1#ifndef SUMMINGCORRECTIONSHELPER_HH
2#define SUMMINGCORRECTIONSHELPER_HH
25 }
catch(std::exception&) {}
41 for(
int i = 0;; ++i) {
47 }
catch(std::out_of_range& e) {
61 for(const auto& iter : fEnergyBackground) {
62 tmpBg += iter.second - iter.first;
65 fEnergyRatio = (fEnergyGateHigh - fEnergyGateLow) / tmpBg;
68 Prefix(
"SummingCorrectionsHelper");
72 ROOT::RDF::RResultPtr<std::map<std::string, TList>>
Book(ROOT::RDataFrame* d)
override
77 void CreateHistograms(
unsigned int slot)
override;
81 void EndOfSort(std::shared_ptr<std::map<std::string, TList>>& list)
override {}
87 int fEnergyBins1D{10000};
88 int fEnergyBins2D{2000};
89 double fLowEnergy{0.};
90 double fHighEnergy{2000.};
93 int fKValueGriffin{379};
94 bool fPileUpRejection{
true};
95 double fMinimumGriffinEnergy{0.};
99 double fPromptLow{-250.};
100 double fPromptHigh{250.};
104 double fCoincidentLow{-250.};
105 double fCoincidentHigh{250.};
106 double fTimeRandomLow{500.};
107 double fTimeRandomHigh{1500.};
108 double fTimeRandomRatio{0.};
110 double fEnergyGateLow{0.};
111 double fEnergyGateHigh{0.};
113 double fEnergyRatio{0.};
117 void FillBranchingRatioHistograms(
unsigned int slot,
TGriffin& grif,
TGriffinBgo& grifBgo);
142 return std::any_of(fEnergyBackground.begin(), fEnergyBackground.end(), [h1](std::pair<double, double> iter) { return iter.first < h1->GetEnergy() && h1->GetEnergy() < iter.second; });
154 return ((fPileUpRejection && hit->
GetKValue() != fKValueGriffin) || hit->
GetEnergy() < fMinimumGriffinEnergy);
void DestroyHelper(TGRSIHelper *helper)
SummingCorrectionsHelper * CreateHelper(TList *list)
bool Background(TGriffinHit *h1) const
std::vector< std::pair< double, double > > fEnergyBackground
bool Prompt(TGriffinHit *h1, TGriffinHit *h2) const
bool Gate(TGriffinHit *h1) const
bool TimeRandom(TGriffinHit *h1, TGriffinHit *h2) const
double fMinimumGriffinEnergy
bool Coincident(TGriffinHit *h1, TGriffinHit *h2) const
void EndOfSort(std::shared_ptr< std::map< std::string, TList > > &list) override
This method gets called at the end of Finalize()
bool Reject(TGriffinHit *hit) const
ROOT::RDF::RResultPtr< std::map< std::string, TList > > Book(ROOT::RDataFrame *d) override
This method will call the Book action on the provided dataframe.
bool GoodCfd(TDetectorHit *h1) const
SummingCorrectionsHelper(TList *list)
virtual Long64_t GetTimeStampNs(Option_t *opt="") const
virtual double GetEnergy(Option_t *opt="") const
virtual Short_t GetKValue() const
!
virtual Double_t GetTime(const ETimeFlag &correct_flag=ETimeFlag::kAll, Option_t *opt="") const
Returns a time value to the nearest nanosecond!
TUserSettings * fUserSettings
bool GetBool(const std::string ¶meter, bool quiet=false) const
int GetInt(const std::string ¶meter, bool quiet=false) const
double GetDouble(const std::string ¶meter, bool quiet=false) const