1 #include "IgnoreRightECalRuns3and4Correction.hxx" 2 #include "HighlandAnalysisUtils.hxx" 3 #include <VersioningUtils.hxx> 4 #include "Parameters.hxx" 13 std::string base =
"highlandCorrections.IgnoreRightECal.Runs.";
17 std::string curr = GetParamString(base +
"MC.Lower.", pairing);
19 while (ND::params().HasParameter(curr)) {
21 curr = GetParamString(base +
"MC.Upper.", pairing);
23 std::pair<int, int> p(lower, upper);
24 _runs_MC.push_back(p);
26 curr = GetParamString(base +
"MC.Lower.", pairing);
31 curr = GetParamString(base +
"Data.Lower.", pairing);
33 while (ND::params().HasParameter(curr)) {
35 curr = GetParamString(base +
"Data.Upper.", pairing);
37 std::pair<int, int> p(lower, upper);
38 _runs_Data.push_back(p);
40 curr = GetParamString(base +
"Data.Lower.", pairing);
45 std::string IgnoreRightECalRuns3and4Correction::GetParamString(std::string base,
int pairing) {
48 ss << base << pairing;
58 if (!ShouldApplyCorrection(spill)) {
62 for (
unsigned int i = 0; i < spill.
Bunches.size(); i++) {
67 for (Int_t j = 0; j < nECAL; j++) {
70 int nECALSegments = 0;
76 if (ecal->
Detector != SubDetId::kRightTECAL) {
77 ECALSegments[i] = ecal;
88 for (Int_t i=0;i<nECALSegments;i++)
93 unsigned long det = 0;
94 for(UInt_t i = 0; i < SubDetId::kInvalidSubdetector; i++){
97 if (idet == SubDetId::kRightTECAL)
115 bool IgnoreRightECalRuns3and4Correction::ShouldApplyCorrection(
AnaSpillC& spillBB) {
120 if (versionUtils::prod6_corrections)
127 std::vector<std::pair<int, int> >& runs = spill.
GetIsMC() ? _runs_MC : _runs_Data;
129 for (
unsigned int i = 0; i < runs.size(); i++) {
130 if (run >= runs[i].first && run <= runs[i].second) {
int GetParameterI(std::string)
Get parameter. Value is returned as integer.
AnaECALParticleB * ECALSegments[NMAXECALS]
The ECAL segments that contributed to this global track.
int nECALSegments
How many ECAL tracks are associated with this track.
std::vector< AnaBunchC * > Bunches
The reconstructed objects, split into timing bunches.
static void SetDetectorSystemFields(unsigned long &BitField)
Representation of an ECAL segment of a global track.
AnaEventInfoB * EventInfo
Run, sunrun, event, time stamp, etc.
static bool GetDetectorUsed(unsigned long BitField, SubDetId::SubDetEnum det)
Method to see if a certain subdetector or subdetector system is used.
All corrections should be registered with the CorrectionManager.
static void SetDetectorUsed(unsigned long &BitField, SubDetId::SubDetEnum det)
Method to set a certain subdetector or subdetector system to used used.
SubDetEnum
Enumeration of all detector systems and subdetectors.
bool GetIsMC() const
Return whether this spill is from Monte Carlo or not.
Representation of a global track.
void Apply(AnaSpillC &spill)
Apply the variation to all tracks with TPC info.
int GetAllTracksUsingDet(const AnaBunchB &bunch, SubDetId::SubDetEnum det, AnaTrackB *selTracks[])
IgnoreRightECalRuns3and4Correction()
Int_t Run
The ND280 run number.