SpillReducer.cxx
Go to the documentation of this file.
2 
4 
6 
7 namespace ana
8 {
9  //----------------------------------------------------------------------
11  const caf::SRSpillProxy* spillProxy)
12  {
13  if(!spill->ismc) { // only for data
14 
15  spill->isgoodspill = kTightBeamQualityCuts(spillProxy) && kStandardDQCuts(spillProxy);
16 
17  spill->hornI = 0;
18  spill->posx = 0;
19  spill->posy = 0;
20  spill->widthx = 0;
21  spill->widthy = 0;
22  spill->deltaspilltimensec = 0;
23  spill->fracdcm3hits = 0;
24  spill->nmissingdcms = 0;
25  spill->dcmedgematchfrac = 0;
26  spill->nmissingdcmslg = 0;
27  spill->spilltimesec = 0;
28  spill->gpsspilltimesec = 0;
29  spill->gpsspilltimensec = 0;
30  spill->nnoisyapds = 0;
31  spill->nbaddcmslg = 0;
32  }
33  }
34 }
unsigned long int spilltimesec
Spill time in seconds [s].
Definition: SRSpill.h:33
unsigned int nmissingdcmslg
# of DCMS with 63 or more bad FEBs (LiveGeometry, subset of baddcmslg)
Definition: SRSpill.h:68
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
unsigned int nmissingdcms
# of missing DCMs
Definition: SRSpill.h:64
float posy
y position on target
Definition: SRSpill.h:52
float dcmedgematchfrac
How many hits at the DCM edge are matched in the adjacent DCM?
Definition: SRSpill.h:74
float fracdcm3hits
fraction of DCM3 hits in horizontal modules
Definition: SRSpill.h:65
const SpillCut kTightBeamQualityCuts([](const caf::SRSpillProxy *s){if(s->ismc) return true; if(s->trigger==2) return true;if(s->spilltimesec==0 &&s->deltaspilltimensec==0 &&s->widthx==0) return bool(s->isgoodspill);if(std::abs(s->deltaspilltimensec) > 0.5e9) return false;if(s->spillpot< 2e12) return false;if(s->hornI< -202|| s->hornI >-198) return false;if(s->posx< -2.00|| s->posx >+2.00) return false;if(s->posy< -2.00|| s->posy >+2.00) return false;return kBeamWidthCut(s);})
Definition: SpillCuts.h:10
float hornI
Horn current.
Definition: SRSpill.h:42
unsigned int nbaddcmslg
# of DCMS with too many bad channels (LiveGeometry)
Definition: SRSpill.h:69
bool isgoodspill
Was the pot for a spill good? (only applicable to data, default true)
Definition: SRSpill.h:32
const SpillCut kStandardDQCuts([](const caf::SRSpillProxy *spill){if(spill->dcmedgematchfrac==0 &&spill->fracdcm3hits==0 &&spill->nmissingdcmslg==0) return bool(spill->isgoodspill); if(spill->det==caf::kNEARDET && (spill->fracdcm3hits > 0.45|| spill->nmissingdcms > 0)) return false; if(spill->eventincomplete) return false; if(spill->det==caf::kFARDET && spill->nmissingdcmslg > 0) return false; if(spill->det==caf::kFARDET && !spill->ismc && spill->dcmedgematchfrac<=0.2) return false;return true;})
Cut out events with a noisy detector or with parts missing.
Definition: SpillCuts.h:16
unsigned long int gpsspilltimensec
Spill time from GPS [ns].
Definition: SRSpill.h:36
float widthy
Spill width in y dimension.
Definition: SRSpill.h:54
unsigned long int gpsspilltimesec
Spill time from GPS [s].
Definition: SRSpill.h:35
float widthx
Spill width in x dimension.
Definition: SRSpill.h:53
Proxy for caf::SRSpill.
Definition: SRProxy.h:1346
signed long long int deltaspilltimensec
Delta time [ns].
Definition: SRSpill.h:37
unsigned int nnoisyapds
# of noisy APDs
Definition: SRSpill.h:67
void CleanSpillQualityInfo(caf::SRSpill *spill, const caf::SRSpillProxy *spillProxy)
bool ismc
data or MC? True if MC
Definition: SRSpill.h:30
float posx
x position on target
Definition: SRSpill.h:51