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

Comparing UserCode/MitAna/DataTree/interface/Track.h (file contents):
Revision 1.37 by loizides, Wed Mar 18 15:10:31 2009 UTC vs.
Revision 1.43 by bendavid, Tue Jul 14 13:44:12 2009 UTC

# Line 82 | Line 82
82   #include "MitAna/DataTree/interface/DataObject.h"
83   #include "MitAna/DataTree/interface/MCParticle.h"
84   #include "MitAna/DataTree/interface/SuperCluster.h"
85 #include "MitAna/DataTree/interface/Types.h"
85  
86   namespace mithep
87   {
# Line 135 | Line 134 | namespace mithep
134          TEC9S
135        };
136  
137 <      Track() : fQOverP(0), fQOverPErr(0), fLambda(0), fLambdaErr(0),
138 <                fPhi0(0), fPhi0Err(0), fDxy(0), fDxyErr(0), fDsz(0), fDszErr(0),
139 <                fChi2(0), fNdof(0), fEtaEcal(0), fPhiEcal(0) {}
137 >      enum ETrackAlgorithm {
138 >        undefAlgorithm=0,
139 >        ctf=1,
140 >        rs=2,
141 >        cosmics=3,
142 >        iter0=4,
143 >        iter1=5,
144 >        iter2=6,
145 >        iter3=7,
146 >        iter4=8,
147 >        iter5=9,
148 >        iter6=10,
149 >        iter7=11,
150 >        iter8=12,
151 >        iter9=13,
152 >        iter10=14,
153 >        outInEcalSeededConv=15,
154 >        inOutEcalSeededConv=16,
155 >        nuclInter=17,
156 >        standAloneMuon=18,
157 >        globalMuon=19,
158 >        cosmicStandAloneMuon=20,
159 >        cosmicGlobalMuon=21,
160 >        iter1LargeD0=22,
161 >        iter2LargeD0=23,
162 >        iter3LargeD0=24,
163 >        iter4LargeD0=25,
164 >        iter5LargeD0=26,
165 >        bTagGhostTracks=27,
166 >        beamhalo=28,
167 >        algoSize=29
168 >      };
169 >
170 >
171 >      Track() : fAlgo(undefAlgorithm), fIsGsf(0), fQOverP(0), fQOverPErr(0),
172 >                fLambda(0), fLambdaErr(0), fPhi0(0), fPhi0Err(0),
173 >                fDxy(0), fDxyErr(0), fDsz(0), fDszErr(0), fChi2(0),
174 >                fNdof(0), fEtaEcal(0), fPhiEcal(0) {}
175        Track(Double_t qOverP, Double_t lambda, Double_t phi0, Double_t dxy, Double_t dsz) :
176 <                fQOverP(qOverP), fQOverPErr(0), fLambda(lambda), fLambdaErr(0),
177 <                fPhi0(phi0), fPhi0Err(0), fDxy(dxy), fDxyErr(0), fDsz(dsz), fDszErr(0),
178 <                fChi2(0), fNdof(0), fEtaEcal(0), fPhiEcal(0) {}
176 >                fAlgo(undefAlgorithm), fIsGsf(0), fQOverP(qOverP), fQOverPErr(0),
177 >                fLambda(lambda), fLambdaErr(0), fPhi0(phi0), fPhi0Err(0),
178 >                fDxy(dxy), fDxyErr(0), fDsz(dsz), fDszErr(0), fChi2(0),
179 >                fNdof(0), fEtaEcal(0), fPhiEcal(0) {}
180        ~Track() {}
181  
182 +      ETrackAlgorithm      Algo()           const { return fAlgo;                 }
183        Int_t                Charge()         const { return (fQOverP>0) ? 1 : -1;  }
184        Double_t             Chi2()           const { return fChi2;                 }
185        void                 ClearHit(EHitLayer l)  { fHits.ClearBit(l);            }
# Line 160 | Line 196 | namespace mithep
196        Double_t             EtaEcal()        const { return fEtaEcal;              }
197        Bool_t               Hit(EHitLayer l) const { return fHits.TestBit(l);      }
198        const BitMask48     &Hits()           const { return fHits;                 }
199 +      Bool_t               IsGsf()          const { return fIsGsf;                }
200        Double_t             Lambda()         const { return fLambda;               }
201        Double_t             LambdaErr()      const { return fLambdaErr;            }
202        const MCParticle    *MCPart()         const { return fMCParticleRef.Obj();  }
203        const ThreeVectorC  &Mom()            const;
204 <      FourVectorM          Mom4(Double_t m) const { return FourVectorM(Pt(),Eta(),Phi(),E(m)); }
205 <      UInt_t               Ndof()           const { return fNdof;                              }
204 >      FourVectorM          Mom4(Double_t m) const { return FourVectorM(Pt(),Eta(),Phi(),m); }
205 >      UShort_t             Ndof()           const { return fNdof;                              }
206        UInt_t               NHits()          const { return fHits.NBitsSet();                   }
207        UInt_t               NStereoHits()    const { return StereoHits().NBitsSet();            }
208        EObjType             ObjType()        const { return kTrack;                             }    
# Line 186 | Line 223 | namespace mithep
223        Double_t             Theta()          const { return (TMath::PiOver2() - fLambda);       }
224        const SuperCluster  *SCluster()       const { return fSuperClusterRef.Obj();             }
225        const BitMask48      StereoHits()     const { return (fHits & StereoLayers());           }
226 +      void                 SetAlgo(ETrackAlgorithm e)          { fAlgo = e;                    }
227        void                 SetChi2(Double_t chi2)              { fChi2 = chi2;                 }
228        void                 SetErrors(Double_t qOverPErr, Double_t lambdaErr, Double_t phi0Err,
229                                       Double_t dXyErr, Double_t dSzErr);
# Line 194 | Line 232 | namespace mithep
232                                       Double_t dXy, Double_t dSz);
233        void                 SetHit(EHitLayer l)                 { fHits.SetBit(l);              }
234        void                 SetHits(const BitMask48 &hits)      { fHits = hits;                 }
235 <      void                 SetNdof(UInt_t dof)                 { fNdof = dof;                  }
235 >      void                 SetIsGsf(Bool_t b)                  { fIsGsf = b;                   }
236 >      void                 SetNdof(UShort_t dof)               { fNdof = dof;                  }
237        void                 SetMCPart(const MCParticle *p)      { fMCParticleRef = p;           }
238        void                 SetPhiEcal(Double_t phi)            { fPhiEcal = phi;               }
239        void                 SetSCluster(const SuperCluster* sc) { fSuperClusterRef = sc;        }
# Line 208 | Line 247 | namespace mithep
247        void                 GetMom()      const;
248  
249        BitMask48            fHits;                //storage for mostly hit information
250 <      Double32_t           fQOverP;              //signed inverse of momentum [1/GeV]
251 <      Double32_t           fQOverPErr;           //error of q/p
252 <      Double32_t           fLambda;              //pi/2 - polar angle at the reference point
253 <      Double32_t           fLambdaErr;           //error of lambda
254 <      Double32_t           fPhi0;                //azimuth angle at the given point
255 <      Double32_t           fPhi0Err;             //error of azimuthal angle
256 <      Double32_t           fDxy;                 //transverse distance to reference point [cm]
257 <      Double32_t           fDxyErr;              //error of transverse distance
258 <      Double32_t           fDsz;                 //longitudinal distance to reference point [cm]
259 <      Double32_t           fDszErr;              //error of longitudinal distance
260 <      Double32_t           fChi2;                //chi squared of track fit
261 <      UInt_t               fNdof;                //degree-of-freedom of track fit
262 <      Double32_t           fEtaEcal;             //eta of track at Ecal front face
263 <      Double32_t           fPhiEcal;             //phi of track at Ecal front face
250 >      ETrackAlgorithm      fAlgo;                //track algorithm
251 >      Bool_t               fIsGsf;               //flag to identify gsf tracks
252 >      Double32_t           fQOverP;              //[0,0,14]signed inverse of momentum [1/GeV]
253 >      Double32_t           fQOverPErr;           //[0,0,14]error of q/p
254 >      Double32_t           fLambda;              //[0,0,14]pi/2 - polar angle at the reference point
255 >      Double32_t           fLambdaErr;           //[0,0,14]error of lambda
256 >      Double32_t           fPhi0;                //[0,0,14]azimuth angle at the given point
257 >      Double32_t           fPhi0Err;             //[0,0,14]error of azimuthal angle
258 >      Double32_t           fDxy;                 //[0,0,14]trans. distance to reference point [cm]
259 >      Double32_t           fDxyErr;              //[0,0,14]error of transverse distance
260 >      Double32_t           fDsz;                 //[0,0,14]long. distance to reference point [cm]
261 >      Double32_t           fDszErr;              //[0,0,14]error of longitudinal distance
262 >      Double32_t           fChi2;                //[0,0,12]chi squared of track fit
263 >      UShort_t             fNdof;                //degree-of-freedom of track fit
264 >      Double32_t           fEtaEcal;             //[0,0,12]eta of track at Ecal front face
265 >      Double32_t           fPhiEcal;             //[0,0,12]phi of track at Ecal front face
266        Ref<SuperCluster>    fSuperClusterRef;     //superCluster crossed by track
267        Ref<MCParticle>      fMCParticleRef;       //reference to sim particle (for monte carlo)
268        mutable CacheFlag    fCacheMomFlag;        //||cache validity flag for momentum
269        mutable ThreeVectorC fCachedMom;           //!cached momentum vector
270                
271 <    ClassDef(Track, 1) // Track class
271 >    ClassDef(Track, 2) // Track class
272    };
273   }
274  
# Line 270 | Line 311 | inline Double_t mithep::Track::D0Correct
311   //--------------------------------------------------------------------------------------------------
312   inline
313   void mithep::Track::SetHelix(Double_t qOverP, Double_t lambda, Double_t phi0,
314 <                                   Double_t dxy, Double_t dsz)
314 >                             Double_t dxy, Double_t dsz)
315   {
316    // Set helix parameters.
317  
# Line 285 | Line 326 | void mithep::Track::SetHelix(Double_t qO
326   //--------------------------------------------------------------------------------------------------
327   inline
328   void mithep::Track::SetErrors(Double_t qOverPErr, Double_t lambdaErr, Double_t phi0Err,
329 <                                   Double_t dxyErr, Double_t dszErr)
329 >                              Double_t dxyErr, Double_t dszErr)
330   {
331    // Set helix errors.
332  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines