Revision: | 1.1 |
Committed: | Mon Jan 18 14:35:10 2010 UTC (15 years, 3 months ago) by bendavid |
Content type: | text/plain |
Branch: | MAIN |
CVS Tags: | Mit_032, Mit_031, Mit_025c_branch2, Mit_025c_branch1, Mit_030, Mit_029c, Mit_029b, Mit_030_pre1, Mit_029a, Mit_029, Mit_029_pre1, Mit_028a, Mit_025c_branch0, Mit_028, Mit_027a, Mit_027, Mit_026, Mit_025e, Mit_025d, Mit_025c, Mit_025b, Mit_025a, Mit_025, Mit_025pre2, Mit_024b, Mit_025pre1, Mit_024a, Mit_024, Mit_023, Mit_022a, Mit_022, Mit_020d, TMit_020d, Mit_020c, Mit_021, Mit_021pre2, Mit_021pre1, Mit_020b, Mit_020a, Mit_020, Mit_020pre1, Mit_018, Mit_017, Mit_017pre3, Mit_017pre2, Mit_017pre1, 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, HEAD |
Branch point for: | Mit_025c_branch |
Log Message: | Add TrackQuality |
# | Content |
---|---|
1 | //-------------------------------------------------------------------------------------------------- |
2 | // $Id: Track.h,v 1.46 2010/01/07 11:03:41 bendavid Exp $ |
3 | // |
4 | // TrackQuality |
5 | // |
6 | // Wrapper for BitMask storing the Track Quality flags. Implemented as a seperate class |
7 | // to simplify dependencies and reduce code duplication in case one wants to work with track |
8 | // quality elsewhere than in an actual Track object. |
9 | // |
10 | // Authors: J.Bendavid |
11 | //-------------------------------------------------------------------------------------------------- |
12 | |
13 | #ifndef MITANA_DATATREE_TRACKQUALITY_H |
14 | #define MITANA_DATATREE_TRACKQUALITY_H |
15 | |
16 | #include "MitAna/DataCont/interface/BitMask.h" |
17 | #include "MitAna/DataCont/interface/Types.h" |
18 | |
19 | namespace mithep |
20 | { |
21 | class TrackQuality |
22 | { |
23 | public: |
24 | enum EQuality { //taken from DataFormats/TrackReco/interface/TrackBase.h |
25 | undefQuality=-1, |
26 | loose=0, |
27 | tight=1, |
28 | highPurity=2, |
29 | confirmed=3, |
30 | goodIterative=4, |
31 | qualitySize=5 |
32 | }; |
33 | |
34 | |
35 | TrackQuality() {} |
36 | virtual ~TrackQuality() {} |
37 | |
38 | void ClearQuality(EQuality q) { fQualityMask.ClearBit(q); } |
39 | Bool_t Quality(EQuality q) const { return fQualityMask.TestBit(q); } |
40 | const BitMask8 &QualityMask() const { return fQualityMask; } |
41 | UInt_t NQuality() const { return fQualityMask.NBitsSet(); } |
42 | void SetQuality(EQuality q) { fQualityMask.SetBit(q); } |
43 | void SetQualityMask(const BitMask8 &q) { fQualityMask = q; } |
44 | |
45 | |
46 | protected: |
47 | BitMask8 fQualityMask; //track quality bitmask |
48 | |
49 | ClassDef(TrackQuality, 1) // Track class |
50 | }; |
51 | } |
52 | #endif |