GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AncillaryFilter.h
Go to the documentation of this file.
1 // This class has been automatically generated on
3 // Fri Apr 3 14:13:08 2015 by ROOT version 5.34/14
4 // from TTree SToGS/ Tree from SToGS
5 // found on file: /data/workspace/shared_data/SToGS/pac_2015/all_GW_SToGSROOT_Thread00_Run000.root
7 
8 #ifndef AncillaryFilter_h
9 #define AncillaryFilter_h
10 
11 #include <TROOT.h>
12 #include <TChain.h>
13 #include <TFile.h>
14 #include <TSelector.h>
15 
16 class TH2F;
17 class TH1F;
18 
19 // Header file for the classes stored in the TTree if any.
20 
21 // Fixed size dimensions of array or collections stored in the TTree if any.
22 const Int_t kMaxPr = 1;
23 const Int_t kMaxPr_fHits = 200;
24 const Int_t kMaxEv = 1;
25 const Int_t kMaxEv_fHits = 1000;
26 
27 class AncillaryFilter : public TSelector {
28 private:
29  Int_t fN_Gamma[2];
30  Int_t fN_Neutron[2];
31  Int_t fN_Proton[2];
32  Int_t fN_Alpha[2];
33 
34  Int_t fN_Agata[2];
35  Int_t fN_Diamant[2];
36  Int_t fN_Diamant_proton[2];
37  Int_t fN_Diamant_alpha[2];
38  Int_t fN_NW[2];
39 
40  TString fFileName;
41 
42  int PlotEfficiencies; //0 no plot, 1 filtered efficiencies, 2 global efficiencies
43 
44  TString EfficiencyPlotFileName;
45 
46  TH2F *AGATACountsGlobNorm;
47  TH2F *DiamantCountsGlobNorm;
48  TH2F *NWCountsGlobNorm;
49 
50  TH2F *AGATACountsPrNorm;
51  TH2F *DiamantCountsPrNorm;
52  TH2F *NWCountsPrNorm;
53 
54  TH2F *AGATACountsEvNorm;
55  TH2F *DiamantCountsEvNorm;
56  TH2F *NWCountsEvNorm;
57 
58  TH1F *GlobalExitChannelDistrib;
59  TH1F *ExitChannelDistrib[6][6][2];
60 
61 public :
62  TTree *fChain;
63 
64  unsigned long NEntries;
65  int Fact;
66 
67  // Declaration of leaf types
68  //SBRPEvent *Pr_;
69  Int_t Pr_fHits_;
70  Double32_t Pr_fHits_fE[kMaxPr_fHits]; //[Pr.fHits_]
71  Int_t Pr_fHits_fPDG[kMaxPr_fHits]; //[Pr.fHits_]
72  Double32_t Pr_fHits_fX[kMaxPr_fHits]; //[Pr.fHits_]
73  Double32_t Pr_fHits_fY[kMaxPr_fHits]; //[Pr.fHits_]
74  Double32_t Pr_fHits_fZ[kMaxPr_fHits]; //[Pr.fHits_]
75  Double32_t Pr_fHits_fT[kMaxPr_fHits]; //[Pr.fHits_]
76  Int_t Pr_fHits_fFlag[kMaxPr_fHits]; //[Pr.fHits_]
77  Int_t Pr_fHits_fUID[kMaxPr_fHits]; //[Pr.fHits_]
78  Double32_t Pr_fHits_fPX[kMaxPr_fHits]; //[Pr.fHits_]
79  Double32_t Pr_fHits_fPY[kMaxPr_fHits]; //[Pr.fHits_]
80  Double32_t Pr_fHits_fPZ[kMaxPr_fHits]; //[Pr.fHits_]
81  Double32_t Pr_fETot;
82  Int_t Pr_fMultTot;
83  //SBREvent *Ev_;
84  Int_t Ev_fHits_;
85  Double32_t Ev_fHits_fE[kMaxEv_fHits]; //[Ev.fHits_]
86  Int_t Ev_fHits_fPDG[kMaxEv_fHits]; //[Ev.fHits_]
87  Double32_t Ev_fHits_fX[kMaxEv_fHits]; //[Ev.fHits_]
88  Double32_t Ev_fHits_fY[kMaxEv_fHits]; //[Ev.fHits_]
89  Double32_t Ev_fHits_fZ[kMaxEv_fHits]; //[Ev.fHits_]
90  Double32_t Ev_fHits_fT[kMaxEv_fHits]; //[Ev.fHits_]
91  Int_t Ev_fHits_fFlag[kMaxEv_fHits]; //[Ev.fHits_]
92  Int_t Ev_fHits_fUID[kMaxEv_fHits]; //[Ev.fHits_]
93  Double32_t Ev_fETot;
94  Int_t Ev_fMultTot;
95 
96  // List of branches
97  TBranch *b_Pr_fHits_;
98  TBranch *b_Pr_fHits_fE;
99  TBranch *b_Pr_fHits_fPDG;
100  TBranch *b_Pr_fHits_fX;
101  TBranch *b_Pr_fHits_fY;
102  TBranch *b_Pr_fHits_fZ;
103  TBranch *b_Pr_fHits_fT;
104  TBranch *b_Pr_fHits_fFlag;
105  TBranch *b_Pr_fHits_fUID;
106  TBranch *b_Pr_fHits_fPX;
107  TBranch *b_Pr_fHits_fPY;
108  TBranch *b_Pr_fHits_fPZ;
109  TBranch *b_Pr_fETot;
110  TBranch *b_Pr_fMultTot;
111  TBranch *b_Ev_fHits_;
112  TBranch *b_Ev_fHits_fE;
113  TBranch *b_Ev_fHits_fPDG;
114  TBranch *b_Ev_fHits_fX;
115  TBranch *b_Ev_fHits_fY;
116  TBranch *b_Ev_fHits_fZ;
117  TBranch *b_Ev_fHits_fT;
118  TBranch *b_Ev_fHits_fFlag;
119  TBranch *b_Ev_fHits_fUID;
120  TBranch *b_Ev_fETot;
121  TBranch *b_Ev_fMultTot;
122 
123  AncillaryFilter(TTree * /*tree*/ =0) : fChain(0) { }
124  virtual ~AncillaryFilter() { }
125  virtual Int_t Version() const { return 2; }
126  virtual void Begin(TTree *tree);
127  virtual void SlaveBegin(TTree *tree);
128  virtual void Init(TTree *tree);
129  virtual Bool_t Notify();
130  virtual Bool_t Process(Long64_t entry);
131  virtual Int_t GetEntry(Long64_t entry, Int_t getall = 0) { return fChain ? fChain->GetTree()->GetEntry(entry, getall) : 0; }
132  virtual void SetOption(const char *option) { fOption = option; }
133  virtual void SetObject(TObject *obj) { fObject = obj; }
134  virtual void SetInputList(TList *input) { fInput = input; }
135  virtual TList *GetOutputList() const { return fOutput; }
136  virtual void SlaveTerminate();
137  virtual void Terminate();
138 
139  void ReadConfFile();
140 
142 };
143 
144 #endif
145 
146 #ifdef AncillaryFilter_cxx
147 void AncillaryFilter::Init(TTree *tree)
148 {
149  // The Init() function is called when the selector needs to initialize
150  // a new tree or chain. Typically here the branch addresses and branch
151  // pointers of the tree will be set.
152  // It is normally not necessary to make changes to the generated
153  // code, but the routine can be extended by the user if needed.
154  // Init() will be called many times when running on PROOF
155  // (once per file to be processed).
156 
157  // Set branch addresses and branch pointers
158  if (!tree) return;
159  fChain = tree;
160  fChain->SetMakeClass(1);
161 
162  fChain->SetBranchAddress("Pr.fHits", &Pr_fHits_, &b_Pr_fHits_);
163  fChain->SetBranchAddress("Pr.fHits.fE", Pr_fHits_fE, &b_Pr_fHits_fE);
164  fChain->SetBranchAddress("Pr.fHits.fPDG", Pr_fHits_fPDG, &b_Pr_fHits_fPDG);
165  fChain->SetBranchAddress("Pr.fHits.fX", Pr_fHits_fX, &b_Pr_fHits_fX);
166  fChain->SetBranchAddress("Pr.fHits.fY", Pr_fHits_fY, &b_Pr_fHits_fY);
167  fChain->SetBranchAddress("Pr.fHits.fZ", Pr_fHits_fZ, &b_Pr_fHits_fZ);
168  fChain->SetBranchAddress("Pr.fHits.fT", Pr_fHits_fT, &b_Pr_fHits_fT);
169  fChain->SetBranchAddress("Pr.fHits.fFlag", Pr_fHits_fFlag, &b_Pr_fHits_fFlag);
170  fChain->SetBranchAddress("Pr.fHits.fUID", Pr_fHits_fUID, &b_Pr_fHits_fUID);
171  fChain->SetBranchAddress("Pr.fHits.fPX", Pr_fHits_fPX, &b_Pr_fHits_fPX);
172  fChain->SetBranchAddress("Pr.fHits.fPY", Pr_fHits_fPY, &b_Pr_fHits_fPY);
173  fChain->SetBranchAddress("Pr.fHits.fPZ", Pr_fHits_fPZ, &b_Pr_fHits_fPZ);
174  fChain->SetBranchAddress("Pr.fETot", &Pr_fETot, &b_Pr_fETot);
175  fChain->SetBranchAddress("Pr.fMultTot", &Pr_fMultTot, &b_Pr_fMultTot);
176  fChain->SetBranchAddress("Ev.fHits", &Ev_fHits_, &b_Ev_fHits_);
177  fChain->SetBranchAddress("Ev.fHits.fE", Ev_fHits_fE, &b_Ev_fHits_fE);
178  fChain->SetBranchAddress("Ev.fHits.fPDG", Ev_fHits_fPDG, &b_Ev_fHits_fPDG);
179  fChain->SetBranchAddress("Ev.fHits.fX", Ev_fHits_fX, &b_Ev_fHits_fX);
180  fChain->SetBranchAddress("Ev.fHits.fY", Ev_fHits_fY, &b_Ev_fHits_fY);
181  fChain->SetBranchAddress("Ev.fHits.fZ", Ev_fHits_fZ, &b_Ev_fHits_fZ);
182  fChain->SetBranchAddress("Ev.fHits.fT", Ev_fHits_fT, &b_Ev_fHits_fT);
183  fChain->SetBranchAddress("Ev.fHits.fFlag", Ev_fHits_fFlag, &b_Ev_fHits_fFlag);
184  fChain->SetBranchAddress("Ev.fHits.fUID", Ev_fHits_fUID, &b_Ev_fHits_fUID);
185  fChain->SetBranchAddress("Ev.fETot", &Ev_fETot, &b_Ev_fETot);
186  fChain->SetBranchAddress("Ev.fMultTot", &Ev_fMultTot, &b_Ev_fMultTot);
187 }
188 
190 {
191  // The Notify() function is called when a new file is opened. This
192  // can be either for a new TTree in a TChain or when when a new TTree
193  // is started when using PROOF. It is normally not necessary to make changes
194  // to the generated code, but the routine can be extended by the
195  // user if needed. The return value is currently not used.
196 
197  return kTRUE;
198 }
199 
200 #endif // #ifdef AncillaryFilter_cxx
virtual void SlaveTerminate()
virtual void Init(TTree *tree)
virtual Bool_t Notify()
Double32_t Pr_fHits_fPY[kMaxPr_fHits]
virtual void Begin(TTree *tree)
TBranch * b_Ev_fHits_fT
Double32_t Ev_fHits_fX[kMaxEv_fHits]
TBranch * b_Ev_fHits_fE
TBranch * b_Pr_fHits_fX
TBranch * b_Pr_fHits_fPZ
const Int_t kMaxEv
TBranch * b_Pr_fHits_fUID
virtual void Terminate()
Double32_t Pr_fHits_fPZ[kMaxPr_fHits]
const Int_t kMaxPr
TBranch * b_Pr_fMultTot
Int_t Pr_fHits_fFlag[kMaxPr_fHits]
Int_t Pr_fHits_fUID[kMaxPr_fHits]
TBranch * b_Pr_fHits_fPDG
Double32_t Pr_fHits_fY[kMaxPr_fHits]
TBranch * b_Pr_fHits_
Double32_t Ev_fHits_fZ[kMaxEv_fHits]
const Int_t kMaxEv_fHits
TBranch * b_Ev_fMultTot
TBranch * b_Ev_fHits_fX
virtual Int_t GetEntry(Long64_t entry, Int_t getall=0)
TBranch * b_Ev_fHits_
Double32_t Ev_fETot
Int_t Pr_fHits_fPDG[kMaxPr_fHits]
TBranch * b_Pr_fHits_fFlag
TBranch * b_Ev_fHits_fUID
const Int_t kMaxPr_fHits
TBranch * b_Pr_fHits_fPX
unsigned long NEntries
pointer to the analyzed TTree or TChain
Double32_t Pr_fHits_fZ[kMaxPr_fHits]
virtual ~AncillaryFilter()
Double32_t Pr_fHits_fE[kMaxPr_fHits]
TBranch * b_Pr_fHits_fZ
Double32_t Pr_fHits_fPX[kMaxPr_fHits]
Double32_t Ev_fHits_fT[kMaxEv_fHits]
TBranch * b_Ev_fHits_fY
TBranch * b_Pr_fHits_fE
virtual void SlaveBegin(TTree *tree)
TBranch * b_Pr_fETot
Double32_t Ev_fHits_fE[kMaxEv_fHits]
Double32_t Pr_fHits_fX[kMaxPr_fHits]
TBranch * b_Ev_fHits_fZ
virtual void SetObject(TObject *obj)
Double32_t Pr_fETot
TBranch * b_Ev_fETot
TBranch * b_Pr_fHits_fPY
TBranch * b_Ev_fHits_fFlag
virtual void SetInputList(TList *input)
ClassDef(AncillaryFilter, 0)
AncillaryFilter(TTree *=0)
TBranch * b_Pr_fHits_fY
Int_t Ev_fHits_fPDG[kMaxEv_fHits]
Int_t Ev_fHits_fUID[kMaxEv_fHits]
Int_t Ev_fHits_fFlag[kMaxEv_fHits]
TBranch * b_Pr_fHits_fT
Double32_t Pr_fHits_fT[kMaxPr_fHits]
virtual Int_t Version() const
virtual void SetOption(const char *option)
Double32_t Ev_fHits_fY[kMaxEv_fHits]
virtual Bool_t Process(Long64_t entry)
TBranch * b_Ev_fHits_fPDG
virtual TList * GetOutputList() const