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

Class which encapsulates the creation of an InDetRawDataCollection. More...

#include <InDetRawDataFakeCreator.h>

Collaboration diagram for InDetRawDataFakeCreator:

Public Member Functions

 InDetRawDataFakeCreator ()
 Default constructor. More...
 
const InDetRawDataCollection< PixelRDORawData > * createPixelRawDataColl (IdentifierHash hashId, const PixelID *pixelId, MsgStream &log)
 Create PixelRawDataCollection. More...
 
const InDetRawDataCollection< SCT_RDORawData > * createSCT_RawDataColl (IdentifierHash hashId, const SCT_ID *sctId, MsgStream &log)
 Create SCT_RawDataCollection. More...
 
const InDetRawDataCollection< TRT_RDORawData > * createTRT_RawDataColl (IdentifierHash hashId, const TRT_ID *trtId, MsgStream &log)
 Create TRT_RawDataCollection. More...
 

Detailed Description

Class which encapsulates the creation of an InDetRawDataCollection.

Definition at line 40 of file InDetRawDataFakeCreator.h.

Constructor & Destructor Documentation

◆ InDetRawDataFakeCreator()

InDetRawDataFakeCreator::InDetRawDataFakeCreator ( )
inline

Default constructor.

Definition at line 70 of file InDetRawDataFakeCreator.h.

71 {
72 }

Member Function Documentation

◆ createPixelRawDataColl()

const InDetRawDataCollection< PixelRDORawData > * InDetRawDataFakeCreator::createPixelRawDataColl ( IdentifierHash  hashId,
const PixelID pixelId,
MsgStream &  log 
)
inline

Create PixelRawDataCollection.

Definition at line 76 of file InDetRawDataFakeCreator.h.

79 {
80 
81  // create a new pixel RDO collection
84 
85  IdContext cntx(pixelId->wafer_context());
86 
87  // need the DE identifier
88  Identifier waferId = pixelId->wafer_id (hashId);
89  rdocoll->setIdentifier(waferId);
90 
91  log << MSG::VERBOSE << "hash, id1, id2: "
92  << MSG::hex << (unsigned int)hashId << MSG::dec << " "
93  << MSG::hex << waferId << MSG::dec << " "
94  << MSG::hex << pixelId->wafer_id(hashId) << MSG::dec << " "
95  << pixelId->show_to_string(waferId) << " "
96  << pixelId->show_to_string(pixelId->wafer_id(hashId)) << " "
97  << endmsg;
98 
99  int deltaPhi = pixelId->phi_index_max(waferId)/6;
100  int deltaEta = pixelId->eta_index_max(waferId)/6;
101  log << MSG::VERBOSE << "phi max, eta max, dphi, deta: "
102  << pixelId->phi_index_max(waferId) << " "
103  << pixelId->eta_index_max(waferId) << " "
104  << deltaPhi << " "
105  << deltaEta << " "
106  << endmsg;
107 
108  int phi = deltaPhi;
109  // loop on 16 digits
110  for (int j = 0; j < 4; ++j, phi += deltaPhi) {
111  int eta = deltaEta;
112  for (int k = 0; k < 4; ++k, eta += deltaEta) {
113 
114  Identifier id_readout = pixelId->pixel_id(waferId, phi, eta);
115  const unsigned int mo = (1 & 0x1F) << 27;
116  const unsigned int fe2 =(1 & 0xF) << 21;
117  const unsigned int row2=(1 & 0xFF) << 13;
118  const unsigned int col2=(1 & 0x1F) << 8;
119  const unsigned int tot =(5 & 0xFF);
120  unsigned int pixelWord = (mo|fe2|row2|col2|tot);
121 
122  Pixel1RawData *rdo= new Pixel1RawData(id_readout, pixelWord);
123  if (rdo) {
124  rdocoll->push_back(rdo);
125 
126  } else {
127  log << MSG::ERROR << "Could not create Pixel1RawData object !"
128  << endmsg;
129  }
130  // Print out contents of RDO
131  log << MSG::VERBOSE << "Created RDO: "
132  << pixelId->show_to_string(rdo->identify()) << " "
133  << MSG::hex << rdo->getWord() << endmsg;
134  }
135  }
136 
137  return (rdocoll);
138 }

◆ createSCT_RawDataColl()

const InDetRawDataCollection< SCT_RDORawData > * InDetRawDataFakeCreator::createSCT_RawDataColl ( IdentifierHash  hashId,
const SCT_ID sctId,
MsgStream &  log 
)
inline

Create SCT_RawDataCollection.

Definition at line 141 of file InDetRawDataFakeCreator.h.

144 {
145  // create a new sct RDO collection
148 
149  IdContext cntx(sctId->wafer_context());
150 
151  // need the DE identifier
152  Identifier waferId = sctId->wafer_id (hashId);
153  rdocoll->setIdentifier(waferId);
154 
155  int deltaStrip = sctId->strip_max(waferId)/6;
156  log << MSG::VERBOSE << "strip max, dstrip: "
157  << sctId->strip_max(waferId) << " "
158  << deltaStrip << " "
159  << endmsg;
160 
161  int strip = deltaStrip;
162  // loop on 4 digits
163  for (int j = 0; j < 4; ++j, strip += deltaStrip) {
164 
165  Identifier id_readout = sctId->strip_id(waferId, strip);
166  const unsigned int str =(strip) << 16;
167  const unsigned int group = 4;
168  unsigned int word= (group|str);
169 
170  SCT1_RawData *rdo= new SCT1_RawData(id_readout, word);
171  if (rdo) {
172  rdocoll->push_back(rdo);
173 
174  } else {
175  log << MSG::ERROR << "Could not create SCT1_RawData object !"
176  << endmsg;
177  }
178  // Print out contents of RDO
179  log << MSG::VERBOSE << "Created RDO: "
180  << sctId->show_to_string(rdo->identify()) << " "
181  << MSG::hex << rdo->getWord() << endmsg;
182  }
183 
184  return (rdocoll);
185 }

