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#include "GaudiKernel/ThreadLocalContext.h"
30
31 //Constructor
32 LArHV2Ntuple:: LArHV2Ntuple(const std::string& name, ISvcLocator* pSvcLocator):
33 AthAlgorithm(name,pSvcLocator),
34 m_tree(nullptr),
35 m_addcells(false),
36 m_bec(0),
38 m_eta(0),
39 m_phi(0),
40 m_electrode(0),
41 m_gap(0),
42 m_hvline(0),
43 m_hv(0),
44 m_current(0),
45 m_barrelec(0), m_posneg(0), m_FT(0),m_slot(0),m_channel(0),
46 m_caloId(nullptr), m_onlId(nullptr)
47 {
48 declareProperty("AddCellID",m_addcells);
49 }
50
51 //__________________________________________________________________________
52 //Destructor
54 {
55 ATH_MSG_DEBUG ( "LArHV2Ntuple destructor called" );
56 }
57 //__________________________________________________________________________
59 {
60 ATH_CHECK( m_thistSvc.retrieve() );
61
62 ATH_CHECK( m_cablingKey.initialize() );
63 ATH_CHECK( m_caloMgrKey.initialize() );
64 ATH_CHECK( detStore()->retrieve(m_caloId, "CaloCell_ID") );
65
66 m_tree = new TTree("mytree","Calo Noise ntuple");
67 m_tree->Branch("bec",&m_bec,"bec/I");
68 m_tree->Branch("isPresampler",&m_isPresampler,"isPresampler/I");
69 m_tree->Branch("eta",&m_eta,"eta/F");
70 m_tree->Branch("phi",&m_phi,"phi/F");
71 m_tree->Branch("HVline",&m_hvline,"HVline/I");
72 m_tree->Branch("electrode",&m_electrode,"electrode/I");
73 m_tree->Branch("gap",&m_gap,"gap/I");
74 m_tree->Branch("hv",&m_hv,"hv/F");
75 m_tree->Branch("current",&m_current,"current/F");
76 if(m_addcells) {
77 m_tree->Branch("barrel_ec",&m_barrelec,"barrel_ec/I");
78 m_tree->Branch("side",&m_posneg,"side/I");
79 m_tree->Branch("FT",&m_FT,"FT/I");
80 m_tree->Branch("slot",&m_slot,"slot/I");
81 m_tree->Branch("channel",&m_channel,"channel/I");
82 ATH_CHECK( detStore()->retrieve(m_onlId, "LArOnlineID") );
83 }
84
85 ATH_CHECK( m_hvCablingKey.initialize() );
86 ATH_CHECK( m_DCSFolderKeys.initialize() );
87
88 ATH_CHECK( m_thistSvc->regTree("/file1/hv/mytree",m_tree) );
89 return StatusCode::SUCCESS;
90
91 }
92 //__________________________________________________________________________
94 {
95 const EventContext& ctx = Gaudi::Hive::currentContext();
96
97 //.............................................
98
99 // FIXME: Use LArHVData instead?
101 std::vector<const CondAttrListCollection*> attrLists;
103 {
105 attrLists.push_back (*attrList);
106 }
107 const LArHVManager *manager = nullptr;
108 ATH_CHECK( detStore()->retrieve(manager) );
109
110 const EMBHVManager& hvManager_EMB=manager->getEMBHVManager();
111 const EMBHVManager::EMBHVData hvdata_EMB = hvManager_EMB.getData (**hvCabling, attrLists);
112
113 const EMBPresamplerHVManager& hvManager_EMBPS=manager->getEMBPresamplerHVManager();
114 const EMBPresamplerHVManager::EMBPresamplerHVData hvdata_EMBPS = hvManager_EMBPS.getData (**hvCabling, attrLists);
115
116 const EMECPresamplerHVManager& hvManager_EMECPS=manager->getEMECPresamplerHVManager();
117 const EMECPresamplerHVManager::EMECPresamplerHVData hvdata_EMECPS = hvManager_EMECPS.getData (**hvCabling, attrLists);
118
119 const EMECHVManager& hvManager_EMEC_OUT=manager->getEMECHVManager(EMECHVModule::OUTER);
120 const EMECHVManager::EMECHVData hvdata_EMEC_OUT = hvManager_EMEC_OUT.getData (**hvCabling, attrLists);
121
122 const EMECHVManager& hvManager_EMEC_IN=manager->getEMECHVManager(EMECHVModule::INNER);
123 const EMECHVManager::EMECHVData hvdata_EMEC_IN = hvManager_EMEC_IN.getData (**hvCabling, attrLists);
124
125 const HECHVManager& hvManager_HEC=manager->getHECHVManager();
126 const HECHVManager::HECHVData hvdata_HEC = hvManager_HEC.getData (**hvCabling, attrLists);
127
128 const FCALHVManager& hvManager_FCAL=manager->getFCALHVManager();
129 const FCALHVManager::FCALHVData hvdata_FCAL = hvManager_FCAL.getData (**hvCabling, attrLists);
130
131 if(m_hvonlId_map.empty()) {
133 const LArOnOffIdMapping* cabling{*cablingHdl};
134 if(!cabling) {
135 ATH_MSG_ERROR("Do not have mapping object " << m_cablingKey.key());
136 return StatusCode::FAILURE;
137 }
138
140 ATH_CHECK(caloMgrHandle.isValid());
141 const CaloDetDescrManager* calodetdescrmgr=*caloMgrHandle;
142 std::vector<Identifier>::const_iterator cell_b=m_caloId->cell_begin();
143 std::vector<Identifier>::const_iterator cell_e=m_caloId->cell_end();
144 for(;cell_b!=cell_e; ++cell_b) {
145 if(m_caloId->is_tile(*cell_b)) continue;
146 HWIdentifier onlid = cabling->createSignalChannelID(*cell_b);
147 std::vector<int> hvlines = GetHVLines (hvdata_EMB,
148 hvdata_EMBPS,
149 hvdata_EMEC_OUT,
150 hvdata_EMEC_IN,
151 hvdata_EMECPS,
152 hvdata_HEC,
153 hvdata_FCAL,
154 *cell_b,
155 calodetdescrmgr);
156 for(unsigned i=0; i<hvlines.size(); ++i ) {
157 if(m_hvonlId_map.find(hvlines[i]) == m_hvonlId_map.end()) { // new key
158 std::vector<HWIdentifier> vec;
159 vec.push_back(onlid);
160 m_hvonlId_map[hvlines[i]] = vec;
161 } else { // existing key
162 m_hvonlId_map[hvlines[i]].push_back(onlid);
163 }
164 }
165 }// end map filling
166 }
167
168 for (unsigned int iSide=EMBHVManager::beginSideIndex();iSide<EMBHVManager::endSideIndex();iSide++) { // loop over HV modules
169 for (unsigned int iPhi=hvManager_EMB.beginPhiIndex();iPhi<hvManager_EMB.endPhiIndex();iPhi++) {
170 for (unsigned int iSector=EMBHVManager::beginSectorIndex();iSector<EMBHVManager::endSectorIndex();iSector++) {
171 for (unsigned int iEta=hvManager_EMB.beginEtaIndex();iEta<hvManager_EMB.endEtaIndex();iEta++) { //0 to 7
172 const EMBHVModule& hvMod = hvManager_EMB.getHVModule(iSide,iEta,iPhi,iSector);
173 float eta=0.5*(hvMod.getEtaMin()+hvMod.getEtaMax());
174 for (unsigned int ielec=0;ielec<32;ielec++) { //use hvMod->getNumElectrodes when bug is corrected
175 const EMBHVElectrode& electrode = hvMod.getElectrode(ielec);
176 for (unsigned int iGap=0;iGap<2;iGap++) { // EMB : 2, TRY TO FIND AUTOMATICALLY NB OF GAPS
177 float hv = hvdata_EMB.voltage (electrode, iGap);
178 float current = hvdata_EMB.current (electrode, iGap);
179 float phi = electrode.getPhi();
180
181 m_bec=0;
183 m_eta=eta;
184 m_phi=phi;
185 m_electrode = ielec;
186 m_gap = iGap;
187 m_hv = hv;
188 m_current= current;
189 m_hvline = hvdata_EMB.hvLineNo (electrode, iGap);
190
191 if(m_addcells) {
192 for(unsigned i=0; i<m_hvonlId_map[m_hvline].size(); ++i) {
195 m_FT=m_onlId->feedthrough(m_hvonlId_map[m_hvline][i]);
198 m_tree->Fill();
199 }
200 } else m_tree->Fill();
201
202 } //end for iGap
203 }
204 }
205 }
206 }
207 } //EMBHVManager
208
209 for (unsigned int iSide=EMBPresamplerHVManager::beginSideIndex();iSide<EMBPresamplerHVManager::endSideIndex();iSide++) { // loop over HV modules
210 for (unsigned int iPhi=hvManager_EMBPS.beginPhiIndex();iPhi<hvManager_EMBPS.endPhiIndex();iPhi++) {
211 for (unsigned int iEta=hvManager_EMBPS.beginEtaIndex();iEta<hvManager_EMBPS.endEtaIndex();iEta++) { //0 to 7
212 const EMBPresamplerHVModule& hvMod = hvManager_EMBPS.getHVModule(iSide,iEta,iPhi);
213 for (int iGap=0;iGap<2;iGap++) {
214 float hv = hvdata_EMBPS.voltage (hvMod, iGap);
215 float current = hvdata_EMBPS.current (hvMod, iGap);
216 float eta = 0.5*(hvMod.getEtaMin()+hvMod.getEtaMax());
217 float phi= 0.5*(hvMod.getPhiMin()+hvMod.getPhiMax());
218
219 m_bec=0;
221 m_eta=eta;
222 m_phi=phi;
223 m_electrode = 0;
224 m_gap = iGap;
225 m_hv = hv;
226 m_current= current;
227 m_hvline = hvdata_EMBPS.hvLineNo (hvMod, iGap);
228
229 if(m_addcells) {
230 for(unsigned i=0; i<m_hvonlId_map[m_hvline].size(); ++i) {
233 m_FT=m_onlId->feedthrough(m_hvonlId_map[m_hvline][i]);
236 m_tree->Fill();
237 }
238 } else m_tree->Fill();
239
240 } //end for iGap
241 }
242 }
243 } //EMBPresampler
244
245 for (unsigned int iSide=EMECPresamplerHVManager::beginSideIndex();iSide<EMECPresamplerHVManager::endSideIndex();iSide++) { // loop over HV modules
246 for (unsigned int iPhi=hvManager_EMECPS.beginPhiIndex();iPhi<hvManager_EMECPS.endPhiIndex();iPhi++) {
247 const EMECPresamplerHVModule& hvMod = hvManager_EMECPS.getHVModule(iSide,iPhi);
248 for (int iGap=0;iGap<2;iGap++) {
249 float hv = hvdata_EMECPS.voltage (hvMod, iGap);
250 float current = hvdata_EMECPS.current (hvMod, iGap);
251 float eta = 0.5*(hvMod.getEtaMin()+hvMod.getEtaMax());
252 float phi=0.5*(hvMod.getPhiMin()+hvMod.getPhiMax());
253
254 m_bec=1;
256 m_eta=eta;
257 m_phi=phi;
258 m_electrode = 0;
259 m_gap = iGap;
260 m_hv = hv;
261 m_current= current;
262 m_hvline = hvdata_EMECPS.hvLineNo (hvMod, iGap);
263
264 if(m_addcells) {
265 for(unsigned i=0; i<m_hvonlId_map[m_hvline].size(); ++i) {
268 m_FT=m_onlId->feedthrough(m_hvonlId_map[m_hvline][i]);
271 m_tree->Fill();
272 }
273 } else m_tree->Fill();
274
275 } //end for iGap
276 }
277 }//EMECPresampler
278
279
280
281 for (unsigned int iSide=EMECHVManager::beginSideIndex();iSide<EMECHVManager::endSideIndex();iSide++) { // loop over HV modules
282 for (unsigned int iPhi=hvManager_EMEC_OUT.beginPhiIndex();iPhi<hvManager_EMEC_OUT.endPhiIndex();iPhi++) {
283 for (unsigned int iSector=hvManager_EMEC_OUT.beginSectorIndex();iSector<hvManager_EMEC_OUT.endSectorIndex();iSector++) {
284 for (unsigned int iEta=hvManager_EMEC_OUT.beginEtaIndex();iEta<hvManager_EMEC_OUT.endEtaIndex();iEta++) {
285 const EMECHVModule& hvMod=hvManager_EMEC_OUT.getHVModule(iSide,iEta,iPhi,iSector);
286 float eta=0.5*(hvMod.getEtaMin()+hvMod.getEtaMax());
287 for (unsigned int ielec=0;ielec<hvMod.getNumElectrodes();ielec++) { //use hvMod.getNumElectrodes when bug is corrected
288 const EMECHVElectrode& electrode = hvMod.getElectrode(ielec);
289 for (unsigned int iGap=0;iGap<2;iGap++) { //EMEC : 2 gaps, TRY TO FIND AUTOMATICALLY NB OF GAPS
290 float hv = hvdata_EMEC_OUT.voltage (electrode, iGap);
291 float current = hvdata_EMEC_OUT.current (electrode, iGap);
292 float phi = electrode.getPhi();
293
294 m_bec=1;
296 m_eta=eta;
297 m_phi=phi;
298 m_electrode = ielec;
299 m_gap = iGap;
300 m_hv = hv;
301 m_current= current;
302 m_hvline = hvdata_EMEC_OUT.hvLineNo (electrode, iGap);
303
304 if(m_addcells) {
305 for(unsigned i=0; i<m_hvonlId_map[m_hvline].size(); ++i) {
308 m_FT=m_onlId->feedthrough(m_hvonlId_map[m_hvline][i]);
311 m_tree->Fill();
312 }
313 } else m_tree->Fill();
314
315 } //end for iGap
316 }
317 }
318 }
319 }
320 }//EMEC Outer
321
322 for (unsigned int iSide=EMECHVManager::beginSideIndex();iSide<EMECHVManager::endSideIndex();iSide++) { // loop over HV modules
323 for (unsigned int iPhi=hvManager_EMEC_IN.beginPhiIndex();iPhi<hvManager_EMEC_IN.endPhiIndex();iPhi++) {
324 for (unsigned int iSector=hvManager_EMEC_IN.beginSectorIndex();iSector<hvManager_EMEC_IN.endSectorIndex();iSector++) {
325 for (unsigned int iEta=hvManager_EMEC_IN.beginEtaIndex();iEta<hvManager_EMEC_IN.endEtaIndex();iEta++) {
326 const EMECHVModule& hvMod=hvManager_EMEC_IN.getHVModule(iSide,iEta,iPhi,iSector);
327 float eta=0.5*(hvMod.getEtaMin()+hvMod.getEtaMax());
328 for (unsigned int ielec=0;ielec<hvMod.getNumElectrodes();ielec++) { //use hvMod.getNumElectrodes when bug is corrected
329 const EMECHVElectrode& electrode = hvMod.getElectrode(ielec);
330 for (unsigned int iGap=0;iGap<2;iGap++) { //EMEC : 2 gaps, TRY TO FIND AUTOMATICALLY NB OF GAPS
331 float hv = hvdata_EMEC_IN.voltage (electrode, iGap);
332 float current = hvdata_EMEC_IN.current (electrode, iGap);
333 float phi = electrode.getPhi();
334
335 m_bec=2;
337 m_eta=eta;
338 m_phi=phi;
339 m_electrode = ielec;
340 m_gap = iGap;
341 m_hv = hv;
342 m_current= current;
343 m_hvline = hvdata_EMEC_IN.hvLineNo (electrode, iGap);
344
345 if(m_addcells) {
346 for(unsigned i=0; i<m_hvonlId_map[m_hvline].size(); ++i) {
349 m_FT=m_onlId->feedthrough(m_hvonlId_map[m_hvline][i]);
352 m_tree->Fill();
353 }
354 } else m_tree->Fill();
355
356 } //end for iGap
357 }
358 }
359 }
360 }
361 }// EMEC Inner
362
363 float etamax_layer[4]={3.3,3.1,3.1,3.3};
364 float etamin_layer[4]={1.5,1.5,1.6,1.7};
365
366
367 for (unsigned int iSide=HECHVManager::beginSideIndex();iSide<HECHVManager::endSideIndex();iSide++) { // loop over HV modules
368 for (unsigned int iPhi=HECHVManager::beginPhiIndex();iPhi<HECHVManager::endPhiIndex();iPhi++) {
369 for (unsigned int iSampling=HECHVManager::beginSamplingIndex();iSampling<HECHVManager::endSamplingIndex();iSampling++) {
370 float eta_min,eta_max;
371 if (iSide==1) {
372 eta_min = etamin_layer[iSampling];
373 eta_max = etamax_layer[iSampling];
374 } else {
375 eta_min = -1.*etamax_layer[iSampling];
376 eta_max = -1.*etamin_layer[iSampling];
377 }
378 float eta = 0.5*(eta_min+eta_max);
379 const HECHVModule& hvMod = hvManager_HEC.getHVModule(iSide,iPhi,iSampling);
380 float phi = 0.5*(hvMod.getPhiMin()+hvMod.getPhiMax());
381
382 for (unsigned int iGap=0;iGap<HECHVModule::getNumSubgaps();iGap++) {//HEC : 4 gaps, TRY TO FIND AUTOMATICALLY NB OF GAPS
383 const HECHVSubgap& subgap=hvMod.getSubgap(iGap);
384 float hv = hvdata_HEC.voltage (subgap);
385 float current = hvdata_HEC.current (subgap);
386 m_bec = 10+iSampling;
388 m_eta=eta;
389 m_phi=phi;
390 m_electrode = 0;
391 m_gap = iGap;
392 m_hv=hv;
393 m_current=current;
394 m_hvline = hvdata_HEC.hvLineNo (subgap);
395 if(m_addcells) {
396 for(unsigned i=0; i<m_hvonlId_map[m_hvline].size(); ++i) {
399 m_FT=m_onlId->feedthrough(m_hvonlId_map[m_hvline][i]);
402 m_tree->Fill();
403 }
404 } else m_tree->Fill();
405 }// end for iGap
406 }
407 }
408 }//HECHVManager
409
410 for (unsigned int iSide=FCALHVManager::beginSideIndex();iSide<FCALHVManager::endSideIndex();iSide++) { // loop over HV modules
411 float eta_min=3.1,eta_max=4.9;
412 if (iSide==0) { eta_min=-4.9; eta_max=-3.1; }
413
414 float eta = 0.5*(eta_min+eta_max);
415 for (unsigned int iSampling=FCALHVManager::beginSamplingIndex();iSampling<FCALHVManager::endSamplingIndex();iSampling++) {
416 for (unsigned int iSector=FCALHVManager::beginSectorIndex(iSampling);iSector<FCALHVManager::endSectorIndex(iSampling);iSector++) {
417
418 const FCALHVModule& hvMod = hvManager_FCAL.getHVModule(iSide,iSector,iSampling);
419
420 float dphi=CaloPhiRange::twopi()/16;
421 if (iSampling==1) dphi=CaloPhiRange::twopi()/8.;
422 if (iSampling==2) dphi=CaloPhiRange::twopi()/4.;
423 float phi_min = ((float)(iSector))*dphi;
424 phi_min = CaloPhiRange::fix(phi_min);
425 float phi_max = CaloPhiRange::fix(dphi+phi_min);
426 float phi = 0.5*(phi_min+phi_max);
427
428 for (unsigned int iLine=0;iLine<FCALHVModule::getNumHVLines();iLine++) {
429 const FCALHVLine& hvline = hvMod.getHVLine(iLine);
430 float hv = hvdata_FCAL.voltage (hvline);
431 float current = hvdata_FCAL.current (hvline);
432 m_bec = 14+iSampling;
434 m_eta=eta;
435 m_phi=phi;
436 m_electrode = iSector;
437 m_gap = iLine;
438 m_hv=hv;
439 m_current=current;
440 m_hvline = hvdata_FCAL.hvLineNo (hvline);
441 if(m_addcells) {
442 for(unsigned i=0; i<m_hvonlId_map[m_hvline].size(); ++i) {
445 m_FT=m_onlId->feedthrough(m_hvonlId_map[m_hvline][i]);
448 m_tree->Fill();
449 }
450 } else m_tree->Fill();
451 }
452 } //iSector
453 }//iSampling
454 }//iSide
455
456 return StatusCode::SUCCESS;
457 }
458
459std::vector<int> LArHV2Ntuple::GetHVLines (const EMBHVManager::EMBHVData& hvdata_EMB,
461 const EMECHVManager::EMECHVData& hvdata_EMEC_OUT,
462 const EMECHVManager::EMECHVData& hvdata_EMEC_IN,
464 const HECHVManager::HECHVData& hvdata_HEC,
465 const FCALHVManager::FCALHVData& hvdata_FCAL,
466 const Identifier& id,
467 const CaloDetDescrManager* calodetdescrmgr) {
468
469 std::set<int> hv;
470
471 // LAr EMB
472 if (m_caloId->is_em(id) && m_caloId->sampling(id)>0) {
473 if (abs(m_caloId->em_idHelper()->barrel_ec(id))==1) {
474 const EMBDetectorElement* embElement = dynamic_cast<const EMBDetectorElement*>(calodetdescrmgr->get_element(id));
475 if (!embElement) std::abort();
476 const EMBCellConstLink cell = embElement->getEMBCell();
477 unsigned int nelec = cell->getNumElectrodes();
478 for (unsigned int i=0;i<nelec;i++) {
479 const EMBHVElectrode& electrode = cell->getElectrode(i);
480 for (unsigned int igap=0;igap<2;igap++) hv.insert(hvdata_EMB.hvLineNo(electrode, igap));
481 }
482 } else { // LAr EMEC
483 const EMECDetectorElement* emecElement = dynamic_cast<const EMECDetectorElement*>(calodetdescrmgr->get_element(id));
484 if (!emecElement) std::abort();
485 const EMECCellConstLink cell = emecElement->getEMECCell();
486 unsigned int nelec = cell->getNumElectrodes();
487 for (unsigned int i=0;i<nelec;i++) {
488 const EMECHVElectrode& electrode = cell->getElectrode(i);
489 const EMECHVModule& module = electrode.getModule();
490 const EMECHVManager::EMECHVData& hvdata =
491 module.getWheelIndex() == EMECHVModule::INNER ?
492 hvdata_EMEC_IN :
493 hvdata_EMEC_OUT;
494 for (unsigned int igap=0;igap<2;igap++) hv.insert(hvdata.hvLineNo (electrode, igap));
495 }
496 }
497 } else if (m_caloId->is_hec(id)) { // LAr HEC
498 const HECDetectorElement* hecElement = dynamic_cast<const HECDetectorElement*>(calodetdescrmgr->get_element(id));
499 if (!hecElement) std::abort();
500 const HECCellConstLink cell = hecElement->getHECCell();
501 unsigned int nsubgaps = cell->getNumSubgaps();
502 for (unsigned int igap=0;igap<nsubgaps;igap++) {
503 const HECHVSubgap& subgap = cell->getSubgap(igap);
504 hv.insert(hvdata_HEC.hvLineNo (subgap));
505 }
506 } else if (m_caloId->is_fcal(id)) { // LAr FCAL
507 const FCALDetectorElement* fcalElement = dynamic_cast<const FCALDetectorElement*>(calodetdescrmgr->get_element(id));
508 if (!fcalElement) std::abort();
509 const FCALTile* tile = fcalElement->getFCALTile();
510 unsigned int nlines = FCALTile::getNumHVLines();
511 for (unsigned int i=0;i<nlines;i++) {
512 const FCALHVLine* line = tile->getHVLine(i);
513 if (line) hv.insert(hvdata_FCAL.hvLineNo (*line));
514 }
515 } else if (m_caloId->is_em(id) && m_caloId->sampling(id)==0) { // Presamplers
516 if (abs(m_caloId->em_idHelper()->barrel_ec(id))==1) {
517 const EMBDetectorElement* embElement = dynamic_cast<const EMBDetectorElement*>(calodetdescrmgr->get_element(id));
518 if (!embElement) std::abort();
519 const EMBCellConstLink cell = embElement->getEMBCell();
520 const EMBPresamplerHVModule& hvmodule = cell->getPresamplerHVModule();
521 for (unsigned int igap=0;igap<2;igap++) hv.insert(hvdata_EMBPS.hvLineNo (hvmodule, igap));
522 } else {
523 const EMECDetectorElement* emecElement = dynamic_cast<const EMECDetectorElement*>(calodetdescrmgr->get_element(id));
524 if (!emecElement) std::abort();
525 const EMECCellConstLink cell = emecElement->getEMECCell();
526 const EMECPresamplerHVModule& hvmodule = cell->getPresamplerHVModule ();
527 for (unsigned int igap=0;igap<2;igap++) hv.insert(hvdata_EMECPS.hvLineNo (hvmodule, igap));
528 }
529 }
530
531 std::vector<int> hvlines;
532 for (std::set<int>::iterator i=hv.begin();i!=hv.end();++i) hvlines.push_back(*i);
533 return hvlines;
534 }
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 with parameters:
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:20
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:21
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() 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.