41 |
|
m_genjet_phi=0; |
42 |
|
m_genjet_energy=0; |
43 |
|
m_genparticles_indices.clear(); |
44 |
+ |
m_pfconstituents.clear(); |
45 |
|
}; |
46 |
|
|
47 |
|
~Jet(){ |
56 |
|
return v4; |
57 |
|
}; |
58 |
|
|
59 |
+ |
std::vector<Particle> pfconstituents() const{return m_pfconstituents;} |
60 |
+ |
|
61 |
+ |
void add_pfconstituents(Particle p){m_pfconstituents.push_back(p);} |
62 |
+ |
|
63 |
|
int nTracks() const{return m_nTracks;} |
64 |
|
float jetArea() const{return m_jetArea;} |
65 |
|
float pileup() const{return m_pileup;} |
118 |
|
void set_genjet_energy(float x){m_genjet_energy=x;} |
119 |
|
void add_genparticles_index(unsigned int x){m_genparticles_indices.push_back(x);} |
120 |
|
|
121 |
+ |
bool has_genjet() const{return m_genjet_pt>0;} |
122 |
+ |
|
123 |
+ |
bool pfID(){ |
124 |
+ |
//pf ID has already been applied when using goodPatJets |
125 |
+ |
if(numberOfDaughters()>1 |
126 |
+ |
&& neutralHadronEnergyFraction()<0.99 |
127 |
+ |
&& neutralEmEnergyFraction()<0.99){ |
128 |
+ |
|
129 |
+ |
if(fabs(eta())>=2.4) |
130 |
+ |
return true; |
131 |
+ |
|
132 |
+ |
if(chargedEmEnergyFraction()<0.99 |
133 |
+ |
&& chargedHadronEnergyFraction()>0 |
134 |
+ |
&& chargedMultiplicity()>0) |
135 |
+ |
return true; |
136 |
+ |
} |
137 |
+ |
return false; |
138 |
+ |
} |
139 |
+ |
|
140 |
|
private: |
141 |
|
|
142 |
|
int m_nTracks; |
169 |
|
|
170 |
|
std::vector<unsigned int> m_genparticles_indices; |
171 |
|
|
172 |
+ |
std::vector<Particle> m_pfconstituents; |
173 |
+ |
|
174 |
|
}; |
175 |
|
|
176 |
|
#endif |