◆ createTRT_RawDataColl()

const InDetRawDataCollection< TRT_RDORawData > * InDetRawDataFakeCreator::createTRT_RawDataColl ( IdentifierHash  hashId,
const TRT_ID trtId,
MsgStream &  log 
)
inline

Create TRT_RawDataCollection.

Definition at line 189 of file InDetRawDataFakeCreator.h.

192 {
193  // create a new trt RDO collection
196 
197  IdContext cntx(trtId->straw_layer_context());
198 
199  // need the DE identifier
200  Identifier strLayId = trtId->layer_id (hashId);
201  rdocoll->setIdentifier(strLayId);
202 
203  int deltaStraw = trtId->straw_max(strLayId)/6;
204  log << MSG::VERBOSE << "straw max, dstraw: "
205  << trtId->straw_max(strLayId) << " "
206  << deltaStraw << " "
207  << endmsg;
208 
209  int straw = deltaStraw;
210  // loop on 16 digits
211  for (int j = 0; j < 4; ++j, straw += deltaStraw) {
212 
213  Identifier id_readout = trtId->straw_id(strLayId, straw);
214  unsigned int trtWord= (0xFFFFFFFF);
215 
216  TRT_LoLumRawData *rdo= new TRT_LoLumRawData(id_readout, trtWord);
217  if (rdo) {
218  rdocoll->push_back(rdo);
219 
220  } else {
221  log << MSG::ERROR << "Could not create TRT_LoLumRawData object !"
222  << endmsg;
223  }
224  // Print out contents of RDO
225  log << MSG::VERBOSE << "Created RDO: "
226  << trtId->show_to_string(rdo->identify()) << " "
227  << MSG::hex << rdo->getWord() << endmsg;
228  }
229  return (rdocoll);
230 }

The documentation for this class was generated from the following file:
TRT_ID::layer_id
Identifier layer_id(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer) const
For an individual straw layer.
Definition: TRT_ID.h:500
TRT::Hit::straw
@ straw
Definition: HitInfo.h:82
SiliconTech::strip
@ strip
TRT_ID::straw_max
int straw_max(const Identifier &id) const
Definition: TRT_ID.cxx:996
InDetRawDataCollection::setIdentifier
void setIdentifier(Identifier id)
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
TRT_LoLumRawData
Definition: TRT_LoLumRawData.h:25
xAOD::deltaPhi
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
Definition: L2StandAloneMuon_v1.cxx:160
PixelID::wafer_id
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
Definition: PixelID.h:364
PixelID::phi_index_max
int phi_index_max(const Identifier &id) const
Definition: PixelID.cxx:144
P4Helpers::deltaEta
double deltaEta(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
Definition: P4Helpers.h:66
PixelID::eta_index_max
int eta_index_max(const Identifier &id) const
Definition: PixelID.cxx:163
TRT_ID::straw_layer_context
IdContext straw_layer_context(void) const
straw_layer id
Definition: TRT_ID.h:713
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
InDetRawDataCollection
Definition: InDetRawDataCollection.h:31
Pixel1RawData
Definition: Pixel1RawData.h:23
SCT_ID::wafer_context
IdContext wafer_context(void) const
Definition: SCT_ID.h:705
LB_AnalMapSplitter.tot
tot
Definition: LB_AnalMapSplitter.py:46
DataVector< RawDataT >::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
InDetRawData::getWord
unsigned int getWord() const
Definition: InDetRawData.h:47
CaloLCW_tf.group
group
Definition: CaloLCW_tf.py:28
AtlasDetectorID::show_to_string
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
Definition: AtlasDetectorID.cxx:574
PixelID::wafer_context
IdContext wafer_context(void) const
Definition: PixelID.h:590
python.CaloScaleNoiseConfig.str
str
Definition: CaloScaleNoiseConfig.py:78
PixelID::pixel_id
Identifier pixel_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int phi_index, int eta_index) const
For an individual pixel.
Definition: PixelID.h:432
SCT_ID::strip_max
int strip_max(const Identifier &id) const
Definition: SCT_ID.cxx:187
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
SCT1_RawData
Definition: SCT1_RawData.h:27
str
Definition: BTagTrackIpAccessor.cxx:11
InDetRawData::identify
virtual Identifier identify() const override final
Definition: InDetRawData.h:41
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
SCT_ID::wafer_id
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side) const
For a single side of module.
Definition: SCT_ID.h:464
IdContext
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
Definition: IdContext.h:26
fitman.k
k
Definition: fitman.py:528
TRT_ID::straw_id
Identifier straw_id(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer, int straw) const
Three ways of getting id for a single straw:
Definition: TRT_ID.h:581
SCT_ID::strip_id
Identifier strip_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side, int strip) const
For an individual strip.
Definition: SCT_ID.h:535
Identifier
Definition: IdentifierFieldParser.cxx:14