ATLAS Offline Software
TBXMLCaloCellWriterTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
6 #include "TBXMLWriterToolBase.h"
8 #include "TBXMLWriter.h"
9 
10 #include "GaudiKernel/MsgStream.h"
11 
12 #include "CLHEP/Units/SystemOfUnits.h"
13 
14 #include "Identifier/Identifier.h"
16 
18 #include "CaloDetDescr/CaloDetDescrElement.h"
19 
21 
22 #include "CaloGeoHelpers/CaloSampling.h"
23 #include "CaloEvent/CaloCell.h"
25 
26 #include "boost/io/ios_state.hpp"
27 
28 #include <iostream>
29 #include <fstream>
30 #include <iomanip>
31 
32 #include <vector>
33 #include <string>
34 #include <sstream>
35 #include <map>
36 
37 #include <cmath>
38 
39 
40 using CLHEP::deg;
41 
42 
43 const unsigned int TBXMLCaloCellWriterTool::m_nCols = 2;
44 
46  const std::string& name,
47  const IInterface* parent)
49  , m_etaMin(-5.0)
50  , m_etaMax(5.0)
51  , m_phiMin(0.*deg)
52  , m_phiMax(360.*deg)
53  , m_firstEvent(true)
54  , m_idHelper(0)
55 {
56  declareProperty("InputCellContainer", m_cellContainer);
57  declareProperty("IncludedCalos", m_includedCalos);
58  declareProperty("IncludedSamplings", m_includedSamplings);
59  declareProperty("EtaMin", m_etaMin);
60  declareProperty("EtaMax", m_etaMax);
61  declareProperty("PhiMin", m_phiMin);
62  declareProperty("PhiMax", m_phiMax);
63  // save pointer to algorithm
64  m_mother = dynamic_cast<const TBXMLWriter*>(parent);
65 }
66 
68 { }
69 
71 {
74  return StatusCode::SUCCESS;
75 }
76 
78 // Event Writer //
80 
82 TBXMLCaloCellWriterTool::writeEvent(std::ostream& outStream,
83  const std::string& /* entryTag */)
84 {
85  // messaging
86  MsgStream log(msgSvc(),name());
87 
89  // On the Fly Initialization //
91 
92  if ( m_firstEvent )
93  {
94  // check pointer
95  if ( m_mother == 0 )
96  {
97  log << MSG::ERROR
98  << "tool does not hang off the TBXMLWriter algorithm."
99  << endmsg;
100  return StatusCode::FAILURE;
101  }
102 
103  // convert poperties
104  StatusCode checkOut = this->convertProperties();
105  if ( checkOut.isFailure() )
106  {
107  log << MSG::ERROR
108  << "cannot convert properties correctly!"
109  << endmsg;
110  return StatusCode::FAILURE;
111  }
112  m_firstEvent = false;
113 
114  // print out configuration
115  log << MSG::INFO
116  << "list of included calo samplings:"
117  << endmsg;
118  for ( unsigned int i=0; i<m_caloSamplings.size(); i++ )
119  {
120  log << MSG::INFO
121  << "Sampling \042"
123  << "\042 with SubCalo index "
124  << (int)m_caloSamplings[i]
125  << endmsg;
126  }
127  }
128 
130  // Check On Begin Run //
132 
133  const EventContext& ctx = Gaudi::Hive::currentContext();
134  EventIDBase::number_type run_number = ctx.eventID().run_number();
135  if (m_runNumbers.insert (run_number).second) {
136  StatusCode checkOut = this->writeRunFiles(m_mother->getFileDir(),
137  run_number);
138  if ( checkOut.isFailure() )
139  {
140  log << MSG::ERROR
141  << "cannot produce run XML files."
142  << endmsg;
143  return StatusCode::FAILURE;
144  }
145  }
146 
147 
149  // Retrieve Data from StoreGate //
151 
152  const CaloCellContainer* theContainer = 0;
153  ATH_CHECK( evtStore()->retrieve(theContainer,m_cellContainer) );
154 
156  // Loop Individual Calorimeters //
158 
159  for ( unsigned int i=0; i<m_caloIndices.size(); i++ )
160  {
161  // write container tag
162  outStream << "<!-- TBXMLCaloCellWriterTool: begin write cell container "
163  << m_includedCalos[i] << " -->" << std::endl;
164 
165  std::vector<std::string> theCellAttrNames;
166  theCellAttrNames.push_back("name");
167  theCellAttrNames.push_back("ncols");
168  theCellAttrNames.push_back("nrows");
169  theCellAttrNames.push_back("idtype");
170  theCellAttrNames.push_back("etype");
171  std::vector<std::string> theCellAttrValues;
172  theCellAttrValues.push_back(m_includedCalos[i]);
173  std::ostringstream theCols;
174  theCols << m_nCols << std::ends;
175 
176  // get data size
177  unsigned int dataSize = theContainer->nCellsCalo(m_caloIndices[i]);
178  unsigned int nRows =
179  (unsigned int)ceil( (double)dataSize / (double)m_nCols );
180  std::ostringstream theRows;
181  theRows << nRows << std::ends;
182  theCellAttrValues.push_back(theCols.str());
183  theCellAttrValues.push_back(theRows.str());
184  theCellAttrValues.push_back("uint");
185  theCellAttrValues.push_back("double");
186  this->openElement(outStream,"CaloCellContainer",
187  theCellAttrNames,theCellAttrValues);
188 
189  // loop on cells
191  theContainer->beginConstCalo(m_caloIndices[i]);
193  theContainer->endConstCalo(m_caloIndices[i]);
194 
195  // baseline index
196  IdentifierHash baseIndex, lastIndex;
198  baseIndex, lastIndex);
199 
200  unsigned int theCtr = 0;
201  bool isTerminated = false;
202  for ( ; firstCell != lastCell; ++firstCell )
203  {
204  // check if cell in requested layer and range
205  double eta = (*firstCell)->eta();
206  double phi = (*firstCell)->phi();
207  const CaloDetDescrElement * theCaloDDE= (*firstCell)->caloDDE();
208  CaloSampling::CaloSample theLayer;
209  if (theCaloDDE) {
210  theLayer = (CaloSampling::CaloSample) theCaloDDE->getSampling();
211  }else{
212  theLayer = CaloSampling::Unknown;
213  }
214  if ( ( std::find(m_caloSamplings.begin(),
215  m_caloSamplings.end(),
216  theLayer) != m_caloSamplings.end() ) &&
217  ( ( eta > m_etaMin && eta < m_etaMax ) &&
218  ( phi > m_phiMin && phi < m_phiMax ) )
219  )
220  {
221  // get calorimeter hash index
222  IdentifierHash theIndex =
223  (*firstCell)->caloDDE()->calo_hash();
224  // get eta, phi, region
225  int etaIndex = m_idHelper->eta((*firstCell)->ID());
226  int phiIndex = m_idHelper->phi((*firstCell)->ID());
227  int regIndex = m_idHelper->region((*firstCell)->ID());
228  // int subIndex = m_idHelper->sub_calo((*firstCell)->ID());
229  int lyrIndex = m_idHelper->sampling((*firstCell)->ID());
230  int subIndex = -1;
231  // get subIndex
232  if ( m_idHelper->is_em_barrel((*firstCell)->ID()) )
233  {
234  subIndex = 0;
235  }
236  else if ( m_idHelper->is_em_endcap((*firstCell)->ID()) )
237  {
238  subIndex = 1;
239  }
240  else if ( m_idHelper->is_tile_barrel((*firstCell)->ID()) )
241  {
242  subIndex = 2;
243  }
244  else if ( m_idHelper->is_tile_extbarrel((*firstCell)->ID()) )
245  {
246  subIndex = 3;
247  }
248  else if ( m_idHelper->is_hec((*firstCell)->ID()) )
249  {
250  subIndex = 4;
251  }
252  else if ( m_idHelper->is_fcal((*firstCell)->ID()) )
253  {
254  subIndex = 5;
255  }
256  // get signal
257  double theEnergy = (*firstCell)->e();
258  if ( theCtr == 0 || ( theCtr % m_nCols ) == 0 )
259  {
260  outStream << " ";
261  }
262  theIndex -= (int)baseIndex;
263  boost::io::ios_base_all_saver streamsave (outStream);
264  outStream
265  << std::setw(10) << std::setfill(' ') << theIndex << " "
266  << std::setw(3) << std::setfill(' ') << subIndex << " "
267  << std::setw(3) << std::setfill(' ') << lyrIndex << " "
268  << std::setw(3) << std::setfill(' ') << regIndex << " "
269  << std::setw(3) << std::setfill(' ') << etaIndex << " "
270  << std::setw(3) << std::setfill(' ') << phiIndex << " "
271  << std::setw(10) << std::setprecision(5) << theEnergy;
272  theCtr++;
273  if ( (isTerminated = ( theCtr % m_nCols )) == 0 )
274  {
275  outStream << std::endl;
276  }
277  }
278  }
279  if ( ! isTerminated ) outStream << std::endl;
280  this->closeElement(outStream);
281  // write container tag
282  outStream << "<!-- TBXMLCaloCellWriterTool: end write cell container "
283  << m_includedCalos[i] << " -->" << std::endl;
284  }
285 
286  return StatusCode::SUCCESS;
287 }
288 
290 // Run File Writer //
292 
294 TBXMLCaloCellWriterTool::writeRunFiles(const std::string& fileDir,
295  unsigned int runNumber)
296 {
297 
299  // Write Dictionary //
301 
302  // construct directory and file name
303  std::ostringstream thisFileName;
304  thisFileName << fileDir << "/geom."
305  << std::setw(6) << std::setfill('0')
306  << runNumber << ".xml" << std::ends;
307 
308  std::ofstream thisFileStream((thisFileName.str()).c_str());
309 
310  // Document type
311  std::vector<std::string> theRunElements;
312  theRunElements.push_back("FCalGeomTable*");
313  this->openDictionary(thisFileStream,"FCalGeomTable",theRunElements);
314  std::vector<std::string> theRunAttr;
315  theRunAttr.push_back("name CDATA #REQUIRED");
316  this->addAttributes(thisFileStream,"FCalGeomTable",theRunAttr);
317 
318  // FCal geometry table
319  std::vector<std::string> anyData;
320  anyData.push_back("ANY");
321  this->addDictElement(thisFileStream,"FCalGeomTable",anyData);
322  std::vector<std::string> theGeomAttr;
323  theGeomAttr.push_back("name CDATA #REQUIRED");
324  this->addAttributes(thisFileStream,"FCalGeomTable",theGeomAttr);
325 
326  // close dictionary
327  this->closeDictionary(thisFileStream);
328 
330  // Write Run Geometry //
332 
334  const CaloDetDescrManager* caloDetMgr = *caloMgrHandle;
335  ATH_CHECK( detStore()->retrieve (caloDetMgr, "CaloMgr") );
336 
337  IdentifierHash firstIndex, lastIndex, safeIndex;
339  firstIndex, lastIndex);
340  safeIndex = firstIndex;
341 
342  // open element
343  std::vector<std::string> theRunValues(theRunAttr.size());
344  for ( unsigned int i=0; i<theRunAttr.size(); i++ )
345  {
346  if ( (theRunAttr[i]).find("name") != std::string::npos )
347  {
348  theRunValues[i] = "FCalMod0";
349  theRunAttr[i] =
350  theRunAttr[i].substr(0,theRunAttr[i].find_first_of(" "));
351  }
352  }
353  this->openElement(thisFileStream,"FCalGeomTable",theRunAttr,theRunValues);
354  theRunValues[0] = "FCalCells";
355  this->openElement(thisFileStream,"FCalGeomTable",theRunAttr,theRunValues);
356  thisFileStream << "<!-- 32-bit Id"
357  << " Module# "
358  << " EtaIndex "
359  << " PhiIndex "
360  << " X [cm] "
361  << " Y [cm] "
362  << " Z [cm] "
363  << " TileSize "
364  << "-->" << std::endl;
365 
366  // find big/small tile indicator -> to be replaced
367  std::map<int,double> smallestDx;
368  std::map<int,double> largestDx;
369  for ( unsigned int iCtr = (unsigned int)safeIndex;
370  iCtr <= (unsigned int)lastIndex; iCtr++ )
371  {
372  IdentifierHash theIndex(iCtr);
373  Identifier theId = m_idHelper->cell_id(theIndex);
374  int theCalo = m_idHelper->sub_calo(theId);
375  const CaloDetDescrElement* theElement =
376  caloDetMgr->get_element(theIndex);
377  double dx = theElement->dx();
378  // check tile size
379  if ( smallestDx.find(theCalo) == smallestDx.end() )
380  {
381  smallestDx[theCalo] = dx;
382  largestDx[theCalo] = dx;
383  }
384  else
385  {
386  if ( dx < smallestDx[theCalo] ) smallestDx[theCalo] = dx;
387  if ( dx > largestDx[theCalo] ) largestDx[theCalo] = dx;
388  }
389  }
390 
391  // get geometry
392  for (unsigned int iCtr=(unsigned int)firstIndex;
393  iCtr<=(unsigned int)lastIndex; iCtr++ )
394  {
395  IdentifierHash theIndex(iCtr);
396  // get identifiers
397  Identifier theId = m_idHelper->cell_id(theIndex);
398  int theModule = m_idHelper->sampling(theId);
399  int theEta = m_idHelper->eta(theId);
400  int thePhi = m_idHelper->phi(theId);
401  int theCalo = m_idHelper->sub_calo(theId);
402  // get geometry
403  const CaloDetDescrElement* theElement =
404  caloDetMgr->get_element(theIndex);
405  double theX = theElement->x();
406  double theY = theElement->y();
407  double theZ = theElement->z();
408  // check tile size
409  double dx = theElement->dx();
410  int tileSize = dx > 1.1*smallestDx[theCalo] ? 1 : 0;
411 
412  // write out
413  thisFileStream << " "
414  << std::setw(10)
415  << std::setfill(' ') << iCtr-(unsigned int)firstIndex
416  << " "
417  << std::setw(2) << std::setfill(' ') << theModule
418  << " "
419  << std::setw(2) << std::setfill(' ') << theEta
420  << " "
421  << std::setw(2) << std::setfill(' ') << thePhi
422  << " "
423  << std::setw(10) << std::setprecision(5) << theX << " "
424  << std::setw(10) << std::setprecision(5) << theY << " "
425  << std::setw(10) << std::setprecision(5) << theZ << " "
426  << " "
427  << std::setw(2) << std::setfill(' ') << tileSize
428  << std::endl;
429  }
430  ATH_CHECK(this->finalize(thisFileStream));
431  thisFileStream.close();
432 
433  return StatusCode::SUCCESS;
434 }
435 
438 {
439  // messaging
440  MsgStream log(msgSvc(),name());
441 
442  // get calo id helper
443  ATH_CHECK( detStore()->retrieve (m_idHelper, "CaloCell_ID") );
444 
446  // Get Calo Indices //
448 
451  while ( firstCalo != lastCalo )
452  {
453  if ( *firstCalo == "LAREM" )
454  {
456  ++firstCalo;
457  }
458  else if ( *firstCalo == "LARHEC" )
459  {
461  ++firstCalo;
462  }
463  else if ( *firstCalo == "LARFCAL" )
464  {
466  ++firstCalo;
467  }
468  else if ( *firstCalo == "TILE" )
469  {
470  m_caloIndices.push_back(CaloCell_ID::TILE);
471  ++firstCalo;
472  }
473  else
474  {
475  firstCalo = m_includedCalos.erase(firstCalo);
476  }
477  }
478 
480  // Get CaloSamplings //
482 
483  // nasty (no switch on string types...)
484  for (const std::string& sample : m_includedSamplings)
485  {
486  // H8 calos
487  if ( sample == "PreSamplerB" )
489  if ( sample == "EMB0" )
491  if ( sample == "EMB1" )
493  if ( sample == "EMB2" )
495  if ( sample == "TileBar0" )
497  if ( sample == "TileBar1" )
499  if ( sample == "TileBar2" )
501  if ( sample == "TileExt0" )
503  if ( sample == "TileExt1" )
505  if ( sample == "TileExt2" )
507 
508  // H6 calos
509  if ( sample == "EME1" )
511  if ( sample == "EME2" )
513  if ( sample == "HEC0" )
515  if ( sample == "HEC1" )
517  if ( sample == "HEC2" )
519  if ( sample == "HEC3" )
521  if ( sample == "FCAL0" )
523  if ( sample == "FCAL1" )
525  if ( sample == "FCAL2" )
527  }
528 
529  return m_caloSamplings.size() == 0 && m_caloIndices.size() == 0
530  ? StatusCode::FAILURE
531  : StatusCode::SUCCESS;
532 }
533 
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
GetLCDefs::Unknown
@ Unknown
Definition: GetLCDefs.h:21
CaloCell_Base_ID::LARFCAL
@ LARFCAL
Definition: CaloCell_Base_ID.h:46
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
CaloCell_ID_FCS::TileExt2
@ TileExt2
Definition: FastCaloSim_CaloCell_ID.h:39
plotting.plot_kinematics.run_number
run_number
Definition: plot_kinematics.py:29
TBXMLWriterToolBase::openElement
virtual void openElement(std::ostream &outStream, const std::string &theElement, const std::vector< std::string > &listOfAttr, const std::vector< std::string > &listOfValues)
Definition: TBXMLWriterToolBase.cxx:108
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
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
CaloDetDescrElement::y
float y() const
cell y
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:365
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
TBXMLWriterToolBase::addDictElement
virtual void addDictElement(std::ostream &outStream, const std::string &theElement, const std::vector< std::string > &listOfElements)
Definition: TBXMLWriterToolBase.cxx:59
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
CaloCell_Base_ID::is_em_endcap
bool is_em_endcap(const Identifier id) const
test if the id belongs to the EM Endcap
CaloCell_ID_FCS::TileExt0
@ TileExt0
Definition: FastCaloSim_CaloCell_ID.h:37
TBXMLWriterToolBase::openDictionary
virtual void openDictionary(std::ostream &outStream, const std::string &dictName, const std::vector< std::string > &listOfElements)
Definition: TBXMLWriterToolBase.cxx:20
TBXMLWriterToolBase::addAttributes
virtual void addAttributes(std::ostream &outStream, const std::string &theElement, const std::vector< std::string > &listOfAttributes)
Definition: TBXMLWriterToolBase.cxx:93
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
TBXMLCaloCellWriterTool::convertProperties
virtual StatusCode convertProperties()
Definition: TBXMLCaloCellWriterTool.cxx:437
CaloDetDescrManager_Base::get_element
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
Definition: CaloDetDescrManager.cxx:159
CaloCellContainer::beginConstCalo
CaloCellContainer::const_iterator beginConstCalo(CaloCell_ID::SUBCALO caloNum) const
get const iterators on cell of just one calo
Definition: CaloCellContainer.cxx:119
CaloCell_ID_FCS::FCAL1
@ FCAL1
Definition: FastCaloSim_CaloCell_ID.h:41
deg
#define deg
Definition: SbPolyhedron.cxx:17
CaloCell.h
AtlasMcWeight::number_type
unsigned int number_type
Definition: AtlasMcWeight.h:20
TBXMLCaloCellWriterTool::writeRunFiles
virtual StatusCode writeRunFiles(const std::string &fileDir, unsigned int runNumber) override
Definition: TBXMLCaloCellWriterTool.cxx:294
TBXMLWriterToolBase::closeElement
virtual void closeElement(std::ostream &outStream, const std::string &theElement)
Definition: TBXMLWriterToolBase.cxx:141
CaloCell_Base_ID::LARHEC
@ LARHEC
Definition: CaloCell_Base_ID.h:46
CaloCell_ID_FCS::HEC2
@ HEC2
Definition: FastCaloSim_CaloCell_ID.h:29
TBXMLCaloCellWriterTool::m_etaMin
double m_etaMin
Definition: TBXMLCaloCellWriterTool.h:64
TBXMLWriterToolBase::finalize
virtual StatusCode finalize() override
Definition: TBXMLWriterToolBase.h:51
TBXMLCaloCellWriterTool::m_caloSamplings
std::vector< CaloSampling::CaloSample > m_caloSamplings
Definition: TBXMLCaloCellWriterTool.h:69
CaloCell_Base_ID::is_tile_barrel
bool is_tile_barrel(const Identifier id) const
test if the id belongs to the Tiles barrel
TBXMLWriter
Definition: TBXMLWriter.h:24
TBXMLCaloCellWriterTool::writeEvent
virtual StatusCode writeEvent(std::ostream &outFile, const std::string &) override
Definition: TBXMLCaloCellWriterTool.cxx:82
CaloCell_Base_ID::is_hec
bool is_hec(const Identifier id) const
test if the id belongs to the HEC
CaloDetDescrManager.h
Definition of CaloDetDescrManager.
CaloCell_ID.h
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
TBXMLCaloCellWriterTool::m_includedCalos
std::vector< std::string > m_includedCalos
Definition: TBXMLCaloCellWriterTool.h:61
TBXMLCaloCellWriterTool::~TBXMLCaloCellWriterTool
~TBXMLCaloCellWriterTool()
Definition: TBXMLCaloCellWriterTool.cxx:67
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
TBXMLWriterToolBase.h
CaloCell_ID_FCS::HEC1
@ HEC1
Definition: FastCaloSim_CaloCell_ID.h:28
constants.EMB2
int EMB2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:54
FullCPAlgorithmsTest_eljob.sample
sample
Definition: FullCPAlgorithmsTest_eljob.py:113
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
TBXMLCaloCellWriterTool::m_phiMin
double m_phiMin
Definition: TBXMLCaloCellWriterTool.h:64
lumiFormat.i
int i
Definition: lumiFormat.py:85
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
CaloCell_Base_ID::calo_cell_hash_range
void calo_cell_hash_range(const Identifier id, IdentifierHash &caloCellMin, IdentifierHash &caloCellMax) const
to loop on 'global' cell hashes of one sub-calorimeter alone
CaloCell_Base_ID::is_fcal
bool is_fcal(const Identifier id) const
test if the id belongs to the FCAL - true also for MiniFCAL
CaloCell_ID_FCS::TileBar0
@ TileBar0
Definition: FastCaloSim_CaloCell_ID.h:31
CaloCell_Base_ID::sampling
int sampling(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CaloCell_Base_ID::is_tile_extbarrel
bool is_tile_extbarrel(const Identifier id) const
test if the id belongs to the Tiles extended barrel
TBXMLCaloCellWriterTool::TBXMLCaloCellWriterTool
TBXMLCaloCellWriterTool(const std::string &type, const std::string &name, const IInterface *parent)
tool constructor
Definition: TBXMLCaloCellWriterTool.cxx:45
CaloCellContainer::nCellsCalo
int nCellsCalo(const CaloCell_ID::SUBCALO caloNum) const
get number of cels of given calorimeter
Definition: CaloCellContainer.cxx:145
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
CaloCell_Base_ID::sub_calo
int sub_calo(const Identifier id) const
returns an int taken from SUBCALO enum and describing the subCalo to which the Id belongs.
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CaloCell_Base_ID::TILE
@ TILE
Definition: CaloCell_Base_ID.h:46
PowhegPythia8EvtGen_jetjet.theEnergy
int theEnergy
Definition: PowhegPythia8EvtGen_jetjet.py:12
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
TBXMLWriterToolBase::initialize
virtual StatusCode initialize() override
Definition: TBXMLWriterToolBase.h:35
TBXMLCaloCellWriterTool::m_firstEvent
bool m_firstEvent
Definition: TBXMLCaloCellWriterTool.h:66
CaloCell_Base_ID::is_em_barrel
bool is_em_barrel(const Identifier id) const
test if the id belongs to the EM barrel
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
CaloCell_ID_FCS::TileExt1
@ TileExt1
Definition: FastCaloSim_CaloCell_ID.h:38
IdentifierHash.h
TBXMLCaloCellWriterTool::m_cellContainer
std::string m_cellContainer
Definition: TBXMLCaloCellWriterTool.h:70
PayloadHelpers::dataSize
size_t dataSize(TDA::PayloadIterator start)
Size in bytes of the buffer that is needed to decode next fragment data content.
Definition: TriggerEDMDeserialiserAlg.cxx:188
TBXMLWriter.h
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
TBXMLCaloCellWriterTool::m_caloIndices
std::vector< CaloCell_ID::SUBCALO > m_caloIndices
Definition: TBXMLCaloCellWriterTool.h:68
CaloCell_Base_ID::phi
int phi(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
CaloCellContainer.h
TBXMLCaloCellWriterTool::m_etaMax
double m_etaMax
Definition: TBXMLCaloCellWriterTool.h:64
CaloCellContainer
Container class for CaloCell.
Definition: CaloCellContainer.h:55
TBXMLCaloCellWriterTool::m_runNumbers
std::unordered_set< EventIDBase::number_type > m_runNumbers
Definition: TBXMLCaloCellWriterTool.h:76
CaloCell_Base_ID::cell_id
Identifier cell_id(const int subCalo, const int barec_or_posneg, const int sampling_or_fcalmodule, const int region_or_dummy, const int eta, const int phi) const
Make a cell (== channel) ID from constituting fields and subCalo index; for (Mini)FCAL,...
CaloDetDescrElement::x
float x() const
cell x
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:363
CaloCell_ID_FCS::HEC0
@ HEC0
Definition: FastCaloSim_CaloCell_ID.h:27
eflowRec::phiIndex
unsigned int phiIndex(float phi, float binsize)
calculate phi index for a given phi
Definition: EtaPhiLUT.cxx:23
TBXMLCaloCellWriterTool::m_nCols
static const unsigned int m_nCols
Definition: TBXMLCaloCellWriterTool.h:59
DeMoAtlasDataLoss.runNumber
string runNumber
Definition: DeMoAtlasDataLoss.py:64
TBXMLCaloCellWriterTool::m_includedSamplings
std::vector< std::string > m_includedSamplings
Definition: TBXMLCaloCellWriterTool.h:62
CaloDetDescrManager
This class provides the client interface for accessing the detector description information common to...
Definition: CaloDetDescrManager.h:473
CaloDetDescrElement::dx
float dx() const
cell dx
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:375
CaloDetDescrElement::getSampling
CaloCell_ID::CaloSample getSampling() const
cell sampling
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:395
TBXMLCaloCellWriterTool::m_idHelper
const CaloCell_ID * m_idHelper
Definition: TBXMLCaloCellWriterTool.h:72
CaloCell_ID_FCS::PreSamplerB
@ PreSamplerB
Definition: FastCaloSim_CaloCell_ID.h:19
CaloDetDescrElement::z
float z() const
cell z
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:367
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
makeTRTBarrelCans.dx
tuple dx
Definition: makeTRTBarrelCans.py:20
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
TBXMLCaloCellWriterTool.h
CaloCellContainer::endConstCalo
CaloCellContainer::const_iterator endConstCalo(CaloCell_ID::SUBCALO caloNum) const
Definition: CaloCellContainer.cxx:133
TBXMLWriterToolBase
base class for XML writer tools for 2004 event display
Definition: TBXMLWriterToolBase.h:17
TBXMLCaloCellWriterTool::m_mother
const TBXMLWriter * m_mother
Definition: TBXMLCaloCellWriterTool.h:74
CaloCell_ID_FCS::FCAL2
@ FCAL2
Definition: FastCaloSim_CaloCell_ID.h:42
RPDUtils::nRows
unsigned constexpr int nRows
Definition: RPDUtils.h:24
TBXMLCaloCellWriterTool::m_caloMgrKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Definition: TBXMLCaloCellWriterTool.h:78
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
CaloCell_ID_FCS::HEC3
@ HEC3
Definition: FastCaloSim_CaloCell_ID.h:30
TBXMLCaloCellWriterTool::initialize
virtual StatusCode initialize() override
Definition: TBXMLCaloCellWriterTool.cxx:70
CaloCell_Base_ID::LAREM
@ LAREM
Definition: CaloCell_Base_ID.h:46
CaloCell_ID_FCS::FCAL0
@ FCAL0
Definition: FastCaloSim_CaloCell_ID.h:40
TBXMLCaloCellWriterTool::m_phiMax
double m_phiMax
Definition: TBXMLCaloCellWriterTool.h:64
CaloCell_ID_FCS::EMB3
@ EMB3
Definition: FastCaloSim_CaloCell_ID.h:22
constants.EME2
int EME2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:56
TBXMLWriter::getFileDir
const std::string & getFileDir() const
Definition: TBXMLWriter.h:44
TBXMLWriterToolBase::closeDictionary
virtual void closeDictionary(std::ostream &outStream)
Definition: TBXMLWriterToolBase.cxx:52
Identifier
Definition: IdentifierFieldParser.cxx:14