source: huonglan/MYSIMULATION/anaTree.hOK @ 15

Last change on this file since 15 was 15, checked in by huonglan, 13 years ago

fast simulation of t't'bar pair production from my stage

File size: 7.1 KB
Line 
1//////////////////////////////////////////////////////////
2// This class has been automatically generated on
3// Thu May 27 09:21:10 2010 by ROOT version 5.26/00
4// from TTree T_ana/T_ana
5// found on file: MC_topprime.root
6//////////////////////////////////////////////////////////
7
8#ifndef anaTree_h
9#define anaTree_h
10
11#include <TROOT.h>
12#include <TChain.h>
13#include <TFile.h>
14#include <TSelector.h>
15#include <vector>
16#include "MyVector4.h"
17
18//Lan
19#include <TH1F.h>
20
21class anaTree : public TSelector {
22public :
23   TTree          *fChain;   //!pointer to the analyzed TTree or TChain
24
25   // Declaration of leaf types
26   Int_t           evt;
27   Int_t           npar;
28   Int_t           pdgId[20];   //[npar]
29   Int_t           stat[20];   //[npar]
30   Int_t           barc[20];   //[npar]
31   Float_t         etaP[20];   //[npar]
32   Float_t         phiP[20];   //[npar]
33   Float_t         pTP[20];   //[npar]
34   Float_t         EP[20];   //[npar]
35   Int_t           nele;
36   Int_t           pdgIdE[10];   //[nele]
37   Float_t         etaE[10];   //[nele]
38   Float_t         phiE[10];   //[nele]
39   Float_t         pTE[10];   //[nele]
40   Float_t         EE[10];   //[nele]
41   Int_t           nq;
42   Int_t           pdgIdQ[20];   //[nq]
43   Float_t         etaQ[20];   //[nq]
44   Float_t         phiQ[20];   //[nq]
45   Float_t         pTQ[20];   //[nq]
46   Float_t         EQ[20];   //[nq]
47   Int_t           nmu;
48   Int_t           pdgIdM[10];   //[nmu]
49   Float_t         etaM[10];   //[nmu]
50   Float_t         phiM[10];   //[nmu]
51   Float_t         pTM[10];   //[nmu]
52   Float_t         EM[10];   //[nmu]
53   Float_t         ETmisX;
54   Float_t         ETmisY;
55   Float_t         ETmisZ;
56   Float_t         SumET;
57   Float_t         ETmisXmea;
58   Float_t         ETmisYmea;
59
60   // List of branches
61   TBranch        *b_evt;   //!
62   TBranch        *b_npar;   //!
63   TBranch        *b_pdgId;   //!
64   TBranch        *b_stat;   //!
65   TBranch        *b_barc;   //!
66   TBranch        *b_etaP;   //!
67   TBranch        *b_phiP;   //!
68   TBranch        *b_pTP;   //!
69   TBranch        *b_EP;   //!
70   TBranch        *b_nele;   //!
71   TBranch        *b_pdgIdE;   //!
72   TBranch        *b_etaE;   //!
73   TBranch        *b_phiE;   //!
74   TBranch        *b_pTE;   //!
75   TBranch        *b_EE;   //!
76   TBranch        *b_nq;   //!
77   TBranch        *b_pdgIdQ;   //!
78   TBranch        *b_etaQ;   //!
79   TBranch        *b_phiQ;   //!
80   TBranch        *b_pTQ;   //!
81   TBranch        *b_EQ;   //!
82   TBranch        *b_nmu;   //!
83   TBranch        *b_pdgIdM;   //!
84   TBranch        *b_etaM;   //!
85   TBranch        *b_phiM;   //!
86   TBranch        *b_pTM;   //!
87   TBranch        *b_EM;   //!
88   TBranch        *b_ETmisX;   //!
89   TBranch        *b_ETmisY;   //!
90   TBranch        *b_ETmisZ;   //!
91   TBranch        *b_SumET;   //!
92   TBranch        *b_ETmisXmea;   //!
93   TBranch        *b_ETmisYmea;   //!
94
95   anaTree(TTree * /*tree*/ =0) { }
96   virtual ~anaTree() { }
97   virtual Int_t   Version() const { return 2; }
98   virtual void    Begin(TTree *tree);
99   virtual void    SlaveBegin(TTree *tree);
100   virtual void    Init(TTree *tree);
101   virtual Bool_t  Notify();
102   virtual Bool_t  Process(Long64_t entry);
103   virtual Int_t   GetEntry(Long64_t entry, Int_t getall = 0) { return fChain ? fChain->GetTree()->GetEntry(entry, getall) : 0; }
104   virtual void    SetOption(const char *option) { fOption = option; }
105   virtual void    SetObject(TObject *obj) { fObject = obj; }
106   virtual void    SetInputList(TList *input) { fInput = input; }
107   virtual TList  *GetOutputList() const { return fOutput; }
108   virtual void    SlaveTerminate();
109   virtual void    Terminate();
110   //   bool sortmyv4(MyVector4 left,MyVector4 right);
111
112   ClassDef(anaTree,0);
113
114   //###### ADD HERE !!!!! ######
115
116   //True information
117   TH1F * m_ptleptruth;
118
119   TH1F * m_dphilntruth;
120
121   TH1F * m_dRlnWtruth;
122   TH1F * m_dRqqWtruth;
123   TH1F * m_dRqWqtmin;
124   TH1F * m_dRqWqtmax;
125
126   TH1F * m_dRlqmin;
127
128   TH1F * m_ptquarktruth;
129
130   TH1F * m_ptWtruth;
131   TH1F * m_ptttruth;
132
133   TH1F * m_nevtlnln;
134   TH1F * m_nevtlnqq;
135   TH1F * m_nevtqqqq;
136
137   TH1F * m_ctettruth;
138   
139   //Reconstruction
140   TH1F * m_ne;
141   TH1F * m_nmu;
142   TH1F * m_ptlep;
143   TH1F * m_ptW;
144   TH1F * m_pttop;
145   TH1F * m_ptquark;
146
147   TH1F * m_mjj;
148   TH1F * m_mWh;
149   TH1F * m_mth;
150   TH1F * m_mtl;   
151   TH1F * m_dmt;   
152   TH1F * m_mtcorr;
153
154   TH1F * m_mjjO;
155   TH1F * m_mWhO;
156   TH1F * m_mthO;
157   TH1F * m_mtlO;   
158   TH1F * m_mtcorrO;
159
160   TH1F * m_ctet_reco;
161};
162
163#endif
164
165#ifdef anaTree_cxx
166void anaTree::Init(TTree *tree)
167{
168   // The Init() function is called when the selector needs to initialize
169   // a new tree or chain. Typically here the branch addresses and branch
170   // pointers of the tree will be set.
171   // It is normally not necessary to make changes to the generated
172   // code, but the routine can be extended by the user if needed.
173   // Init() will be called many times when running on PROOF
174   // (once per file to be processed).
175
176   // Set branch addresses and branch pointers
177   if (!tree) return;
178   fChain = tree;
179   fChain->SetMakeClass(1);
180
181   fChain->SetBranchAddress("evt", &evt, &b_evt);
182   fChain->SetBranchAddress("npar", &npar, &b_npar);
183   fChain->SetBranchAddress("pdgId", pdgId, &b_pdgId);
184   fChain->SetBranchAddress("stat", stat, &b_stat);
185   fChain->SetBranchAddress("barc", barc, &b_barc);
186   fChain->SetBranchAddress("etaP", etaP, &b_etaP);
187   fChain->SetBranchAddress("phiP", phiP, &b_phiP);
188   fChain->SetBranchAddress("pTP", pTP, &b_pTP);
189   fChain->SetBranchAddress("EP", EP, &b_EP);
190   fChain->SetBranchAddress("nele", &nele, &b_nele);
191   fChain->SetBranchAddress("pdgIdE", pdgIdE, &b_pdgIdE);
192   fChain->SetBranchAddress("etaE", etaE, &b_etaE);
193   fChain->SetBranchAddress("phiE", phiE, &b_phiE);
194   fChain->SetBranchAddress("pTE", pTE, &b_pTE);
195   fChain->SetBranchAddress("EE", EE, &b_EE);
196   fChain->SetBranchAddress("nq", &nq, &b_nq);
197   fChain->SetBranchAddress("pdgIdQ", pdgIdQ, &b_pdgIdQ);
198   fChain->SetBranchAddress("etaQ", etaQ, &b_etaQ);
199   fChain->SetBranchAddress("phiQ", phiQ, &b_phiQ);
200   fChain->SetBranchAddress("pTQ", pTQ, &b_pTQ);
201   fChain->SetBranchAddress("EQ", EQ, &b_EQ);
202   fChain->SetBranchAddress("nmu", &nmu, &b_nmu);
203   fChain->SetBranchAddress("pdgIdM", pdgIdM, &b_pdgIdM);
204   fChain->SetBranchAddress("etaM", etaM, &b_etaM);
205   fChain->SetBranchAddress("phiM", phiM, &b_phiM);
206   fChain->SetBranchAddress("pTM", pTM, &b_pTM);
207   fChain->SetBranchAddress("EM", EM, &b_EM);
208   fChain->SetBranchAddress("ETmisX", &ETmisX, &b_ETmisX);
209   fChain->SetBranchAddress("ETmisY", &ETmisY, &b_ETmisY);
210   fChain->SetBranchAddress("ETmisZ", &ETmisZ, &b_ETmisZ);
211   fChain->SetBranchAddress("SumET", &SumET, &b_SumET);
212   fChain->SetBranchAddress("ETmisXmea", &ETmisXmea, &b_ETmisXmea);
213   fChain->SetBranchAddress("ETmisYmea", &ETmisYmea, &b_ETmisYmea);
214}
215
216Bool_t anaTree::Notify()
217{
218   // The Notify() function is called when a new file is opened. This
219   // can be either for a new TTree in a TChain or when when a new TTree
220   // is started when using PROOF. It is normally not necessary to make changes
221   // to the generated code, but the routine can be extended by the
222   // user if needed. The return value is currently not used.
223
224   return kTRUE;
225}
226
227#endif // #ifdef anaTree_cxx
Note: See TracBrowser for help on using the repository browser.