LBNEPerfectFocusProcess.hh
Go to the documentation of this file.
1 //
2 // Implement Perfect focusing as a G4VProcess.
3 //
4 #ifndef LBNEPerfectFocusProcess_H
5 #define LBNEPerfectFocusProcess_H 1
6 #include "globals.hh"
7 #include "G4VDiscreteProcess.hh"
8 #include "G4ParticleDefinition.hh"
9 #include "G4Step.hh"
10 #include "G4Track.hh"
11 //
12 // Purely mnemonics at this point, as we will not change the number of interaction length
13 // Nor the step legnth..
14 //
15 class LBNEPerfectFocusParticleChange: public G4VParticleChange {
16 public:
17 
20 
21 };
22 
23 //
24 // The real thing: instant and perfect focusing.
25 //
26 class LBNEPerfectFocusProcess: public G4VDiscreteProcess {
27 public:
28 
29  LBNEPerfectFocusProcess(const G4String &aName="pFocus", G4ProcessType aType = fGeneral );
30  virtual ~LBNEPerfectFocusProcess();
31 
32 
33  LBNEPerfectFocusParticleChange* PostStepDoIt (const G4Track &track, const G4Step &stepData);
34 
35  G4double PostStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize,
36  G4ForceCondition *condition);
37 
38  bool IsApplicable(const G4ParticleDefinition&);
39  void StartTracking(G4Track *aTrack);
40  G4double GetMeanFreePath(const G4Track&, G4double, G4ForceCondition*);
41 
42 private:
43 
44  // hide assignment operator as private
47 
48 //
49 // No data member, as there are no internal parameters to this process..
50 // Except one, the Z at which the perfect focusing occurs..
51 // Late December 2014, implement the perfect focusing process exiting the target region,
52 // triggered by fZCoordForPerfectFocusing< 0.
53 //
56  mutable double fZAtTrigger; // The z position where we change the mean free path to trigger the focusing.
57  mutable double fZStart; // The z Startup position of the track.
58  mutable double fRAtTriggerSq; // The r position where we change the mean free path to trigger the focusing.
59  mutable double fRStartSq; // The z Startup position of the track.
60  mutable LBNEPerfectFocusParticleChange* fParticleChange; // We got to manage the memory oursefl here..
61 //
62  double GetFreePath(const G4Track &track, G4double previousStepSize); // to avoid cloning code in Phys. Inter Length and mean Free path.
63 };
64 
65 #endif
constexpr auto const & right(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Definition: AssnsIter.h:104
LBNEPerfectFocusParticleChange * fParticleChange