ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/HbbAnalysis/interface/Objects.hh
(Generate patch)

Comparing UserCode/HbbAnalysis/interface/Objects.hh (file contents):
Revision 1.18 by amagnan, Mon Feb 7 13:35:19 2011 UTC vs.
Revision 1.29 by agilbert, Tue Oct 25 13:26:50 2011 UTC

# Line 4 | Line 4
4   #include <vector>
5   #include <string>
6   #include <iostream>
7 + #include <map>
8  
9   #include "TLorentzVector.h"
10 + #include "TMath.h"
11  
12   namespace HbbAnalysis {
13  
14 <  struct MCVars {
13 <    unsigned int index;
14 <    double E;
15 <    double pT;
16 <    double eta;
17 <    double y;
18 <    double phi;
19 <    int pdgId;
20 <    int status;
21 <  };
22 <
23 <  struct HLTVars {
24 <    float pT;
25 <    float eta;
26 <    float phi;
27 <    int id;
28 <    float mass;
29 <    unsigned int type;//1=EM, 2=muon, 3=jet, 0=unknown
30 <  };
31 <
32 <  struct L1Vars {
33 <    //type:
34 <    //0 = empty
35 <    //1 = central jet
36 <    //2 = tau jet
37 <    //3 = forward jet
38 <    unsigned int type;
39 <    int bx;
40 <    float pT;
41 <    float ET;
42 <    float eta;
43 <    float phi;
44 <  };
45 <
46 <  struct GenVars {
47 <    bool valid;
48 <    double E;
49 <    double pT;
50 <    double eta;
51 <    double y;
52 <    double phi;
53 <    int charge;
54 <    int pdgId;
55 <    int status;
56 <    double mass;
14 >  struct Point{
15      double vx;
16      double vy;
17      double vz;
18 +    
19 +    Point() : vx(0), vy(0), vz(0) {}
20 +    Point(double x, double y, double z) : vx(x), vy(y), vz(z) {}
21 +    void Clear() {
22 +      vx = 0;
23 +      vy = 0;
24 +      vz = 0;
25 +    }
26 +  };
27 +
28 +  struct P4Total {
29 +    double comE;
30 +    double sumPx;
31 +    double sumPy;
32 +    double sumPz;
33 +    double sumE;
34 +    P4Total() :
35 +      comE(0),
36 +      sumPx(0),
37 +      sumPy(0),
38 +      sumPz(0),
39 +      sumE(0)
40 +    {}
41 +    void Clear() {
42 +      comE = 0;
43 +      sumPx = 0;
44 +      sumPy = 0;
45 +      sumPz = 0;
46 +      sumE = 0;
47 +    }
48 +  };
49 +
50 +  struct FourMomentum {
51 +      double px;
52 +      double py;
53 +      double pz;
54 +      double e;
55 +
56 +      FourMomentum() :
57 +        px(0),
58 +        py(0),
59 +        pz(0),
60 +        e(0)
61 +    {}
62 +      void Clear() {
63 +        px = 0;
64 +        py = 0;
65 +        pz = 0;
66 +        e = 0;
67 +      }
68 +      TLorentzVector GetTLorentzVector() const {
69 +        return TLorentzVector(px,py,pz,e);
70 +      }
71 +  };
72 +
73 +  struct PUVars {
74 +    int bunchCrossing;
75 +    unsigned int numInteractions;
76 +    PUVars(){
77 +      bunchCrossing = 0;
78 +      numInteractions = 0;
79 +    }
80 +    void Clear(){
81 +      bunchCrossing = 0;
82 +      numInteractions = 0;
83 +    }
84    };
85  
86 <  struct BaseVars {
87 <    double E;
88 <    double pT;
89 <    double eta;
90 <    double y;
91 <    double phi;
86 >  struct GenJetVars {
87 >    int flavour;
88 >    double mass;
89 >    int nConstituents;
90 >    GenJetVars():
91 >      flavour(0),
92 >      mass(0),
93 >      nConstituents(0)
94 >    {}
95 >    void Clear() {
96 >      flavour = 0;
97 >      mass = 0;
98 >      nConstituents = 0;
99 >    }
100 >  };
101 >
102 >  struct GenVars {
103      float charge;
104 <    double vx;
105 <    double vy;
106 <    double vz;
104 >    int pdgId;
105 >    short status;
106 >    int index;
107 >    Point vertex;
108 >    GenVars():
109 >      charge(0),
110 >      pdgId(0),
111 >      status(0),
112 >      index(0)
113 >    {}
114 >    void Clear() {
115 >      charge = 0;
116 >      pdgId = 0;
117 >      status = 0;
118 >      index = 0;
119 >      vertex.Clear();
120 >    }
121    };
122  
123    struct SCVars {
124 +    float eta;
125      float sigmaEtaEta;
126      float sigmaIEtaIEta;
127      float e1x5;
128      float e2x5Max;
129      float e5x5;
130      float eOverP;
131 +    SCVars():
132 +      eta(0),
133 +      sigmaEtaEta(0),
134 +      sigmaIEtaIEta(0),
135 +      e1x5(0),
136 +      e2x5Max(0),
137 +      e5x5(0),
138 +      eOverP(0)
139 +    {}
140 +    void Clear() {
141 +    eta = 0;
142 +    sigmaEtaEta = 0;
143 +    sigmaIEtaIEta = 0;
144 +    e1x5 = 0;
145 +    e2x5Max = 0;
146 +    e5x5 = 0;
147 +    eOverP = 0;
148 +    }
149    };
150  
151    struct EleIsoVars {
84    float calo;
152      float track;
153      float ecal;
154      float hcal;
155 +    EleIsoVars():
156 +      track(0),
157 +      ecal(0),
158 +      hcal(0)
159 +    {}
160 +    void Clear() {
161 +    track = 0;
162 +    ecal = 0;
163 +    hcal = 0;
164 +    }
165    };
166    
167    struct EleIDVars{
168      unsigned short idAndIso;
169 <    std::vector<std::pair<std::string,float> > electronIDs;
169 >    std::map<std::string,float> electronIDs;
170      float hOverE;
171      float deltaPhiIn;
172      float deltaEtaIn;
173      bool ecalDrivenSeed;
174      bool trackerDrivenSeed;
175 +    EleIDVars():
176 +      idAndIso(0),
177 +      hOverE(0),
178 +      deltaPhiIn(0),
179 +      deltaEtaIn(0),
180 +      ecalDrivenSeed(false),
181 +      trackerDrivenSeed(false)
182 +    {}
183 +    void Clear() {
184 +    idAndIso = 0;
185 +    electronIDs.clear();
186 +    hOverE = 0;
187 +    deltaPhiIn = 0;
188 +    deltaEtaIn = 0;
189 +    ecalDrivenSeed = false;
190 +    trackerDrivenSeed = false;
191 +    }
192    };
193  
194    struct MuTrkVars {
# Line 105 | Line 199 | namespace HbbAnalysis {
199      int charge;
200      unsigned int trackerHits;
201      unsigned int pixelHits;
202 +    MuTrkVars():
203 +      dxy(0),
204 +      dz(0),
205 +      normalizedChi2(0),
206 +      muonHits(0),
207 +      charge(0),
208 +      trackerHits(0),
209 +      pixelHits(0)
210 +    {}
211 +    void Clear() {
212 +      dxy = 0;
213 +      dz = 0;
214 +      normalizedChi2 = 0;
215 +      muonHits = 0;
216 +      charge = 0;
217 +      trackerHits = 0;
218 +      pixelHits = 0;
219 +    }
220    };
221    
222    struct MuIsoVars {
223      float sumPt;
224      float emEt;
225      float hadEt;
226 <    float nTracks;
227 <    float nJets;
226 >    int nTracks;
227 >    MuIsoVars():
228 >      sumPt(0),
229 >      emEt(0),
230 >      hadEt(0),
231 >      nTracks(0)
232 >    {}
233 >    void Clear() {
234 >    sumPt = 0;
235 >    emEt = 0;
236 >    hadEt = 0;
237 >    nTracks = 0;
238 >    }
239    };
240    
241    struct MuIDVars{
# Line 124 | Line 247 | namespace HbbAnalysis {
247      unsigned int nMatchesLoose;
248      unsigned int nMatchesMedium;
249      unsigned int nMatchesTight;
250 +    MuIDVars():
251 +      type(0),
252 +      caloCompat(0),
253 +      segCompat(0),
254 +      nChambers(0),
255 +      nMatchesLoose(0),
256 +      nMatchesMedium(0),
257 +      nMatchesTight(0)
258 +    {}
259 +    void Clear() {
260 +      type = 0;
261 +      ids.clear();
262 +      caloCompat = 0;
263 +      segCompat = 0;
264 +      nChambers = 0;
265 +      nMatchesLoose = 0;
266 +      nMatchesMedium = 0;
267 +      nMatchesTight = 0;
268 +    }
269    };
270  
271 +  
272    struct TrkVars{
273      double pT;
274      double eta;
# Line 134 | Line 277 | namespace HbbAnalysis {
277      double IPxy;
278      double IPz;
279      float signedSipt;
280 +    TrkVars():
281 +      pT(0),
282 +      eta(0),
283 +      phi(0),
284 +      matchDist(0),
285 +      IPxy(0),
286 +      IPz(0),
287 +      signedSipt(0)
288 +    {}
289 +
290    };
291 +  
292  
293    struct CaloTauIsoVars{
294      unsigned int nIsoTracks;
# Line 146 | Line 300 | namespace HbbAnalysis {
300      float isolationTracksPtSum;
301      float isolationECALhitsEtSum;
302      float maximumHCALhitEt;
303 +    CaloTauIsoVars():
304 +      nIsoTracks(0),
305 +      nSigTracks(0),
306 +      leadTrackHCAL3x3hitsEtSum(0),
307 +      leadTrackHCAL3x3hottesthitDEta(0),
308 +      signalTracksInvariantMass(0),
309 +      tracksInvariantMass(0),
310 +      isolationTracksPtSum(0),
311 +      isolationECALhitsEtSum(0),
312 +      maximumHCALhitEt(0)
313 +    {}
314 +
315 +
316 +
317    };
318  
319    struct CaloTauIDVars{
320      float byIsolation;
321      float byLeadingTrackFinding;
322      float byLeadingTrackPtCut;
323 +    CaloTauIDVars():
324 +      byIsolation(0),
325 +      byLeadingTrackFinding(0),
326 +      byLeadingTrackPtCut(0)
327 +    {}
328 +
329    };
330  
331    struct PFTauIsoVars{
# Line 164 | Line 338 | namespace HbbAnalysis {
338      double hcal3x3OverPLead;
339      double ecalStripSumEOverPLead;
340      double bremsRecoveryEOverPLead;
341 +    PFTauIsoVars():
342 +      nSigCands(0),
343 +      nIsoCands(0),
344 +      maximumHCALPFClusterEt(0),
345 +                //emFraction(0),
346 +      hcalTotOverPLead(0),
347 +      hcalMaxOverPLead(0),
348 +      hcal3x3OverPLead(0),
349 +      ecalStripSumEOverPLead(0),
350 +      bremsRecoveryEOverPLead(0)
351 +    {}
352    };
353  
354    //for hadr, neutr and gamma cands
# Line 171 | Line 356 | namespace HbbAnalysis {
356      unsigned int nSigCands;
357      unsigned int nIsoCands;
358      double isolationPtSum;
359 +    PFTauCandVars():
360 +      nSigCands(0),
361 +      nIsoCands(0),
362 +      isolationPtSum(0)
363 +    {}
364    };
365  
366    struct PFTauIDVars{
# Line 190 | Line 380 | namespace HbbAnalysis {
380      float ecalIsolationUsingLeadingPion;
381      float leadingPionPtCut;
382      float trackIsolationUsingLeadingPion;
383 +    PFTauIDVars():
384 +      byLeadingTrackFinding(0),
385 +      byLeadingTrackPtCut(0),
386 +      byTrackIsolation(0),
387 +      byECALIsolation(0),
388 +      byIsolation(0),
389 +      againstElectron(0),
390 +      againstMuon(0),
391 +      byIsolationUsingLeadingPion(0),
392 +      byTaNC(0),
393 +      byTaNCfrHalfPercent(0),
394 +      byTaNCfrOnePercent(0),
395 +      byTaNCfrQuarterPercent(0),
396 +      byTaNCfrTenthPercent(0),
397 +      ecalIsolationUsingLeadingPion(0),
398 +      leadingPionPtCut(0),
399 +      trackIsolationUsingLeadingPion(0)
400 +    {}
401    };
402  
403    struct PFTauEleIDVars{
# Line 198 | Line 406 | namespace HbbAnalysis {
406      double phi;
407      float output;
408      float decision;
409 +
410 +    PFTauEleIDVars():
411 +      pT(0),
412 +      eta(0),
413 +      phi(0),
414 +      output(0),
415 +      decision(0)
416 +    {}
417    };
418      
419    struct PFTauMuIDVars{
420      float caloCompat;
421      float segCompat;
422      float decision;
423 +    PFTauMuIDVars():
424 +      caloCompat(0),
425 +      segCompat(0),
426 +      decision(0)
427 +    {}
428    };
429  
209  struct JetVars{
210    //1=had, 2=e, 3=mu for heavy quarks;
211    //2=uds, 3=g for light quarks
212    unsigned int flavour;
213    int partonFlavour;
214    unsigned int nAssociatedTracks;
215    double rawpT;
216    float etaMean;
217    float phiMean;
218    float etaEtaMoment;
219    float phiPhiMoment;
220    float etaPhiMoment;
221    bool l1Match;
222    bool hltMatch;
223    //double rawEta;
224    //double rawPhi;
225  };
430  
431    struct CaloJetVars{
432 <    double maxEInEmTowers;
433 <    double maxEInHadTowers;
434 <    double energyFractionHadronic;
435 <    double emEnergyFraction;
436 <    double hadEnergyInHB;
437 <    double hadEnergyInHO;
438 <    double hadEnergyInHE;
439 <    double hadEnergyInHF;
440 <    double emEnergyInEB;
441 <    double emEnergyInEE;
442 <    double emEnergyInHF;
443 <    double towersArea;
444 <    double n90;
445 <    double n60;
432 >    float maxEInEmTowers;
433 >    float maxEInHadTowers;
434 >    float energyFractionHadronic;
435 >    float emEnergyFraction;
436 >    float hadEnergyInHB;
437 >    float hadEnergyInHO;
438 >    float hadEnergyInHE;
439 >    float hadEnergyInHF;
440 >    float emEnergyInEB;
441 >    float emEnergyInEE;
442 >    float emEnergyInHF;
443 >    float towersArea;
444 >    int n90;
445 >    int n60;
446 >    CaloJetVars():
447 >      maxEInEmTowers(0),
448 >      maxEInHadTowers(0),
449 >      energyFractionHadronic(0),
450 >      emEnergyFraction(0),
451 >      hadEnergyInHB(0),
452 >      hadEnergyInHO(0),
453 >      hadEnergyInHE(0),
454 >      hadEnergyInHF(0),
455 >      emEnergyInEB(0),
456 >      emEnergyInEE(0),
457 >      emEnergyInHF(0),
458 >      towersArea(0),
459 >      n90(0),
460 >      n60(0)
461 >    {}
462 >    void Clear() {
463 >      maxEInEmTowers = 0;
464 >      maxEInHadTowers = 0;
465 >      energyFractionHadronic = 0;
466 >      emEnergyFraction = 0;
467 >      hadEnergyInHB = 0;
468 >      hadEnergyInHO = 0;
469 >      hadEnergyInHE = 0;
470 >      hadEnergyInHF = 0;
471 >      emEnergyInEB = 0;
472 >      emEnergyInEE = 0;
473 >      emEnergyInHF = 0;
474 >      towersArea = 0;
475 >      n90 = 0;
476 >      n60 = 0;
477 >    }
478    };
479  
480    struct JPTJetVars{
481      float zspCorrection;
482      int elecMultiplicity;
483 <    std::vector<TrkVars> pionsInCone;
484 <    std::vector<TrkVars> pionsCurledOut;
485 <    std::vector<TrkVars> pionsCurledIn;
486 <    std::vector<TrkVars> elecsInCone;
487 <    std::vector<TrkVars> elecsCurledOut;
488 <    std::vector<TrkVars> elecsCurledIn;
489 <    std::vector<TrkVars> muonsInCone;
490 <    std::vector<TrkVars> muonsCurledOut;
491 <    std::vector<TrkVars> muonsCurledIn;
483 >    float calopT;
484 >    float caloEta;
485 >    //std::vector<TrkVars> pionsInCone;
486 >    //std::vector<TrkVars> pionsCurledOut;
487 >    //std::vector<TrkVars> pionsCurledIn;
488 >    //std::vector<TrkVars> elecsInCone;
489 >    //std::vector<TrkVars> elecsCurledOut;
490 >    //std::vector<TrkVars> elecsCurledIn;
491 >    //std::vector<TrkVars> muonsInCone;
492 >    //std::vector<TrkVars> muonsCurledOut;
493 >    //std::vector<TrkVars> muonsCurledIn;
494 >    std::vector< std::pair<unsigned int,double> > particleStatusPt;
495 >    JPTJetVars():
496 >      zspCorrection(0),
497 >      elecMultiplicity(0),
498 >      calopT(0),
499 >      caloEta(0)
500 >    {}
501 >    void Clear() {
502 >      zspCorrection = 0;
503 >      elecMultiplicity = 0;
504 >      calopT = 0;
505 >      caloEta = 0;
506 >      particleStatusPt.clear();
507 >    }
508    };
509  
510    struct JPTPFJetVars{
511 <    double chargedHadronEnergy;
512 <    double chargedHadronEnergyFraction;
513 <    double neutralHadronEnergy;
514 <    double neutralHadronEnergyFraction;
515 <    double chargedEmEnergy;
516 <    double chargedEmEnergyFraction;
517 <    double neutralEmEnergy;
518 <    double neutralEmEnergyFraction;
519 <    double chargedMultiplicity;
520 <    double muonMultiplicity;
511 >    float chargedHadronEnergy;
512 >    float chargedHadronEnergyFraction;
513 >    float neutralHadronEnergy;
514 >    float neutralHadronEnergyFraction;
515 >    float chargedEmEnergy;
516 >    float chargedEmEnergyFraction;
517 >    float neutralEmEnergy;
518 >    float neutralEmEnergyFraction;
519 >    int chargedMultiplicity;
520 >    int muonMultiplicity;
521 >    JPTPFJetVars():
522 >      chargedHadronEnergy(0),
523 >      chargedHadronEnergyFraction(0),
524 >      neutralHadronEnergy(0),
525 >      neutralHadronEnergyFraction(0),
526 >      chargedEmEnergy(0),
527 >      chargedEmEnergyFraction(0),
528 >      neutralEmEnergy(0),
529 >      neutralEmEnergyFraction(0),
530 >      chargedMultiplicity(0),
531 >      muonMultiplicity(0)
532 >    {}
533 >    void Clear() {
534 >      chargedHadronEnergy = 0;
535 >      chargedHadronEnergyFraction = 0;
536 >      neutralHadronEnergy = 0;
537 >      neutralHadronEnergyFraction = 0;
538 >      chargedEmEnergy = 0;
539 >      chargedEmEnergyFraction = 0;
540 >      neutralEmEnergy = 0;
541 >      neutralEmEnergyFraction = 0;
542 >      chargedMultiplicity = 0;
543 >      muonMultiplicity = 0;
544 >    }
545    };
546  
547    struct PFJetVars{
548      double chargedMuEnergy;
549      double chargedMuEnergyFraction;
550      double neutralMultiplicity;
551 +    unsigned numberOfDaughters;
552 +    double HFHadronEnergy;
553 +    PFJetVars():
554 +      chargedMuEnergy(0),
555 +      chargedMuEnergyFraction(0),
556 +      neutralMultiplicity(0),
557 +      numberOfDaughters(0),
558 +      HFHadronEnergy(0)
559 +    {}
560 +    void Clear() {
561 +      chargedMuEnergy = 0;
562 +      chargedMuEnergyFraction = 0;
563 +      neutralMultiplicity = 0;
564 +      numberOfDaughters = 0;
565 +      HFHadronEnergy = 0;
566 +    }
567    };
568  
569    struct JetBtagVars{
570 <    double cSV;
571 <    double cSVMVA;
572 <    double iPMVA;
573 <    double bProba;
574 <    double probability;
575 <    double sSVHE;
576 <    double sSVHP;
577 <    double softElectronByPt;
578 <    double softElectronByIP3d;
579 <    double softMuon;
580 <    double softMuonByPt;
581 <    double softMuonByIP3d;
582 <    double tCHE;
583 <    double tCHP;
570 >    float cSV;
571 >    float cSVMVA;
572 >    float iPMVA;
573 >    float bProba;
574 >    float probability;
575 >    float sSVHE;
576 >    float sSVHP;
577 >    float softElectronByPt;
578 >    float softElectronByIP3d;
579 >    float softMuon;
580 >    float softMuonByPt;
581 >    float softMuonByIP3d;
582 >    float tCHE;
583 >    float tCHP;
584 >    JetBtagVars():
585 >      cSV(0),
586 >      cSVMVA(0),
587 >      iPMVA(0),
588 >      bProba(0),
589 >      probability(0),
590 >      sSVHE(0),
591 >      sSVHP(0),
592 >      softElectronByPt(0),
593 >      softElectronByIP3d(0),
594 >      softMuon(0),
595 >      softMuonByPt(0),
596 >      softMuonByIP3d(0),
597 >      tCHE(0),
598 >      tCHP(0)
599 >    {}
600 >    void Clear() {
601 >      cSV = 0;
602 >      cSVMVA = 0;
603 >      iPMVA = 0;
604 >      bProba = 0;
605 >      probability = 0;
606 >      sSVHE = 0;
607 >      sSVHP = 0;
608 >      softElectronByPt = 0;
609 >      softElectronByIP3d = 0;
610 >      softMuon = 0;
611 >      softMuonByPt = 0;
612 >      softMuonByIP3d = 0;
613 >      tCHE = 0;
614 >      tCHP = 0;
615 >    }
616 >  };
617 >
618 >  struct JetSecVertexVars{
619 >    HbbAnalysis::FourMomentum fourVec;
620 >    HbbAnalysis::Point vertex;
621 >    JetSecVertexVars(){}
622 >    void Clear() {
623 >      fourVec.Clear();
624 >      vertex.Clear();
625 >    }
626    };
627  
628  
# Line 310 | Line 644 | namespace HbbAnalysis {
644      //int numberOfHits2RPC;
645      //int numberOfHits3RPC;
646      //int numberOfHitsRPC;
647 +    JetIDVars():
648 +      fHPD(0),
649 +      fRBX(0),
650 +      n90Hits(0),
651 +      restrictedEMF(0),
652 +      nHCALTowers(0),
653 +      nECALTowers(0),
654 +      hitsInN90(0)
655 +    {}
656 +    void Clear() {
657 +      fHPD = 0;
658 +      fRBX = 0;
659 +      n90Hits = 0;
660 +      restrictedEMF = 0;
661 +      nHCALTowers = 0;
662 +      nECALTowers = 0;
663 +      hitsInN90 = 0;
664 +    }
665    };
666  
667    struct JetECorVars{
668 <    float L1;
669 <    float L2;
670 <    float L3;
671 <    float L2L3Residual;
668 >    //std::vector<std::pair<std::string,double> > Levels;
669 >    std::map<std::string, double> Levels;
670 >    JetECorVars(){
671 >    }
672 >    void Clear() {
673 >      Levels.clear();
674 >    }
675    };
676  
677  
# Line 327 | Line 682 | namespace HbbAnalysis {
682      double sumET;
683      double phi;
684      double mEtSig;
685 +    MetVars():
686 +      mET(0),
687 +      mEx(0),
688 +      mEy(0),
689 +      sumET(0),
690 +      phi(0),
691 +      mEtSig(0)
692 +    {}
693 +
694    };
695  
696    struct TriggerVars{
697      std::string name;
698      unsigned int index;
699      bool accept;
700 +    int prescale;
701 +    TriggerVars():
702 +      name(""),
703 +      index(0),
704 +      accept(false),
705 +      prescale(0)
706 +    {}
707    };
708  
709  
710    struct VertexVars{
711 <    std::vector<float> trackWeights;
711 >    //std::vector<float> trackWeights;
712 >    //std::vector<float> trackpT;
713 >    double sumPtSq;
714      double chi2;
715      double ndof;
716      double x;
# Line 350 | Line 723 | namespace HbbAnalysis {
723      double cov01;
724      double cov02;
725      double cov12;
726 +    VertexVars():
727 +      sumPtSq(0),
728 +      chi2(0),
729 +      ndof(0),
730 +      x(0),
731 +      y(0),
732 +      z(0),
733 +      rho(0),
734 +      xError(0),
735 +      yError(0),
736 +      zError(0),
737 +      cov01(0),
738 +      cov02(0),
739 +      cov12(0)
740 +    {
741 +    }
742 +    void Clear() {
743 +    sumPtSq = 0;
744 +    chi2 = 0;
745 +    ndof = 0;
746 +    x = 0;
747 +    y = 0;
748 +    z = 0;
749 +    rho = 0;
750 +    xError = 0;
751 +    yError = 0;
752 +    zError = 0;
753 +    cov01 = 0;
754 +    cov02 = 0;
755 +    cov12 = 0;
756 +    }
757    };
758  
759    struct BeamSpotVars{
# Line 374 | Line 778 | namespace HbbAnalysis {
778      //double emittanceX() const { return emittanceX_; }
779      //double emittanceY() const { return emittanceY_; }
780      //double betaStar() const { return betaStar_; }
781 +    BeamSpotVars():
782 +      x0(0),
783 +      y0(0),
784 +      z0(0),
785 +      sigmaZ(0),
786 +      BeamWidthX(0),
787 +      BeamWidthY(0),
788 +      x0Error(0),
789 +      y0Error(0),
790 +      z0Error(0),
791 +      sigmaZ0Error(0),
792 +      BeamWidthXError(0),
793 +      BeamWidthYError(0)
794 +    {}
795    };
796  
797 +  double DeltaPhi(const double phi1, const double phi2);
798 +  double DeltaR(const TLorentzVector & v1, const TLorentzVector & v2);
799  
800 +  template <class T1, class T2>
801 +  double DeltaR(const T1 & v1, const T2 & v2){
802 +    double dEta = v1.eta - v2.eta;
803 +    double dPhi = fabs(v1.phi - v2.phi);
804 +    if (dPhi > TMath::Pi()) dPhi = (2.0*TMath::Pi() - dPhi);
805 +    return sqrt(dEta*dEta+dPhi*dPhi);
806 +  }
807  
808 <
382 <  double DeltaPhi(const double phi1, const double phi2);
383 <
384 <  double DeltaR(const BaseVars & v1, const BaseVars & v2);
385 <  double DeltaR(const BaseVars & v1, const GenVars & v2);
386 <
387 <  double SameSign(const BaseVars & v1, const BaseVars & v2);
808 >  bool SameSign(double charge1, double charge2);
809  
810 <  double OppSign(const BaseVars & v1, const BaseVars & v2);
810 >  bool OppSign(double charge1, double charge2);
811  
812 <  TLorentzVector FourMomentum(const BaseVars & v, const double scale=1) ;
812 >  //TLorentzVector FourMomentum(const BaseVars & v, const double scale=1) ;
813  
814 <  double TransverseMass(const BaseVars & leg1,
815 <                        const BaseVars & leg2,
814 >  double TransverseMass(const TLorentzVector & leg1,
815 >                        const TLorentzVector & leg2,
816                          const double mEx,
817                          const double mEy);
818  
819 <  double TransverseMass(const BaseVars & leg1,
819 >  double TransverseMass(const TLorentzVector & leg1,
820                          const double mEx,
821                          const double mEy);
822  
823 <  TLorentzVector FourMomentumCDFmethod(const BaseVars & leg1,
824 <                                       const BaseVars & leg2,
823 >  TLorentzVector FourMomentumCDFmethod(const TLorentzVector & leg1,
824 >                                       const TLorentzVector & leg2,
825                                         double mEx,
826                                         double mEy);
827  
828 <  TLorentzVector FourMomentumCollinearApprox(const BaseVars & leg1,
829 <                                             const BaseVars & leg2,
828 >  TLorentzVector FourMomentumCollinearApprox(const TLorentzVector & leg1,
829 >                                             const TLorentzVector & leg2,
830                                               double mEx,
831                                               double mEy);
832  
833 <  double EtaDetector(const BaseVars & v1);
834 <  double EtaDetector(const GenVars & v1);
833 >  //double EtaDetector(const BaseVars & v1);
834 >  //double EtaDetector(const GenVars & v1);
835  
836   }//namespace
837  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines