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 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /processes/management/include/G4VEntanglementClipBoard.hh (Version 11.3.0) and /processes/management/include/G4VEntanglementClipBoard.hh (Version 5.2.p2)


  1 //                                                  1 
  2 // *******************************************    
  3 // * License and Disclaimer                       
  4 // *                                              
  5 // * The  Geant4 software  is  copyright of th    
  6 // * the Geant4 Collaboration.  It is provided    
  7 // * conditions of the Geant4 Software License    
  8 // * LICENSE and available at  http://cern.ch/    
  9 // * include a list of copyright holders.         
 10 // *                                              
 11 // * Neither the authors of this software syst    
 12 // * institutes,nor the agencies providing fin    
 13 // * work  make  any representation or  warran    
 14 // * regarding  this  software system or assum    
 15 // * use.  Please see the license in the file     
 16 // * for the full disclaimer and the limitatio    
 17 // *                                              
 18 // * This  code  implementation is the result     
 19 // * technical work of the GEANT4 collaboratio    
 20 // * By using,  copying,  modifying or  distri    
 21 // * any work based  on the software)  you  ag    
 22 // * use  in  resulting  scientific  publicati    
 23 // * acceptance of all terms of the Geant4 Sof    
 24 // *******************************************    
 25 //                                                
 26 //                                                
 27 //                                                
 28 // -------------------------------------------    
 29 // GEANT4 class header file                       
 30 //                                                
 31 // Class Description:                             
 32 // Base class for a clipboard for communicatin    
 33 //                                                
 34 // ------------------ G4VEntanglementClipBoard    
 35 //                                                
 36 // Author: J.Allison, May 2017                    
 37 //                                                
 38 // -------------------------------------------    
 39                                                   
 40 // Usage:                                         
 41 //                                                
 42 // In the method that generates entangled seco    
 43 // (See, for example, G4eplusAnnihilation::AtR    
 44 // Make a shared pointer to a clip board and a    
 45 // G4EntanglementAuxInfo. That way the clip bo    
 46 // (G4XXXEntanglementClipBoard is your class i    
 47 // (See, for example, G4eplusAnnihilationEntan    
 48 //  auto clipBoard = std::make_shared<G4XXXEnt    
 49 // For each secondary                             
 50 //  G4Track* track = new G4Track(...              
 51 //  ...                                           
 52 //  clipBoard->SetTrackA(track);                  
 53 //  track->SetAuxiliaryTrackInformation(0,new     
 54 // Then repeat for track B                        
 55 //                                                
 56 // In the method that does the quantum "measur    
 57 // (See, for example, G4LivermorePolarizedComp    
 58 //  const auto* auxInfo = fParticleChange->Get    
 59 //  if (auxInfo) {                                
 60 //    const auto* entanglementAuxInfo = dynami    
 61 //    if (entanglementAuxInfo) {                  
 62 //      auto* clipBoard = dynamic_cast<G4XXXEn    
 63 //      (entanglementAuxInfo->GetEntanglementC    
 64 //      if (clipBoard) {                          
 65 //        if (clipBoard->IsTrack1Measurement()    
 66 //          if (clipBoard->GetTrackB() == fPar    
 67 //            clipBoard->ResetTrack1Measuremen    
 68 //            // Store information                
 69 //            ...                                 
 70 //          }                                     
 71 //        } else if (clipBoard->IsTrack2Measur    
 72 //          if (clipBoard->GetTrackA() == fPar    
 73 //            clipBoard->ResetTrack2Measuremen    
 74 //            // Retrieve information and appl    
 75 //            ...                                 
 76 //          }                                     
 77 //        }                                       
 78 //      }                                         
 79 //    }                                           
 80 //  }                                             
 81                                                   
 82 #ifndef G4VEntanglementClipBoard_hh               
 83 #define G4VEntanglementClipBoard_hh               
 84                                                   
 85 #include "globals.hh"                             
 86                                                   
 87 class G4ParticleDefinition;                       
 88 class G4Track;                                    
 89                                                   
 90 class G4VEntanglementClipBoard {                  
 91                                                   
 92 public:                                           
 93                                                   
 94   G4VEntanglementClipBoard()                      
 95   : fpParentParticleDefinition(0)                 
 96   , fTrackA(0)                                    
 97   , fTrackB(0)                                    
 98   , fTrack1Measurement(true)                      
 99   , fTrack2Measurement(true)                      
100   {}                                              
101   virtual ~G4VEntanglementClipBoard() {}          
102                                                   
103   void SetParentParticleDefinition(G4ParticleD    
104   {fpParentParticleDefinition = p;}               
105   G4ParticleDefinition* GetParentParticleDefin    
106   {return fpParentParticleDefinition;}            
107                                                   
108   void SetTrackA(const G4Track* track) {fTrack    
109   void SetTrackB(const G4Track* track) {fTrack    
110   const G4Track* GetTrackA() const {return fTr    
111   const G4Track* GetTrackB() const {return fTr    
112                                                   
113   // The entanglement-sensitive process is res    
114   void ResetTrack1Measurement() {fTrack1Measur    
115   void ResetTrack2Measurement() {fTrack2Measur    
116   G4bool IsTrack1Measurement() const {return f    
117   G4bool IsTrack2Measurement() const {return f    
118                                                   
119 private:                                          
120                                                   
121   G4ParticleDefinition* fpParentParticleDefini    
122                                                   
123   // Use pointer values to identify tracks. We    
124   // tracks will be processed so let us call t    
125   const G4Track* fTrackA;                         
126   const G4Track* fTrackB;                         
127                                                   
128   // False until first measurement...             
129   G4bool fTrack1Measurement;  // ...of the fir    
130   G4bool fTrack2Measurement;  // ...of the sec    
131                                                   
132 };                                                
133                                                   
134 #endif                                            
135