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

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