ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/StableData.h
Revision: 1.10
Committed: Fri Mar 20 18:23:27 2009 UTC (16 years, 1 month ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_016, Mit_015b, Mit_015a, Mit_015, Mit_014e, Mit_014d, Mit_014c, Mit_014b, Mit_014a, Mit_014, Mit_014pre3, Mit_014pre2, Mit_014pre1, Mit_013d, Mit_013c, Mit_013b, Mit_013a, Mit_013, Mit_013pre1, Mit_012i, Mit_012h, Mit_012g, Mit_012f, Mit_012e, Mit_012d, Mit_012c, Mit_012b, Mit_012a, Mit_012, Mit_011a, Mit_011, Mit_010a, Mit_010, Mit_009c, Mit_009b, Mit_009a, Mit_009, Mit_008
Changes since 1.9: +2 -2 lines
Log Message:
Cosmetics

File Contents

# Content
1 //--------------------------------------------------------------------------------------------------
2 // $Id: StableData.h,v 1.9 2009/03/18 15:44:32 loizides Exp $
3 //
4 // StableData
5 //
6 // Additional information on a stable daughter which is specific to a particular decay.
7 //
8 // Authors: J.Bendavid
9 //--------------------------------------------------------------------------------------------------
10
11 #ifndef MITANA_DATATREE_STABLEDATA_H
12 #define MITANA_DATATREE_STABLEDATA_H
13
14 #include "MitAna/DataCont/interface/BitMask.h"
15 #include "MitAna/DataTree/interface/StableParticle.h"
16 #include "MitAna/DataTree/interface/DaughterData.h"
17 #include "MitAna/DataTree/interface/Track.h"
18 #include "MitAna/DataTree/interface/Types.h"
19 #include "MitCommon/DataFormats/interface/Vect3C.h"
20
21 namespace mithep
22 {
23 class StableData : public DaughterData
24 {
25 public:
26 StableData() {}
27 StableData(const Particle *p, const ThreeVector &mom) :
28 DaughterData(p), fMomAtVertex(mom) {}
29 StableData(const Particle *p, const ThreeVectorC &mom) :
30 DaughterData(p), fMomAtVertex(mom) {}
31 StableData(const Particle *p, Double_t px, Double_t py, Double_t pz) :
32 DaughterData(p), fMomAtVertex(ThreeVector(px,py,pz)) {}
33
34 Bool_t BadLayer(Track::EHitLayer l) const { return fBadLayers.TestBit(l); }
35 const BitMask48 &BadLayers() const { return fBadLayers; }
36 const BitMask48 MissedHits() const;
37 UInt_t NMissedHits() const { return MissedHits().NBitsSet(); }
38 UInt_t NWrongHits() const { return WrongHits().NBitsSet(); }
39 UInt_t NWrongOrMissingHits() const { return fBadLayers.NBitsSet(); }
40 EObjType ObjType() const { return kStableData; }
41 ThreeVectorC ThreeMom() const { return fMomAtVertex.V(); }
42 const BitMask48 WrongHits() const;
43 void SetBadLayer(Track::EHitLayer l) { fBadLayers.SetBit(l); }
44 void SetBadLayers(const BitMask48 &layers) { fBadLayers = layers; }
45 void SetThreeMom(Double_t px, Double_t y, Double_t z);
46 void SetThreeMom(const ThreeVector &mom) { fMomAtVertex = mom; ClearMom(); }
47
48 protected:
49 Double_t GetMass() const { return Original()->Mass(); }
50 void GetMom() const;
51
52 Vect3C fMomAtVertex; //fitted momentum at vertex
53 BitMask48 fBadLayers; //layer mask for incorrect or missing hits from
54 //before or after the decay vertex
55 //using same bit-layer mapping as mithep::Track
56
57 ClassDef(StableData, 1) // Stable data class
58 };
59 }
60
61 //--------------------------------------------------------------------------------------------------
62 inline void mithep::StableData::GetMom() const
63 {
64 // Get momentum values from stored values.
65
66 fCachedMom.SetCoordinates(fMomAtVertex.Rho(),fMomAtVertex.Eta(),fMomAtVertex.Phi(),GetMass());
67 }
68
69 //--------------------------------------------------------------------------------------------------
70 inline void mithep::StableData::SetThreeMom(Double_t px, Double_t py, Double_t pz)
71 {
72 // Set four momentum.
73
74 fMomAtVertex.SetXYZ(px, py, pz);
75 ClearMom();
76 }
77 #endif