ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4MonopoleTransportation.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4MonopoleTransportation.hh
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
28 //
29 //
30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32 //
33 // ------------------------------------------------------------
34 // GEANT 4 include file implementation
35 // ------------------------------------------------------------
36 //
37 // Class description:
38 //
39 // G4MonopoleTransportation is a process responsible for the transportation of
40 // magnetic monopoles, i.e. the geometrical propagation encountering the
41 // geometrical sub-volumes of the detectors.
42 // It is also tasked with part of updating the "safety".
43 
44 // =======================================================================
45 // Created: 3 May 2010, J. Apostolakis, B. Bozsogi
46 // =======================================================================
47 
48 #ifndef G4MonopoleTransportation_hh
49 #define G4MonopoleTransportation_hh 1
50 
51 #include "G4VProcess.hh"
52 #include "G4FieldManager.hh"
53 
54 #include "G4Navigator.hh"
56 #include "G4PropagatorInField.hh"
57 #include "G4Track.hh"
58 #include "G4Step.hh"
60 #include "G4MonopoleFieldSetup.hh"
61 
62 class G4SafetyHelper;
63 class G4Monopole;
64 
66 {
67  // Concrete class that does the geometrical transport
68 
69  public: // with description
70 
71  G4MonopoleTransportation(const G4Monopole* p, G4int verbosityLevel= 1);
73 
75  const G4Track& track,
76  G4double previousStepSize,
77  G4double currentMinimumStep,
78  G4double& currentSafety,
79  G4GPILSelection* selection
80  );
81 
83  const G4Track& track,
84  const G4Step& stepData
85  );
86 
88  const G4Track& track,
89  const G4Step& stepData
90  );
91  // Responsible for the relocation.
92 
94  const G4Track& ,
95  G4double previousStepSize,
96  G4ForceCondition* pForceCond
97  );
98  // Forces the PostStepDoIt action to be called,
99  // but does not limit the step.
100 
102  void SetPropagatorInField( G4PropagatorInField* pFieldPropagator);
103  // Access/set the assistant class that Propagate in a Field.
104 
105  inline G4double GetThresholdWarningEnergy() const;
106  inline G4double GetThresholdImportantEnergy() const;
107  inline G4int GetThresholdTrials() const;
108 
109  inline void SetThresholdWarningEnergy( G4double newEnWarn );
110  inline void SetThresholdImportantEnergy( G4double newEnImp );
111  inline void SetThresholdTrials(G4int newMaxTrials );
112 
113  // Get/Set parameters for killing loopers:
114  // Above 'important' energy a 'looping' particle in field will
115  // *NOT* be abandoned, except after fThresholdTrials attempts.
116  // Below Warning energy, no verbosity for looping particles is issued
117 
118  inline G4double GetMaxEnergyKilled() const;
119  inline G4double GetSumEnergyKilled() const;
120  inline void ResetKilledStatistics( G4int report = 1);
121  // Statistics for tracks killed (currently due to looping in field)
122 
123  inline void EnableShortStepOptimisation(G4bool optimise=true);
124  // Whether short steps < safety will avoid to call Navigator (if field=0)
125 
126  public: // without description
127 
129  const G4Track& ,
131  ) { return -1.0; };
132  // No operation in AtRestDoIt.
133 
135  const G4Track& ,
136  const G4Step&
137  ) {return 0;};
138  // No operation in AtRestDoIt.
139 
141 
142  virtual void StartTracking(G4Track* aTrack);
143  // Reset state for new (potentially resumed) track
144 
145  protected:
146 
148  // Checks whether a field exists for the "global" field manager.
149 
150  private:
151 
153 
155 
158  // The Propagators used to transport the particle
159 
165  // G4bool fEnergyChanged;
168  // The particle's state after this Step, Store for DoIt
169 
171 
173 
175  // Flag to determine whether a boundary was reached.
176 
179  // Remember last safety origin & value.
180 
182  // New ParticleChange
183 
185 
186  // Thresholds for looping particles:
187  //
188  G4double fThreshold_Warning_Energy; // Warn above this energy
189  G4double fThreshold_Important_Energy; // Hesitate above this
190  G4int fThresholdTrials; // for this no of trials
191  // Above 'important' energy a 'looping' particle in field will
192  // *NOT* be abandoned, except after fThresholdTrials attempts.
193  // G4double fUnimportant_Energy;
194  // Below this energy, no verbosity for looping particles is issued
195 
196  // Counter for steps in which particle reports 'looping',
197  // if it is above 'Important' Energy
199  // Statistics for tracks abandoned
202 
203  // Whether to avoid calling G4Navigator for short step ( < safety)
204  // If using it, the safety estimate for endpoint will likely be smaller.
206 
207  G4SafetyHelper* fpSafetyHelper; // To pass it the safety value obtained
209 
210 };
211 
212 #include "G4MonopoleTransportation.icc"
213 
214 #endif