ATLAS Offline Software
TBPatternUnitHelper.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TBUTILS_TBPATTERNUNITHELPER_H
6 #define TBUTILS_TBPATTERNUNITHELPER_H
7 
9 
10 #include <string>
11 
13 {
14  public:
15 
16  enum Context { H6 = 0, H8 = 1, Unknown = -1 };
17 }
18 
19 struct TBH6PatternUnitHelper
20 {
21 public:
22 
23 enum Bits { S1 = 0,
24  S2 = 1,
25  S3 = 2,
26  Veto = 3,
27  TCFront = 4,
28  TCBack = 5,
29  Muon = 6,
32  Unknown = 9 };
33 
34  // copied from Peter Loch code :
35 
36  inline bool isParticle()
37  { return ( m_triggerWord & 0x00000100 ) != 0; }
38  inline bool isRandom()
39  { return ( m_triggerWord & 0x00000200 ) != 0; }
40  inline bool isPedestal() { return this->isRandom(); }
41  inline bool isMonitor()
42  { return ( m_triggerWord & 0x00000400 ) != 0; }
43  inline bool isCalib() { return this->isMonitor(); }
44 
45  // specifics
46  inline bool hasS1()
47  { return ( m_triggerWord & 0x00000001 ) != 0; }
48  inline bool hasS2()
49  { return ( m_triggerWord & 0x00000002 ) != 0; }
50  inline bool hasS3()
51  { return ( m_triggerWord & 0x00000004 ) != 0; }
52  inline bool hasVeto()
53  { return ( m_triggerWord & 0x00000008 ) != 0; }
54  inline bool hasTCFront()
55  { return ( m_triggerWord & 0x00000010 ) != 0; }
56  bool hasTCBack()
57  { return ( m_triggerWord & 0x00000020 ) != 0; }
58  inline bool hasMuon()
59  { return ( m_triggerWord & 0x00000040 ) != 0; }
60  inline bool hasFibre()
61  { return ( m_triggerWord & 0x00000080 ) != 0; }
62  inline bool hasLatePileUp()
63  { return ( m_triggerWord & 0x00000800 ) != 0; }
64  inline bool hasEarlyPileUp()
65  { return ( m_triggerWord & 0x00001000 ) != 0; }
66  inline bool hasCedar6of8()
67  { return ( m_triggerWord & 0x00002000 ) != 0; }
68  inline bool hasCedar7of8()
69  { return ( m_triggerWord & 0x00004000 ) != 0; }
70  inline bool hasCedar8of8()
71  { return ( m_triggerWord & 0x00008000 ) != 0; }
72 
73 
74 
75 
76  static bool hasS1(const TBTriggerPatternUnit* aTrigger)
77  {
78 
79  private:
80 
81  static std::vector<unsigned int> m_maskBits;
82  static std::vector<std::string> m_maskNames;
83 
84 };
85 #endif
TBPatternUnitContext::Context
Context
Definition: TBPatternUnitHelper.h:16
hasS1
bool hasS1()
Definition: TBPatternUnitHelper.h:46
S1
struct TBPatternUnitContext S1
TBPatternUnitContext::H8
@ H8
Definition: TBPatternUnitHelper.h:16
LatePileUp
struct TBPatternUnitContext LatePileUp
isPedestal
bool isPedestal()
Definition: TBPatternUnitHelper.h:40
Veto
struct TBPatternUnitContext Veto
hasFibre
bool hasFibre()
Definition: TBPatternUnitHelper.h:60
S3
struct TBPatternUnitContext S3
EarlyPileUp
struct TBPatternUnitContext EarlyPileUp
hasCedar7of8
bool hasCedar7of8()
Definition: TBPatternUnitHelper.h:68
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:45
TBTriggerPatternUnit.h
hasLatePileUp
bool hasLatePileUp()
Definition: TBPatternUnitHelper.h:62
FPGATrackSimInputUtils::Bits
Bits
Definition: FPGATrackSimInputUtils.h:15
hasS2
bool hasS2()
Definition: TBPatternUnitHelper.h:48
hasCedar8of8
bool hasCedar8of8()
Definition: TBPatternUnitHelper.h:70
hasEarlyPileUp
bool hasEarlyPileUp()
Definition: TBPatternUnitHelper.h:64
TBPatternUnitContext
Definition: TBPatternUnitHelper.h:13
hasMuon
bool hasMuon()
Definition: TBPatternUnitHelper.h:58
TBPatternUnitContext::H6
@ H6
Definition: TBPatternUnitHelper.h:16
TCFront
struct TBPatternUnitContext TCFront
hasCedar6of8
bool hasCedar6of8()
Definition: TBPatternUnitHelper.h:66
isRandom
bool isRandom()
Definition: TBPatternUnitHelper.h:38
hasTCBack
bool hasTCBack()
Definition: TBPatternUnitHelper.h:56
hasTCFront
bool hasTCFront()
Definition: TBPatternUnitHelper.h:54
hasVeto
bool hasVeto()
Definition: TBPatternUnitHelper.h:52
hasS3
bool hasS3()
Definition: TBPatternUnitHelper.h:50
isMonitor
bool isMonitor()
Definition: TBPatternUnitHelper.h:41
Unknown
struct TBPatternUnitContext Unknown
S2
struct TBPatternUnitContext S2
TBTriggerPatternUnit
Definition: TBTriggerPatternUnit.h:27
isCalib
bool isCalib()
Definition: TBPatternUnitHelper.h:43
isParticle
bool isParticle()
Definition: TBPatternUnitHelper.h:36
TBPatternUnitContext::Unknown
@ Unknown
Definition: TBPatternUnitHelper.h:16
TCBack
struct TBPatternUnitContext TCBack