49{
50 const EventContext& ctx = Gaudi::Hive::currentContext();
51
53
55
56 log << MSG::INFO <<
" initializing MakeLArCellFromRaw"<<
endmsg ;
57
58 if(pCorr)
log <<MSG::INFO <<
" Number of Corrections "<< pCorr->size()<<
endmsg ;
59
60
61 SmartIF<StoreGateSvc>
detStore{Gaudi::svcLocator( )->service(
"DetectorStore")};
62 if (!detStore)
63 {
64 log << MSG::ERROR <<
"MakeLArCellFromRaw ERROR cannot retrieve DetectorStore " <<
endmsg;
65 return;
66 }
67
68
69
70 if (poolMaxSize!=0) {
71 log << MSG::INFO <<
"MakeLArCellFromRaw Creating DataPool<LArCell> of size " << poolMaxSize <<
endmsg ;
72 }else{
73 log << MSG::INFO <<
"MakeLArCellFromRaw do not use DataPool" <<
endmsg ;
74 }
75
76
81
83 log <<MSG::ERROR <<
"cannot find LArOnlineID in MakeLArCellFromRaw " <<
endmsg;
84 }
85
86
87 int n_em = 0 ;
88 int n_hec = 0 ;
89 int n_fcal = 0 ;
90
91 int n_em_err = 0 ;
92 int n_hec_err = 0 ;
93 int n_fcal_err = 0 ;
94
95
96 const std::vector<Identifier>& emIds = em_id.
channel_ids();
97 const std::vector<Identifier>& hecIds = hec_id.
channel_ids();
98 const std::vector<Identifier>& fcalIds = fcal_id.
channel_ids();
99
102 double qu=0;
103
105 info0.eta=0;
106 info0.phi=0;
110 info0.fcal=false;
111 info0.tt=0;
112 info0.eCorr=1.;
113 info0.elem = nullptr ;
114
115
116 std::vector<Identifier>::const_iterator
it = emIds.begin();
117 std::vector<Identifier>::const_iterator it2 = emIds.end();
119 {
120 const Identifier& chan_id = *
it ;
121
122 try{
123
128 if (cellVec.empty())cellVec.resize(128,info0);
129
131
133
134 const CaloDetDescrElement* caloDDE =man.
get_element( chan_id);
135
141
143
144 ++n_em;
145 if(pCorr) {
146
147 LArCell larCell(caloDDE,en,time,qu,g);
149 }
150 } catch (LArID_Exception& ex){
151 ++n_em_err;
152 }
153 }
154
155
156
157
159 it2 = hecIds.end();
161 {
162 const Identifier& chan_id = *
it ;
163
164 try{
165
167
171 if (cellVec.empty())cellVec.resize(128,info0);
172
174
176
177 const CaloDetDescrElement* caloDDE =man.
get_element( chan_id);
178
185
186 if(pCorr) {
187
188 LArCell larCell(caloDDE,en,time,qu,g);
190 }
191 ++n_hec;
192 } catch (LArID_Exception& ex){
193 ++n_hec_err;
194 }
195 }
196
197
198 it = fcalIds.begin();
199 it2 = fcalIds.end();
201 {
202 const Identifier& chan_id = *
it ;
203
204 try{
205
207
211 if (cellVec.empty())cellVec.resize(128,info0);
212
214
216
217 const CaloDetDescrElement* caloDDE =man.
get_element( chan_id);
218
225
226 if(pCorr) {
227
228 LArCell larCell(caloDDE,en,time,qu,g);
230 }
231 ++n_fcal;
232 } catch (LArID_Exception& ex){
233 ++n_fcal_err;
234 }
235 }
236
237
238 log <<MSG::INFO <<
" number of em, hec, fcal cells="<<n_em<<
" "<<n_hec<<
" "<<n_fcal<<
endmsg;
239 log <<MSG::INFO<<
" number of exceptions for em,hec,fcal="<<n_em_err<<
" "<<n_hec_err<<
" "<<n_fcal_err<<
endmsg;
240 log <<MSG::INFO<<
" done with initializing MakeLArCellFromRaw"<<
endmsg;
241 return;
242}
const LArFCAL_ID * fcal_idHelper() const
access to FCAL idHelper
const LArEM_ID * em_idHelper() const
access to EM idHelper
const LArHEC_ID * hec_idHelper() const
access to HEC idHelper
float eta() const
cell eta
float phi() const
cell phi
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
const CaloCell_ID * getCaloCell_ID() const
get calo cell ID helper
const std::vector< Identifier > & channel_ids() const
provide access to channel id vector, accessed via hash
const std::vector< Identifier > & channel_ids() const
provide acces to channel id vector, accessed via hash
const std::vector< Identifier > & channel_ids() const
provide access to channel id vector, accessed via hash
HWIdentifier createSignalChannelID(const Identifier &id) const
create a HWIdentifier from an Identifier (not inline)
TT_ID trigTowerID(const Identifier &channel_id) const
Translate offline channel identifier to trigger tower ID.
double getCorrection(LArCell *cell, const std::vector< const CaloCellCorrection * > &vCorr, const EventContext &ctx) const
IMessageSvc * getMessageSvc(bool quiet=false)