1 #include "ProtonInteractionSystematic.hxx" 8 const Float_t proton_si::ProtonSIPropagator::_thEnergy = 20 * units::GeV;
21 Double_t proton_si::ProtonSIPropagator::GetProtonInelasticCrossSection(
const Double_t& momentum,
const Double_t& Z,
const Double_t& A)
const{
26 if (kineticEnergy <= 0.) {
return 0.; }
28 if (A < Z) {
return 0.; }
32 if (kineticEnergy > _thEnergy) { kineticEnergy = _thEnergy; }
34 Double_t A13 = std::pow(A,-0.3333333333);
35 Double_t nOfNeutrons = A - Z;
36 kineticEnergy /=units::GeV;
37 Double_t alog10E = std::log10(kineticEnergy);
39 const Double_t nuleonRadius = 1.36E-15;
40 const Double_t fac = M_PI*nuleonRadius*nuleonRadius;
42 Double_t b0 = 2.247-0.915*(1 - A13);
43 Double_t fac1 = b0*(1 - A13);
45 if(nOfNeutrons > 1) { fac2=std::log(((Double_t)(nOfNeutrons))); }
46 Double_t crossSection = 1.0E31*fac*fac2*(1. + 1./A13 - fac1);
49 crossSection *= (1 - 0.15*std::exp(-kineticEnergy))/(1.0 - 0.0007*A);
52 Double_t ff1= 0.70-0.002*A;
53 Double_t ff2= 1.00+1/A;
54 Double_t ff3= 0.8+18/A-0.002*A;
56 Double_t ff4= 1.0 - (1.0/(1+std::exp(-8*ff1*(alog10E + 1.37*ff2))));
58 crossSection *= (1 + ff3*ff4);
62 ff1=1. - 1./A - 0.001*A;
63 ff2=1.17 - 2.7/A - 0.0014*A;
65 ff4=-8.*ff1*(alog10E + 2.0*ff2);
67 crossSection *= units::millibarn/(1. + std::exp(ff4));
77 if (type != si_syst::kInelastic)
return 0.;
81 TGeoVolume *volume = node->GetVolume();
82 TGeoMaterial *material = volume->GetMaterial();
83 TGeoMixture *mixture = (TGeoMixture*)material;
85 return GetProtonInelasticCrossSection(mom, mixture->GetZ(), mixture->GetA());
93 if (
_det == SubDetId::kFGD1){
96 Bool_t xOK = -1150.0 < pos.X() && pos.X() < 1150.0;
97 Bool_t yOK = -1170.0 < pos.Y() && pos.Y() < 1230.0;
98 Bool_t zOK = 98.0 < pos.Z() && pos.Z() < 576.0;
100 return xOK && yOK && zOK;
102 else if (
_det == SubDetId::kFGD2){
105 Bool_t xOK = -1150.0 < pos.X() && pos.X() < 1150.0;
106 Bool_t yOK = -1170.0 < pos.Y() && pos.Y() < 1230.0;
107 Bool_t zOK = 1347.0 < pos.Z() && pos.Z() < 1934.0;
108 return xOK && yOK && zOK;
virtual Double_t GetCrossSection(const si_syst::InteractionType &, const Float_t &, const Int_t &, TGeoNode *) const
virtual Bool_t InVOI(const TVector3 &) const
Whether a track is in VOI given a position and detector.
Float_t ComputeKineticEnergy(Float_t mom, Float_t mass)
Compute kinetic energy given momentum and mass.
SubDetId::SubDetEnum _det
Keep the relevant sub-detector here for the moment.