ATLAS Offline Software
TriggerTower_v1.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // $Id: TriggerTower_v1.cxx 638578 2015-01-09 17:00:15Z morrisj $
6 
7 // EDM includes(s):
9 
10 // Local include(s):
12 
13 namespace xAOD{
14 
16  SG::AuxElement()
17  {
18  }
19 
20  AUXSTORE_OBJECT_SETTER_AND_GETTER( TriggerTower_v1, std::vector<int>, emLUT , setEmLUT )
21  AUXSTORE_OBJECT_SETTER_AND_GETTER( TriggerTower_v1, std::vector<int>, hadLUT , setHadLUT )
22  AUXSTORE_OBJECT_SETTER_AND_GETTER( TriggerTower_v1, std::vector<int>, emADC , setEmADC )
23  AUXSTORE_OBJECT_SETTER_AND_GETTER( TriggerTower_v1, std::vector<int>, hadADC , setHadADC )
24  AUXSTORE_OBJECT_SETTER_AND_GETTER( TriggerTower_v1, std::vector<int>, emBCIDvec , setEmBCIDvec )
25  AUXSTORE_OBJECT_SETTER_AND_GETTER( TriggerTower_v1, std::vector<int>, hadBCIDvec , setHadBCIDvec )
26  AUXSTORE_OBJECT_SETTER_AND_GETTER( TriggerTower_v1, std::vector<int>, emBCIDext , setEmBCIDext )
27  AUXSTORE_OBJECT_SETTER_AND_GETTER( TriggerTower_v1, std::vector<int>, hadBCIDext , setHadBCIDext )
30  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( TriggerTower_v1, unsigned int, key , setKey )
31  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( TriggerTower_v1, int, emError , setEmError )
32  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( TriggerTower_v1, int, hadError , setHadError )
33  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( TriggerTower_v1, int, emPeak , setEmPeak )
34  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( TriggerTower_v1, int, emADCPeak , setEmADCPeak )
35  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( TriggerTower_v1, int, hadPeak , setHadPeak )
36  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( TriggerTower_v1, int, hadADCPeak , setHadADCPeak )
37 
38 
39  void TriggerTower_v1::addEM(const std::vector<int>& digits, const std::vector<int>& et,
40  const std::vector<int>& digits_bcid, const std::vector<int>& bcid,
41  int error, int peak, int adc_peak)
42  {
43  setEmADC( digits );
44  setEmLUT( et );
45  setEmBCIDvec( bcid );
46  setEmBCIDext( digits_bcid );
47  setEmError( error );
48  setEmPeak( peak );
49  setEmADCPeak( adc_peak );
50  }
51 
53  void TriggerTower_v1::addHad(const std::vector<int>& digits, const std::vector<int>& et,
54  const std::vector<int>& digits_bcid, const std::vector<int>& bcid,
55  int error, int peak, int adc_peak)
56  {
57  setHadADC( digits );
58  setHadLUT( et );
60  setHadBCIDext( digits_bcid );
61  setHadError( error );
62  setHadPeak( peak );
63  setHadADCPeak( adc_peak );
64  }
65 
67  void TriggerTower_v1::setCoord(double eta,double phi)
68  {
69  setEta( eta );
70  setPhi( phi );
71  }
72 
75  {
76  return emLUT()[ emPeak() ];
77  }
78 
81  {
82  return hadLUT()[ hadPeak() ];
83  }
84 
87  {
88  // Fix for misfilled MC TriggerTowers
89  if( ( emBCIDvec().size() != emLUT().size() ) &&
90  ( emBCIDvec().size() == emADC().size() ) ){
91  return emBCIDvec()[ emADCPeak() ];
92  }
93  return emBCIDvec()[ emPeak() ];
94  }
95 
98  {
99  // Fix for misfilled MC TriggerTowers
100  if( ( hadBCIDvec().size() != hadLUT().size() ) &&
101  ( hadBCIDvec().size() == hadADC().size() ) ){
102  return hadBCIDvec()[ hadADCPeak() ];
103  }
104  return hadBCIDvec()[ hadPeak() ];
105  }
106 
109  {
110  // return true if the TriggerTower is saturated
111  // i.e. it has an energy greater than the saturation threshold
112  // otherwise, return false;
113 
114  return emEnergy() >= m_saturation;
115  }
116 
119  {
120  // return true if the TriggerTower is saturated
121  // i.e. it has an energy greater than the saturation threshold
122  // otherwise, return false;
123 
124  return hadEnergy() >= m_saturation;
125  }
126 
127 } // namespace xAOD
xAOD::AUXSTORE_PRIMITIVE_SETTER_AND_GETTER
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1, float, IP2D_pb, setIP2D_pb) AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1
xAOD::TriggerTower_v1::emBCIDvec
const std::vector< int > & emBCIDvec() const
get EM BCID for all time slices
et
Extra patterns decribing particle interation process.
xAOD::TriggerTower_v1::eta
float eta() const
get eta
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
xAOD::TriggerTower_v1::hadBCID
int hadBCID() const
get HAD BCID at peak
Definition: TriggerTower_v1.cxx:97
xAOD::TriggerTower_v1::setHadADCPeak
void setHadADCPeak(int)
set HAD ADC peak
AuxStoreAccessorMacros.h
xAOD::TriggerTower_v1::hadPeak
int hadPeak() const
get HAD peak
xAOD::TriggerTower_v1::hadADCPeak
int hadADCPeak() const
get HAD ADC peak
xAOD::TriggerTower_v1::addHad
void addHad(const std::vector< int > &digits, const std::vector< int > &et, const std::vector< int > &digits_bcid, const std::vector< int > &bcid, int error, int peak, int adc_peak)
Fill HAD towers with digits, calibrated ET vectors and status flags.
Definition: TriggerTower_v1.cxx:53
xAOD::TriggerTower_v1::setHadError
void setHadError(int)
set HAD error
xAOD::TriggerTower_v1::setEta
void setEta(float)
set eta
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
xAOD::TriggerTower_v1
Description of TriggerTower_v1.
Definition: TriggerTower_v1.h:44
xAOD::TriggerTower_v1::m_saturation
static const int m_saturation
Definition: TriggerTower_v1.h:163
xAOD::TriggerTower_v1::isEMSaturated
bool isEMSaturated() const
Is EM saturated?
Definition: TriggerTower_v1.cxx:108
xAOD::TriggerTower_v1::isHadSaturated
bool isHadSaturated() const
Is HAD saturated?
Definition: TriggerTower_v1.cxx:118
Amg::setPhi
Amg::RotationMatrix3D setPhi(Amg::RotationMatrix3D mat, double angle, int convention=0)
Definition: EulerAnglesHelpers.h:102
xAOD::TriggerTower_v1::emLUT
const std::vector< int > & emLUT() const
get EM energy for all time slices
xAOD::phi
setEt phi
Definition: TrigEMCluster_v1.cxx:29
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
TriggerTower_v1.h
xAOD::TriggerTower_v1::hadBCIDvec
const std::vector< int > & hadBCIDvec() const
get HAD BCID for all time slices
vector
Definition: MultiHisto.h:13
xAOD::TriggerTower_v1::phi
float phi() const
get phi (note that for L1Calo phi runs from 0 to 2pi)
xAOD::TriggerTower_v1::setHadPeak
void setHadPeak(int)
set HAD peak
xAOD::TriggerTower_v1::hadADC
const std::vector< int > & hadADC() const
get HAD ADC for all time slices
xAOD::TriggerTower_v1::setHadLUT
void setHadLUT(const std::vector< int > &)
set HAD energy for all time slices
xAOD::TriggerTower_v1::setHadBCIDvec
void setHadBCIDvec(const std::vector< int > &)
set HAD BCID for all time slices
xAOD::TriggerTower_v1::emADC
const std::vector< int > & emADC() const
get EM ADC for all time slices
xAOD::TriggerTower_v1::setCoord
void setCoord(double eta, double phi)
Specify the location of tower. Internally calls setEta();setPhi();.
Definition: TriggerTower_v1.cxx:67
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133
xAOD::TriggerTower_v1::setHadADC
void setHadADC(const std::vector< int > &)
set HAD ADC for all time slices
xAOD::TriggerTower_v1::hadLUT
const std::vector< int > & hadLUT() const
get HAD energy for all time slices
xAOD::TriggerTower_v1::emADCPeak
int emADCPeak() const
get EM ADC peak
xAOD::TriggerTower_v1::emPeak
int emPeak() const
get EM peak
xAOD::TriggerTower_v1::emBCID
int emBCID() const
get EM BCID at peak
Definition: TriggerTower_v1.cxx:86
xAOD::TriggerTower_v1::emEnergy
int emEnergy() const
Final EM energy value used by the algorithms.
Definition: TriggerTower_v1.cxx:74
error
Definition: IImpactPoint3dEstimator.h:70
xAOD::TriggerTower_v1::hadEnergy
int hadEnergy() const
Final HAD energy value used by the algorithms.
Definition: TriggerTower_v1.cxx:80
xAOD::TriggerTower_v1::TriggerTower_v1
TriggerTower_v1()
Definition: TriggerTower_v1.cxx:15
xAOD::TriggerTower_v1::setHadBCIDext
void setHadBCIDext(const std::vector< int > &)
set HAD extBCID for all time slices
xAOD::AUXSTORE_OBJECT_SETTER_AND_GETTER
AUXSTORE_OBJECT_SETTER_AND_GETTER(CaloRings_v1, RingSetLinks, ringSetLinks, setRingSetLinks) unsigned CaloRings_v1
Definition: CaloRings_v1.cxx:27
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
xAOD::TriggerTower_v1::setPhi
void setPhi(float)
set phi