ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/algomez/FourTop/TreeAnalyzer/interface/StoreTreeVariable.h
(Generate patch)

Comparing UserCode/algomez/FourTop/TreeAnalyzer/interface/StoreTreeVariable.h (file contents):
Revision 1.1 by algomez, Wed Jan 4 01:01:33 2012 UTC vs.
Revision 1.3 by algomez, Mon Jan 23 18:27:24 2012 UTC

# Line 21 | Line 21 | class StoreTreeVariable {
21        void SetVertexFalse(){StoreVertex = kFALSE;}
22        void SetTriggerFalse(){StoreTrigger = kFALSE;}
23        void SetMetFalse(){StoreMet = kFALSE;}
24 +      void SetGeneralFalse(){StoreGeneral = kFALSE;}
25  
26        //typedef struct MuonVariables{
27        typedef struct {
# Line 94 | Line 95 | class StoreTreeVariable {
95           Double_t jettche[NMAX];
96           Double_t jetsvhe[NMAX];
97           Double_t jetsvhp[NMAX];
98 <         Double_t jetcsv[NMAX];
98 >         Double_t jetcsv[NMAX]; */
99 >         Int_t numBjets_csvl;
100 >         Int_t numBjets_csvm;
101 >         Int_t numBjets_csvt;
102  
103           //Jet Track number
104 <         Int_t   jettracksize[NMAX];
105 <         */
104 >         //Int_t   jettracksize[NMAX];
105 >        
106  
107           // B discriminator
108 <         Double_t bdisc_1st[NMAX];
109 <         Double_t bdisc_2nd[NMAX];
110 <         Double_t bdisc_3rd[NMAX];
111 <         Double_t bdisc_4th[NMAX];
108 <         Double_t bdisc_5th[NMAX];
109 <         Double_t bdisc_6th[NMAX];
110 <         Double_t bdisc_7th[NMAX];
108 >         Double_t bdisc_1st;
109 >         Double_t bdisc_2nd;
110 >         Double_t bdisc_3rd;
111 >         Double_t bdisc_4th;
112  
113        };
114  
# Line 128 | Line 129 | class StoreTreeVariable {
129  
130        struct MetVariables{
131  
132 <      /*
132 >              /*
133           Double_t met;
134           Double_t metphi;
135           Double_t mht;
# Line 154 | Line 155 | class StoreTreeVariable {
155           Int_t csvbtagjetnum_down;
156           Int_t    flavorhistory;
157           */
158 +         Double_t Ht;
159 +         Double_t Stlep;
160 +         Double_t Stjet;
161 +      };
162 +
163 +      struct GeneralVariables {
164  
165           Int_t Run;
166           Int_t Lumi;
167           Int_t Event;
168 +         Double_t PUWeight;
169  
170        };
171  
# Line 169 | Line 177 | class StoreTreeVariable {
177        VertexVariables *GetVertexVariable(){return &VStoreVertex;}
178        TriggerVariables *GetTriggerVariable(){return &VStoreTrigger;}
179        MetVariables *GetMetVariable(){return &VStoreMet;}
180 +      GeneralVariables *GetGeneralVariable(){return &VStoreGeneral;}
181  
182        void InitialAll();
183        void InitialVertex();
# Line 177 | Line 186 | class StoreTreeVariable {
186        void InitialJet();
187        void InitialTrigger();
188        void InitialMet();
189 +      void InitialGeneral();
190  
191     private:
192  
# Line 188 | Line 198 | class StoreTreeVariable {
198        bool StoreJet;
199        bool StoreTrigger;
200        bool StoreMet;
201 +      bool StoreGeneral;
202  
203        //V mean variables
204        MuonVariables VStoreMuon;
# Line 196 | Line 207 | class StoreTreeVariable {
207        VertexVariables VStoreVertex;
208        TriggerVariables VStoreTrigger;
209        MetVariables VStoreMet;
210 +      GeneralVariables VStoreGeneral;
211  
212   };
213  
# Line 212 | Line 224 | StoreTreeVariable::StoreTreeVariable(){
224    StoreJet = kTRUE;
225    StoreTrigger = kTRUE;
226    StoreMet = kTRUE;
227 +  StoreGeneral = kTRUE;
228  
229   }
230  
# Line 296 | Line 309 | void StoreTreeVariable::InitialJet(){
309        Top->Branch("jet_btag_SVhighputy",VStoreJet.jetsvhp,"jetsvhp[numjets]/D");
310        Top->Branch("jet_btag_csv",VStoreJet.jetcsv,"jetcsv[numjets]/D");
311        */
312 +      Top->Branch("numBjets_csvl",&VStoreJet.numBjets_csvl,"numBjets_csvl/I");
313 +      Top->Branch("numBjets_csvm",&VStoreJet.numBjets_csvm,"numBjets_csvm/I");
314 +      Top->Branch("numBjets_csvt",&VStoreJet.numBjets_csvt,"numBjets_csvt/I");
315 +
316        //b discriminant
317 <      Top->Branch("jet_bdisc_1st",VStoreJet.bdisc_1st,"bdisc_1st[numjets]/D");
318 <      Top->Branch("jet_bdisc_2nd",VStoreJet.bdisc_2nd,"bdisc_2nd[numjets]/D");
319 <      Top->Branch("jet_bdisc_3rd",VStoreJet.bdisc_3rd,"bdisc_3rd[numjets]/D");
320 <      Top->Branch("jet_bdisc_4th",VStoreJet.bdisc_4th,"bdisc_4th[numjets]/D");
304 <      Top->Branch("jet_bdisc_5th",VStoreJet.bdisc_5th,"bdisc_5th[numjets]/D");
305 <      Top->Branch("jet_bdisc_6th",VStoreJet.bdisc_6th,"bdisc_6th[numjets]/D");
306 <      Top->Branch("jet_bdisc_7th",VStoreJet.bdisc_7th,"bdisc_7th[numjets]/D");
317 >      Top->Branch("bdisc_1st",&VStoreJet.bdisc_1st,"bdisc_1st/D");
318 >      Top->Branch("bdisc_2nd",&VStoreJet.bdisc_2nd,"bdisc_2nd/D");
319 >      Top->Branch("bdisc_3rd",&VStoreJet.bdisc_3rd,"bdisc_3rd/D");
320 >      Top->Branch("bdisc_4th",&VStoreJet.bdisc_4th,"bdisc_4th/D");
321  
322        //Jet track size
323        //Top->Branch("jet_tracksize",VStoreJet.jettracksize,"jettracksize[numjets]/I");
310
324   }
325  
326   }
# Line 316 | Line 329 | void StoreTreeVariable::InitialMet(){
329  
330    if(StoreMet){
331        cout<<"We are inital Met Branch"<<endl;
332 <
320 <      /*
332 >    /*
333        Top->Branch("MET_energy",&VStoreMet.met,"met/D");
334        Top->Branch("MET_phi",&VStoreMet.metphi,"metphi/D");
335        Top->Branch("MHT_energy",&VStoreMet.mht,"mht/D");
# Line 341 | Line 353 | void StoreTreeVariable::InitialMet(){
353        Top->Branch("csvbtagjetnum_up",&VStoreMet.csvbtagjetnum_up,"csvbtagjetnum_up/I");
354        Top->Branch("csvbtagjetnum_down",&VStoreMet.csvbtagjetnum_down,"csvbtagjetnum_down/I");
355        Top->Branch("flavorhistory",&VStoreMet.flavorhistory,"flavorhistory/I");
356 <      */
357 <      Top->Branch("run",&VStoreMet.Run,"Run/I");
358 <      Top->Branch("lumi",&VStoreMet.Lumi,"Lumi/I");
359 <      Top->Branch("event",&VStoreMet.Event,"Event/I");
348 <
356 >    */
357 >      Top->Branch("ht",&VStoreMet.Ht,"Ht/D");
358 >      Top->Branch("Stlep",&VStoreMet.Stlep,"Stlep/D");
359 >      Top->Branch("Stjet",&VStoreMet.Stjet,"Stjet/D");
360    }
361 + }
362 +
363 + void StoreTreeVariable::InitialGeneral(){
364  
365 +  if(StoreGeneral){
366 +      cout<<"We are inital General Branch"<<endl;
367 +
368 +      Top->Branch("run",&VStoreGeneral.Run,"Run/I");
369 +      Top->Branch("lumi",&VStoreGeneral.Lumi,"Lumi/I");
370 +      Top->Branch("event",&VStoreGeneral.Event,"Event/I");
371 +      Top->Branch("PUWeight",&VStoreGeneral.PUWeight,"PUWeight/D");
372 +
373 +  }
374   }
375  
376   void StoreTreeVariable::InitialTrigger(){
# Line 382 | Line 405 | void StoreTreeVariable::InitialAll(){
405       InitialElectron();
406       InitialJet();
407       InitialMet();
408 +     InitialGeneral();
409   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines