TH2*histBefore1stHitRadLen=newTH2F("RadLen_Before1stHit","Radiation length [%] before 1st hit",nPointsPhi,phiLow,phiHigh,nPointsEta,etaLow,etaHigh);
TH2*histBefore2ndHitRadLen=newTH2F("RadLen_Before2ndHit","Radiation length [%] before 2nd hit",nPointsPhi,phiLow,phiHigh,nPointsEta,etaLow,etaHigh);
TH2*histBeforeLastHitRadLen=newTH2F("RadLen_BeforeLastHit","Radiation length [%] before last hit",nPointsPhi,phiLow,phiHigh,nPointsEta,etaLow,etaHigh);
TH2*histHitsPerTrack=newTH2F("HitsPerTrack","Number of hits per track",nPointsPhi,phiLow,phiHigh,nPointsEta,etaLow,etaHigh);
TH2*histRadius1stHit=newTH2F("Radius_1stHit","Radius of the 1st hit [mm]",nPointsPhi,phiLow,phiHigh,nPointsEta,etaLow,etaHigh);
TH2*histRadius2ndHit=newTH2F("Radius_2ndHit","Radius of the 2nd hit [mm]",nPointsPhi,phiLow,phiHigh,nPointsEta,etaLow,etaHigh);
TH2*histRadiusLastHit=newTH2F("Radius_LastHit","Radius of the last hit [mm]",nPointsPhi,phiLow,phiHigh,nPointsEta,etaLow,etaHigh);
TH2*histZ1stHit=newTH2F("Z_1stHit","Z of the 1st hit [mm]",nPointsPhi,phiLow,phiHigh,nPointsEta,etaLow,etaHigh);
TH2*histZ2ndHit=newTH2F("Z_2ndHit","Z of the 2nd hit [mm]",nPointsPhi,phiLow,phiHigh,nPointsEta,etaLow,etaHigh);
TH2*histZLastHit=newTH2F("Z_LastHit","Z of the last hit [mm]",nPointsPhi,phiLow,phiHigh,nPointsEta,etaLow,etaHigh);
histRadLen->SetMaximum(50.0);
histRadLen->SetMinimum(0.0);
histBefore1stHitRadLen->SetMaximum(20.0);
histBefore1stHitRadLen->SetMinimum(0.0);
histBefore2ndHitRadLen->SetMaximum(20.0);
histBefore2ndHitRadLen->SetMinimum(0.0);
histBeforeLastHitRadLen->SetMaximum(20.0);
histBeforeLastHitRadLen->SetMinimum(0.0);
histHitsPerTrack->SetMaximum(20.0);
histHitsPerTrack->SetMinimum(0.0);
std::map<std::string,TH2*>matHist_Total;
std::map<std::string,TH2*>matHist_1stHit;
std::map<std::string,TH2*>matHist_2ndHit;
std::map<std::string,TH2*>matHist_LastHit;
ROOT::Math::XYZPointip{0.0,0.0,meanIP};
constdoubleipSampleWeight{1.0/nIPSamples};
doubleeta{0.};
//double theta_deg{0.};
doubletheta_rad{0.};
doublecosTheta{0.};
doublesinTheta{0.};
doublephi_deg{0.};
doublephi_rad{0.};
doublecosPhi{0.};
doublesinPhi{0.};
// Store the different materials encountered along the path: