HighLAND
ProtonInteractionSystematic.hxx
1 #ifndef ProtonInteractionSystematic_h
2 #define ProtonInteractionSystematic_h
3 
4 #include "SecondaryInteractionSystematic.hxx"
5 #include "Parameters.hxx"
6 
7 namespace proton_si{
8 
10 
11  public:
13  // For the moment read the uncertainty from the param file
14  _uncertainty = (Float_t)ND::params().GetParameterD("psycheND280Utils.ProtonSI.XSec.Uncertainty");
15  }
16 
17 
18  virtual Double_t GetCrossSection(const si_syst::InteractionType&, const Float_t&, const Int_t&, TGeoNode*) const;
19 
20  virtual Double_t GetCrossSectionError(const si_syst::InteractionType& type, const Float_t&, const Int_t&, TGeoNode*) const{
21  if (type != si_syst::kInelastic) return 0.;
22  return _uncertainty;
23  }
24 
25  /// Whether a track is in VOI given a position and detector
26  virtual Bool_t InVOI(const TVector3&) const;
27 
28  protected:
29 
30  void SetParameters(){
31 
32  // Read from the param files
33  _lengthStepSize = (Float_t)ND::params().GetParameterD("psycheND280Utils.SI.StepSize");
34  _momStepSize = (Float_t)ND::params().GetParameterD("psycheND280Utils.SI.StepMom");
35 
36  // Set interaction types here
37  AddInteractionType(si_syst::kInelastic);
38 
39  // Set relevant PDGs
40  AddParticlePDG(ParticleId::kProtonPDG);
41 
42  }
43 
44  private:
45 
46  Double_t GetProtonInelasticCrossSection(const Double_t& momentum, const Double_t& Z, const Double_t& A) const;
47 
48  Float_t _uncertainty;
49 
50  static const Float_t _thEnergy;
51  };
52 
54 
55  public:
56 
57  ///ctor
59  _propagator = new proton_si::ProtonSIPropagator;
60  _propagator->Initialize();
61  }
62 
63  ///dtor
64  virtual ~ProtonSIManager(){}
65 
66  };
67 
68 }
69 
70 #endif
Double_t _lengthStepSize
The step size in terms of length.
virtual Double_t GetCrossSection(const si_syst::InteractionType &, const Float_t &, const Int_t &, TGeoNode *) const
Double_t _momStepSize
The step size in terms of monetum.
void AddInteractionType(si_syst::InteractionType type)
Add an interaction type.
void AddParticlePDG(ParticleId::PdgEnum pdg)
Add particle PDG.
virtual Double_t GetCrossSectionError(const si_syst::InteractionType &type, const Float_t &, const Int_t &, TGeoNode *) const
double GetParameterD(std::string)
Get parameter. Value is returned as double.
Definition: Parameters.cxx:229
virtual Bool_t InVOI(const TVector3 &) const
Whether a track is in VOI given a position and detector.