ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/interface/PhotonTreeWriter.h
Revision: 1.32
Committed: Wed Aug 21 13:29:50 2013 UTC (11 years, 8 months ago) by bendavid
Content type: text/plain
Branch: MAIN
Changes since 1.31: +2 -1 lines
Log Message:
add monte carlo event weight needed for sherpa samples

File Contents

# User Rev Content
1 bendavid 1.1 //--------------------------------------------------------------------------------------------------
2 bendavid 1.32 // $Id: PhotonTreeWriter.h,v 1.31 2013/07/30 21:08:04 mingyang Exp $
3 bendavid 1.1 //
4     // PhotonTreeWriter
5     //
6 veverka 1.30 // Authors: J. Bendavid, J. Veverka
7 bendavid 1.1 //--------------------------------------------------------------------------------------------------
8    
9     #ifndef MITPHYSICS_MODS_PHOTONTREEWRITER_H
10     #define MITPHYSICS_MODS_PHOTONTREEWRITER_H
11    
12     #include "MitAna/TreeMod/interface/BaseMod.h"
13     #include "MitAna/DataTree/interface/PhotonFwd.h"
14     #include "MitAna/DataTree/interface/TrackCol.h"
15     #include "MitAna/DataTree/interface/VertexCol.h"
16     #include "MitAna/DataTree/interface/BeamSpotCol.h"
17     #include "MitAna/DataTree/interface/PFCandidateCol.h"
18     #include "MitAna/DataTree/interface/PileupEnergyDensityCol.h"
19     #include "MitAna/DataTree/interface/DecayParticleCol.h"
20     #include "MitAna/DataTree/interface/ElectronCol.h"
21 fabstoec 1.10 #include "MitAna/DataTree/interface/MuonCol.h"
22 bendavid 1.1 #include "MitAna/DataTree/interface/DecayParticleCol.h"
23     #include "MitAna/DataTree/interface/PileupInfoCol.h"
24     #include "MitAna/DataTree/interface/MCParticleCol.h"
25 bendavid 1.25 #include "MitAna/DataTree/interface/MCEventInfo.h"
26 bendavid 1.2 #include "MitAna/DataTree/interface/SuperClusterCol.h"
27     #include "MitAna/DataTree/interface/PFMetCol.h"
28 bendavid 1.5 #include "MitAna/DataTree/interface/JetCol.h"
29 fabstoec 1.13 #include "MitAna/DataTree/interface/PFJetCol.h"
30     #include "MitAna/DataTree/interface/GenJetCol.h"
31 bendavid 1.2 #include "MitPhysics/Utils/interface/PhotonFix.h"
32 bendavid 1.1 #include "MitPhysics/Utils/interface/PhotonTools.h"
33 bendavid 1.17 #include "MitPhysics/Utils/interface/MVAMet.h"
34 mingyang 1.24 #include "MitPhysics/Utils/interface/MVAVBF.h"
35 bendavid 1.1
36 fabstoec 1.26 #include "MitPhysics/Utils/interface/VertexTools.h"
37     #include "MitPhysics/Utils/interface/ElectronIDMVA.h"
38    
39 bendavid 1.1 class TNtuple;
40     class TRandom3;
41    
42     namespace mithep
43     {
44 bendavid 1.18
45     class PhotonTreeWriterVtx
46     {
47    
48     public:
49     void SetVars(const Vertex *v, const Photon *p1, const Photon *p2, const PFCandidateCol *pfcands, Int_t idx, Int_t numvtx, Float_t genvtxz);
50    
51     private:
52     Int_t n;
53     Int_t nvtx;
54     Float_t ptgg;
55     Float_t phigg;
56     Float_t etagg;
57     Float_t pxgg;
58     Float_t pygg;
59     Float_t pzgg;
60     Float_t mgg;
61     Float_t zgen;
62     Float_t x;
63     Float_t y;
64     Float_t z;
65     Float_t pt;
66     Float_t phi;
67     Float_t eta;
68     Float_t px;
69     Float_t py;
70     Float_t pz;
71     Float_t sumpt;
72     Float_t sumptsq;
73     Int_t nchalltoward;
74     Int_t nchalltransverse;
75     Int_t nchallaway;
76     Int_t nchcuttoward;
77     Int_t nchcuttransverse;
78     Int_t nchcutaway;
79     };
80    
81 mingyang 1.21 template <int NClus=16>//ming: what's template
82 bendavid 1.1 class PhotonTreeWriterPhoton
83     {
84     public:
85 fabstoec 1.26 void SetVars(const Photon *p, const DecayParticle *c, const Electron *ele, const SuperCluster *pfsc, const MCParticle *m, PhotonFix &phfixph, PhotonFix &phfixele, const TrackCol* trackCol,const VertexCol* vtxCol, const PFCandidateCol* candCol, Double_t _tRho, Bool_t fillclusterarrays, const ElectronCol* els, const DecayParticleCol *convs, const BaseVertex *bs, Bool_t applyElectronVeto=kTRUE, const Vertex* realVtx = NULL);
86 bendavid 1.1 Float_t Ecor() const { return ecor; };
87     Float_t Ecorerr() const { return ecorerr; };
88 bendavid 1.2 Float_t Ecorele() const { return ecorele; };
89 veverka 1.30 Float_t Ecoreleerr() const { return ecoreleerr; };
90 mingyang 1.31
91 bendavid 1.1 private:
92 bendavid 1.5 UChar_t hasphoton;
93 bendavid 1.1 Float_t e;
94     Float_t pt;
95     Float_t eta;
96     Float_t phi;
97     Float_t r9;
98     Float_t e3x3;
99     Float_t e5x5;
100     Float_t sce;
101     Float_t scrawe;
102     Float_t scpse;
103 bendavid 1.17 Float_t scpssigmaxx;
104     Float_t scpssigmayy;
105 bendavid 1.1 Float_t sceta;
106     Float_t scphi;
107 paus 1.9 UInt_t scnclusters;
108     UInt_t scnhits;
109 bendavid 1.2 Float_t scetawidth;
110     Float_t scphiwidth;
111 bendavid 1.1 Float_t hovere;
112 bendavid 1.17 Float_t hoveretower;
113 bendavid 1.1 Float_t sigietaieta;
114 paus 1.9 Bool_t isbarrel;
115     Bool_t isr9reco;
116     Bool_t isr9cat;
117     Char_t phcat;
118 bendavid 1.2 Float_t eerr;
119     Float_t eerrsmeared;
120 bendavid 1.3 Float_t esmearing;
121 bendavid 1.5 Float_t idmva;
122     Float_t ecalisodr03;
123     Float_t hcalisodr03;
124     Float_t trkisohollowdr03;
125 bendavid 1.8 Float_t ecalisodr04;
126     Float_t hcalisodr04;
127     Float_t trkisohollowdr04;
128     Float_t trackiso1;
129     Float_t trackiso2;
130     Float_t combiso1;
131     Float_t combiso2;
132 bendavid 1.23 Bool_t passeleveto;
133    
134 bendavid 1.5 //quantities from seed basic cluster
135 bendavid 1.2 Float_t eseed;
136 bendavid 1.4 Float_t etaseed;
137     Float_t phiseed;
138 paus 1.9 Int_t ietaseed;
139     Int_t iphiseed;
140     Int_t ixseed;
141     Int_t iyseed;
142 bendavid 1.4 Float_t etacryseed;
143     Float_t phicryseed;
144     Float_t xcryseed;
145     Float_t ycryseed;
146     Float_t thetaaxisseed;
147     Float_t phiaxisseed;
148 bendavid 1.5 Float_t sigietaietaseed;
149     Float_t sigiphiphiseed;
150     Float_t covietaiphiseed;
151     Float_t e3x3seed;
152     Float_t e5x5seed;
153     Float_t emaxseed;
154     Float_t e2ndseed;
155     Float_t etopseed;
156     Float_t ebottomseed;
157     Float_t eleftseed;
158     Float_t erightseed;
159     Float_t e1x3seed;
160     Float_t e3x1seed;
161     Float_t e1x5seed;
162     Float_t e2x2seed;
163     Float_t e4x4seed;
164     Float_t e2x5maxseed;
165     Float_t e2x5topseed;
166     Float_t e2x5bottomseed;
167     Float_t e2x5leftseed;
168     Float_t e2x5rightseed;
169     Float_t xseedseed;
170     Float_t yseedseed;
171     Float_t zseedseed;
172     UInt_t nhitsseed;
173    
174 bendavid 1.4 //quantities from second basic cluster, if present
175     Float_t ebc2;
176     Float_t etabc2;
177     Float_t phibc2;
178 paus 1.9 Int_t ietabc2;
179     Int_t iphibc2;
180     Int_t ixbc2;
181     Int_t iybc2;
182 bendavid 1.4 Float_t etacrybc2;
183     Float_t phicrybc2;
184     Float_t xcrybc2;
185     Float_t ycrybc2;
186     Float_t thetaaxisbc2;
187 bendavid 1.5 Float_t phiaxisbc2;
188     Float_t sigietaietabc2;
189     Float_t sigiphiphibc2;
190     Float_t covietaiphibc2;
191     Float_t e3x3bc2;
192     Float_t e5x5bc2;
193     Float_t emaxbc2;
194     Float_t e2ndbc2;
195     Float_t etopbc2;
196     Float_t ebottombc2;
197     Float_t eleftbc2;
198     Float_t erightbc2;
199     Float_t e1x3bc2;
200     Float_t e3x1bc2;
201     Float_t e1x5bc2;
202     Float_t e2x2bc2;
203     Float_t e4x4bc2;
204     Float_t e2x5maxbc2;
205     Float_t e2x5topbc2;
206     Float_t e2x5bottombc2;
207     Float_t e2x5leftbc2;
208     Float_t e2x5rightbc2;
209     Float_t xbc2bc2;
210     Float_t ybc2bc2;
211     Float_t zbc2bc2;
212     UInt_t nhitsbc2;
213    
214     //quantities from lowest energy basic cluster if present
215     Float_t ebclast;
216     Float_t etabclast;
217     Float_t phibclast;
218 paus 1.9 Int_t ietabclast;
219     Int_t iphibclast;
220     Int_t ixbclast;
221     Int_t iybclast;
222 bendavid 1.5 Float_t etacrybclast;
223     Float_t phicrybclast;
224     Float_t xcrybclast;
225     Float_t ycrybclast;
226     Float_t thetaaxisbclast;
227     Float_t phiaxisbclast;
228     Float_t sigietaietabclast;
229     Float_t sigiphiphibclast;
230     Float_t covietaiphibclast;
231     Float_t e3x3bclast;
232     Float_t e5x5bclast;
233     UInt_t nhitsbclast;
234    
235     //quantities from second lowest energy basic cluster if present
236     Float_t ebclast2;
237     Float_t etabclast2;
238     Float_t phibclast2;
239 paus 1.9 Int_t ietabclast2;
240     Int_t iphibclast2;
241     Int_t ixbclast2;
242     Int_t iybclast2;
243 bendavid 1.5 Float_t etacrybclast2;
244     Float_t phicrybclast2;
245     Float_t xcrybclast2;
246     Float_t ycrybclast2;
247     Float_t thetaaxisbclast2;
248     Float_t phiaxisbclast2;
249     Float_t sigietaietabclast2;
250     Float_t sigiphiphibclast2;
251     Float_t covietaiphibclast2;
252     Float_t e3x3bclast2;
253     Float_t e5x5bclast2;
254     UInt_t nhitsbclast2;
255 bendavid 1.1
256     //energy correction quantities from PhotonFix
257     Float_t ecor;
258     Float_t ecorerr;
259 bendavid 1.2 Float_t ecorele;
260     Float_t ecoreleerr;
261 bendavid 1.1 Float_t etac;
262     Float_t etas;
263     Float_t etam;
264     Float_t phic;
265     Float_t phis;
266     Float_t phim;
267     Float_t xz;
268     Float_t xc;
269     Float_t xs;
270     Float_t xm;
271     Float_t yz;
272     Float_t yc;
273     Float_t ys;
274     Float_t ym;
275    
276     //conversion quantities
277 bendavid 1.5 UChar_t hasconversion;
278 bendavid 1.1 Float_t convp;
279     Float_t convpt;
280     Float_t conveta;
281     Float_t convphi;
282     Float_t convdeta;
283     Float_t convdphi;
284     Float_t convvtxrho;
285     Float_t convvtxz;
286     Float_t convvtxphi;
287     Float_t convleadpt;
288     Float_t convtrailpt;
289     Float_t convleadtrackpt;
290 paus 1.9 Char_t convleadtrackalgo;
291     Char_t convleadtrackalgos;
292     Char_t convleadtrackcharge;
293 bendavid 1.1 Float_t convtrailtrackpt;
294 paus 1.9 Char_t convtrailtrackalgo;
295     Char_t convtrailtrackalgos;
296     Char_t trailtrackcharge;
297 bendavid 1.1
298 bendavid 1.2 //electron quantities
299 bendavid 1.5 UChar_t haselectron;
300     UChar_t eleisecaldriven;
301     UChar_t eleistrackerdriven;
302 bendavid 1.2 Float_t elee;
303     Float_t elept;
304     Float_t eleeta;
305     Float_t elephi;
306 paus 1.9 Char_t elecharge;
307 bendavid 1.2 Float_t elefbrem;
308     Float_t eledeta;
309     Float_t eledphi;
310     Float_t elep;
311     Float_t elepin;
312     Float_t elepout;
313    
314     //pf supercluster quantities
315 bendavid 1.5 UChar_t haspfsc;
316 bendavid 1.2 Float_t pfsce;
317     Float_t pfscrawe;
318     Float_t pfsceta;
319     Float_t pfscphi;
320 bendavid 1.17 UInt_t pfscnclusters;
321     UInt_t pfscnhits;
322     Float_t pfscetawidth;
323     Float_t pfscphiwidth;
324     UInt_t pfscnpsclusters;
325 bendavid 1.1
326     //generator level quantities
327 bendavid 1.5 UChar_t ispromptgen;
328 bendavid 1.1 Float_t gene;
329     Float_t genpt;
330     Float_t geneta;
331     Float_t genphi;
332     Float_t genz;
333 bendavid 1.5 Int_t pdgid;
334     Int_t motherpdgid;
335 bendavid 1.17
336 fabstoec 1.19 // -----------------------------------------------------
337     // PF-CiC4 Debug Stuff
338     Float_t pfcic4_tIso1;
339     Float_t pfcic4_tIso2;
340     Float_t pfcic4_tIso3;
341     Float_t pfcic4_covIEtaIEta;
342     Float_t pfcic4_HoE;
343     Float_t pfcic4_R9;
344     Float_t pfcic4_wVtxInd;
345     Float_t pfcic4_ecalIso3;
346     Float_t pfcic4_ecalIso4;
347     Float_t pfcic4_trackIsoSel03;
348     Float_t pfcic4_trackIsoWorst04;
349     Float_t pfcic4_combIso1;
350     Float_t pfcic4_combIso2;
351     // -----------------------------------------------------
352    
353 mingyang 1.21 // -----------------------------------------------------
354     //id mva
355     //2011
356     Float_t idmva_tIso1abs;
357     Float_t idmva_tIso2abs;
358     Float_t idmva_tIso3abs;
359     Float_t idmva_absIsoEcal;
360     Float_t idmva_absIsoHcal;
361     //2012
362     Float_t idmva_CoviEtaiPhi;
363     Float_t idmva_s4ratio;
364     Float_t idmva_GammaIso;
365     Float_t idmva_ChargedIso_selvtx;
366 fabstoec 1.26 Float_t idmva_ChargedIso_0p2_selvtx;
367 mingyang 1.21 Float_t idmva_ChargedIso_worstvtx;
368     Float_t idmva_PsEffWidthSigmaRR;
369    
370 mingyang 1.31 Float_t ebcs[NClus];
371 bendavid 1.17 Float_t etabcs[NClus];
372     Float_t phibcs[NClus];
373     Int_t ietabcs[NClus];
374     Int_t iphibcs[NClus];
375     Int_t ixbcs[NClus];
376     Int_t iybcs[NClus];
377     Float_t etacrybcs[NClus];
378     Float_t phicrybcs[NClus];
379     Float_t xcrybcs[NClus];
380     Float_t ycrybcs[NClus];
381     Float_t sigietaietabcs[NClus];
382     Float_t sigiphiphibcs[NClus];
383     Float_t covietaiphibcs[NClus];
384     Float_t sigetaetabcs[NClus];
385     Float_t sigphiphibcs[NClus];
386     Float_t covetaphibcs[NClus];
387     Float_t e3x3bcs[NClus];
388     Float_t e5x5bcs[NClus];
389     Float_t emaxbcs[NClus];
390     Float_t e2ndbcs[NClus];
391     Float_t etopbcs[NClus];
392     Float_t ebottombcs[NClus];
393     Float_t eleftbcs[NClus];
394     Float_t erightbcs[NClus];
395     Float_t e1x3bcs[NClus];
396     Float_t e3x1bcs[NClus];
397     Float_t e1x5bcs[NClus];
398     Float_t e2x2bcs[NClus];
399     Float_t e4x4bcs[NClus];
400     Float_t e2x5maxbcs[NClus];
401     Float_t e2x5topbcs[NClus];
402     Float_t e2x5bottombcs[NClus];
403     Float_t e2x5leftbcs[NClus];
404     Float_t e2x5rightbcs[NClus];
405     UInt_t nhitsbcs[NClus];
406    
407     Float_t epfbcs[NClus];
408     Float_t etapfbcs[NClus];
409     Float_t phipfbcs[NClus];
410     Int_t ietapfbcs[NClus];
411     Int_t iphipfbcs[NClus];
412     Int_t ixpfbcs[NClus];
413     Int_t iypfbcs[NClus];
414     Float_t etacrypfbcs[NClus];
415     Float_t phicrypfbcs[NClus];
416     Float_t xcrypfbcs[NClus];
417     Float_t ycrypfbcs[NClus];
418     Float_t sigietaietapfbcs[NClus];
419     Float_t sigiphiphipfbcs[NClus];
420     Float_t covietaiphipfbcs[NClus];
421     Float_t sigetaetapfbcs[NClus];
422     Float_t sigphiphipfbcs[NClus];
423     Float_t covetaphipfbcs[NClus];
424     Float_t e3x3pfbcs[NClus];
425     Float_t e5x5pfbcs[NClus];
426     Float_t emaxpfbcs[NClus];
427     Float_t e2ndpfbcs[NClus];
428     Float_t etoppfbcs[NClus];
429     Float_t ebottompfbcs[NClus];
430     Float_t eleftpfbcs[NClus];
431     Float_t erightpfbcs[NClus];
432     Float_t e1x3pfbcs[NClus];
433     Float_t e3x1pfbcs[NClus];
434     Float_t e1x5pfbcs[NClus];
435     Float_t e2x2pfbcs[NClus];
436     Float_t e4x4pfbcs[NClus];
437     Float_t e2x5maxpfbcs[NClus];
438     Float_t e2x5toppfbcs[NClus];
439     Float_t e2x5bottompfbcs[NClus];
440     Float_t e2x5leftpfbcs[NClus];
441     Float_t e2x5rightpfbcs[NClus];
442     UInt_t nhitspfbcs[NClus];
443    
444     Float_t epsc[100];
445     Float_t etapsc[100];
446     Float_t phipsc[100];
447     UChar_t planepsc[100];
448    
449    
450 bendavid 1.1 };
451    
452     class PhotonTreeWriterDiphotonEvent
453     {
454     public:
455 fabstoec 1.12 // ------------ BTAG STUFF -------------------
456 fabstoec 1.15 Float_t btagJet1;
457     Float_t btagJet1Pt;
458     Float_t btagJet1Eta;
459     Float_t btagJet2;
460     Float_t btagJet2Pt;
461     Float_t btagJet2Eta;
462 fabstoec 1.12 // ----------- LEPTON TAG STUFF -------------
463 fabstoec 1.10 Int_t leptonTag;
464 fabstoec 1.26 // ----------- VEERTEX SYNCHING STUFF -------
465    
466     Int_t vtxInd1;
467     Int_t vtxInd2;
468     Int_t vtxInd3;
469    
470     Float_t vtxBestPtbal ;
471     Float_t vtxBestPtasym ;
472     Float_t vtxBestSumpt2 ;
473     Float_t vtxBestP2Conv ;
474    
475     Float_t vtxMva1Z ;
476     Float_t vtxMva2Z ;
477     Float_t vtxMva3Z ;
478    
479     Float_t vtxMva1 ;
480     Float_t vtxMva2 ;
481     Float_t vtxMva3 ;
482    
483     Int_t vtxNleg1 ;
484     Int_t vtxNleg2 ;
485     Int_t vtxConvIdx1 ;
486     Int_t vtxConvIdx2 ;
487     Int_t vtxNconv ;
488    
489     Float_t vtxConv1Z ;
490     Float_t vtxConv1DZ ;
491     Float_t vtxConv1Prob ;
492    
493     Float_t vtxConv2Z ;
494     Float_t vtxConv2DZ ;
495     Float_t vtxConv2Prob ;
496    
497    
498 fabstoec 1.11 // ---------- MUON STUFF --------------------
499     Float_t muonPt;
500     Float_t muonEta;
501     Float_t muDR1;
502     Float_t muDR2;
503     Float_t muIso1;
504     Float_t muIso2;
505     Float_t muIso3;
506     Float_t muIso4;
507     Float_t muD0;
508     Float_t muDZ;
509     Int_t muNhits;
510     Float_t muChi2;
511     Int_t muNpixhits;
512     Int_t muNegs;
513     Int_t muNMatch;
514     // ----------- ELECTRON STUFF --------------
515     Float_t elePt;
516     Float_t eleEta;
517     Float_t eleSCEta;
518     Float_t eleIso1;
519     Float_t eleIso2;
520     Float_t eleIso3;
521     Float_t eleIso4;
522     Float_t eleDist;
523     Float_t eleDcot;
524     Float_t eleCoviee;
525     Float_t eleDphiin;
526     Float_t eleDetain;
527     Float_t eleDR1;
528     Float_t eleDR2;
529     Float_t eleMass1;
530     Float_t eleMass2;
531     Int_t eleNinnerHits;
532 fabstoec 1.26 Float_t eleIdMva;
533 fabstoec 1.11 // -----------------------------------------
534 bendavid 1.1 Float_t rho;
535 bendavid 1.17 Float_t rho25;
536     Float_t rhoold;
537 bendavid 1.1 Float_t genHiggspt;
538     Float_t genHiggsZ;
539     Float_t genmass;
540     Float_t gencostheta;
541 bendavid 1.23 Float_t genz;
542 bendavid 1.2 Float_t bsX;
543     Float_t bsY;
544     Float_t bsZ;
545 bendavid 1.7 Float_t bsSigmaZ;
546 bendavid 1.2 Float_t vtxX;
547     Float_t vtxY;
548 bendavid 1.1 Float_t vtxZ;
549     Int_t nVtx;
550     Int_t numPU;
551     Int_t numPUminus;
552     Int_t numPUplus;
553     Float_t mass;
554 bendavid 1.2 Float_t masserr;
555     Float_t masserrsmeared;
556 bendavid 1.4 Float_t masserrwrongvtx;
557     Float_t masserrsmearedwrongvtx;
558     Float_t vtxprob;
559 bendavid 1.5 Float_t deltamvtx;
560 bendavid 1.1 Float_t ptgg;
561 bendavid 1.5 Float_t etagg;
562     Float_t phigg;
563 bendavid 1.1 Float_t costheta;
564 bendavid 1.2 Float_t massele;
565     Float_t ptee;
566     Float_t costhetaele;
567     Float_t mt;
568     Float_t cosphimet;
569     Float_t mtele;
570     Float_t cosphimetele;
571 bendavid 1.1 UInt_t evt;
572     UInt_t run;
573     UInt_t lumi;
574     UChar_t evtcat;
575 bendavid 1.2 UInt_t nobj;
576 fabstoec 1.13 Double_t fromZ; //added: Heng 2/14/2012
577     Double_t fromW; //added: Heng
578     Float_t zpt; //added: Heng
579     Float_t allZpt; //added: Heng
580     Float_t zEta; //added: Heng
581     Float_t allZEta; //added: Heng
582 fabstoec 1.16
583     //Met stuff
584 fabstoec 1.13 Float_t corrpfmet;
585     Float_t corrpfmetphi;
586     Float_t corrpfmetx;
587     Float_t corrpfmety;
588     Double_t dphiMetgg;
589     Double_t cosdphiMetgg;
590     Double_t dphiPhPh;
591 bendavid 1.2 Float_t pfmet;
592     Float_t pfmetphi;
593     Float_t pfmetx;
594     Float_t pfmety;
595 mtouch 1.20
596 bendavid 1.17
597     Float_t mvametsel;
598     Float_t mvametselphi;
599     Float_t mvametselx;
600     Float_t mvametsely;
601     Float_t mvametselsig;
602    
603     Float_t mvametfirst;
604     Float_t mvametfirstphi;
605     Float_t mvametfirstx;
606     Float_t mvametfirsty;
607     Float_t mvametfirstsig;
608    
609 fabstoec 1.16 Double_t spfMet;
610 bendavid 1.17
611 mingyang 1.24 // ----------- VBF TAG STUFF -------------
612     Int_t vbfTag;
613     Float_t vbfbdt;
614 mtouch 1.20
615 mingyang 1.31
616 veverka 1.30 // ----------- TTH TAG STUFF -------------
617     Int_t tthTag;
618    
619 mingyang 1.24 // ----------------------------------------
620 bendavid 1.5 UChar_t ismc;
621 bendavid 1.25 Int_t mcprocid;
622 bendavid 1.32 Double_t mcweight;
623 bendavid 1.1
624     //corrected quantities from PhotonFix corrections
625     Float_t masscor;
626     Float_t masscorerr;
627 bendavid 1.2 Float_t masscorele;
628     Float_t masscoreleerr;
629 mingyang 1.28
630     //jet quantities for met phi cut
631     Float_t jetleadNoIDpt;
632     Float_t jetleadNoIDeta;
633     Float_t jetleadNoIDphi;
634     Float_t jetleadNoIDmass;
635    
636 bendavid 1.5 //jet quantities
637     Float_t jet1pt;
638     Float_t jet1eta;
639     Float_t jet1phi;
640     Float_t jet1mass;
641     Float_t jet2pt;
642     Float_t jet2eta;
643     Float_t jet2phi;
644     Float_t jet2mass;
645     Float_t jetcentralpt;
646     Float_t jetcentraleta;
647     Float_t jetcentralphi;
648     Float_t jetcentralmass;
649     Float_t dijetpt;
650     Float_t dijeteta;
651     Float_t dijetphi;
652     Float_t dijetmass;
653     Float_t jetetaplus;
654     Float_t jetetaminus;
655    
656 fabstoec 1.16 // Float_t uncorrjet1pt;
657     // Float_t uncorrjet1eta;
658     // Float_t uncorrjet1phi;
659     // Float_t uncorrjet1mass;
660     // Float_t uncorrjet2pt;
661     // Float_t uncorrjet2eta;
662     // Float_t uncorrjet2phi;
663     // Float_t uncorrjet2mass;
664     // Float_t uncorrjetcentralpt;
665     // Float_t uncorrjetcentraleta;
666     // Float_t uncorrjetcentralphi;
667     // Float_t uncorrjetcentralmass;
668     // Float_t diuncorrjetpt;
669     // Float_t diuncorrjeteta;
670     // Float_t diuncorrjetphi;
671     // Float_t diuncorrjetmass;
672     // Float_t uncorrjetetaplus;
673     // Float_t uncorrjetetaminus;
674    
675 bendavid 1.5 Float_t zeppenfeld;
676     Float_t dphidijetgg;
677    
678 bendavid 1.17 PhotonTreeWriterPhoton<16> photons[2];
679 bendavid 1.1 };
680    
681     class PhotonTreeWriter : public BaseMod
682     {
683     public:
684     PhotonTreeWriter(const char *name ="PhotonTreeWriter",
685     const char *title="Selecting PhotonPairs");
686    
687     ~PhotonTreeWriter();
688    
689     // setting all the input Names
690     void SetInputPhotonsName(const char *n){ fPhotonBranchName= n; }
691     void SetPhotonsFromBranch(bool b) { fPhotonsFromBranch = b; }
692     void SetTrackName(const char *n) { fTrackBranchName = n; }
693     void SetElectronName(const char *n) { fElectronName = n; }
694     void SetConversionName(const char *n) { fConversionName = n; }
695     void SetPUDensityName(const char *n) { fPileUpDenName = n; }
696     void SetPVName(const char *n) { fPVName = n; }
697     void SetPVFromBranch(bool b) { fPVFromBranch = b; }
698     void SetMCParticle(const char *n) { fMCParticleName = n; }
699     void SetPUInfoName(const char *n) { fPileUpName = n; }
700     void SetBeamspotName(const char *n) { fBeamspotName = n; }
701     void SetPFCandName(const char *n) { fPFCandName = n; }
702 bendavid 1.2 void SetSuperClusterName(const char *n) { fSuperClusterName = n; }
703 bendavid 1.5 void SetPFJetName(const char *n) { fPFJetName = n; }
704 fabstoec 1.13 void SetGenJetName(const char *n) { fGenJetName = n; }
705     void SetuncorrPFJetName(const char *n) { funcorrPFJetName = n; }
706 fabstoec 1.22 void SetPFNoPileUpName(const char *n) { fPFNoPileUpName = n; }
707     void SetPFPileUpName(const char *n) { fPFPileUpName = n; }
708    
709 fabstoec 1.13
710 bendavid 1.5 void SetPFJetsFromBranch(Bool_t b) { fPFJetsFromBranch = b; }
711     void SetEnableJets(Bool_t b) { fEnableJets = b; }
712 mingyang 1.29 void SetEnableGenJets(Bool_t b) { fEnableGenJets = b; }
713 bendavid 1.18 void SetApplyJetId(Bool_t b) { fApplyJetId = b; }
714 fabstoec 1.10 void SetApplyLeptonTag(Bool_t b) { fApplyLeptonTag = b; }
715 mingyang 1.24 void SetApplyVBFTag(Bool_t b) { fApplyVBFTag = b; }
716 veverka 1.30 void SetApplyTTHTag(Bool_t b) { fApplyTTHTag = b; }
717 fabstoec 1.12 void SetApplyBTag(Bool_t b) { fApplyBTag = b; }
718 fabstoec 1.14 void SetApplyPFMetCorr(Bool_t b) { fApplyPFMetCorrections = b; }
719 bendavid 1.2 void SetPhFixDataFile(const char *n) { fPhFixDataFile = n; }
720 veverka 1.30 void SetVerbosityLevel(Bool_t b) { fVerbosityLevel = b; }
721 bendavid 1.1
722 fabstoec 1.16
723 fabstoec 1.22
724    
725 bendavid 1.1 // set basic Cut variables (FOR PRE-SELECTION)
726    
727     // is Data Or Not?
728 paus 1.9 void SetIsData (Bool_t b) { fIsData = b; };
729 bendavid 1.1
730    
731 bendavid 1.6 void SetApplyElectronVeto(Bool_t b) { fApplyElectronVeto = b; }
732 bendavid 1.1
733 paus 1.9 void SetTupleName(const char* c) { fTupleName = c; }
734 bendavid 1.1 void SetGoodElectronsFromBranch(Bool_t b) { fGoodElectronsFromBranch = b; }
735 paus 1.9 void SetGoodElectronName(TString name) { fGoodElectronName = name; }
736     void SetWriteDiphotonTree(Bool_t b) { fWriteDiphotonTree = b; }
737     void SetWriteSingleTree(Bool_t b) { fWriteSingleTree = b; }
738     void SetLoopOnGoodElectrons(Bool_t b) { fLoopOnGoodElectrons = b; }
739 bendavid 1.17 void SetEnablePFPhotons(Bool_t b) { fEnablePFPhotons = b; }
740 paus 1.9 void SetExcludeSinglePrompt(Bool_t b) { fExcludeSinglePrompt = b; }
741     void SetExcludeDoublePrompt(Bool_t b) { fExcludeDoublePrompt = b; }
742 bendavid 1.1
743 fabstoec 1.10 void SetLeptonTagElectronsName(TString name) { fLeptonTagElectronsName = name; }
744     void SetLeptonTagMuonsName (TString name) { fLeptonTagMuonsName = name; }
745 fabstoec 1.22 void SetFillClusterArrays(Bool_t b) { fFillClusterArrays = b; }
746 fabstoec 1.10
747 fabstoec 1.22 void SetDo2012LepTag(Bool_t b) { fDo2012LepTag = b; }
748 bendavid 1.17
749 bendavid 1.23 void SetBeamspotWidth(Double_t x) { fBeamspotWidth = x; }
750 fabstoec 1.26
751     void SetElectronMVAWeightsSubdet0Pt10To20(TString s)
752     { fElectronMVAWeights_Subdet0Pt10To20 = s; }
753     void SetElectronMVAWeightsSubdet1Pt10To20(TString s)
754     { fElectronMVAWeights_Subdet1Pt10To20 = s; }
755     void SetElectronMVAWeightsSubdet2Pt10To20(TString s)
756     { fElectronMVAWeights_Subdet2Pt10To20 = s; }
757     void SetElectronMVAWeightsSubdet0Pt20ToInf(TString s)
758     { fElectronMVAWeights_Subdet0Pt20ToInf = s; }
759     void SetElectronMVAWeightsSubdet1Pt20ToInf(TString s)
760     { fElectronMVAWeights_Subdet1Pt20ToInf = s; }
761     void SetElectronMVAWeightsSubdet2Pt20ToInf(TString s)
762     { fElectronMVAWeights_Subdet2Pt20ToInf = s; }
763    
764 fabstoec 1.27 void SetDoSynching(bool b) {fDoSynching = b;}
765 fabstoec 1.26
766    
767 bendavid 1.23
768 bendavid 1.1 protected:
769     void Process();
770     void SlaveBegin();
771 mingyang 1.31
772 paus 1.9 // Private auxiliary methods...
773 bendavid 1.1 void FindHiggsPtAndZ(Float_t& pt, Float_t& z, Float_t& mass);
774 paus 1.9 Float_t GetEventCat (PhotonTools::CiCBaseLineCats cat1,
775     PhotonTools::CiCBaseLineCats cat2);
776 mingyang 1.31 //void ApplyTTHTag(const Photon*, const Photon*, const Vertex*);
777     //void PrintTTHDebugInfo();
778     //void PrintTTHDecay();
779 veverka 1.30 void PrintGenElectrons();
780     void PrintElectrons(const char *, const ElectronCol*);
781 bendavid 1.1
782 mingyang 1.31 void ApplyTTHTag(const Photon *phHard, const Photon *phSoft,const Vertex *selvtx);
783    
784 bendavid 1.1 // Names for the input Collections
785     TString fPhotonBranchName;
786 bendavid 1.17 TString fPFPhotonName;
787 bendavid 1.1 TString fElectronName;
788     TString fGoodElectronName;
789     TString fConversionName;
790 fabstoec 1.26 TString fPFConversionName;
791 bendavid 1.1 TString fTrackBranchName;
792     TString fPileUpDenName;
793     TString fPVName;
794     TString fBeamspotName;
795     TString fPFCandName;
796 fabstoec 1.22 TString fPFNoPileUpName; //name of pfnpu collection
797     TString fPFPileUpName; //name of pfpu collection
798    
799 bendavid 1.1 TString fMCParticleName;
800 bendavid 1.25 TString fMCEventInfoName;
801    
802 bendavid 1.1 TString fPileUpName;
803 bendavid 1.2 TString fSuperClusterName;
804     TString fPFMetName;
805 bendavid 1.5 TString fPFJetName;
806 fabstoec 1.10
807 mtouch 1.20
808 fabstoec 1.16 TString funcorrPFJetName;
809 fabstoec 1.13 TString fGenJetName; //added to do pfmet correction 05/01/2012
810    
811 mtouch 1.20
812 fabstoec 1.10 TString fLeptonTagElectronsName;
813     TString fLeptonTagMuonsName;
814    
815 bendavid 1.1
816     // is it Data or MC?
817     Bool_t fIsData;
818    
819     // in case there's some PV pre-selection
820     Bool_t fPhotonsFromBranch;
821     Bool_t fPVFromBranch;
822     Bool_t fGoodElectronsFromBranch;
823 bendavid 1.5 Bool_t fPFJetsFromBranch;
824 bendavid 1.1
825 fabstoec 1.26 Bool_t fDoSynching;
826    
827 paus 1.9 const PhotonCol *fPhotons;
828 bendavid 1.17 const PhotonCol *fPFPhotons;
829 paus 1.9 const ElectronCol *fElectrons;
830     const ElectronCol *fGoodElectrons;
831     const DecayParticleCol *fConversions;
832 fabstoec 1.26 const DecayParticleCol *fPFConversions;
833 paus 1.9 const TrackCol *fTracks;
834     const PileupEnergyDensityCol *fPileUpDen;
835     const VertexCol *fPV;
836     const BeamSpotCol *fBeamspot;
837     const PFCandidateCol *fPFCands;
838     const MCParticleCol *fMCParticles;
839 bendavid 1.25 const MCEventInfo *fMCEventInfo;
840 paus 1.9 const PileupInfoCol *fPileUp;
841     const SuperClusterCol *fSuperClusters;
842     const PFMetCol *fPFMet;
843     const JetCol *fPFJets;
844 fabstoec 1.13 const GenJetCol *fGenJets;
845     const PFJetCol *funcorrPFJets;
846 bendavid 1.2
847 fabstoec 1.10 const ElectronCol *fLeptonTagElectrons;
848     const MuonCol *fLeptonTagMuons;
849 fabstoec 1.22 const PFCandidateCol *fPFNoPileUpCands; //!pfnpu collection
850     const PFCandidateCol *fPFPileUpCands; //!pfpu collection
851 fabstoec 1.10
852 bendavid 1.1 // --------------------------------
853 paus 1.9 Bool_t fLoopOnGoodElectrons; //loop over good elecs instead of photons
854     Bool_t fApplyElectronVeto; //invert elec veto (for cic sel. only atm)
855     Bool_t fWriteDiphotonTree;
856     Bool_t fWriteSingleTree;
857 bendavid 1.1
858 bendavid 1.17 Bool_t fEnablePFPhotons;
859    
860 paus 1.9 Bool_t fExcludeSinglePrompt;
861     Bool_t fExcludeDoublePrompt;
862 bendavid 1.2
863 paus 1.9 Bool_t fEnableJets;
864 mingyang 1.29 Bool_t fEnableGenJets;
865 bendavid 1.18 Bool_t fApplyJetId;
866 fabstoec 1.10
867     Bool_t fApplyLeptonTag;
868 mingyang 1.24 Bool_t fApplyVBFTag;
869 veverka 1.30 Bool_t fApplyTTHTag;
870 fabstoec 1.12 Bool_t fApplyBTag;
871 fabstoec 1.14 Bool_t fApplyPFMetCorrections;
872 fabstoec 1.12
873 bendavid 1.17 Bool_t fFillClusterArrays;
874 bendavid 1.18 Bool_t fFillVertexTree;
875 bendavid 1.17
876 fabstoec 1.22 Bool_t fDo2012LepTag;
877 veverka 1.30
878     Int_t fVerbosityLevel;
879 fabstoec 1.22
880 paus 1.9 TString fPhFixDataFile;
881     PhotonFix fPhfixph;
882     PhotonFix fPhfixele;
883 bendavid 1.23
884     Double_t fBeamspotWidth;
885 veverka 1.30
886 bendavid 1.1
887     // --------------------------------
888 mingyang 1.24 // variables for vbf
889     float jet1pt_vbf;
890     float jet2pt_vbf;
891     float deltajeteta_vbf;
892     float dijetmass_vbf;
893     float zeppenfeld_vbf;
894     float dphidijetgg_vbf;
895     float diphoptOverdiphomass_vbf;
896     float pho1ptOverdiphomass_vbf;
897     float pho2ptOverdiphomass_vbf;
898    
899     // --------------------------------
900 bendavid 1.1 // validation Tuple
901 paus 1.9 TString fTupleName;
902 bendavid 1.1 PhotonTreeWriterDiphotonEvent* fDiphotonEvent;
903 bendavid 1.17 PhotonTreeWriterPhoton<16>* fSinglePhoton;
904 paus 1.9 TTree* hCiCTuple;
905     TTree* hCiCTupleSingle;
906 bendavid 1.1
907 bendavid 1.18 PhotonTreeWriterVtx *fDiphotonVtx;
908     TTree *hVtxTree;
909    
910 bendavid 1.17 MVAMet fMVAMet;
911 bendavid 1.18 JetIDMVA fJetId;
912 mingyang 1.24 MVAVBF fMVAVBF;
913 bendavid 1.17
914 fabstoec 1.26 VertexTools fVtxTools;
915    
916     ElectronIDMVA *fElectronIDMVA;
917     TString fElectronMVAWeights_Subdet0Pt10To20;
918     TString fElectronMVAWeights_Subdet1Pt10To20;
919     TString fElectronMVAWeights_Subdet2Pt10To20;
920     TString fElectronMVAWeights_Subdet0Pt20ToInf;
921     TString fElectronMVAWeights_Subdet1Pt20ToInf;
922     TString fElectronMVAWeights_Subdet2Pt20ToInf;
923    
924     RhoUtilities::RhoType fTheRhoType;
925    
926 bendavid 1.1 ClassDef(PhotonTreeWriter, 1) // Photon identification module
927 mingyang 1.24 };
928 bendavid 1.1 }
929     #endif