GRSISort
Created by P.C. Bender
Developement Team: P.C. Bender, R. Dunlop, V. Bildstein
An extension of the ROOT analysis Framework
ExampleFragmentSelector.C
Go to the documentation of this file.
1 #define ExampleFragmentSelector_cxx
2 // The class definition in ExampleFragmentSelector.h has been generated automatically
4 
6 {
7  fH2["hp_charge"] = new TH2D("hp_charge", "#gamma Charge vs. Channel", 128, 0., 128., 12000, 0., 12000.);
8  fH2["hp_energy"] = new TH2D("hp_energy", "#gamma Energy vs. Channel", 128, 0., 128., 16000, 0., 8000.);
9 
10  for(auto it : fH1) {
11  GetOutputList()->Add(it.second);
12  }
13  for(auto it : fH2) {
14  GetOutputList()->Add(it.second);
15  }
16  for(auto it : fHSparse) {
17  GetOutputList()->Add(it.second);
18  }
19 }
20 
22 {
23  fH2.at("hp_charge")->Fill(fFragment->GetChannelNumber(), fFragment->GetCharge());
24  fH2.at("hp_energy")->Fill(fFragment->GetChannelNumber(), fFragment->GetEnergy());
25 }
TList * GetOutputList() const override
this does the same as TSelector::GetOutputList()
Definition: TGRSISelector.h:56
virtual Float_t GetCharge() const
!
TGRSIMap< std::string, TH2 * > fH2
! map for 2-D histograms
Definition: TGRSISelector.h:68
TGRSIMap< std::string, TH1 * > fH1
! map for 1-D histograms
Definition: TGRSISelector.h:67
TGRSIMap< std::string, THnSparseF * > fHSparse
! map for sparse n-D histograms
Definition: TGRSISelector.h:72
Short_t GetChannelNumber() const
Definition: TFragment.cxx:129
virtual double GetEnergy(Option_t *opt="") const