ATLAS Offline Software
Loading...
Searching...
No Matches
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.
CaloCellContainercreateCaloCellContainer (const CaloCell_ID *calocellId, const CaloDetDescrManager *caloMgr, MsgStream &log) const
 Create a CaloCellContainer with LAr cells.

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}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define endmsg
void push_back(CaloCell *)
reimplementation of const push_back
IdentifierHash calo_cell_hash(const Identifier cellId) const
create hash id from 'global' 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,...
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
@ LARHIGHGAIN
Definition CaloGain.h:18
time(flags, cells_name, *args, **kw)
setWord1 uint16_t

The documentation for this class was generated from the following file: