1 #include "MomRangeResolSystematics.hxx" 2 #include "ND280AnalysisUtils.hxx" 3 #include "EventBoxTracker.hxx" 4 #include "VersioningUtils.hxx" 24 std::cout <<
"MomRangeResolSystematics::ApplyVariation(): " << box->
nRelevantRecObjects << std::endl;
37 std::cout << itrk << std::endl;
39 std::cout<<
"\n"<<std::endl;
49 std::cout <<
"track true momentum p0_true -- " << p0_true << std::endl;
50 std::cout <<
"track range momentum muon p0_range -- " << p0_range << std::endl;
62 if(smrd_det!=SubDetId::kInvalid)
63 bin_outerdet = smrd_det;
64 else if(tecal_det!=SubDetId::kInvalid)
65 bin_outerdet = tecal_det;
68 std::cout <<
" bin values: bin_fgddet "<< bin_fgddet <<
" bin_outerdet " << bin_outerdet <<
" costheta " << costheta <<
"\n";
75 if (!
GetBinSigmaValue(bin_fgddet, bin_outerdet, costheta, sigma, index))
continue;
78 std::cout <<
" bin values: sigma " << sigma <<
" index " << index << std::endl;
85 std::cout <<
"muon candidate p_range after tweak = "<< prangev << std::endl;
138 if (det == SubDetId::kFGD1 || det == SubDetId::kFGD){
139 IDs[ngroups++] = EventBoxTracker::kTracksWithFGD1AndNoTPC;
141 if (det == SubDetId::kFGD2 || det == SubDetId::kFGD){
142 IDs[ngroups++] = EventBoxTracker::kTracksWithFGD2AndNoTPC;
154 det = SubDetId::kFGD1;
156 det = SubDetId::kFGD2;
169 det = SubDetId::kTopTECAL;
171 det = SubDetId::kLeftTECAL;
173 det = SubDetId::kRightTECAL;
175 det = SubDetId::kBottomTECAL;
187 det = SubDetId::kTopSMRD;
189 det = SubDetId::kLeftSMRD;
191 det = SubDetId::kRightSMRD;
193 det = SubDetId::kBottomSMRD;
Int_t _index
The index of this systematic (needed by SystematicsManager);.
const AnaTrackB * GetOriginalTrack() const
Return a casted version of the original AnaParticleB associated.
Float_t * Variations
the vector of Variations, one for each of the systematic parameters
int nECALSegments
How many ECAL tracks are associated with this track.
virtual bool IsRelevantRecObject(const AnaEventC &, const AnaRecObjectC &) const
Check whether a RecObject is relevant for this systematic or not.
SystBoxB * GetSystBox(const AnaEventC &event, Int_t isel=0, Int_t ibranch=0) const
Get the SystBox corresponding to a selection, branch and event.
virtual void Print() const
Dump the object to screen.
void SetNParameters(int N)
Set the number of systematic parameters associated to this systematic.
SubDetId::SubDetEnum GetSMRDDet(unsigned long Detector)
Get SMRD detector assuming only one can be present.
AnaTrueObjectC * TrueObject
The link to the true oject that most likely generated this reconstructed object.
static bool GetDetectorUsed(unsigned long BitField, SubDetId::SubDetEnum det)
Method to see if a certain subdetector or subdetector system is used.
Float_t Momentum
The initial momentum of the true particle.
SubDetId::SubDetEnum GetTECalDet(unsigned long Detector)
Get TECal detector assuming only one can be present.
Float_t RangeMomentumMuon
Momentum by range calculated with muon hypothesis.
virtual void Apply(const ToyExperiment &toy, AnaEventC &event)
Apply the systematic.
virtual bool UndoSystematic(AnaEventC &event)
Undo the systematic variations done by ApplyVariation. This is faster tha reseting the full Spill...
int nSMRDSegments
How many SMRD tracks are associated with this track.
SubDetEnum
Enumeration of all detector systems and subdetectors.
Representation of a global track.
ToyVariations * GetToyVariations(UInt_t index) const
returns the variations for a given systematic (index)
Float_t DirectionStart[3]
The reconstructed start direction of the particle.
UInt_t GetNBranches() const
Return the number of branches.
Int_t nRelevantRecObjects
----—— Relevant rec objects and true objects for each systematic ------------—— ...
SubDetId::SubDetEnum GetFGDDet(unsigned long Detector)
Get FGD detector assuming only one can be present.
AnaTrueParticleB * GetTrueParticle() const
Return a casted version of the AnaTrueObject associated.
bool GetBinSigmaValue(Float_t value, Float_t &sigma)
Get only sigma.
Int_t GetRelevantRecObjectGroups(const SelectionBase &sel, Int_t *IDs) const
Get the TrackGroup IDs array for this systematic.
MomRangeResolSystematics()
Instantiate the momentum resolution systematic.
Int_t GetNBins()
Get the number of bins.
SubDetId_h GetDetectorFV(Int_t ibranch=0) const
Get the detector in which the Fiducial Volume is defined.