ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/UHHAnalysis/NtupleWriter/Objects/Jet.h
(Generate patch)

Comparing UserCode/UHHAnalysis/NtupleWriter/Objects/Jet.h (file contents):
Revision 1.3 by peiffer, Wed Jun 13 09:38:28 2012 UTC vs.
Revision 1.6 by rkogler, Thu Jan 31 13:08:51 2013 UTC

# Line 41 | Line 41 | class Jet : public Particle{
41       m_genjet_phi=0;
42       m_genjet_energy=0;
43       m_genparticles_indices.clear();
44 +     m_pfconstituents.clear();
45    };
46  
47    ~Jet(){
# Line 55 | Line 56 | class Jet : public Particle{
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;}
# Line 113 | Line 118 | class Jet : public Particle{
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;
# Line 145 | Line 169 | class Jet : public Particle{
169  
170    std::vector<unsigned int> m_genparticles_indices;
171  
172 +  std::vector<Particle> m_pfconstituents;
173 +
174   };
175  
176   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines