ATLAS Offline Software
Loading...
Searching...
No Matches
LArHV2Ntuple.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "LArHV2Ntuple.h"
6#include "Gaudi/Property.h"
7#include "GaudiKernel/MsgStream.h"
8#include "GaudiKernel/NTuple.h"
10#include "LArHV/EMBHVManager.h"
11#include "LArHV/EMBHVModule.h"
13#include "LArHV/EMECHVManager.h"
14#include "LArHV/EMECHVModule.h"
16#include "LArHV/HECHVManager.h"
17#include "LArHV/HECHVModule.h"
18#include "LArHV/HECHVSubgap.h"
19#include "LArHV/FCALHVManager.h"
29
30 //Constructor
31 LArHV2Ntuple:: LArHV2Ntuple(const std::string& name, ISvcLocator* pSvcLocator):
32 AthAlgorithm(name,pSvcLocator),
33 m_tree(nullptr),
34 m_addcells(false),
35 m_bec(0),
37 m_eta(0),
38 m_phi(0),
39 m_electrode(0),
40 m_gap(0),
41 m_hvline(0),
42 m_hv(0),
43 m_current(0),
44 m_barrelec(0), m_posneg(0), m_FT(0),m_slot(0),m_channel(0),
45 m_caloId(nullptr), m_onlId(nullptr)
46 {
47 declareProperty("AddCellID",m_addcells);
48 }
49
50 //__________________________________________________________________________
51 //Destructor
53 {
54 ATH_MSG_DEBUG ( "LArHV2Ntuple destructor called" );
55 }
56 //__________________________________________________________________________
58 {
59 ATH_CHECK( m_thistSvc.retrieve() );
60
61 ATH_CHECK( m_cablingKey.initialize() );
62 ATH_CHECK( m_caloMgrKey.initialize() );
63 ATH_CHECK( detStore()->retrieve(m_caloId, "CaloCell_ID") );
64
65 m_tree = new TTree("mytree","Calo Noise ntuple");
66 m_tree->Branch("bec",&m_bec,"bec/I");
67 m_tree->Branch("isPresampler",&m_isPresampler,"isPresampler/I");
68 m_tree->Branch("eta",&m_eta,"eta/F");
69 m_tree->Branch("phi",&m_phi,"phi/F");
70 m_tree->Branch("HVline",&m_hvline,"HVline/I");
71 m_tree->Branch("electrode",&m_electrode,"electrode/I");
72 m_tree->Branch("gap",&m_gap,"gap/I");
73 m_tree->Branch("hv",&m_hv,"hv/F");
74 m_tree->Branch("current",&m_current,"current/F");
75 if(m_addcells) {
76 m_tree->Branch("barrel_ec",&m_barrelec,"barrel_ec/I");
77 m_tree->Branch("side",&m_posneg,"side/I");
78 m_tree->Branch("FT",&m_FT,"FT/I");
79 m_tree->Branch("slot",&m_slot,"slot/I");
80 m_tree->Branch("channel",&m_channel,"channel/I");
81 ATH_CHECK( detStore()->retrieve(m_onlId, "LArOnlineID") );
82 }
83
84 ATH_CHECK( m_hvCablingKey.initialize() );
85 ATH_CHECK( m_DCSFolderKeys.initialize() );
86
87 ATH_CHECK( m_thistSvc->regTree("/file1/hv/mytree",m_tree) );
88 return StatusCode::SUCCESS;
89
90 }
91 //__________________________________________________________________________
92 StatusCode LArHV2Ntuple::execute(const EventContext& ctx)
93 {
94
95 //.............................................
96
97 // FIXME: Use LArHVData instead?
99 std::vector<const CondAttrListCollection*> attrLists;
101 {
103 attrLists.push_back (*attrList);
104 }
105 const LArHVManager *manager = nullptr;
106 ATH_CHECK( detStore()->retrieve(manager) );
107
108 const EMBHVManager& hvManager_EMB=manager->getEMBHVManager();
109 const EMBHVManager::EMBHVData hvdata_EMB = hvManager_EMB.getData (**hvCabling, attrLists);
110
111 const EMBPresamplerHVManager& hvManager_EMBPS=manager->getEMBPresamplerHVManager();
112 const EMBPresamplerHVManager::EMBPresamplerHVData hvdata_EMBPS = hvManager_EMBPS.getData (**hvCabling, attrLists);
113
114 const EMECPresamplerHVManager& hvManager_EMECPS=manager->getEMECPresamplerHVManager();
115 const EMECPresamplerHVManager::EMECPresamplerHVData hvdata_EMECPS = hvManager_EMECPS.getData (**hvCabling, attrLists);
116
117 const EMECHVManager& hvManager_EMEC_OUT=manager->getEMECHVManager(EMECHVModule::OUTER);
118 const EMECHVManager::EMECHVData hvdata_EMEC_OUT = hvManager_EMEC_OUT.getData (**hvCabling, attrLists);
119
120 const EMECHVManager& hvManager_EMEC_IN=manager->getEMECHVManager(EMECHVModule::INNER);
121 const EMECHVManager::EMECHVData hvdata_EMEC_IN = hvManager_EMEC_IN.getData (**hvCabling, attrLists);
122
123 const HECHVManager& hvManager_HEC=manager->getHECHVManager();
124 const HECHVManager::HECHVData hvdata_HEC = hvManager_HEC.getData (**hvCabling, attrLists);
125
126 const FCALHVManager& hvManager_FCAL=manager->getFCALHVManager();
127 const FCALHVManager::FCALHVData hvdata_FCAL = hvManager_FCAL.getData (**hvCabling, attrLists);
128
129 if(m_hvonlId_map.empty()) {
131 const LArOnOffIdMapping* cabling{*cablingHdl};
132 if(!cabling) {
133 ATH_MSG_ERROR("Do not have mapping object " << m_cablingKey.key());
134 return StatusCode::FAILURE;
135 }
136
138 ATH_CHECK(caloMgrHandle.isValid());
139 const CaloDetDescrManager* calodetdescrmgr=*caloMgrHandle;
140 std::vector<Identifier>::const_iterator cell_b=m_caloId->cell_begin();
141 std::vector<Identifier>::const_iterator cell_e=m_caloId->cell_end();
142 for(;cell_b!=cell_e; ++cell_b) {
143 if(m_caloId->is_tile(*cell_b)) continue;
144 HWIdentifier onlid = cabling->createSignalChannelID(*cell_b);
145 std::vector<int> hvlines = GetHVLines (hvdata_EMB,
146 hvdata_EMBPS,
147 hvdata_EMEC_OUT,
148 hvdata_EMEC_IN,
149 hvdata_EMECPS,
150 hvdata_HEC,
151 hvdata_FCAL,
152 *cell_b,
153 calodetdescrmgr);
154 for(unsigned i=0; i<hvlines.size(); ++i ) {
155 if(m_hvonlId_map.find(hvlines[i]) == m_hvonlId_map.end()) { // new key
156 std::vector<HWIdentifier> vec;
157 vec.push_back(onlid);
158 m_hvonlId_map[hvlines[i]] = vec;
159 } else { // existing key
160 m_hvonlId_map[hvlines[i]].push_back(onlid);
161 }
162 }
163 }// end map filling
164 }
165
166 for (unsigned int iSide=EMBHVManager::beginSideIndex();iSide<EMBHVManager::endSideIndex();iSide++) { // loop over HV modules
167 for (unsigned int iPhi=hvManager_EMB.beginPhiIndex();iPhi<hvManager_EMB.endPhiIndex();iPhi++) {
168 for (unsigned int iSector=EMBHVManager::beginSectorIndex();iSector<EMBHVManager::endSectorIndex();iSector++) {
169 for (unsigned int iEta=hvManager_EMB.beginEtaIndex();iEta<hvManager_EMB.endEtaIndex();iEta++) { //0 to 7
170 const EMBHVModule& hvMod = hvManager_EMB.getHVModule(iSide,iEta,iPhi,iSector);
171 float eta=0.5*(hvMod.getEtaMin()+hvMod.getEtaMax());
172 for (unsigned int ielec=0;ielec<32;ielec++) { //use hvMod->getNumElectrodes when bug is corrected
173 const EMBHVElectrode& electrode = hvMod.getElectrode(ielec);
174 for (unsigned int iGap=0;iGap<2;iGap++) { // EMB : 2, TRY TO FIND AUTOMATICALLY NB OF GAPS
175 float hv = hvdata_EMB.voltage (electrode, iGap);
176 float current = hvdata_EMB.current (electrode, iGap);
177 float phi = electrode.getPhi();
178
179 m_bec=0;
181 m_eta=eta;
182 m_phi=phi;
183 m_electrode = ielec;
184 m_gap = iGap;
185 m_hv = hv;
186 m_current= current;
187 m_hvline = hvdata_EMB.hvLineNo (electrode, iGap);
188
189 if(m_addcells) {
190 for(unsigned i=0; i<m_hvonlId_map[m_hvline].size(); ++i) {
193 m_FT=m_onlId->feedthrough(m_hvonlId_map[m_hvline][i]);
196 m_tree->Fill();
197 }
198 } else m_tree->Fill();
199
200 } //end for iGap
201 }
202 }
203 }
204 }
205 } //EMBHVManager
206
207 for (unsigned int iSide=EMBPresamplerHVManager::beginSideIndex();iSide<EMBPresamplerHVManager::endSideIndex();iSide++) { // loop over HV modules
208 for (unsigned int iPhi=hvManager_EMBPS.beginPhiIndex();iPhi<hvManager_EMBPS.endPhiIndex();iPhi++) {
209 for (unsigned int iEta=hvManager_EMBPS.beginEtaIndex();iEta<hvManager_EMBPS.endEtaIndex();iEta++) { //0 to 7
210 const EMBPresamplerHVModule& hvMod = hvManager_EMBPS.getHVModule(iSide,iEta,iPhi);
211 for (int iGap=0;iGap<2;iGap++) {
212 float hv = hvdata_EMBPS.voltage (hvMod, iGap);
213 float current = hvdata_EMBPS.current (hvMod, iGap);
214 float eta = 0.5*(hvMod.getEtaMin()+hvMod.getEtaMax());
215 float phi= 0.5*(hvMod.getPhiMin()+hvMod.getPhiMax());
216
217 m_bec=0;
219 m_eta=eta;
220 m_phi=phi;
221 m_electrode = 0;
222 m_gap = iGap;
223 m_hv = hv;
224 m_current= current;
225 m_hvline = hvdata_EMBPS.hvLineNo (hvMod, iGap);
226
227 if(m_addcells) {
228 for(unsigned i=0; i<m_hvonlId_map[m_hvline].size(); ++i) {
231 m_FT=m_onlId->feedthrough(m_hvonlId_map[m_hvline][i]);
234 m_tree->Fill();
235 }
236 } else m_tree->Fill();
237
238 } //end for iGap
239 }
240 }
241 } //EMBPresampler
242
243 for (unsigned int iSide=EMECPresamplerHVManager::beginSideIndex();iSide<EMECPresamplerHVManager::endSideIndex();iSide++) { // loop over HV modules
244 for (unsigned int iPhi=hvManager_EMECPS.beginPhiIndex();iPhi<hvManager_EMECPS.endPhiIndex();iPhi++) {
245 const EMECPresamplerHVModule& hvMod = hvManager_EMECPS.getHVModule(iSide,iPhi);
246 for (int iGap=0;iGap<2;iGap++) {
247 float hv = hvdata_EMECPS.voltage (hvMod, iGap);
248 float current = hvdata_EMECPS.current (hvMod, iGap);
249 float eta = 0.5*(hvMod.getEtaMin()+hvMod.getEtaMax());
250 float phi=0.5*(hvMod.getPhiMin()+hvMod.getPhiMax());
251
252 m_bec=1;
254 m_eta=eta;
255 m_phi=phi;
256 m_electrode = 0;
257 m_gap = iGap;
258 m_hv = hv;
259 m_current= current;
260 m_hvline = hvdata_EMECPS.hvLineNo (hvMod, iGap);
261
262 if(m_addcells) {
263 for(unsigned i=0; i<m_hvonlId_map[m_hvline].size(); ++i) {
266 m_FT=m_onlId->feedthrough(m_hvonlId_map[m_hvline][i]);
269 m_tree->Fill();
270 }
271 } else m_tree->Fill();
272
273 } //end for iGap
274 }
275 }//EMECPresampler
276
277
278
279 for (unsigned int iSide=EMECHVManager::beginSideIndex();iSide<EMECHVManager::endSideIndex();iSide++) { // loop over HV modules
280 for (unsigned int iPhi=hvManager_EMEC_OUT.beginPhiIndex();iPhi<hvManager_EMEC_OUT.endPhiIndex();iPhi++) {
281 for (unsigned int iSector=hvManager_EMEC_OUT.beginSectorIndex();iSector<hvManager_EMEC_OUT.endSectorIndex();iSector++) {
282 for (unsigned int iEta=hvManager_EMEC_OUT.beginEtaIndex();iEta<hvManager_EMEC_OUT.endEtaIndex();iEta++) {
283 const EMECHVModule& hvMod=hvManager_EMEC_OUT.getHVModule(iSide,iEta,iPhi,iSector);
284 float eta=0.5*(hvMod.getEtaMin()+hvMod.getEtaMax());
285 for (unsigned int ielec=0;ielec<hvMod.getNumElectrodes();ielec++) { //use hvMod.getNumElectrodes when bug is corrected
286 const EMECHVElectrode& electrode = hvMod.getElectrode(ielec);
287 for (unsigned int iGap=0;iGap<2;iGap++) { //EMEC : 2 gaps, TRY TO FIND AUTOMATICALLY NB OF GAPS
288 float hv = hvdata_EMEC_OUT.voltage (electrode, iGap);
289 float current = hvdata_EMEC_OUT.current (electrode, iGap);
290 float phi = electrode.getPhi();
291
292 m_bec=1;
294 m_eta=eta;
295 m_phi=phi;
296 m_electrode = ielec;
297 m_gap = iGap;
298 m_hv = hv;
299 m_current= current;
300 m_hvline = hvdata_EMEC_OUT.hvLineNo (electrode, iGap);
301
302 if(m_addcells) {
303 for(unsigned i=0; i<m_hvonlId_map[m_hvline].size(); ++i) {
306 m_FT=m_onlId->feedthrough(m_hvonlId_map[m_hvline][i]);
309 m_tree->Fill();
310 }
311 } else m_tree->Fill();
312
313 } //end for iGap
314 }
315 }
316 }
317 }
318 }//EMEC Outer
319
320 for (unsigned int iSide=EMECHVManager::beginSideIndex();iSide<EMECHVManager::endSideIndex();iSide++) { // loop over HV modules
321 for (unsigned int iPhi=hvManager_EMEC_IN.beginPhiIndex();iPhi<hvManager_EMEC_IN.endPhiIndex();iPhi++) {
322 for (unsigned int iSector=hvManager_EMEC_IN.beginSectorIndex();iSector<hvManager_EMEC_IN.endSectorIndex();iSector++) {
323 for (unsigned int iEta=hvManager_EMEC_IN.beginEtaIndex();iEta<hvManager_EMEC_IN.endEtaIndex();iEta++) {
324 const EMECHVModule& hvMod=hvManager_EMEC_IN.getHVModule(iSide,iEta,iPhi,iSector);
325 float eta=0.5*(hvMod.getEtaMin()+hvMod.getEtaMax());
326 for (unsigned int ielec=0;ielec<hvMod.getNumElectrodes();ielec++) { //use hvMod.getNumElectrodes when bug is corrected
327 const EMECHVElectrode& electrode = hvMod.getElectrode(ielec);
328 for (unsigned int iGap=0;iGap<2;iGap++) { //EMEC : 2 gaps, TRY TO FIND AUTOMATICALLY NB OF GAPS
329 float hv = hvdata_EMEC_IN.voltage (electrode, iGap);
330 float current = hvdata_EMEC_IN.current (electrode, iGap);
331 float phi = electrode.getPhi();
332
333 m_bec=2;
335 m_eta=eta;
336 m_phi=phi;
337 m_electrode = ielec;
338 m_gap = iGap;
339 m_hv = hv;
340 m_current= current;
341 m_hvline = hvdata_EMEC_IN.hvLineNo (electrode, iGap);
342
343 if(m_addcells) {
344 for(unsigned i=0; i<m_hvonlId_map[m_hvline].size(); ++i) {
347 m_FT=m_onlId->feedthrough(m_hvonlId_map[m_hvline][i]);
350 m_tree->Fill();
351 }
352 } else m_tree->Fill();
353
354 } //end for iGap
355 }
356 }
357 }
358 }
359 }// EMEC Inner
360
361 float etamax_layer[4]={3.3,3.1,3.1,3.3};
362 float etamin_layer[4]={1.5,1.5,1.6,1.7};
363
364
365 for (unsigned int iSide=HECHVManager::beginSideIndex();iSide<HECHVManager::endSideIndex();iSide++) { // loop over HV modules
366 for (unsigned int iPhi=HECHVManager::beginPhiIndex();iPhi<HECHVManager::endPhiIndex();iPhi++) {
367 for (unsigned int iSampling=HECHVManager::beginSamplingIndex();iSampling<HECHVManager::endSamplingIndex();iSampling++) {
368 float eta_min,eta_max;
369 if (iSide==1) {
370 eta_min = etamin_layer[iSampling];
371 eta_max = etamax_layer[iSampling];
372 } else {
373 eta_min = -1.*etamax_layer[iSampling];
374 eta_max = -1.*etamin_layer[iSampling];
375 }
376 float eta = 0.5*(eta_min+eta_max);
377 const HECHVModule& hvMod = hvManager_HEC.getHVModule(iSide,iPhi,iSampling);
378 float phi = 0.5*(hvMod.getPhiMin()+hvMod.getPhiMax());
379
380 for (unsigned int iGap=0;iGap<HECHVModule::getNumSubgaps();iGap++) {//HEC : 4 gaps, TRY TO FIND AUTOMATICALLY NB OF GAPS
381 const HECHVSubgap& subgap=hvMod.getSubgap(iGap);
382 float hv = hvdata_HEC.voltage (subgap);
383 float current = hvdata_HEC.current (subgap);
384 m_bec = 10+iSampling;
386 m_eta=eta;
387 m_phi=phi;
388 m_electrode = 0;
389 m_gap = iGap;
390 m_hv=hv;
391 m_current=current;
392 m_hvline = hvdata_HEC.hvLineNo (subgap);
393 if(m_addcells) {
394 for(unsigned i=0; i<m_hvonlId_map[m_hvline].size(); ++i) {
397 m_FT=m_onlId->feedthrough(m_hvonlId_map[m_hvline][i]);
400 m_tree->Fill();
401 }
402 } else m_tree->Fill();
403 }// end for iGap
404 }
405 }
406 }//HECHVManager
407
408 for (unsigned int iSide=FCALHVManager::beginSideIndex();iSide<FCALHVManager::endSideIndex();iSide++) { // loop over HV modules
409 float eta_min=3.1,eta_max=4.9;
410 if (iSide==0) { eta_min=-4.9; eta_max=-3.1; }
411
412 float eta = 0.5*(eta_min+eta_max);
413 for (unsigned int iSampling=FCALHVManager::beginSamplingIndex();iSampling<FCALHVManager::endSamplingIndex();iSampling++) {
414 for (unsigned int iSector=FCALHVManager::beginSectorIndex(iSampling);iSector<FCALHVManager::endSectorIndex(iSampling);iSector++) {
415
416 const FCALHVModule& hvMod = hvManager_FCAL.getHVModule(iSide,iSector,iSampling);
417
418 float dphi=CaloPhiRange::twopi()/16;
419 if (iSampling==1) dphi=CaloPhiRange::twopi()/8.;
420 if (iSampling==2) dphi=CaloPhiRange::twopi()/4.;
421 float phi_min = ((float)(iSector))*dphi;
422 phi_min = CaloPhiRange::fix(phi_min);
423 float phi_max = CaloPhiRange::fix(dphi+phi_min);
424 float phi = 0.5*(phi_min+phi_max);
425
426 for (unsigned int iLine=0;iLine<FCALHVModule::getNumHVLines();iLine++) {
427 const FCALHVLine& hvline = hvMod.getHVLine(iLine);
428 float hv = hvdata_FCAL.voltage (hvline);
429 float current = hvdata_FCAL.current (hvline);
430 m_bec = 14+iSampling;
432 m_eta=eta;
433 m_phi=phi;
434 m_electrode = iSector;
435 m_gap = iLine;
436 m_hv=hv;
437 m_current=current;
438 m_hvline = hvdata_FCAL.hvLineNo (hvline);
439 if(m_addcells) {
440 for(unsigned i=0; i<m_hvonlId_map[m_hvline].size(); ++i) {
443 m_FT=m_onlId->feedthrough(m_hvonlId_map[m_hvline][i]);
446 m_tree->Fill();
447 }
448 } else m_tree->Fill();
449 }
450 } //iSector
451 }//iSampling
452 }//iSide
453
454 return StatusCode::SUCCESS;
455 }
456
457std::vector<int> LArHV2Ntuple::GetHVLines (const EMBHVManager::EMBHVData& hvdata_EMB,
459 const EMECHVManager::EMECHVData& hvdata_EMEC_OUT,
460 const EMECHVManager::EMECHVData& hvdata_EMEC_IN,
462 const HECHVManager::HECHVData& hvdata_HEC,
463 const FCALHVManager::FCALHVData& hvdata_FCAL,
464 const Identifier& id,
465 const CaloDetDescrManager* calodetdescrmgr) {
466
467 std::set<int> hv;
468
469 // LAr EMB
470 if (m_caloId->is_em(id) && m_caloId->sampling(id)>0) {
471 if (abs(m_caloId->em_idHelper()->barrel_ec(id))==1) {
472 const EMBDetectorElement* embElement = dynamic_cast<const EMBDetectorElement*>(calodetdescrmgr->get_element(id));
473 if (!embElement) std::abort();
474 const EMBCellConstLink cell = embElement->getEMBCell();
475 unsigned int nelec = cell->getNumElectrodes();
476 for (unsigned int i=0;i<nelec;i++) {
477 const EMBHVElectrode& electrode = cell->getElectrode(i);
478 for (unsigned int igap=0;igap<2;igap++) hv.insert(hvdata_EMB.hvLineNo(electrode, igap));
479 }
480 } else { // LAr EMEC
481 const EMECDetectorElement* emecElement = dynamic_cast<const EMECDetectorElement*>(calodetdescrmgr->get_element(id));
482 if (!emecElement) std::abort();
483 const EMECCellConstLink cell = emecElement->getEMECCell();
484 unsigned int nelec = cell->getNumElectrodes();
485 for (unsigned int i=0;i<nelec;i++) {
486 const EMECHVElectrode& electrode = cell->getElectrode(i);
487 const EMECHVModule& module = electrode.getModule();
488 const EMECHVManager::EMECHVData& hvdata =
489 module.getWheelIndex() == EMECHVModule::INNER ?
490 hvdata_EMEC_IN :
491 hvdata_EMEC_OUT;
492 for (unsigned int igap=0;igap<2;igap++) hv.insert(hvdata.hvLineNo (electrode, igap));
493 }
494 }
495 } else if (m_caloId->is_hec(id)) { // LAr HEC
496 const HECDetectorElement* hecElement = dynamic_cast<const HECDetectorElement*>(calodetdescrmgr->get_element(id));
497 if (!hecElement) std::abort();
498 const HECCellConstLink cell = hecElement->getHECCell();
499 unsigned int nsubgaps = cell->getNumSubgaps();
500 for (unsigned int igap=0;igap<nsubgaps;igap++) {
501 const HECHVSubgap& subgap = cell->getSubgap(igap);
502 hv.insert(hvdata_HEC.hvLineNo (subgap));
503 }
504 } else if (m_caloId->is_fcal(id)) { // LAr FCAL
505 const FCALDetectorElement* fcalElement = dynamic_cast<const FCALDetectorElement*>(calodetdescrmgr->get_element(id));
506 if (!fcalElement) std::abort();
507 const FCALTile* tile = fcalElement->getFCALTile();
508 unsigned int nlines = FCALTile::getNumHVLines();
509 for (unsigned int i=0;i<nlines;i++) {
510 const FCALHVLine* line = tile->getHVLine(i);
511 if (line) hv.insert(hvdata_FCAL.hvLineNo (*line));
512 }
513 } else if (m_caloId->is_em(id) && m_caloId->sampling(id)==0) { // Presamplers
514 if (abs(m_caloId->em_idHelper()->barrel_ec(id))==1) {
515 const EMBDetectorElement* embElement = dynamic_cast<const EMBDetectorElement*>(calodetdescrmgr->get_element(id));
516 if (!embElement) std::abort();
517 const EMBCellConstLink cell = embElement->getEMBCell();
518 const EMBPresamplerHVModule& hvmodule = cell->getPresamplerHVModule();
519 for (unsigned int igap=0;igap<2;igap++) hv.insert(hvdata_EMBPS.hvLineNo (hvmodule, igap));
520 } else {
521 const EMECDetectorElement* emecElement = dynamic_cast<const EMECDetectorElement*>(calodetdescrmgr->get_element(id));
522 if (!emecElement) std::abort();
523 const EMECCellConstLink cell = emecElement->getEMECCell();
524 const EMECPresamplerHVModule& hvmodule = cell->getPresamplerHVModule ();
525 for (unsigned int igap=0;igap<2;igap++) hv.insert(hvdata_EMECPS.hvLineNo (hvmodule, igap));
526 }
527 }
528
529 std::vector<int> hvlines;
530 for (std::set<int>::iterator i=hv.begin();i!=hv.end();++i) hvlines.push_back(*i);
531 return hvlines;
532 }
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_DEBUG(x)
Calo Subsystem specific Detector Elements + Dummy element for testing.
CaloPhiRange class declaration.
std::vector< size_t > vec
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const ServiceHandle< StoreGateSvc > & detStore() const
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
This class provides the client interface for accessing the detector description information common to...
static double twopi()
static double fix(double phi)
LAr EMB Detector Element.
EMBCellConstLink getEMBCell() const
EMB Cell description from LArReadoutGeometry.
double getPhi() const
int hvLineNo(const EMBHVElectrode &electrode, const int &iGap) const
double voltage(const EMBHVElectrode &electrode, const int &iGap) const
double current(const EMBHVElectrode &electrode, const int &iGap) const
This class provides direct access to information on the HV electrodes within the barrels.
unsigned int beginPhiIndex() const
unsigned int endEtaIndex() const
static unsigned int endSectorIndex()
unsigned int beginEtaIndex() const
static unsigned int beginSectorIndex()
const EMBHVModule & getHVModule(unsigned int iSide, unsigned int iEta, unsigned int iPhi, unsigned int iSector) const
EMBHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
unsigned int endPhiIndex() const
static unsigned int beginSideIndex()
static unsigned int endSideIndex()
Describes one HV Module within the EMB.
Definition EMBHVModule.h:22
const EMBHVElectrode & getElectrode(unsigned int iElectrode) const
double getEtaMin() const
double getEtaMax() const
double voltage(const EMBPresamplerHVModule &module, const int &iGap) const
double current(const EMBPresamplerHVModule &module, const int &iGap) const
int hvLineNo(const EMBPresamplerHVModule &module, const int &iGap) const
This class provides direct access to information on the HV electrodes within the barrels.
const EMBPresamplerHVModule & getHVModule(unsigned int iSide, unsigned int iEta, unsigned int iPhi) const
EMBPresamplerHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
static unsigned int beginSideIndex()
unsigned int beginPhiIndex() const
static unsigned int endSideIndex()
unsigned int beginEtaIndex() const
Describes one HV Module within the EMB Presampler.
LAr EMEC Detector Element.
EMECCellConstLink getEMECCell() const
EMEC Cell description from LArReadoutGeometry.
double getPhi() const
const EMECHVModule & getModule() const
double current(const EMECHVElectrode &electrode, const int &iGap) const
double voltage(const EMECHVElectrode &electrode, const int &iGap) const
int hvLineNo(const EMECHVElectrode &electrode, const int &iGap) const
This class provides direct access to information on the HV electrodes within the EMEC.
unsigned int beginEtaIndex() const
const EMECHVModule & getHVModule(unsigned int iSide, unsigned int iEta, unsigned int iPhi, unsigned int iSector) const
unsigned int beginSectorIndex() const
unsigned int endPhiIndex() const
static unsigned int beginSideIndex()
static unsigned int endSideIndex()
unsigned int endEtaIndex() const
unsigned int endSectorIndex() const
unsigned int beginPhiIndex() const
EMECHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
double getEtaMax() const
const EMECHVElectrode & getElectrode(unsigned int iElectrode) const
unsigned int getNumElectrodes() const
double getEtaMin() const
double voltage(const EMECPresamplerHVModule &module, const int &iGap) const
double current(const EMECPresamplerHVModule &module, const int &iGap) const
int hvLineNo(const EMECPresamplerHVModule &module, const int &iGap) const
This class provides direct access to information on the HV electrodes within the EMEC.
EMECPresamplerHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
const EMECPresamplerHVModule & getHVModule(unsigned int iSide, unsigned int iPhi) const
static unsigned int beginSideIndex()
Describes one HV Module within the EMEc Presampler.
LAr FCAL Detector Element.
const FCALTile * getFCALTile() const
FCAL Tile description from LArReadoutGeometry.
double current(const FCALHVLine &line) const
double voltage(const FCALHVLine &line) const
int hvLineNo(const FCALHVLine &line) const
This class provides direct access to information on the HV electrodes within the barrels.
static unsigned int beginSideIndex()
static unsigned int endSamplingIndex()
static unsigned int endSideIndex()
static unsigned int beginSectorIndex(unsigned int iSampling)
static unsigned int beginSamplingIndex()
const FCALHVModule & getHVModule(unsigned int iSide, unsigned int iSector, unsigned int iSampling) const
static unsigned int endSectorIndex(unsigned int iSampling)
FCALHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
Describes one HV Module within the FCAL.
const FCALHVLine & getHVLine(unsigned int iLine) const
static unsigned int getNumHVLines()
A tile of the forward calorimeter readout geometry.
Definition FCALTile.h:27
static unsigned int getNumHVLines()
Get num hvlines.
Definition FCALTile.cxx:81
LAr HEC Detector Element.
HECCellConstLink getHECCell() const
HEC Cell description from LArReadoutGeometry.
double current(const HECHVSubgap &subgap) const
int hvLineNo(const HECHVSubgap &subgap) const
double voltage(const HECHVSubgap &subgap) const
This class provides direct access to information on the HV electrodes within the barrels.
static unsigned int beginPhiIndex()
static unsigned int endSamplingIndex()
const HECHVModule & getHVModule(unsigned int iSide, unsigned int iPhi, unsigned int iSampling) const
static unsigned int endSideIndex()
HECHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
static unsigned int beginSideIndex()
static unsigned int beginSamplingIndex()
static unsigned int endPhiIndex()
Describes one HV Module within the HEC.
Definition HECHVModule.h:23
const HECHVSubgap & getSubgap(unsigned int iElectrode) const
double getPhiMin() const
static unsigned int getNumSubgaps()
double getPhiMax() const
std::vector< int > GetHVLines(const EMBHVManager::EMBHVData &hvdata_EMB, const EMBPresamplerHVManager::EMBPresamplerHVData &hvdata_EMBPS, const EMECHVManager::EMECHVData &hvdata_EMEC_OUT, const EMECHVManager::EMECHVData &hvdata_EMEC_IN, const EMECPresamplerHVManager::EMECPresamplerHVData &hvdata_EMECPS, const HECHVManager::HECHVData &hvdata_HEC, const FCALHVManager::FCALHVData &hvdata_FCAL, const Identifier &id, const CaloDetDescrManager *calodetdescrmgr)
ServiceHandle< ITHistSvc > m_thistSvc
TTree * m_tree
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
virtual ~LArHV2Ntuple()
Default Destructor.
std::map< int, std::vector< HWIdentifier > > m_hvonlId_map
virtual StatusCode initialize() override
standard Athena-Algorithm method
SG::ReadCondHandleKeyArray< CondAttrListCollection > m_DCSFolderKeys
virtual StatusCode execute(const EventContext &ctx) override
standard Athena-Algorithm method
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
const CaloCell_ID * m_caloId
const LArOnlineID * m_onlId
SG::ReadCondHandleKey< LArHVIdMapping > m_hvCablingKey
This class provides access to the High Voltage throughout the LAr.