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

Comparing UserCode/HbbAnalysis/interface/Electron.hh (file contents):
Revision 1.7 by amagnan, Mon Sep 5 17:15:15 2011 UTC vs.
Revision 1.8 by agilbert, Tue Oct 25 13:26:50 2011 UTC

# Line 5 | Line 5
5   #include <string>
6  
7   #include "UserCode/HbbAnalysis/interface/Objects.hh"
8 + #include "UserCode/HbbAnalysis/interface/Lepton.hh"
9  
9 namespace HbbAnalysis {
10  
11 <  class Electron {
11 > namespace HbbAnalysis {
12  
13 +  class Electron : public Lepton {
14    public:
15 <
16 <
17 <    /** Constructors */
18 <
18 <    Electron(){
19 <      //Clear();
20 <    };
21 <
22 <    ~Electron(){};
23 <
24 <    Electron(const HbbAnalysis::GenVars & aGen,
25 <             const HbbAnalysis::BaseVars & aReco,
15 >    //Constructors
16 >    Electron();
17 >    Electron(const HbbAnalysis::FourMomentum & aFourVec,
18 >             const HbbAnalysis::LeptonVars & aLeptonVars,
19               const HbbAnalysis::SCVars & aSC,
20               const HbbAnalysis::EleIsoVars & aIso,
21               const HbbAnalysis::EleIDVars & aID
22 <             ){
30 <      Clear();
31 <      genVars(aGen);
32 <      recoVars(aReco);
22 >             ) : Lepton(aFourVec, aLeptonVars) {
23        scVars(aSC);
24        isoVars(aIso);
25        idVars(aID);
26 +    };
27  
28 +    //Setters
29 +    inline void scVars(HbbAnalysis::SCVars const& aSC) {
30 +      sc_ = aSC;
31      };
32  
33 <    inline const HbbAnalysis::GenVars & genVars() const {
34 <      return gen_;
33 >    inline void isoVars(HbbAnalysis::EleIsoVars const& aIso) {
34 >      iso_ = aIso;
35      };
36  
37 <    inline const HbbAnalysis::BaseVars  & recoVars() const {
38 <      return reco_;
37 >    inline void idVars(HbbAnalysis::EleIDVars const& aID) {
38 >      id_ = aID;
39      };
40  
41 <    inline const HbbAnalysis::SCVars  & scVars() const {
41 >    //Getters
42 >    inline HbbAnalysis::SCVars const& scVars() const {
43        return sc_;
44      };
45  
46 <    inline const HbbAnalysis::EleIsoVars  & isoVars() const {
46 >    inline HbbAnalysis::EleIsoVars const& isoVars() const {
47        return iso_;
48      };
49  
50 <    inline const HbbAnalysis::EleIDVars  & idVars() const {
50 >    inline HbbAnalysis::EleIDVars  const& idVars() const {
51        return id_;
52      };
53  
54 <    inline const bool WPc60() {
54 >    //Functions
55 >    inline bool WPc60() {
56        return (id_.idAndIso & 0x1);
57      };
58 <    inline const bool WPc70() {
58 >    inline bool WPc70() {
59        return (id_.idAndIso & 0x2) >> 1;
60      };
61 <    inline const bool WPc80() {
61 >    inline bool WPc80() {
62        return (id_.idAndIso & 0x4) >> 2;
63      };
64 <    inline const bool WPc85() {
64 >    inline bool WPc85() {
65        return (id_.idAndIso & 0x8) >> 3;
66      };
67 <    inline const bool WPc90() {
67 >    inline bool WPc90() {
68        return (id_.idAndIso & 0x10) >> 4;
69      };
70 <    inline const bool WPc95() {
70 >    inline bool WPc95() {
71        return (id_.idAndIso & 0x20) >> 5;
72      };
73 <    inline const bool WPrel60() {
73 >    inline bool WPrel60() {
74        return (id_.idAndIso & 0x40) >> 6;
75      };
76 <    inline const bool WPrel70() {
76 >    inline bool WPrel70() {
77        return (id_.idAndIso & 0x80) >> 7;
78      };
79 <    inline const bool WPrel80() {
79 >    inline bool WPrel80() {
80        return (id_.idAndIso & 0x100) >> 8;
81      };
82 <    inline const bool WPrel85() {
82 >    inline bool WPrel85() {
83        return (id_.idAndIso & 0x200) >> 9;
84      };
85 <    inline const bool WPrel90() {
85 >    inline bool WPrel90() {
86        return (id_.idAndIso & 0x400) >> 10;
87      };
88 <    inline const bool WPrel95() {
88 >    inline bool WPrel95() {
89        return (id_.idAndIso & 0x800) >> 11;
90      };
91  
92 <
93 <    inline void genVars(const HbbAnalysis::GenVars & aGen) {
98 <      gen_ = aGen;
99 <    };
100 <
101 <    inline void recoVars(const HbbAnalysis::BaseVars & aReco) {
102 <      reco_ = aReco;
103 <    };
104 <
105 <    inline void scVars(const HbbAnalysis::SCVars & aSC) {
106 <      sc_ = aSC;
107 <    };
108 <
109 <    inline void isoVars(const HbbAnalysis::EleIsoVars & aIso) {
110 <      iso_ = aIso;
111 <    };
112 <
113 <    inline void idVars(const HbbAnalysis::EleIDVars & aID) {
114 <      id_ = aID;
115 <    };
116 <
117 <    inline void Clear(){
118 <      gen_.valid = false;
119 <      gen_.E = 0;
120 <      gen_.pT = 0;
121 <      gen_.eta = 0;
122 <      gen_.y = 0;
123 <      gen_.phi = 0;
124 <      gen_.charge = 0;
125 <      gen_.pdgId = 0;
126 <      gen_.status = 0;
127 <      gen_.mass = 0;
128 <      gen_.vx = 0;
129 <      gen_.vy = 0;
130 <      gen_.vz = 0;
131 <
132 <      reco_.E = 0;
133 <      reco_.pT = 0;
134 <      reco_.eta = 0;
135 <      reco_.y = 0;
136 <      reco_.phi = 0;
137 <      reco_.charge = 0;
138 <      reco_.vx = 0;
139 <      reco_.vy = 0;
140 <      reco_.vz = 0;
141 <
142 <      sc_.eta = 0;
143 <      sc_.sigmaEtaEta = 0;
144 <      sc_.sigmaIEtaIEta = 0;
145 <      sc_.e1x5 = 0;
146 <      sc_.e2x5Max = 0;
147 <      sc_.e5x5 = 0;
148 <      sc_.eOverP = 0;
149 <
150 <      iso_.calo = 0;
151 <      iso_.track = 0;
152 <      iso_.ecal = 0;
153 <      iso_.hcal = 0;
154 <
155 <      id_.idAndIso = 0;
156 <      id_.electronIDs.clear();
157 <      id_.hOverE = 0;
158 <      id_.deltaPhiIn = 0;
159 <      id_.deltaEtaIn = 0;
160 <      id_.ecalDrivenSeed = false;
161 <      id_.trackerDrivenSeed = false;
162 <    };
163 <
92 >    void Clear();
93 >  
94    private:
165
166    HbbAnalysis::GenVars gen_;
167    HbbAnalysis::BaseVars reco_;
95      HbbAnalysis::SCVars sc_;
96      HbbAnalysis::EleIsoVars iso_;
97      HbbAnalysis::EleIDVars id_;
171
98    };
99  
100 <  inline bool operator < (const Electron & one, const Electron & two)
101 <  {
102 <    return one.recoVars().pT < two.recoVars().pT;
103 <  }
100 >  //inline bool operator < (const Electron & one, const Electron & two)
101 >  //{
102 >  //  return one.recoVars().pT < two.recoVars().pT;
103 >  //}
104    
105    
106   }//namespace

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines