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5 ] [ 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/parameterisation/include/G4FastSimulationManager.hh (Version 11.3.0) and /processes/parameterisation/include/G4FastSimulationManager.hh (Version 11.0.p3,)


** Warning: Cannot open xref database.

  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 //--------------------------------------------    
 30 //                                                
 31 //  G4FastSimulationManager.hh                    
 32 //                                                
 33 //  Description:                                  
 34 //    Manages the Fast Simulation models attac    
 35 //                                                
 36 //  History:                                      
 37 //    Oct 97: Verderi && MoraDeFreitas - First    
 38 //                                                
 39 //--------------------------------------------    
 40                                                   
 41 #ifndef G4FastSimulationManager_h                 
 42 #define G4FastSimulationManager_h 1               
 43                                                   
 44 #include "G4FastSimulationVector.hh"              
 45 #include "G4FastStep.hh"                          
 46 #include "G4FastTrack.hh"                         
 47 #include "G4LogicalVolume.hh"                     
 48 #include "G4ParticleDefinition.hh"                
 49 #include "G4ParticleTable.hh"                     
 50 #include "G4Region.hh"                            
 51 #include "G4RotationMatrix.hh"                    
 52 #include "G4ThreeVector.hh"                       
 53 #include "G4Transform3D.hh"                       
 54 #include "G4VFastSimulationModel.hh"              
 55 #include "G4VParticleChange.hh"                   
 56 #include "G4VPhysicalVolume.hh"                   
 57 #include "G4ios.hh"                               
 58 #include "globals.hh"                             
 59                                                   
 60 //-------------------------------------------     
 61 //                                                
 62 //        G4FastSimulationManager class           
 63 //                                                
 64 //-------------------------------------------     
 65                                                   
 66 // Class Description:                             
 67 //  The G4VFastSimulationModel objects are att    
 68 // through a G4FastSimulationManager.             
 69 //   This object will manage the list of model    
 70 // at tracking time.                              
 71 //                                                
 72                                                   
 73 class G4FastSimulationManager                     
 74 {                                                 
 75   public:  // with description                    
 76     //------------------------                    
 77     // Constructor/Destructor                     
 78     //------------------------                    
 79     // Only one Constructor. By default the en    
 80     // be placed n-Times.                         
 81     // If the user is sure that it is placed j    
 82     // the IsUnique flag should be set TRUE to    
 83     // G4AffineTransform re-calculations each     
 84     // the envelope.                              
 85                                                   
 86     G4FastSimulationManager(G4Envelope* anEnve    
 87     // This is the only constructor. In this c    
 88     // the envelope by giving the G4Region (ty    
 89     // pointer. The G4FastSimulationManager ob    
 90     // this envelope and will notify this G4Re    
 91     // If you know that this region is used fo    
 92     // you can turn the IsUnique boolean to "t    
 93     //                                            
 94     // Note that if you choose to use the G4VF    
 95     // G4Region*, G4bool) constructor for you     
 96     // will be constructed using the given G4R    
 97     // model constructor.                         
 98     //                                            
 99                                                   
100     // Destructor                                 
101     ~G4FastSimulationManager();                   
102                                                   
103     // Add a model to the Model List.             
104     void AddFastSimulationModel(G4VFastSimulat    
105                                                   
106     // Remove a model from the Model List.        
107     void RemoveFastSimulationModel(G4VFastSimu    
108                                                   
109     // Activate a model in the Model List.        
110     G4bool ActivateFastSimulationModel(const G    
111                                                   
112     // Inactivate a model in the Model List.      
113     G4bool InActivateFastSimulationModel(const    
114                                                   
115     // Methods for print/control commands         
116     void ListTitle() const;                       
117     void ListModels() const;                      
118     void ListModels(const G4ParticleDefinition    
119     void ListModels(const G4String& aName) con    
120     const G4Envelope* GetEnvelope() const;        
121                                                   
122     G4VFastSimulationModel* GetFastSimulationM    
123                                                   
124                                                   
125                                                   
126     const std::vector<G4VFastSimulationModel*>    
127     {                                             
128       return ModelList;                           
129     }                                             
130                                                   
131     void FlushModels();                           
132                                                   
133     //----------------------------------------    
134     // Interface methods for the                  
135     // G4FastSimulationManagerProcess process.    
136     //----------------------------------------    
137     // Trigger                                    
138     G4bool PostStepGetFastSimulationManagerTri    
139     // DoIt                                       
140     G4VParticleChange* InvokePostStepDoIt();      
141                                                   
142     // AtRest methods:                            
143     G4bool AtRestGetFastSimulationManagerTrigg    
144     G4VParticleChange* InvokeAtRestDoIt();        
145                                                   
146     // For management                             
147     G4bool operator==(const G4FastSimulationMa    
148                                                   
149   private:                                        
150     // Private members :                          
151     G4FastTrack fFastTrack;                       
152     G4FastStep fFastStep;                         
153     G4VFastSimulationModel* fTriggedFastSimula    
154     G4FastSimulationVector<G4VFastSimulationMo    
155     G4FastSimulationVector<G4VFastSimulationMo    
156                                                   
157     G4ParticleDefinition* fLastCrossedParticle    
158     G4FastSimulationVector<G4VFastSimulationMo    
159                                                   
160     // -- *** depracating, to be dropped @ nex    
161     G4FastSimulationVector<G4Transform3D> Ghos    
162 };                                                
163                                                   
164 inline void G4FastSimulationManager::AddFastSi    
165 {                                                 
166   ModelList.push_back(fsm);                       
167   // forces the fApplicableModelList to be reb    
168   fLastCrossedParticle = nullptr;                 
169 }                                                 
170                                                   
171 inline void G4FastSimulationManager::RemoveFas    
172 {                                                 
173   if (ModelList.remove(fsm) == nullptr) fInact    
174   // forces the fApplicableModelList to be reb    
175   fLastCrossedParticle = nullptr;                 
176 }                                                 
177                                                   
178 inline G4bool G4FastSimulationManager::operato    
179 {                                                 
180   return this == &fsm;                            
181 }                                                 
182                                                   
183 inline const G4Envelope* G4FastSimulationManag    
184 {                                                 
185   return fFastTrack.GetEnvelope();                
186 }                                                 
187                                                   
188 #endif                                            
189