1 #include "TPCPIDVariation.hxx" 11 std::cout <<
" TPCPIDVariation::ApplyVariation(): start " << std::endl;
30 std::cout <<
" TPCPIDVariation::ApplyVariation(): tpcSegment " << std::endl;
38 if (!original)
continue;
39 if (original->
dEdxMeas == -99999)
continue;
41 Float_t mean_var, sigma_var;
43 if (!
GetVariation(*tpcTrack, mean_var, sigma_var, *track, exp))
continue;
46 std::cout <<
" TPCPIDVariation::ApplyVariation(): variation params -- mean var " << mean_var
47 <<
" sigma_var " << sigma_var << std::endl;
55 if (!
GetPIDParams(*tpcTrack, dEdxExp, dEdxSigma, *track))
continue;
58 std::cout <<
" TPCPIDVariation::ApplyVariation(): dEdX params -- dEdxExp " << dEdxExp
59 <<
" dEdxSigma " << dEdxSigma <<
" dEdxMeas_0 " << tpcTrack->
dEdxMeas <<std::endl;
63 Float_t dEdXMeasNew = dEdxExp + (tpcTrack->
dEdxMeas - dEdxExp) * sigma_var;
64 if (dEdXMeasNew < 0)
continue;
68 std::cout <<
" TPCPIDVariation::ApplyVariation(): dEdxMeas_1 (sigma) " << tpcTrack->
dEdxMeas <<std::endl;
72 dEdXMeasNew = tpcTrack->
dEdxMeas + (mean_var) * dEdxSigma;
73 if (dEdXMeasNew < 0)
continue;
78 std::cout <<
" TPCPIDVariation::ApplyVariation(): dEdxMeas_2 (mean) " << tpcTrack->
dEdxMeas <<std::endl;
83 std::cout <<
" TPCPIDVariation::ApplyVariation(): end \n " << std::endl;
90 Float_t& dEdxExp, Float_t& dEdxSigma,
125 if (dEdxSigma == -99999 || dEdxExp ==-99999)
return false;
126 if (dEdxSigma == -0xABCDEF || dEdxExp ==-0xABCDEF)
return false;
Float_t dEdxexpMuon
Expected dE/dx for a muon, based on the reconstructed momentum.
Float_t dEdxexpProton
Expected dE/dx for a proton, based on the reconstructed momentum.
virtual void ApplyVariation(AnaTrackB *track, const ToyExperiment &exp)
Apply variation for a track, the most general case given a certain ToyExperiment. ...
AnaTPCParticleB * TPCSegments[NMAXTPCS]
The TPC segments that contributed to this global track.
Float_t dEdxSigmaProton
Expected error on the dE/dx measurement, for the proton hypothesis.
AnaTrueObjectC * TrueObject
The link to the true oject that most likely generated this reconstructed object.
Float_t dEdxexpPion
Expected dE/dx for a pion, based on the reconstructed momentum.
Float_t dEdxexpEle
Expected dE/dx for an electron, based on the reconstructed momentum.
int nTPCSegments
How many TPC tracks are associated with this track.
const AnaParticleB * Original
Float_t dEdxSigmaEle
Expected error on the dE/dx measurement, for the electron hypothesis.
Int_t PDG
The PDG code of this particle.
virtual void Print() const
Dump the object to screen.
Float_t dEdxMeas
dE/dx as measured by the TPC.
Representation of a global track.
virtual bool GetVariation(const AnaTPCParticleB &tpcTrack, Float_t &mean_var, Float_t &sigma_var, const AnaTrackB &track, const ToyExperiment &exp)=0
Representation of a TPC segment of a global track.
Float_t dEdxSigmaMuon
Expected error on the dE/dx measurement, for the muon hypothesis.
Float_t dEdxSigmaPion
Expected error on the dE/dx measurement, for the pion hypothesis.
AnaTrueParticleB * GetTrueParticle() const
Return a casted version of the AnaTrueObject associated.
virtual bool GetPIDParams(const AnaTPCParticleB &tpcTrack, Float_t &dEdxExp, Float_t &dEdxSigma, const AnaTrackB &track)