1 #include "FGDECalMatchEffSystematics.hxx" 2 #include "CutUtils.hxx" 3 #include "SystematicUtils.hxx" 10 FGDECalMatchEffSystematics::FGDECalMatchEffSystematics(
bool comp):
BinnedParams(
"FGDECalMatchEff",k3D_EFF_ASSYMMETRIC){
13 _computecounters=comp;
20 FGDECalMatchEffSystematics::FGDECalMatchEffSystematics(
bool computecounters,
const std::string& name,
BinnedParams::TypeEnum type):
23 _computecounters = computecounters;
45 std::cout <<
"FGDECalMatchEffSystematics::Apply(): " << SystBox->
nRelevantTrueObjects<< std::endl;
55 if (!truePart || !recoTrack)
continue;
66 if(nfgd_det==0)
continue;
87 eventWeight *= systUtils::ComputeEffLikeWeight(found, toy,
GetIndex(), index, params);
90 std::cout<<
"fgd-ecal found "<< found<<
" eventWeight "<<eventWeight<<std::endl;
137 if (det == SubDetId::kFGD1){
138 IDs[0] = EventBoxTracker::kTracksWithFGD1AndNoTPC;
141 else if (det == SubDetId::kFGD2){
142 IDs[0] = EventBoxTracker::kTracksWithFGD2AndNoTPC;
145 else if (det == SubDetId::kFGD){
146 IDs[0] = EventBoxTracker::kTracksWithFGD1AndNoTPC;
147 IDs[1] = EventBoxTracker::kTracksWithFGD2AndNoTPC;
160 if (det == SubDetId::kFGD1){
164 else if (det == SubDetId::kFGD2){
165 IDs[0] = EventBoxTracker::kTrueParticlesChargedInFGD2ECalHAInBunch;
168 else if (det == SubDetId::kFGD){
170 IDs[1] = EventBoxTracker::kTrueParticlesChargedInFGD2ECalHAInBunch;
Float_t PositionStart[4]
The reconstructed start position of the particle.
Int_t GetIndex() const
Return the index of this systematic.
Int_t GetRelevantTrueObjectGroups(const SelectionBase &sel, Int_t ibranch, Int_t *IDs) const
Get the TrueTrackGroup IDs array for this systematic.
Int_t SelectionEnabledIndex
The enabled index of this selection this ToyBox belongs to.
SystBoxB * GetSystBox(const AnaEventC &event, Int_t isel=0, Int_t ibranch=0) const
Get the SystBox corresponding to a selection, branch and event.
void SetNParameters(int N)
Set the number of systematic parameters associated to this systematic.
static bool GetDetectorUsed(unsigned long BitField, SubDetId::SubDetEnum det)
Method to see if a certain subdetector or subdetector system is used.
bool GetBinValues(Float_t value, Float_t &mean, Float_t &sigma)
Gets the bin values for a 1D source.
bool TrueParticleCrossesFGD(const AnaTrueParticleB *track, SubDetId::SubDetEnum det=SubDetId::kFGD)
Whether a true track crosses a FGD so to be able to deposit charge in at least two layers...
bool UpdateEfficiencyCounter(Int_t index, bool correct)
Update the efficiency variables _ncorrect and _nwrong.
Representation of a true Monte Carlo trajectory/particle.
Weight_h ComputeWeight(const ToyExperiment &, const AnaEventC &, const ToyBoxB &)
Apply the systematic.
Int_t SuccessfulBranch
The branch that is successful for this toy in the selection this ToyBox belongs to.
SubDetEnum
Enumeration of all detector systems and subdetectors.
Representation of a global track.
Int_t nRelevantTrueObjects
Array of Relevant True RecObjects for each systematic.
static SubDetId::SubDetEnum GetSubdetectorEnum(unsigned long BitField)
Get the single subdetector that this track is from.
int GetFGDDetCrossed(const AnaTrueParticleB *track, SubDetId::SubDetEnum det[])
FGD detectors crossed.
bool IsRelevantTrueObject(const AnaEventC &event, const AnaTrueObjectC &track) const
Is this track relevant for this systematic ?
Float_t DirectionStart[3]
The reconstructed start direction of the particle.
AnaRecObjectC ** RelevantTrueObjectsReco
TypeEnum
Enumerator describing the values that _type member can take.
Float_t * GetSLineDir(Float_t *start, Float_t *end)
Direction assuming straight line between given start and end points.
Int_t GetRelevantRecObjectGroups(const SelectionBase &sel, Int_t ibranch, Int_t *IDs) const
Get the TrackGroup IDs array for this systematic.
void InitializeEfficiencyCounter()
Initialize counters.
virtual bool IsRelevantTrueObjectForSystematicInToy(const AnaEventC &, const ToyBoxB &, AnaTrueObjectC *, SystId_h syst_index, Int_t branch=0) const
Is this true track relevant for a given systematic (after selection, called for each toy) ...
AnaParticleB * GetSegmentWithMostNodesInDet(const AnaTrackB &track, SubDetId::SubDetEnum det)
Method to get the subtrack with most nodes in a given detector.
Representation of a reconstructed particle (track or shower).
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.
bool IsRelevantRecObject(const AnaEventC &event, const AnaRecObjectC &track) const
Is this track relevant for this systematic ?
Float_t PositionEnd[4]
The reconstructed end position of the particle.