GRSISort "v4.1.1.0"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
CrossTalkCheckHelper.cxx
Go to the documentation of this file.
2
4{
5 // total addback spectrum
6 fH1[slot]["griffinESuppAddback"] = new TH1F("griffinESuppAddback", Form("Suppressed griffin addback energy;energy [keV];counts/%.1f keV", (fHighEnergy - fLowEnergy) / fEnergyBins), fEnergyBins, fLowEnergy, fHighEnergy);
7
8 // addback spectrum with 1-4 cyrstals/fragments involved
9 for(int nCry = 1; nCry <= 4; ++nCry) {
10 fH1[slot][Form("griffinESuppAddback%d", nCry)] = new TH1F(Form("griffinESuppAddback%d", nCry), Form("Suppressed griffin addback energy with %d crystals/fragments;energy [keV];counts/%.1f keV", nCry, (fHighEnergy - fLowEnergy) / fEnergyBins), fEnergyBins, fLowEnergy, fHighEnergy);
11 }
12}
13
14// TODO: Change the function arguments to match the detectors you want to use and the declaration in the header file!
15void CrossTalkCheckHelper::Exec(unsigned int slot, TGriffin& grif, TGriffinBgo& grifBgo) // NOLINT
16{
17 // we use .at() here instead of [] so that we get meaningful error message if a histogram we try to fill wasn't created
18 // e.g. because of a typo
19
20 // loop over suppressed griffin addback hits
21 for(int g = 0; g < grif.GetSuppressedAddbackMultiplicity(&grifBgo); ++g) {
22 auto* grif1 = grif.GetSuppressedAddbackHit(g);
23 fH1[slot].at("griffinESuppAddback")->Fill(grif1->GetEnergy());
24 if(1 <= grif.GetNSuppressedAddbackFrags(g) && grif.GetNSuppressedAddbackFrags(g) <= 4) {
25 fH1[slot].at(Form("griffinESuppAddback%d", grif.GetNSuppressedAddbackFrags(g)))->Fill(grif1->GetEnergy());
26 }
27 }
28}
29
30void CrossTalkCheckHelper::EndOfSort(std::shared_ptr<std::map<std::string, TList>>& list)
31{
32}
void CreateHistograms(unsigned int slot) override
Virtual helper function that the user uses to create their histograms.
void EndOfSort(std::shared_ptr< std::map< std::string, TList > > &list) override
This method gets called at the end of Finalize()
void Exec(unsigned int slot, TGriffin &grif, TGriffinBgo &grifBgo)
std::vector< TGRSIMap< std::string, TH1 * > > fH1
Definition TGRSIHelper.h:48
UShort_t GetNSuppressedAddbackFrags(const size_t &idx)
Definition TGriffin.cxx:591
TGriffinHit * GetSuppressedAddbackHit(const int &i)
Definition TGriffin.cxx:536
Short_t GetSuppressedAddbackMultiplicity(const TBgo *bgo)
Definition TGriffin.cxx:552