ATLAS Offline Software
Public Member Functions | List of all members
LArCellContFakeCreator Class Reference

Create a CaloCellContainer with LArCells for POOL I/O tests algs. More...

#include <LArCellContFakeCreator.h>

Collaboration diagram for LArCellContFakeCreator:

Public Member Functions

 LArCellContFakeCreator ()
 Default constructor. More...
 
CaloCellContainercreateCaloCellContainer (const CaloCell_ID *calocellId, const CaloDetDescrManager *caloMgr, MsgStream &log) const
 Create a CaloCellContainer with LAr cells. More...
 

Detailed Description

Create a CaloCellContainer with LArCells for POOL I/O tests algs.

Definition at line 36 of file LArCellContFakeCreator.h.

Constructor & Destructor Documentation

◆ LArCellContFakeCreator()

LArCellContFakeCreator::LArCellContFakeCreator ( )
inline

Default constructor.

Definition at line 55 of file LArCellContFakeCreator.h.

56 {
57 }

Member Function Documentation

◆ createCaloCellContainer()

CaloCellContainer * LArCellContFakeCreator::createCaloCellContainer ( const CaloCell_ID calocellId,
const CaloDetDescrManager caloMgr,
MsgStream &  log 
) const
inline

Create a CaloCellContainer with LAr cells.

Definition at line 61 of file LArCellContFakeCreator.h.

64 {
65 
66 
67  // Create container
68  CaloCellContainer* caloCont = new CaloCellContainer();
69 
70 
71  log << MSG::DEBUG << "Created CaloCellContainer" << endmsg;
72 
73  // add 10 cells to container
74  for (int eta = 1; eta < 5; ++eta) {
75  for (int phi = 3; phi < 5; ++phi) {
76 
77  Identifier id = calocellId->cell_id (0, 1, 1, 0, eta, phi);
78  IdentifierHash idHash = calocellId->calo_cell_hash (id);
79  const CaloDetDescrElement* elem = caloMgr->get_element (idHash);
80 
81  //log << MSG::DEBUG << "Found elem" << elem << endmsg;
82 
83  double energy = 5.0*eta;
84  double time = 0.0;
85  uint16_t quality = 0;
86  uint16_t prov = 0;
87  // time and quality/prov use the same bits - only write one out
88  if (4 == phi) {
89  time = 10.0*phi;
90  quality = 2*eta;
91  prov = 2*phi | 0x2000;
92  }
94 
95  LArCell* cell = new LArCell(elem, energy, time, quality, prov, gain);
96  caloCont->push_back(cell);
97 
98  //log << MSG::DEBUG << "Created CaloCellContainer" << endmsg;
99 
100  }
101  }
102 
103  return (caloCont);
104 }

The documentation for this class was generated from the following file:
CaloCell_Base_ID::calo_cell_hash
IdentifierHash calo_cell_hash(const Identifier cellId) const
create hash id from 'global' cell id
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
CaloDetDescrManager_Base::get_element
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
Definition: CaloDetDescrManager.cxx:159
RunTileCalibRec.CaloCellContainer
CaloCellContainer
Definition: RunTileCalibRec.py:403
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
LArCell
Data object for LAr calorimeter readout cell.
Definition: LArCell.h:53
CaloGain::LARHIGHGAIN
@ LARHIGHGAIN
Definition: CaloGain.h:18
CaloCellContainer
Container class for CaloCell.
Definition: CaloCellContainer.h:55
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,...
CaloGain::CaloGain
CaloGain
Definition: CaloGain.h:11
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
CaloCellContainer::push_back
void push_back(CaloCell *)
reimplementation of const push_back
Definition: CaloCellContainer.cxx:74
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
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
Identifier
Definition: IdentifierFieldParser.cxx:14