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.2 by algomez, Fri Jan 6 16:41:29 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 101 | Line 102 | class StoreTreeVariable {
102           */
103  
104           // B discriminator
105 <         Double_t bdisc_1st[NMAX];
106 <         Double_t bdisc_2nd[NMAX];
107 <         Double_t bdisc_3rd[NMAX];
108 <         Double_t bdisc_4th[NMAX];
108 <         Double_t bdisc_5th[NMAX];
109 <         Double_t bdisc_6th[NMAX];
110 <         Double_t bdisc_7th[NMAX];
105 >         Double_t bdisc_1st;
106 >         Double_t bdisc_2nd;
107 >         Double_t bdisc_3rd;
108 >         Double_t bdisc_4th;
109  
110        };
111  
# Line 128 | Line 126 | class StoreTreeVariable {
126  
127        struct MetVariables{
128  
131      /*
129           Double_t met;
130           Double_t metphi;
131           Double_t mht;
# Line 153 | Line 150 | class StoreTreeVariable {
150           Int_t csvbtagjetnum_up;
151           Int_t csvbtagjetnum_down;
152           Int_t    flavorhistory;
153 <         */
153 >      };
154 >
155 >      struct GeneralVariables {
156  
157           Int_t Run;
158           Int_t Lumi;
159           Int_t Event;
160 +         Double_t PUWeight;
161  
162        };
163  
# Line 169 | Line 169 | class StoreTreeVariable {
169        VertexVariables *GetVertexVariable(){return &VStoreVertex;}
170        TriggerVariables *GetTriggerVariable(){return &VStoreTrigger;}
171        MetVariables *GetMetVariable(){return &VStoreMet;}
172 +      GeneralVariables *GetGeneralVariable(){return &VStoreGeneral;}
173  
174        void InitialAll();
175        void InitialVertex();
# Line 177 | Line 178 | class StoreTreeVariable {
178        void InitialJet();
179        void InitialTrigger();
180        void InitialMet();
181 +      void InitialGeneral();
182  
183     private:
184  
# Line 188 | Line 190 | class StoreTreeVariable {
190        bool StoreJet;
191        bool StoreTrigger;
192        bool StoreMet;
193 +      bool StoreGeneral;
194  
195        //V mean variables
196        MuonVariables VStoreMuon;
# Line 196 | Line 199 | class StoreTreeVariable {
199        VertexVariables VStoreVertex;
200        TriggerVariables VStoreTrigger;
201        MetVariables VStoreMet;
202 +      GeneralVariables VStoreGeneral;
203  
204   };
205  
# Line 212 | Line 216 | StoreTreeVariable::StoreTreeVariable(){
216    StoreJet = kTRUE;
217    StoreTrigger = kTRUE;
218    StoreMet = kTRUE;
219 +  StoreGeneral = kTRUE;
220  
221   }
222  
# Line 297 | Line 302 | void StoreTreeVariable::InitialJet(){
302        Top->Branch("jet_btag_csv",VStoreJet.jetcsv,"jetcsv[numjets]/D");
303        */
304        //b discriminant
305 <      Top->Branch("jet_bdisc_1st",VStoreJet.bdisc_1st,"bdisc_1st[numjets]/D");
306 <      Top->Branch("jet_bdisc_2nd",VStoreJet.bdisc_2nd,"bdisc_2nd[numjets]/D");
307 <      Top->Branch("jet_bdisc_3rd",VStoreJet.bdisc_3rd,"bdisc_3rd[numjets]/D");
308 <      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");
305 >      Top->Branch("jet_bdisc_1st",&VStoreJet.bdisc_1st,"bdisc_1st/D");
306 >      Top->Branch("jet_bdisc_2nd",&VStoreJet.bdisc_2nd,"bdisc_2nd/D");
307 >      Top->Branch("jet_bdisc_3rd",&VStoreJet.bdisc_3rd,"bdisc_3rd/D");
308 >      Top->Branch("jet_bdisc_4th",&VStoreJet.bdisc_4th,"bdisc_4th/D");
309  
310        //Jet track size
311        //Top->Branch("jet_tracksize",VStoreJet.jettracksize,"jettracksize[numjets]/I");
# Line 316 | Line 318 | void StoreTreeVariable::InitialMet(){
318  
319    if(StoreMet){
320        cout<<"We are inital Met Branch"<<endl;
321 <
320 <      /*
321 >    
322        Top->Branch("MET_energy",&VStoreMet.met,"met/D");
323        Top->Branch("MET_phi",&VStoreMet.metphi,"metphi/D");
324        Top->Branch("MHT_energy",&VStoreMet.mht,"mht/D");
# Line 341 | Line 342 | void StoreTreeVariable::InitialMet(){
342        Top->Branch("csvbtagjetnum_up",&VStoreMet.csvbtagjetnum_up,"csvbtagjetnum_up/I");
343        Top->Branch("csvbtagjetnum_down",&VStoreMet.csvbtagjetnum_down,"csvbtagjetnum_down/I");
344        Top->Branch("flavorhistory",&VStoreMet.flavorhistory,"flavorhistory/I");
345 <      */
345 <      Top->Branch("run",&VStoreMet.Run,"Run/I");
346 <      Top->Branch("lumi",&VStoreMet.Lumi,"Lumi/I");
347 <      Top->Branch("event",&VStoreMet.Event,"Event/I");
348 <
345 >    
346    }
347 + }
348 +
349 + void StoreTreeVariable::InitialGeneral(){
350  
351 +  if(StoreGeneral){
352 +      cout<<"We are inital General Branch"<<endl;
353 +
354 +      Top->Branch("run",&VStoreGeneral.Run,"Run/I");
355 +      Top->Branch("lumi",&VStoreGeneral.Lumi,"Lumi/I");
356 +      Top->Branch("event",&VStoreGeneral.Event,"Event/I");
357 +      Top->Branch("PUWeight",&VStoreGeneral.PUWeight,"PUWeight/D");
358 +
359 +  }
360   }
361  
362   void StoreTreeVariable::InitialTrigger(){
# Line 382 | Line 391 | void StoreTreeVariable::InitialAll(){
391       InitialElectron();
392       InitialJet();
393       InitialMet();
394 +     InitialGeneral();
395   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines