ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
LVL1::eSuperCellTowerMapper Class Reference

#include <eSuperCellTowerMapper.h>

Inheritance diagram for LVL1::eSuperCellTowerMapper:
Collaboration diagram for LVL1::eSuperCellTowerMapper:

Public Member Functions

 eSuperCellTowerMapper (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~eSuperCellTowerMapper ()
 
virtual StatusCode initialize () override
 standard Athena-Algorithm method More...
 
virtual StatusCode AssignSuperCellsToTowers (std::unique_ptr< eTowerContainer > &my_eTowerContainerRaw) const override
 
virtual StatusCode AssignTriggerTowerMapper (std::unique_ptr< eTowerContainer > &my_eTowerContainerRaw) const override
 
virtual void reset () const override
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

virtual int FindAndConnectTower (std::unique_ptr< eTowerContainer > &my_eTowerContainerRaw, CaloSampling::CaloSample sample, const int region, int layer, const int pos_neg, const int eta_index, const int phi_index, Identifier ID, float et, int prov, bool doPrint) const override
 
virtual void ConnectSuperCellToTower (std::unique_ptr< eTowerContainer > &my_eTowerContainerRaw, int iETower, Identifier ID, int iCell, float et, int layer, bool doenergysplit) const override
 
virtual int FindTowerIDForSuperCell (int towereta, int towerphi) const override
 
virtual void PrintCellSpec (const CaloSampling::CaloSample sample, int layer, const int region, const int eta_index, const int phi_index, const int pos_neg, int iETower, int iCell, int prov, Identifier ID, bool doenergysplit) const override
 
std::string DectectorName (const CaloSampling::CaloSample sample) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

SG::ReadHandleKey< CaloCellContainerm_scellsCollectionSGKey {this, "SCell", "SCell", "SCell"}
 
SG::ReadHandleKey< xAOD::TriggerTowerContainerm_triggerTowerCollectionSGKey {this, "xODTriggerTowers", "xAODTriggerTowers", "xAODTriggerTowers"}
 
ToolHandle< IeFEXSuperCellTowerIdProviderm_eFEXSuperCellTowerIdProviderTool {this, "eFEXSuperCellTowerIdProviderTool", "LVL1::eFEXSuperCellTowerIdProvider", "Tool that provides tower-FOGA mapping"}
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 28 of file eSuperCellTowerMapper.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ eSuperCellTowerMapper()

LVL1::eSuperCellTowerMapper::eSuperCellTowerMapper ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 27 of file eSuperCellTowerMapper.cxx.

27  :
29 {
30  declareInterface<IeSuperCellTowerMapper>(this);
31 
32 }

◆ ~eSuperCellTowerMapper()

LVL1::eSuperCellTowerMapper::~eSuperCellTowerMapper ( )
virtual

Definition at line 34 of file eSuperCellTowerMapper.cxx.

35 {
36 
37 }

Member Function Documentation

◆ AssignSuperCellsToTowers()

StatusCode LVL1::eSuperCellTowerMapper::AssignSuperCellsToTowers ( std::unique_ptr< eTowerContainer > &  my_eTowerContainerRaw) const
overridevirtual

Implements LVL1::IeSuperCellTowerMapper.

Definition at line 96 of file eSuperCellTowerMapper.cxx.

97 {
98 
99  bool doPrint = false;
100 
102  if(!scellsCollection.isValid()){
103  ATH_MSG_FATAL("Could not retrieve collection " << m_scellsCollectionSGKey.key() );
104  return StatusCode::FAILURE;
105  }
106 
107  //const CaloCell_Base_ID* idHelper = caloIdManager->getCaloCell_SuperCell_ID(); // getting the id helper class
108  const CaloCell_Base_ID* idHelper = nullptr;
109  ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_SuperCell_ID") );
110  for (const CaloCell* cell : * scellsCollection){
111 
112  // Discard masked cells from monitoring
113  int SCprov = (cell)->provenance()&0xFFF;
114  bool isMasked = (SCprov&0x80)==0x80;
115 
116  if (isMasked) continue;
117 
118  const CaloSampling::CaloSample sample = (cell)->caloDDE()->getSampling();
119  const Identifier ID = (cell)->ID(); // super cell unique ID
120  int region = idHelper->region(ID);
121  float et = 12.5*std::round((cell)->energy()/(12.5*cosh((cell)->eta())));
122  int pos_neg = idHelper->pos_neg(ID);
123  //We need to explicitly avoid +/- 3 pos_neg supercells! These go beyond |eta| == 2.5
124  if(abs(pos_neg) == 3){ continue; }
125  // mapping with csv file
126  if(m_eFEXSuperCellTowerIdProviderTool->ifhaveinputfile()){
127  int towerid{ -1 };
128  int slot{ -1 };
129  bool doenergysplit { false };
130  ATH_CHECK( m_eFEXSuperCellTowerIdProviderTool->geteTowerIDandslot(ID.get_compact(), towerid, slot, doenergysplit) );
131  // ignore invalid SuperCell
132  if (towerid == -1) {
133  continue;
134  }
135  int layer_tem = -1;
136  // Layer 0: Cell 0
137  // Layer 1: Cell 1, 2, 3, 4
138  // Layer 2: Cell 5, 6, 7, 8
139  // Layer 3: Cell 9
140  // Layer 4: Cell 10 (HEC or TILE, if we have them!)
141  if (slot == 0) {
142  layer_tem = 0;
143  } else if (slot <= 4) {
144  layer_tem = 1;
145  } else if (slot <= 8) {
146  layer_tem = 2;
147  } else if (slot == 9) {
148  layer_tem = 3;
149  } else {
150  layer_tem = 4;
151  }
152 
153  ConnectSuperCellToTower( my_eTowerContainerRaw, towerid, ID, slot, et, layer_tem, doenergysplit);
154  continue;
155  }
156  int layer = -1;
157  int eta_index = idHelper->eta(ID);
158  const int phi_index = idHelper->phi(ID);
159  int prov = (cell)->provenance();
160 
161  /*
162  CaloSampling:
163  PreSamplerB 0
164  EMB1 1
165  EMB2 2
166  EMB3 3
167 
168  PreSamplerE 4
169  EME1 5
170  EME2 6
171  EME3 7
172 
173  HEC0 8
174  HEC1 9
175  HEC2 10
176  HEC3 11
177 
178  TileBar0 12 (Tile Barrel)
179  TileBar1 13
180  TileBar2 14
181 
182  TileGap1 15 (ITC and Scintillator)
183  TileGap2 16
184  TileGap3 17
185 
186  TileExt0 18 (Tile Extended Barrel)
187  TileExt1 19
188  TileExt2 20
189 
190  FCAL0 21 (Forward EM Endcap)
191  FCAL1 22
192  FCAL2 23
193 
194  MINIFCAL0 24
195  MINIFCAL1 25
196  MINIFCAL2 26
197  MINIFCAL3 27
198 
199  Unknown 28
200  */
201 
202  // LOCAL TO GLOBAL ETA INDEX PATCH - USE A 'TOWER OFFSET' TO MARK THE START OF THE ETA_INDEX COUNTING (e.g. the rounded eta value of the innermost supercell)
203  switch(sample){
204  case CaloSampling::PreSamplerB: { break; }
205  case CaloSampling::EMB1: {
206  if(region == 1){ eta_index += 56; }
207  break;
208  }
209  case CaloSampling::EMB2: {
210  if(region == 1){ eta_index += 56; }
211  break;
212  }
213  case CaloSampling::EMB3: { break; }
214  case CaloSampling::PreSamplerE: { eta_index += 15; break; }
215  case CaloSampling::EME1: {
216  if(region == 0){ eta_index += 14; }
217  else if (region == 1){ /* doesn't exist */ }
218  else if (region == 2){ eta_index += 60; }
219  else if (region == 3){ eta_index += 108; } //6 supercell region
220  else if (region == 4){ eta_index += 80; }
221  else if (region == 5){ eta_index += 24; }
222  break;
223  }
224  case CaloSampling::EME2: {
225  if(region == 0){ eta_index += 14; }
226  else if (region == 1){ eta_index += 57; }
227  break;
228  }
229  case CaloSampling::EME3: { eta_index += 15; break; }
230  case CaloSampling::HEC0:
231  case CaloSampling::HEC1:
232  case CaloSampling::HEC2:
233  case CaloSampling::HEC3: { eta_index += 15; break; }
234  default: { /*ATH_MSG_DEBUG("Not doing anything since sample = " << sample);*/ break; }
235  }
236 
237 
238  FindAndConnectTower(my_eTowerContainerRaw,sample,region,layer,pos_neg,eta_index,phi_index,ID,et,prov,doPrint);
239  }
240 
241  return StatusCode::SUCCESS;
242 
243 }

◆ AssignTriggerTowerMapper()

StatusCode LVL1::eSuperCellTowerMapper::AssignTriggerTowerMapper ( std::unique_ptr< eTowerContainer > &  my_eTowerContainerRaw) const
overridevirtual

Implements LVL1::IeSuperCellTowerMapper.

Definition at line 49 of file eSuperCellTowerMapper.cxx.

49  {
50 
51  static constexpr float pi_over_32 = M_PI/32;
52 
54  if(!triggerTowerCollection.isValid()){
55  ATH_MSG_FATAL("Could not retrieve collection " << m_triggerTowerCollectionSGKey.key() );
56  return StatusCode::FAILURE;
57  }
58 
59 
60  for(auto eachTower : *triggerTowerCollection) {
61  if(std::abs(eachTower->eta())<1.5 && eachTower->sampling()==1) {
62  int i_phi = int(eachTower->phi()/pi_over_32);
63  int etaSign{-1};
64  int towerID_Modifier{100000};
65  if (eachTower->eta() > 0) {
66  etaSign = 1;
67  towerID_Modifier = 200000;
68  }
69  int i_eta = int(eachTower->eta() * 10) * etaSign;
70  if(i_eta * etaSign == -14) {
71  towerID_Modifier = 300000;
72  } else if (i_eta * etaSign == 14) {
73  towerID_Modifier = 400000;
74  }
75 
76  int towerid = FindTowerIDForSuperCell(i_eta, i_phi) + towerID_Modifier;
77  LVL1::eTower * targetTower;
78  if((targetTower = my_eTowerContainerRaw->findTower(towerid))) {
79  if (targetTower->getET_float(4, 0) > 0) {
80  ATH_MSG_WARNING("\n==== eSuperCellTowerMapper ============ Hadronic layer energy filled more than once - it will be ignored. (Needs investigation). Please report this!");
81  }
82  targetTower->setET(10, int(eachTower->cpET()) * 500., 4); // cf 0.5 * 1000.0
83  } else {
84  ATH_MSG_WARNING("\n==== eSuperCellTowerMapper ============ Tower id is officially unknown - it will be ignored. (Needs investigation). Please report this!");
85  }
86  }
87  }
88  return StatusCode::SUCCESS;
89 }

◆ ConnectSuperCellToTower()

void LVL1::eSuperCellTowerMapper::ConnectSuperCellToTower ( std::unique_ptr< eTowerContainer > &  my_eTowerContainerRaw,
int  iETower,
Identifier  ID,
int  iCell,
float  et,
int  layer,
bool  doenergysplit 
) const
overrideprivatevirtual

Implements LVL1::IeSuperCellTowerMapper.

Definition at line 246 of file eSuperCellTowerMapper.cxx.

246  {
247 
248  LVL1::eTower * tmpTower = my_eTowerContainerRaw->findTower(iETower);
249 
250  if(tmpTower){
251  tmpTower->setSCID(ID,iCell,et,layer,doenergysplit);
252  }
253 
254 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ DectectorName()

std::string LVL1::eSuperCellTowerMapper::DectectorName ( const CaloSampling::CaloSample  sample) const
private

Definition at line 834 of file eSuperCellTowerMapper.cxx.

834  {
835  std::string sampleName ="";
836  switch (sample) {
837  case CaloSampling::PreSamplerB: { sampleName = "PreSamplerB"; break; }
838  case CaloSampling::EMB1: { sampleName = "EMB1"; break; }
839  case CaloSampling::EMB2: { sampleName = "EMB2"; break; }
840  case CaloSampling::EMB3: { sampleName = "EMB3"; break; }
841  case CaloSampling::PreSamplerE: { sampleName = "PreSamplerE"; break; }
842  case CaloSampling::EME1: { sampleName = "EME1"; break; }
843  case CaloSampling::EME2: { sampleName = "EME2"; break; }
844  case CaloSampling::EME3: { sampleName = "EME3"; break; }
845  case CaloSampling::HEC0: { sampleName = "HEC0"; break; }
846  case CaloSampling::HEC1: { sampleName = "HEC1"; break; }
847  case CaloSampling::HEC2: { sampleName = "HEC2"; break; }
848  case CaloSampling::HEC3: { sampleName = "HEC3"; break; }
849  case CaloSampling::FCAL0: { sampleName = "FCAL0"; break; }
850  case CaloSampling::FCAL1: { sampleName = "FCAL1"; break; }
851  case CaloSampling::FCAL2: { sampleName = "FCAL2"; break; }
852  default: {
853  ATH_MSG_DEBUG("\n==== jSuperCellTowerMapper ============ Supercell has invalid CaloSampling value: " << sample << " (Needs investigation). Please report this!");
854  sampleName = "----";
855  break;
856  }
857  }
858  return sampleName;
859 }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ FindAndConnectTower()

int LVL1::eSuperCellTowerMapper::FindAndConnectTower ( std::unique_ptr< eTowerContainer > &  my_eTowerContainerRaw,
CaloSampling::CaloSample  sample,
const int  region,
int  layer,
const int  pos_neg,
const int  eta_index,
const int  phi_index,
Identifier  ID,
float  et,
int  prov,
bool  doPrint 
) const
overrideprivatevirtual

Implements LVL1::IeSuperCellTowerMapper.

Definition at line 256 of file eSuperCellTowerMapper.cxx.

257 {
258 
259  // bool for the special case of 1.8 < eta < 2.0 only in the front layer
260  bool doenergysplit = false;
261 
262  // bool as a flag to enable or disable the connection of supercells to towers according to their location and identities
263  bool validcell = true;
264 
265  // We tell the eTower which supercell unique ID is in each of it's available 'slots'
266  int towereta = -99; // to be filled with tower eta value to help find it
267  int towerphi = -99; // to be filled with tower phi value to help find it
268  int iETower = -99; // The tower ID which the supercell will be assigned to
269  int iCell = -1; // The position within the Tower that the supercell will be assigned to
270  int towerID_Modifier = -999999999; // adjustable tower ID modifier to fit tower Id scheme
271 
272  /*
273  ** iCell Numbering Scheme **
274 
275  Let's use the following scheme (from low to high eta regardless of detector side):
276  Layer 0: Cell 0
277  Layer 1: Cell 1, 2, 3, 4
278  Layer 2: Cell 5, 6, 7, 8
279  Layer 3: Cell 9
280  Layer 4: Cell 10 (HEC or TILE, if we have them!)
281  */
282 
283 
284  /*
285  ** Structure of the EMB in Supercells **
286 
287  0 < 1.4 in steps of 0.1 == 14 towers
288  1.4 < 1.52 in steps of 0.12 ==> THIS TOWER IS MOVED TO TRANS TOWER REGION
289  14 towers total (all by presampler)
290  64 towers in phi in total
291 
292  896 towers in EMB per side
293  1792 towers in EMB total
294  */
295 
296  /*
297  ** Structure of the TRANS in Supercells **
298 
299  1.4 < 1.5, 1 special tower made from EMB and EME supercells together
300  1 tower in eta
301  64 towers in phi
302 
303  64 towers in TRANS total
304  */
305 
306  /*
307  ** Structure of the EMEC in Supercells **
308 
309  1.375 < 1.5, funny behaviour, treated as 1 special tower ==> 1 tower === TRANSITION TOWER NOW!
310  1.5 < 1.8 standard towers by presampler ==> 3 towers
311  1.8 < 2.0 standard towers by back ==> 2 towers
312  2.0 < 2.4 standard towers by back ==> 4 towers
313  2.4 < 2.5 standard tower by back ==> 1 tower
314  2.5 < 3.1, funny behaviour, treated as 3 wide towers ==> 3 towers. Also wide in phi! ===> WE DON'T CARE ABOUT |ETA| > 2.5
315  3.1 < 3.2 standard tower by back ==> 1 tower. Also wide in phi! ===> WE DON'T CARE ABOUT |ETA| > 2.5
316  10 towers in eta in total (by different means) (IGNORING ABOVE |ETA| > 2.5)
317  64 towers initially in phi (IGNORING ABOVE |ETA| > 2.5)
318 
319  640 towers in EME per side
320  1280 towers in EME total
321  */
322 
323 
324  /*
325  ** Structure of the HEC in Supercells **
326 
327  1.5 - 2.5, [Region 0] standard towers by presampler ==> layer on top of existing towers
328 
329  */
330 
331  /*
332  ** Notes on overall structure **
333  Total number of expected towers can be as high as: 896+640 = 1536 per side + 64 transition region towers (TRANS) each side = 3200 total <=== This is the correct value!
334  */
335 
336  /*
337  ** Notes on Tower ID Number Scheme **
338 
339  Left Barrel IETower = 100000 + X
340  Right Barrel IETower = 200000 + X
341  Left TRANS IETower = 300000 + X;
342  Right TRANS IETower = 400000 + X;
343  Left Endcap IETower = 500000 + X
344  Right Endcap IETower = 600000 + X
345  Left Hadronic Endcap IETower = 11100000 + X --> These are just Layer 5 of Endcap Towers. They will never be generated as standalone eTowers.
346  Right Hadronic Endcap IETower = 22200000 + X --> These are just Layer 5 of Endcap Towers. They will never be generated as standalone eTowers.
347 
348  */
349 
350 
351  //----------------------------------------------------------
352 
353  // Begin assigning supercells to Towers
354 
355  //----------------------------------------------------------
356 
357  switch (sample) {
358  // E.M. Barrel (EMB)
359  case CaloSampling::PreSamplerB: { // DONE
360  // Presampler of the EMBarrel. Supercells are 0.1 x 0.1 unless stated otherwise
361  // Region 0 has 14 supercells in 0 < eta < 1.4 and 64 supercells in phi.
362  // Region 0 has 1 supercell (0.12 x 0.1) in 1.4 < eta < 1.52 and 64 supercells in phi. // Documentation describes this as Region 1 but the code does not. We go with Region 0.
363 
364  layer = 0; // By definition
365 
366  towereta = eta_index; // Layer 0 has super cells which are 0.1 x 0.1 - i.e. the full width of a tower - sothe eta_index matches up to the Tower Eta
367  towerphi = phi_index; // phi is standard also
368 
369  if(eta_index == 14){ // special treatment for TRANSITION tower
370  if(pos_neg < 0){ towerID_Modifier = 300000; }
371  else if(pos_neg > 0){ towerID_Modifier = 400000; }
372  iCell = 0; // By definition
373  }
374  else{ // standard treatment for non-transition towers
375  if(pos_neg < 0){ towerID_Modifier = 100000; }
376  else if(pos_neg > 0){ towerID_Modifier = 200000; }
377  iCell = 0; // By definition
378  }
379 
380  break;
381  }
382  case CaloSampling::EMB1:
383  case CaloSampling::EMB2: {
384  // Layer 1 of the EMBarrel. Supercells are 0.025 x 0.1 unless stated otherwise
385  // Region 0 has 56 supercells in 0 < eta < 1.4 and 64 supercells in phi.
386  // Region 1 has 3 supercells in 1.4 < eta < 1.475 and 64 supercells in phi.
387 
388  // Layer 2 of the EMBarrel. Supercells are 0.025 x 0.1 unless stated otherwise
389  // Region 0 has 56 supercells in 0 < eta < 1.4 and 64 supercells in phi.
390  // Region 1 has 1 supercells (0.075 x 0.1) in 1.4 < eta < 1.475 and 64 supercells in phi.
391 
392  if (region == 0) {
393  towereta = eta_index / 4; // this divides integers by 4 and truncates away the decimals (rounds DOWN to an integer)
394  towerphi = phi_index;
395  if(pos_neg < 0){ towerID_Modifier = 100000; }
396  else if(pos_neg > 0){ towerID_Modifier = 200000; }
397  }
398  else if (region == 1){
399  towereta = 14; // hardcoded but is correct
400  towerphi = phi_index;
401  if(pos_neg < 0){ towerID_Modifier = 300000; }
402  else if(pos_neg > 0){ towerID_Modifier = 400000; }
403  }
404  else {
405  ATH_MSG_DEBUG("[CaloSampling::EMB1 or CaloSampling::EMB2] -> invalid 'region' value: " << region << " (Under investigation) ");
406  }
407 
408  switch(sample){
409  case CaloSampling::EMB1: {
410  iCell = (eta_index % 4) + 1;
411  layer = 1;
412  break;
413  }
414  case CaloSampling::EMB2: {
415  if (region == 0) { iCell = (eta_index % 4) + 5; }
416  else if (region == 1){ iCell = 5; }
417  layer = 2;
418  break;
419  }
420  default: {
421  ATH_MSG_DEBUG("CaloSampling::EMBX -> invalid sample for assigning iCell value! " << sample << " (Under investigation) ");
422  break;
423  }
424  }
425 
426  break;
427  }
428  case CaloSampling::EMB3: {
429  // Layer 3 of the EMBarrel. Supercells are 0.1 x 0.1 unless stated otherwise
430  // Region 0 has 14 supercells in 0 < eta < 1.4 and 64 supercells in phi.
431  // Region 1 does not exist
432 
433  layer = 3; // By definiton
434  towereta = eta_index; // Analogous to PreSamplerB
435  towerphi = phi_index;
436 
437  iCell = 9; // By definition;
438 
439  if(pos_neg < 0){ towerID_Modifier = 100000; }
440  else if(pos_neg > 0){ towerID_Modifier = 200000; }
441 
442  break;
443  }
444  // E.M. End-cap (EMEC)
446  // Region 1 has 3 supercells in 1.5 < eta < 1.8, and 64 supercells in phi.
447  // Supercells are 0.1 x 0.1.
448 
449  layer = 0;
450 
451  towereta = eta_index;
452  towerphi = phi_index;
453 
454  iCell = 0; // By definition
455 
456  if(pos_neg < 0){ towerID_Modifier = 500000; }
457  else if(pos_neg > 0){ towerID_Modifier = 600000; }
458 
459  break;
460  }
461  case CaloSampling::EME1: {
462  // Layer 1 of the EM End-Cap. Supercells very frequently change in size.
463  // Region 0 has 1 supercell in 1.375 < eta < 1.5, and 64 supercells in phi. Supercells are 0.125 x 0.1.
464  // Region 1 has 12 supercells in 1.5 < eta < 1.8, and 64 supercells in phi. Supercells are 0.025 x 0.1.
465  // Region 2 has 6 (now 12??) supercells in 1.8 < eta < 2.0, and 64 supercells in phi. Supercells are 0.0333 (0.016667 ???) x 0.1.
466  // Region 3 has 16 supercells in 2.0 < eta < 2.4, and 64 supercells in phi. Supercells are 0.025 x 0.1.
467  // Region 4 has 1 supercell in 2.4 < eta < 2.5, and 64 supercells in phi. Supercells are 0.1 x 0.1.
468  // Region 5 has 3 supercells in 2.5 < eta < 3.1, and 32 supercells in phi. Supercells are 0.2 x 0.2.
469  // Region 6 has 1 supercell in 3.1 < eta < 3.2, and 32 supercells in phi. Supercells are 0.1 x 0.2
470 
471  // 1.375 < 1.5, funny behaviour, treated as 1 special tower ==> 1 tower
472  // 1.5 < 1.8 standard towers by presampler ==> 3 towers
473  // 1.8 < 2.0 standard towers by back ==> 2 towers
474  // 2.0 < 2.4 standard towers by back ==> 4 towers
475  // 2.4 < 2.5 standard tower by back ==> 1 tower
476  // 2.5 < 3.1, funny behaviour, treated as 3 wide towers ==> 3 towers
477  // 3.1 < 3.2, funny behaviour, treated as 1 tower ==> 1 tower
478  // 15 towers in total (by different means)
479 
480  layer = 1; // By definition
481 
482  switch (region) {
483  case 0: { // special treatment for transition region
484 
485  towereta = eta_index;
486  towerphi = phi_index;
487 
488  iCell = 4; // Placement based on advice from Alan Watson
489  break;
490  }
491  case 2: {
492 
493  towereta = (eta_index / 4);
494  towerphi = phi_index;
495 
496  iCell = (eta_index % 4) + 1;
497  break;
498  }
499  case 3: {
500 
501  // calc ID
502  towereta = (eta_index / 6);
503  towerphi = phi_index;
504 
505  iCell = (eta_index % 6) + 1;
506 
507  if(iCell == 1){ iCell = 1; doenergysplit = false; }
508  else if( iCell == 2 ){ iCell = 1; doenergysplit = true; }
509  else if( iCell == 3 ){ iCell = 2; doenergysplit = false; }
510  else if( iCell == 4 ){ iCell = 3; doenergysplit = false; }
511  else if( iCell == 5 ){ iCell = 3; doenergysplit = true; }
512  else if( iCell == 6 ){ iCell = 4; doenergysplit = false; }
513 
514  break;
515 
516  // OUTDATED CODE LEFT HERE AS A FRIENDLY REMINDER OF SPECIAL STRUCTURE INCASE A FUTURE ISSUE ARISES======================
517  // Begin Dima---
518  // This is the special region, with 6 supercells per tower
519  // Idea here is to divide 2 out of 6 by 2 and add half ET to each of 2 "normal" SC
520  //iETower = (eta_index / 6) + 18;
521 
522  // These are the cells we will split
523  //if (eta_index % 3 == 1) {
524  //iCell = (eta_index % 6 < 3 ? 0 : 2);
525  //iCell2 = iCell + 1;
526  //} else {
527  // These ones just need assigning to the correct location
528  // So that 0, 2, 3, 5 => 0, 1, 2, 3
529  //iCell = (eta_index % 6) / 1.45;
530  //}
531  // end DIMA---
532  // ======================================================================================================================
533  }
534  case 4: {
535 
536  towereta = (eta_index / 4);
537  towerphi = phi_index;
538 
539  iCell = (eta_index % 4) + 1;
540  break;
541  }
542  case 5: {
543 
544  towereta = eta_index ;
545  towerphi = phi_index;
546 
547  iCell = 1;
548  break;
549  }
550  default: {
551  // This should never fire because we don't go beyond 2.5
552  ATH_MSG_DEBUG("CaloSampling::EME1 -> invalid 'region' value: " << region << " (Under investigation) ");
553  break;
554  }
555  break;
556  }
557 
558  if(region != 0){
559  if(pos_neg < 0){ towerID_Modifier = 500000; }
560  else if(pos_neg > 0){ towerID_Modifier = 600000; }
561  }
562  else if(region == 0){
563  // TRANSITION REGION TREATMENT!
564  if(pos_neg < 0){ towerID_Modifier = 300000; }
565  else if(pos_neg > 0){ towerID_Modifier = 400000; }
566  }
567 
568  break;
569  }
570  case CaloSampling::EME2: {
571 
572  // Layer 2 of the EM End-Cap. Supercells very frequently change in size.
573  // Region 0 has 1 supercell in 1.375 < eta < 1.425, and 64 supercells in phi. Supercells are 0.05 x 0.1.
574  // Region 0 also has 3 supercells in 1.425 < eta < 1.5, and 64 supercells in phi. Supercells are 0.025 x 0.1
575  // Region 1 has 12 supercells in 1.5 < eta < 1.8, and 64 supercells in phi. Supercells are 0.025 x 0.1.
576  // Region 2 has 8 supercells in 1.8 < eta < 2.0, and 64 supercells in phi. Supercells are 0.025 x 0.1.
577  // Region 3 has 16 supercells in 2.0 < eta < 2.4, and 64 supercells in phi. Supercells are 0.025 x 0.1.
578  // Region 4 has 4 supercells in 2.4 < eta < 2.5, and 64 supercells in phi. Supercells are 0.025 x 0.1.
579  // Region 5 has 3 supercells in 2.5 < eta < 3.1, and 32 supercells in phi. Supercells are 0.2 x 0.2.
580  // Region 6 has 1 supercell in 3.1 < eta < 3.2, and 32 supercells in phi. Supercells are 0.1 x 0.2
581 
582  layer = 2;
583 
584  switch (region) {
585  case 0: { // special treatment for TRANSITON region
586 
587  layer = 3; // change layer label for ET threshold treatment since we are treating this as a layer3 cell - it's an extreme special case cell as part of the transition region
588 
589  towereta = eta_index;
590  towerphi = phi_index;
591 
592  iCell = 9;
593 
594  break;
595  }
596  case 1: {
597 
598  towereta = (eta_index / 4);
599  towerphi = phi_index;
600 
601  iCell = (eta_index % 4) + 5;
602 
603  break;
604  }
605  default: {
606  ATH_MSG_DEBUG("CaloSampling::EME2 -> invalid 'region' value: " << region << " (Under investigation) ");
607  break;
608  }
609  break;
610  }
611 
612  if(region == 0){
613  // TRANSITION REGION TREATMENT!
614  if(pos_neg < 0){ towerID_Modifier = 300000; }
615  else if(pos_neg > 0){ towerID_Modifier = 400000; }
616  }
617  else {
618  if( (eta_index / 4) < 15 ){
619  if(pos_neg < 0){ towerID_Modifier = 300000; }
620  else if(pos_neg > 0){ towerID_Modifier = 400000; }
621  }
622  else{
623  if(pos_neg < 0){ towerID_Modifier = 500000; }
624  else if(pos_neg > 0){ towerID_Modifier = 600000; }
625  }
626  }
627 
628  break;
629  }
630  case CaloSampling::EME3: {
631 
632  // Layer 3 of the EM End-Cap. Supercells are 0.1 x 0.1 unless stated otherwise.
633  // Region 0 does not exist.
634  // Region 1 has 3 supercells in 1.5 < eta < 1.8, and 64 supercells in phi. Supercells are 0.1 x 0.1.
635  // Region 2 has 2 supercells in 1.8 < eta < 2.0, and 64 supercells in phi. Supercells are 0.1 x 0.1.
636  // Region 3 has 4 supercells in 2.0 < eta < 2.4, and 64 supercells in phi. Supercells are 0.1 x 0.1.
637  // Region 4 has 1 supercells in 2.4 < eta < 2.5, and 64 supercells in phi. Supercells are 0.1 x 0.1.
638  // No other Regions exist
639 
640  layer = 3; // By definition
641 
642  switch (region) {
643  case 0: {
644 
645  towereta = eta_index;
646  towerphi = phi_index;
647 
648  iCell = 9; // By definition
649 
650  break;
651  }
652  default: {
653  ATH_MSG_DEBUG("CaloSampling::EME3 -> invalid 'region' value: " << region << " (Under investigation) ");
654  break;
655  }
656  break;
657  }
658 
659  if(pos_neg < 0){ towerID_Modifier = 500000; }
660  else if(pos_neg > 0){ towerID_Modifier = 600000; }
661 
662  break;
663  }
664  // Hadronic End-cap (HEC)
665  case CaloSampling::HEC0:
666  case CaloSampling::HEC1:
667  case CaloSampling::HEC2:
668  case CaloSampling::HEC3: {
669 
670  // All Layers of the Hadronic End-Cap.
671  // Region 0 has 10 supercells in 1.5 < eta < 2.5, and 32 supercells in phi. Supercells are 0.1 x 0.1.
672  // Region 1 has 4 supercells in 2.5 < eta < 3.3, and 16 supercells in phi. Supercells are 0.2 x 0.2.
673 
674  switch(region){
675  case 0: {
676 
677  towereta = eta_index;
678  towerphi = phi_index;
679 
680  layer = 4; // By definition
681 
682  switch (sample){ // only one supercell per layer in all regions for HECX
683  case CaloSampling::HEC0: { iCell = 10; break; }
684  case CaloSampling::HEC1: { iCell = 11; break; }
685  case CaloSampling::HEC2: { iCell = 12; break; }
686  case CaloSampling::HEC3: { iCell = 13; break; }
687  default: {
688  ATH_MSG_DEBUG("CaloSampling::HECX -> invalid sample for assigning iCell value! " << sample << " (Under investigation) ");
689  break;
690  }
691  }
692  break;
693 
694  }
695  case 1: {
696  validcell = false; // any region 1 HEC cells are actually with eta > 2.5
697  //ATH_MSG_DEBUG("CaloSampling::HECX Region 1 invalid as outside of eta range!");
698  break;
699  }
700  default: { break; }
701  }
702 
703  // Tower connection
704  if(pos_neg < 0){ towerID_Modifier = 500000; }
705  else if(pos_neg > 0){ towerID_Modifier = 600000; }
706 
707  break;
708  }
711  case CaloSampling::TileBar2: {
712  REPORT_MESSAGE_WITH_CONTEXT (MSG::DEBUG, "eSuperCellTowerMapper") << "Supercell is from Tile Barrel - it will be ignored.";
713  validcell = false;
714  //ATH_MSG_DEBUG("\n==== eSuperCellTowerMapper ============ Supercell is from Tile Barrel - it will be ignored.");
715  break;
716  }
719  case CaloSampling::TileGap3: {
720  //ATH_MSG_DEBUG("\n==== eSuperCellTowerMapper ============ Supercell is from Tile Gap (ITC and scintillator) - it will be ignored.");
721  validcell = false;
722  break;
723  }
726  case CaloSampling::TileExt2: {
727  //ATH_MSG_DEBUG("\n==== eSuperCellTowerMapper ============ Supercell is from Tile Extended Barrel - it will be ignored.");
728  validcell = false;
729  break;
730  }
731  case CaloSampling::FCAL0:
732  case CaloSampling::FCAL1:
733  case CaloSampling::FCAL2: {
734  //ATH_MSG_DEBUG("\n==== eSuperCellTowerMapper ============ Supercell is from Forward EM endcap - it will be ignored.");
735  validcell = false;
736  break;
737  }
738  case CaloSampling::MINIFCAL0:
739  case CaloSampling::MINIFCAL1:
740  case CaloSampling::MINIFCAL2:
741  case CaloSampling::MINIFCAL3: {
742  //ATH_MSG_DEBUG("\n==== eSuperCellTowerMapper ============ Supercells is from MiniFCAL - it will be ignored.");
743  validcell = false;
744  break;
745  }
746  case CaloSampling::Unknown: {
747  //ATH_MSG_WARNING("\n==== eSuperCellTowerMapper ============ Supercell sampling is officially unknown - it will be ignored. (Needs investigation). Please report this!");
748  validcell = false;
749  break;
750  }
751  default: {
752  ATH_MSG_DEBUG("\n==== eSuperCellTowerMapper ============ Supercell has invalid CaloSampling value: " << sample << " (Needs investigation). Please report this!");
753  validcell = false;
754  break;
755  }
756  }
757 
758  if(validcell){
759  iETower = FindTowerIDForSuperCell(towereta, towerphi) + towerID_Modifier;
760 
761  // Identify eTowers at eta < 0 and re-order layer 1/2 cells manually
762  // Algorithms want order to be increasing eta, not increasing |eta|
763  if (iETower < 200000 || (iETower > 300000 && iETower < 400000) || (iETower > 500000 && iETower < 600000)) {
764  if (layer == 1) {
765  iCell = 5 - iCell;
766  if (doenergysplit) iCell -= 1; // Need special treatment here because of way energy splitting works
767  } else if (layer == 2) {
768  iCell = 13 - iCell;
769  }
770  }
771 
772  // Only one layer-1 cell in the region 2.4 < |eta| < 2.5. Set the slot to zero to match the behaviour of the firmware.
773  int etaIndex = (iETower%100000)/64;
774  if (iETower > 500000 && etaIndex == 24 && iCell < 5) iCell = 0; // Map final layer 1 cell into layer 0 slot
775 
776  if(doPrint){
777  PrintCellSpec(sample, layer, region, eta_index, phi_index, pos_neg, iETower, iCell, prov, ID, doenergysplit);
778  }
779  ConnectSuperCellToTower( my_eTowerContainerRaw, iETower, ID, iCell, et, layer, doenergysplit);
780  }
781 
782  // END ITERATING OVER SUPER CELLS+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++++
783 
784  return 1;
785 
786  }

◆ FindTowerIDForSuperCell()

int LVL1::eSuperCellTowerMapper::FindTowerIDForSuperCell ( int  towereta,
int  towerphi 
) const
overrideprivatevirtual

Implements LVL1::IeSuperCellTowerMapper.

Definition at line 788 of file eSuperCellTowerMapper.cxx.

789 {
790  return (towerphi + (64 * towereta));
791 }

◆ initialize()

StatusCode LVL1::eSuperCellTowerMapper::initialize ( )
overridevirtual

standard Athena-Algorithm method

Definition at line 39 of file eSuperCellTowerMapper.cxx.

40 {
41 
45  return StatusCode::SUCCESS;
46 
47 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & LVL1::IeSuperCellTowerMapper::interfaceID ( )
inlinestaticinherited

Definition at line 50 of file IeSuperCellTowerMapper.h.

51  {
52  return IID_IeSuperCellTowerMapper;
53  }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ PrintCellSpec()

void LVL1::eSuperCellTowerMapper::PrintCellSpec ( const CaloSampling::CaloSample  sample,
int  layer,
const int  region,
const int  eta_index,
const int  phi_index,
const int  pos_neg,
int  iETower,
int  iCell,
int  prov,
Identifier  ID,
bool  doenergysplit 
) const
overrideprivatevirtual

Implements LVL1::IeSuperCellTowerMapper.

Definition at line 793 of file eSuperCellTowerMapper.cxx.

794  {
795 
796  std::string sampleName = "";
797 
798  switch (sample) {
799  case CaloSampling::PreSamplerB: { sampleName = "PreSamplerB"; break; }
800  case CaloSampling::EMB1: { sampleName = "EMB1"; break; }
801  case CaloSampling::EMB2: { sampleName = "EMB2"; break; }
802  case CaloSampling::EMB3: { sampleName = "EMB3"; break; }
803  case CaloSampling::PreSamplerE: { sampleName = "PreSamplerE"; break; }
804  case CaloSampling::EME1: { sampleName = "EME1"; break; }
805  case CaloSampling::EME2: { sampleName = "EME2"; break; }
806  case CaloSampling::EME3: { sampleName = "EME3"; break; }
807  case CaloSampling::HEC0: { sampleName = "HEC0"; break; }
808  case CaloSampling::HEC1: { sampleName = "HEC1"; break; }
809  case CaloSampling::HEC2: { sampleName = "HEC2"; break; }
810  case CaloSampling::HEC3: { sampleName = "HEC3"; break; }
811  default: {
812  ATH_MSG_DEBUG("\n==== eSuperCellTowerMapper ============ Supercell has invalid CaloSampling value: " << sample << " (Needs investigation). Please report this!");
813  break;
814  }
815  }
816 
817  ATH_MSG_DEBUG("ASSIGNED CELL::: CASE: " << sampleName
818  << "\tSample: " << sample
819  << "\tLayer: " << layer
820  << "\tRegion: " << region
821  << "\tEta_Index: " << eta_index
822  << "\tPhi_Index: " << phi_index
823  << "\tPosNeg: " << pos_neg
824  << "\tiETower: " << iETower
825  << "\tiCell: " << iCell
826  << "\tDoEnergySplit: " << doenergysplit
827  << "\tProvenance: " << prov
828  << "\tID: " << ID
829  << " ");
830 
831  return;
832 }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ reset()

void LVL1::eSuperCellTowerMapper::reset ( ) const
overridevirtual

Implements LVL1::IeSuperCellTowerMapper.

Definition at line 91 of file eSuperCellTowerMapper.cxx.

91  {
92  return;
93 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_eFEXSuperCellTowerIdProviderTool

ToolHandle<IeFEXSuperCellTowerIdProvider> LVL1::eSuperCellTowerMapper::m_eFEXSuperCellTowerIdProviderTool {this, "eFEXSuperCellTowerIdProviderTool", "LVL1::eFEXSuperCellTowerIdProvider", "Tool that provides tower-FOGA mapping"}
private

Definition at line 45 of file eSuperCellTowerMapper.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_scellsCollectionSGKey

SG::ReadHandleKey<CaloCellContainer> LVL1::eSuperCellTowerMapper::m_scellsCollectionSGKey {this, "SCell", "SCell", "SCell"}
private

Definition at line 43 of file eSuperCellTowerMapper.h.

◆ m_triggerTowerCollectionSGKey

SG::ReadHandleKey<xAOD::TriggerTowerContainer> LVL1::eSuperCellTowerMapper::m_triggerTowerCollectionSGKey {this, "xODTriggerTowers", "xAODTriggerTowers", "xAODTriggerTowers"}
private

Definition at line 44 of file eSuperCellTowerMapper.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
GetLCDefs::Unknown
@ Unknown
Definition: GetLCDefs.h:21
test_pyathena.eta
eta
Definition: test_pyathena.py:10
et
Extra patterns decribing particle interation process.
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
CaloCell_ID_FCS::TileExt2
@ TileExt2
Definition: FastCaloSim_CaloCell_ID.h:39
CaloCell_Base_ID::region
int region(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
constants.EMB1
int EMB1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:53
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
LVL1::eSuperCellTowerMapper::FindTowerIDForSuperCell
virtual int FindTowerIDForSuperCell(int towereta, int towerphi) const override
Definition: eSuperCellTowerMapper.cxx:788
LVL1::eTower
The eTower class is an interface object for eFEX trigger algorithms The purposes are twofold:
Definition: eTower.h:38
ID
std::vector< Identifier > ID
Definition: CalibHitIDCheck.h:24
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
LVL1::eSuperCellTowerMapper::m_eFEXSuperCellTowerIdProviderTool
ToolHandle< IeFEXSuperCellTowerIdProvider > m_eFEXSuperCellTowerIdProviderTool
Definition: eSuperCellTowerMapper.h:45
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
CaloCell_ID_FCS::TileExt0
@ TileExt0
Definition: FastCaloSim_CaloCell_ID.h:37
CaloCell_ID_FCS::TileBar1
@ TileBar1
Definition: FastCaloSim_CaloCell_ID.h:32
CaloCell_Base_ID::pos_neg
int pos_neg(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
MuonGM::round
float round(const float toRound, const unsigned int decimals)
Definition: Mdt.cxx:27
M_PI
#define M_PI
Definition: ActiveFraction.h:11
CaloCell_ID_FCS::FCAL1
@ FCAL1
Definition: FastCaloSim_CaloCell_ID.h:41
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
CaloCell_ID_FCS::HEC2
@ HEC2
Definition: FastCaloSim_CaloCell_ID.h:29
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
CaloCell_ID_FCS::TileGap3
@ TileGap3
Definition: FastCaloSim_CaloCell_ID.h:36
LVL1::eTower::setSCID
void setSCID(Identifier ID, int cell, float et, int layer, bool doenergysplit)
Set supercell position ID.
Definition: eTower.cxx:110
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
LVL1::eSuperCellTowerMapper::m_triggerTowerCollectionSGKey
SG::ReadHandleKey< xAOD::TriggerTowerContainer > m_triggerTowerCollectionSGKey
Definition: eSuperCellTowerMapper.h:44
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
CaloCell_ID_FCS::HEC1
@ HEC1
Definition: FastCaloSim_CaloCell_ID.h:28
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
constants.EMB2
int EMB2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:54
FullCPAlgorithmsTest_eljob.sample
sample
Definition: FullCPAlgorithmsTest_eljob.py:113
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
LVL1::eSuperCellTowerMapper::m_scellsCollectionSGKey
SG::ReadHandleKey< CaloCellContainer > m_scellsCollectionSGKey
Definition: eSuperCellTowerMapper.h:43
CaloCell_ID_FCS::TileBar0
@ TileBar0
Definition: FastCaloSim_CaloCell_ID.h:31
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
CaloCell_ID_FCS::TileGap2
@ TileGap2
Definition: FastCaloSim_CaloCell_ID.h:35
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
test_pyathena.parent
parent
Definition: test_pyathena.py:15
CaloCell_Base_ID::eta
int eta(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
constants.EME1
int EME1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:55
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
createCablingJSON.eta_index
int eta_index
Definition: createCablingJSON.py:14
CaloCell_ID_FCS::TileGap1
@ TileGap1
Definition: FastCaloSim_CaloCell_ID.h:34
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
REPORT_MESSAGE_WITH_CONTEXT
#define REPORT_MESSAGE_WITH_CONTEXT(LVL, CONTEXT_NAME)
Report a message, with an explicitly specified context name.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:345
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
CaloCell_ID_FCS::TileExt1
@ TileExt1
Definition: FastCaloSim_CaloCell_ID.h:38
CaloCell_ID_FCS::EME3
@ EME3
Definition: FastCaloSim_CaloCell_ID.h:26
CaloCell_Base_ID::phi
int phi(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
CaloCell_ID_FCS::HEC0
@ HEC0
Definition: FastCaloSim_CaloCell_ID.h:27
a
TList * a
Definition: liststreamerinfos.cxx:10
h
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
CaloCell_ID_FCS::PreSamplerE
@ PreSamplerE
Definition: FastCaloSim_CaloCell_ID.h:23
CaloCell_ID_FCS::PreSamplerB
@ PreSamplerB
Definition: FastCaloSim_CaloCell_ID.h:19
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LVL1::eTower::getET_float
float getET_float(unsigned int layer, int cell=0) const
Get ET of a specified cell in MeV FLOAT VERSION.
Definition: eTower.cxx:183
DEBUG
#define DEBUG
Definition: page_access.h:11
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
CaloCell_ID_FCS::FCAL2
@ FCAL2
Definition: FastCaloSim_CaloCell_ID.h:42
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
LVL1::eSuperCellTowerMapper::ConnectSuperCellToTower
virtual void ConnectSuperCellToTower(std::unique_ptr< eTowerContainer > &my_eTowerContainerRaw, int iETower, Identifier ID, int iCell, float et, int layer, bool doenergysplit) const override
Definition: eSuperCellTowerMapper.cxx:246
LVL1::eSuperCellTowerMapper::FindAndConnectTower
virtual int FindAndConnectTower(std::unique_ptr< eTowerContainer > &my_eTowerContainerRaw, CaloSampling::CaloSample sample, const int region, int layer, const int pos_neg, const int eta_index, const int phi_index, Identifier ID, float et, int prov, bool doPrint) const override
Definition: eSuperCellTowerMapper.cxx:256
CaloCell_ID_FCS::HEC3
@ HEC3
Definition: FastCaloSim_CaloCell_ID.h:30
CaloCell_Base_ID
Helper base class for offline cell identifiers.
Definition: CaloCell_Base_ID.h:41
CaloCell_ID_FCS::FCAL0
@ FCAL0
Definition: FastCaloSim_CaloCell_ID.h:40
CaloCell_ID_FCS::EMB3
@ EMB3
Definition: FastCaloSim_CaloCell_ID.h:22
LVL1::eTower::setET
void setET(int cell, float et, int layer, bool ignoreDisable=false)
Definition: eTower.cxx:99
CaloCell_ID_FCS::TileBar2
@ TileBar2
Definition: FastCaloSim_CaloCell_ID.h:33
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
constants.EME2
int EME2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:56
fitman.k
k
Definition: fitman.py:528
LVL1::eSuperCellTowerMapper::PrintCellSpec
virtual void PrintCellSpec(const CaloSampling::CaloSample sample, int layer, const int region, const int eta_index, const int phi_index, const int pos_neg, int iETower, int iCell, int prov, Identifier ID, bool doenergysplit) const override
Definition: eSuperCellTowerMapper.cxx:793
Identifier
Definition: IdentifierFieldParser.cxx:14