ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/PFCandidate.h
(Generate patch)

Comparing UserCode/MitAna/DataTree/interface/PFCandidate.h (file contents):
Revision 1.2 by loizides, Wed Mar 18 15:44:32 2009 UTC vs.
Revision 1.11 by paus, Wed Jul 25 03:08:41 2012 UTC

# Line 13 | Line 13
13  
14   #include "MitCommon/DataFormats/interface/Vect3.h"
15   #include "MitCommon/DataFormats/interface/Vect4M.h"
16 #include "MitAna/DataTree/interface/Types.h"
16   #include "MitAna/DataCont/interface/Ref.h"
17   #include "MitAna/DataTree/interface/CompositeParticle.h"
18   #include "MitAna/DataTree/interface/Track.h"
19   #include "MitAna/DataTree/interface/Muon.h"
20 + #include "MitAna/DataTree/interface/Electron.h"
21 + #include "MitAna/DataTree/interface/SuperCluster.h"
22   #include "MitAna/DataTree/interface/Conversion.h"
23  
24   namespace mithep
25   {
26 +  class Photon;
27    class PFCandidate : public CompositeParticle
28    {
29      public:
# Line 49 | Line 51 | namespace mithep
51          eHBarrelEndcap,
52          eHEndcapVFCal,
53          eHVFCalEdge,
54 <        eToNuclInt,
55 <        eFromNuclInt,
54 >        eToDispVtx,
55 >        eFromDispVtx,
56          eFromV0,
57          eFromGammaConv,
58 <        eToConversion
58 >        eToConversion,
59 >        ePFNoPileup
60        };
61  
62        PFCandidate() : fCharge(0), fEECal(0), fEHCal(0), fEECalRaw(0), fEHCalRaw(0),
# Line 95 | Line 98 | namespace mithep
98        Bool_t              HasGsfTrk()              const    { return fGsfTrack.IsValid();         }
99        Bool_t              HasTrk()                 const
100                              { return (HasTrackerTrk() || HasGsfTrk()); }
101 +      Bool_t              HasSCluster()            const    { return fSCluster.IsValid();         }
102        const PFCandidate  *Mother()                 const    { return fMother.Obj();               }
103        const Muon         *Mu()                     const    { return fMuon.Obj();                 }
104 +      const Electron     *Ele()                    const    { return fElectron.Obj();             }
105 +      const Photon       *Pho()                    const    { return fPhoton.Obj();               }
106        EObjType            ObjType()                const    { return kPFCandidate;                }
107        EPFType             PFType()                 const    { return fPFType;                     }
108 +      const SuperCluster *SCluster()               const    { return fSCluster.Obj();             }
109        void                SetCharge(Double_t c)             { fCharge = c; ClearCharge();         }
110        void                SetEECal(Double_t e)              { fEECal = e;                         }
111        void                SetEHCal(Double_t e)              { fEHCal = e;                         }
# Line 122 | Line 129 | namespace mithep
129        void                SetTrackerTrk(const Track *t)     { fTrackerTrack = t;                  }
130        void                SetGsfTrk(const Track *t)         { fGsfTrack = t;                      }
131        void                SetMuon(const Muon *m)            { fMuon = m;                          }
132 +      void                SetElectron(const Electron *e)    { fElectron = e;                      }
133 +      void                SetPhoton(const Photon *p)        { fPhoton = p;                        }
134        void                SetConversion(const Conversion *c)
135                              { fConversion = c; }
136 +      void                SetSCluster(const SuperCluster *s) { fSCluster = s;                     }
137        void                SetVertex(Double_t x, Double_t y, Double_t z);
138        const ThreeVector   SourceVertex()           const    { return fSourceVertex.V();           }
139        const Track        *TrackerTrk()             const    { return fTrackerTrack.Obj();         }
# Line 131 | Line 141 | namespace mithep
141        const Track        *BestTrk()                const;
142        const Track        *Trk()                    const    { return BestTrk();                   }
143        
144 +      // Some structural tools
145 +      void                Mark(UInt_t i=1)         const;
146 +
147      protected:
148        Double_t            GetCharge()              const;
149        void                GetMom()                 const;
# Line 151 | Line 164 | namespace mithep
164        Double32_t          fMvaGamma;         //[0,0,14]photon id discriminant
165        Double32_t          fMvaNeutralH;      //[0,0,14]neutral hadron id discriminant
166        Double32_t          fMvaGammaNeutralH; //[0,0,14]photon-neutralhadron discriminant
167 <      Double32_t          fEtaECal;          //[0,0,10]eta at ecal front face
168 <      Double32_t          fPhiECal;          //[0,0,10]phi at ecal front face
167 >      Double32_t          fEtaECal;          //[0,0,12]eta at ecal front face
168 >      Double32_t          fPhiECal;          //[0,0,12]phi at ecal front face
169        EPFType             fPFType;           //particle flow type
170        BitMask32           fPFFlags;          //various PF flags
171        Ref<PFCandidate>    fMother;           //reference to mother
# Line 160 | Line 173 | namespace mithep
173        Ref<Track>          fGsfTrack;         //reference to gsf track (for electrons only)
174        Ref<Muon>           fMuon;             //reference to corresponding reco muon
175        Ref<Conversion>     fConversion;       //reference to corresponding reco conversion
176 +      Ref<SuperCluster>   fSCluster;         //reference to egamma supercluster
177 +      Ref<Electron>       fElectron;         //reference to electron
178 +      Ref<Photon>         fPhoton;           //reference to egamma photon
179  
180 <    ClassDef(PFCandidate,1) // Particle-flow candidate class
180 >    ClassDef(PFCandidate,2) // Particle-flow candidate class
181    };
182   }
183  
184   //--------------------------------------------------------------------------------------------------
185 + inline void mithep::PFCandidate::Mark(UInt_t ib) const
186 + {
187 +  // mark myself
188 +  mithep::DataObject::Mark(ib);
189 +  // mark my dependencies if they are there
190 +  if (fMother.IsValid())
191 +    fMother.Obj()->Mark(ib);
192 +  if (fTrackerTrack.IsValid())
193 +    fTrackerTrack.Obj()->Mark(ib);
194 +  if (fGsfTrack.IsValid())
195 +    fGsfTrack.Obj()->Mark(ib);
196 +  if (fMuon.IsValid())
197 +    fMuon.Obj()->Mark(ib);
198 +  if (fConversion.IsValid())
199 +    fConversion.Obj()->Mark(ib);
200 +  if (fSCluster.IsValid())
201 +    fSCluster.Obj()->Mark(ib);
202 + }
203 +
204 + //--------------------------------------------------------------------------------------------------
205   inline const mithep::Track *mithep::PFCandidate::BestTrk() const
206   {
207    // Return gsf track if present, or else tracker track if present

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines