ATLAS Offline Software
CMXRoI_v1.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // $Id: CMXRoI_v1.h 681007 2015-07-07 13:34:12Z morrisj $
8 #ifndef XAODTRIGL1CALO_VERSIONS_CMXROI_V1_H
9 #define XAODTRIGL1CALO_VERSIONS_CMXROI_V1_H
10 
11 extern "C" {
12 # include <stdint.h>
13 }
14 
15 #include "AthLinks/ElementLink.h"
17 
18 namespace xAOD {
19 
26 
27  class CMXRoI_v1 : public SG::AuxElement{
28  public:
29 
30  enum SumType { NORMAL = 0, MASKED = 1 };
31 
32  // Default constructor
33  CMXRoI_v1();
35  virtual ~CMXRoI_v1(){}
36 
38  virtual void initialize(uint32_t roiWord0, uint32_t roiWord1, uint32_t roiWord2,
40 
42  virtual void initialize(unsigned int ex, unsigned int ey, unsigned int et,
43  int exError, int eyError, int etError,
44  unsigned int sumEtHits, unsigned int missingEtHits,
45  unsigned int missingEtSigHits,
46  unsigned int exM, unsigned int eyM, unsigned int etM,
47  int exErrorM, int eyErrorM, int etErrorM,
48  unsigned int sumEtHitsM, unsigned int missingEtHitsM);
49 
51  const std::vector<uint32_t>& cmxRoIWords() const;
53  void setCmxRoIWords(const std::vector<uint32_t>&);
54 
56  unsigned int ex(SumType type = NORMAL) const;
58  unsigned int ey(SumType type = NORMAL) const;
60  unsigned int et(SumType type = NORMAL) const;
62  int exError(SumType type = NORMAL) const;
64  int eyError(SumType type = NORMAL) const;
66  int etError(SumType type = NORMAL) const;
68  unsigned int sumEtHits(SumType type = NORMAL) const;
70  unsigned int missingEtHits(SumType type = NORMAL) const;
72  unsigned int missingEtSigHits() const;
73 
75  uint32_t roiWord(int word) const;
77  unsigned int exWord(SumType type = NORMAL) const;
79  unsigned int eyWord(SumType type = NORMAL) const;
81  unsigned int etWord(SumType type = NORMAL) const;
82 
83 
84  private:
85  // RoI word IDs
86  static const int s_wordIdVal0 = 0x4;
87  static const int s_wordIdVal1 = 0x6;
88  static const int s_wordIdVal2 = 0x5;
89  // Data locations
90  static const int s_wordIdBit = 28;
91  static const int s_sumEtHitsBit = 16;
92  static const int s_missingEtHitsBit = 16;
93  static const int s_missingEtSigHitsBit = 16;
94  static const int s_energyBit = 0;
95  static const int s_overflowBit = 15;
96  static const int s_sumTypeBit = 26;
97  // Data masks
98  static const int s_wordIdMask = 0xf;
99  static const int s_sumEtHitsMask = 0xff;
100  static const int s_missingEtHitsMask = 0xff;
101  static const int s_missingEtSigHitsMask = 0xff;
102  static const int s_energyMask = 0x7fff;
103  static const int s_overflowMask = 0x1;
104  static const int s_sumTypeMask = 0x1;
105  // RoI word array offsets
106  static const int s_exOffset = 0;
107  static const int s_eyOffset = 2;
108  static const int s_etOffset = 4;
109  static const int s_maxRoiWords = 6;
110 
111  };
112 } // namespace xAOD
113 
114 #endif // XAODTRIGL1CALO_VERSIONS_CMMROI_V1_H
xAOD::CMXRoI_v1::s_missingEtHitsBit
static const int s_missingEtHitsBit
Definition: CMXRoI_v1.h:92
xAOD::CMXRoI_v1::etError
int etError(SumType type=NORMAL) const
Return Et error flags (bit 0 Overflow)
Definition: CMXRoI_v1.cxx:117
xAOD::CMXRoI_v1::s_sumTypeMask
static const int s_sumTypeMask
Definition: CMXRoI_v1.h:104
xAOD::CMXRoI_v1::s_sumTypeBit
static const int s_sumTypeBit
Definition: CMXRoI_v1.h:96
xAOD::CMXRoI_v1::s_wordIdVal1
static const int s_wordIdVal1
Definition: CMXRoI_v1.h:87
et
Extra patterns decribing particle interation process.
xAOD::CMXRoI_v1::missingEtSigHits
unsigned int missingEtSigHits() const
Return Missing-ET-Sig hits.
Definition: CMXRoI_v1.cxx:130
xAOD::CMXRoI_v1::eyError
int eyError(SumType type=NORMAL) const
Return Ey error flags (bit 0 Overflow)
Definition: CMXRoI_v1.cxx:113
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
xAOD::CMXRoI_v1::~CMXRoI_v1
virtual ~CMXRoI_v1()
Default desturctor.
Definition: CMXRoI_v1.h:35
SG::AuxElement
Base class for elements of a container that can have aux data.
Definition: AuxElement.h:483
xAOD::CMXRoI_v1::ex
unsigned int ex(SumType type=NORMAL) const
Return Ex.
Definition: CMXRoI_v1.cxx:97
xAOD::CMXRoI_v1::setCmxRoIWords
void setCmxRoIWords(const std::vector< uint32_t > &)
set cmxRoIWords
xAOD::CMXRoI_v1::s_etOffset
static const int s_etOffset
Definition: CMXRoI_v1.h:108
xAOD::CMXRoI_v1::s_wordIdBit
static const int s_wordIdBit
Definition: CMXRoI_v1.h:90
xAOD::CMXRoI_v1::s_energyMask
static const int s_energyMask
Definition: CMXRoI_v1.h:102
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::CMXRoI_v1::et
unsigned int et(SumType type=NORMAL) const
Return Et.
Definition: CMXRoI_v1.cxx:105
xAOD::CMXRoI_v1::s_missingEtHitsMask
static const int s_missingEtHitsMask
Definition: CMXRoI_v1.h:100
xAOD::CMXRoI_v1::eyWord
unsigned int eyWord(SumType type=NORMAL) const
Return Ey RoI word.
Definition: CMXRoI_v1.cxx:144
xAOD::CMXRoI_v1::s_overflowMask
static const int s_overflowMask
Definition: CMXRoI_v1.h:103
xAOD::CMXRoI_v1::NORMAL
@ NORMAL
Definition: CMXRoI_v1.h:30
xAOD::CMXRoI_v1::cmxRoIWords
const std::vector< uint32_t > & cmxRoIWords() const
get cmxRoIWords
xAOD::CMXRoI_v1::s_overflowBit
static const int s_overflowBit
Definition: CMXRoI_v1.h:95
xAOD::CMXRoI_v1::s_missingEtSigHitsBit
static const int s_missingEtSigHitsBit
Definition: CMXRoI_v1.h:93
xAOD::CMXRoI_v1::exWord
unsigned int exWord(SumType type=NORMAL) const
Return Ex RoI word.
Definition: CMXRoI_v1.cxx:140
xAOD::CMXRoI_v1::s_wordIdVal2
static const int s_wordIdVal2
Definition: CMXRoI_v1.h:88
xAOD::CMXRoI_v1::sumEtHits
unsigned int sumEtHits(SumType type=NORMAL) const
Return Sum-ET hits.
Definition: CMXRoI_v1.cxx:121
xAOD::CMXRoI_v1::s_wordIdVal0
static const int s_wordIdVal0
Definition: CMXRoI_v1.h:86
xAOD::CMXRoI_v1::s_exOffset
static const int s_exOffset
Definition: CMXRoI_v1.h:106
xAOD::CMXRoI_v1::exError
int exError(SumType type=NORMAL) const
Return Ex error flags (bit 0 Overflow)
Definition: CMXRoI_v1.cxx:109
xAOD::CMXRoI_v1::roiWord
uint32_t roiWord(int word) const
Return packed Energy RoI word (0-5)
Definition: CMXRoI_v1.cxx:136
xAOD::CMXRoI_v1::s_energyBit
static const int s_energyBit
Definition: CMXRoI_v1.h:94
xAOD::CMXRoI_v1::ey
unsigned int ey(SumType type=NORMAL) const
Return Ey.
Definition: CMXRoI_v1.cxx:101
xAOD::CMXRoI_v1::initialize
virtual void initialize(uint32_t roiWord0, uint32_t roiWord1, uint32_t roiWord2, uint32_t roiWord3, uint32_t roiWord4, uint32_t roiWord5)
initialize
xAOD::CMXRoI_v1::s_sumEtHitsMask
static const int s_sumEtHitsMask
Definition: CMXRoI_v1.h:99
xAOD::roiWord3
setRoIWord1 roiWord3
Definition: EnergySumRoI_v2.cxx:87
xAOD::CMXRoI_v1::s_missingEtSigHitsMask
static const int s_missingEtSigHitsMask
Definition: CMXRoI_v1.h:101
xAOD::CMXRoI_v1::etWord
unsigned int etWord(SumType type=NORMAL) const
Return ET RoI word.
Definition: CMXRoI_v1.cxx:148
xAOD::CMXRoI_v1::SumType
SumType
Definition: CMXRoI_v1.h:30
xAOD::roiWord5
setRoIWord1 setRoIWord3 roiWord5
Definition: EnergySumRoI_v2.cxx:91
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
xAOD::CMXRoI_v1::missingEtHits
unsigned int missingEtHits(SumType type=NORMAL) const
Return Missing-ET hits.
Definition: CMXRoI_v1.cxx:125
xAOD::CMXRoI_v1::s_sumEtHitsBit
static const int s_sumEtHitsBit
Definition: CMXRoI_v1.h:91
xAOD::CMXRoI_v1::MASKED
@ MASKED
Definition: CMXRoI_v1.h:30
xAOD::CMXRoI_v1::s_wordIdMask
static const int s_wordIdMask
Definition: CMXRoI_v1.h:98
xAOD::CMXRoI_v1::s_eyOffset
static const int s_eyOffset
Definition: CMXRoI_v1.h:107
xAOD::CMXRoI_v1
Description of CMXRoI_v1.
Definition: CMXRoI_v1.h:27
xAOD::CMXRoI_v1::s_maxRoiWords
static const int s_maxRoiWords
Definition: CMXRoI_v1.h:109
xAOD::roiWord1
roiWord1
Definition: EnergySumRoI_v1.cxx:49
AuxElement.h
Base class for elements of a container that can have aux data.
xAOD::CMXRoI_v1::CMXRoI_v1
CMXRoI_v1()
Definition: CMXRoI_v1.cxx:18