ATLAS Offline Software
Loading...
Searching...
No Matches
OccupancyMapMaker Class Reference

#include <OccupancyMapMaker.h>

Inheritance diagram for OccupancyMapMaker:
Collaboration diagram for OccupancyMapMaker:

Public Member Functions

 OccupancyMapMaker (const std::string &name, ISvcLocator *pSvcLocator)
 ~OccupancyMapMaker ()
StatusCode initialize ()
StatusCode execute ()
StatusCode finalize ()
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

std::string getDCSIDFromPosition (int bec, int layer, int modPhi, int modEta)
std::vector< std::string > & splitter (const std::string &str, char delim, std::vector< std::string > &elems)
std::vector< std::string > splitter (const std::string &str, char delim)
StatusCode registerHistograms ()
const std::string histoSuffix (const int bec, const int layer)
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

ServiceHandle< ITHistSvc > m_tHistSvc
ToolHandle< IInDetConditionsToolm_pixelConditionsTool {this, "PixelConditionsSummaryTool", "PixelConditionsSummaryTool", "Tool to retrieve Pixel Conditions summary"}
const PixelIDm_pixelID
std::vector< std::pair< std::string, std::vector< int > > > m_pixelMapping
std::string m_pixelRDOKey
std::vector< int > m_moduleHashList
double m_nEvents
TH1D * m_nEventsHist
TH1D * m_nEventsLBHist
std::vector< TH2D * > m_hitMaps
std::vector< TH2C * > m_noiseMaps
std::vector< TH1D * > m_LBdependence
std::vector< TH1D * > m_BCIDdependence
std::vector< TH1D * > m_TOTdistributions
TH1D * m_disabledModules
TH2D * m_overlayedPixelNoiseMap
TH2D * m_overlayedIBLDCNoiseMap
TH2D * m_overlayedIBLSCNoiseMap
double m_disk1ACut
double m_disk2ACut
double m_disk3ACut
double m_disk1CCut
double m_disk2CCut
double m_disk3CCut
double m_iblCut
double m_bLayerCut
double m_layer1Cut
double m_layer2Cut
double m_dbmCut
int m_hist_lbMax
double m_longPixelMultiplier
double m_gangedPixelMultiplier
bool m_occupancyPerBC
unsigned int m_nBCReadout
unsigned int m_evt_lbMin
unsigned int m_evt_lbMax
bool m_calculateNoiseMaps
std::string m_mapFile
DataObjIDColl m_extendedExtraObjects
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 25 of file OccupancyMapMaker.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ OccupancyMapMaker()

OccupancyMapMaker::OccupancyMapMaker ( const std::string & name,
ISvcLocator * pSvcLocator )

Definition at line 33 of file OccupancyMapMaker.cxx.

33 :
34 AthAlgorithm(name, pSvcLocator),
35 m_tHistSvc("THistSvc", name),
36 m_pixelID(0),
37 m_pixelRDOKey("PixelRDOs"),
38 m_nEvents(0.),
39 m_nEventsHist(nullptr),
40 m_nEventsLBHist(nullptr),
41 m_disabledModules(nullptr),
45 m_disk1ACut(1.e-3),
46 m_disk2ACut(1.e-3),
47 m_disk3ACut(1.e-3),
48 m_disk1CCut(1.e-3),
49 m_disk2CCut(1.e-3),
50 m_disk3CCut(1.e-3),
51 m_iblCut(1.e-3),
52 m_bLayerCut(1.e-3),
53 m_layer1Cut(1.e-3),
54 m_layer2Cut(1.e-3),
55 m_dbmCut(1.e-3),
56 m_hist_lbMax(3001),
59 m_occupancyPerBC(true),
60 m_nBCReadout(2),
61 m_evt_lbMin(0),
62 m_evt_lbMax(-1),
64 m_mapFile("PixelMapping_Run2.dat")
65{
66 declareProperty("PixelRDOKey", m_pixelRDOKey, "StoreGate key of pixel RDOs");
67 declareProperty("Disk1ACut", m_disk1ACut, "Occupancy cut for Disk1A pixels");
68 declareProperty("Disk2ACut", m_disk2ACut, "Occupancy cut for Disk2A pixels");
69 declareProperty("Disk3ACut", m_disk3ACut, "Occupancy cut for Disk3A pixels");
70 declareProperty("Disk1CCut", m_disk1CCut, "Occupancy cut for Disk1C pixels");
71 declareProperty("Disk2CCut", m_disk2CCut, "Occupancy cut for Disk2C pixels");
72 declareProperty("Disk3CCut", m_disk3CCut, "Occupancy cut for Disk3C pixels");
73 declareProperty("BLayerCut", m_bLayerCut, "Occupancy cut for BLayer pixels");
74 declareProperty("Layer1Cut", m_layer1Cut, "Occupancy cut for Layer1 pixels");
75 declareProperty("Layer2Cut", m_layer2Cut, "Occupancy cut for Layer2 pixels");
76 declareProperty("IBLCut", m_dbmCut, "Occupancy cut for DBM pixels");
77 declareProperty("nLBmax", m_hist_lbMax, "Maximum number of LB (for histograms binning)");
78 declareProperty("NBCReadout", m_nBCReadout, "Number of bunch crossings read out");
79 declareProperty("LBMin", m_evt_lbMin, "First lumi block to consider");
80 declareProperty("LBMax", m_evt_lbMax, "Last lumi block to consider");
81 declareProperty("LongPixelMultiplier", m_longPixelMultiplier, "Multiplier for long pixels");
82 declareProperty("GangedPixelMultiplier", m_gangedPixelMultiplier, "Multiplier for ganged pixels");
83 declareProperty("OccupancyPerBC", m_occupancyPerBC, "Calculate occupancy per BC or per event");
84 declareProperty("CalculateNoiseMaps", m_calculateNoiseMaps, "If false only build hit maps");
85 declareProperty("InputPixelMap", m_mapFile);
86 declareProperty("THistSvc", m_tHistSvc, "THistSvc");
87}
AthAlgorithm()
Default constructor:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
std::string m_pixelRDOKey
const PixelID * m_pixelID
unsigned int m_nBCReadout
ServiceHandle< ITHistSvc > m_tHistSvc
unsigned int m_evt_lbMin

◆ ~OccupancyMapMaker()

OccupancyMapMaker::~OccupancyMapMaker ( )

Definition at line 89 of file OccupancyMapMaker.cxx.

89{}

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode OccupancyMapMaker::execute ( )

Definition at line 299 of file OccupancyMapMaker.cxx.

299 {
300 ATH_MSG_DEBUG( "Executing OccupancyMapMaker" );
301
302 const EventContext& ctx = Gaudi::Hive::currentContext();
303
304 // check LB is in allowed range
305 unsigned int LB = ctx.eventID().lumi_block();
306 if( (LB < m_evt_lbMin) || (m_evt_lbMax >= m_evt_lbMin && LB > m_evt_lbMax) ){
307 ATH_MSG_VERBOSE("Event in lumiblock " << LB <<
308 " not in selected range [" << m_evt_lbMin << "," << m_evt_lbMax << "] => skipped");
309 return StatusCode::SUCCESS;
310 }
311
312 // retrieve PixelRDO container
313 const PixelRDO_Container* pixelRDOs = nullptr;
314 StatusCode sc = evtStore()->retrieve(pixelRDOs, m_pixelRDOKey);
315 if( !sc.isSuccess() ){
316 ATH_MSG_FATAL( "Unable to retrieve pixel RDO container at " << m_pixelRDOKey );
317 return StatusCode::FAILURE;
318 } ATH_MSG_DEBUG( "Pixel RDO container retrieved" );
319
320 // loop in RDO container
321 for(PixelRDO_Container::const_iterator coll=pixelRDOs->begin();
322 coll!=pixelRDOs->end(); ++coll){
323
324 const InDetRawDataCollection<PixelRDORawData>* PixelRDOCollection(*coll);
325 if(PixelRDOCollection != 0){
326 Identifier moduleID = PixelRDOCollection->identify();
327 IdentifierHash modHash = m_pixelID->wafer_hash(moduleID);
328 ATH_MSG_VERBOSE("moduleID, modHash = " << moduleID << " , " << modHash);
329
330 // exclude module if reported as not good by PixelConditionsSummaryTool
331 if( !(m_pixelConditionsTool->isGood(modHash, ctx)) ) {
332 ATH_MSG_VERBOSE("Module excluded as reported not good by PixelConditionsSummaryTool");
333 continue;
334 }
335
336 // exclude module if containg FE synch errors
337 if (m_pixelConditionsTool->hasBSError(modHash, ctx)) {
338 ATH_MSG_VERBOSE("Module excluded as containing FE synch errors");
339 continue;
340 }
341
342 for(DataVector<PixelRDORawData>::const_iterator rdo = PixelRDOCollection->begin();
343 rdo!=PixelRDOCollection->end(); ++rdo){
344 Identifier rdoID = (*rdo)->identify();
345 unsigned int pixel_eta = m_pixelID->eta_index(rdoID);
346 unsigned int pixel_phi = m_pixelID->phi_index(rdoID);
347
348 int TOT = (*rdo)->getToT(); // it returns a 8 bits "word"
349 int BCID = (*rdo)->getBCID();
350
351 m_hitMaps[modHash]->Fill(pixel_eta, pixel_phi);
352 m_LBdependence[modHash]->Fill(LB);
353 m_BCIDdependence[modHash]->Fill(BCID);
354 m_TOTdistributions[modHash]->Fill(TOT);
355 }
356 }
357 }
358
359
360 // [sgs] why is this done in every event ???
361 for(unsigned int moduleHash = 0; moduleHash < m_pixelID->wafer_hash_max(); moduleHash++) {
362 if( !m_pixelConditionsTool->isActive( moduleHash, ctx ) ){
363 m_disabledModules->Fill( moduleHash );
364 }
365 }
366
367 m_nEvents++;
368 m_nEventsHist->Fill(0.5);
369 m_nEventsLBHist->Fill(LB);
370
371 return StatusCode::SUCCESS;
372}
#define ATH_MSG_FATAL(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_DEBUG(x)
static Double_t sc
InDetRawDataContainer< InDetRawDataCollection< PixelRDORawData > > PixelRDO_Container
DataModel_detail::const_iterator< DataVector > const_iterator
Standard const_iterator.
Definition DataVector.h:838
const_iterator end() const
return const_iterator for end of container
const_iterator begin() const
return const_iterator for first entry
std::vector< TH1D * > m_TOTdistributions
ToolHandle< IInDetConditionsTool > m_pixelConditionsTool
std::vector< TH1D * > m_LBdependence
std::vector< TH1D * > m_BCIDdependence
std::vector< TH2D * > m_hitMaps
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 50 of file AthAlgorithm.cxx.

51{
52 // If we didn't find any symlinks to add, just return the collection
53 // from the base class. Otherwise, return the extended collection.
54 if (!m_extendedExtraObjects.empty()) {
56 }
57 return Algorithm::extraOutputDeps();
58}
DataObjIDColl m_extendedExtraObjects

◆ finalize()

StatusCode OccupancyMapMaker::finalize ( )

Definition at line 380 of file OccupancyMapMaker.cxx.

380 {
381 ATH_MSG_INFO("Finalizing OccupancyMapMaker");
382
385
386 const int minLogOccupancy = 8;
387 const double minOccupancy = pow(10.,-minLogOccupancy);
388
389 TH1D* globalOccupancy= new TH1D("occupancy", "Pixel occupancy", minLogOccupancy*10, -minLogOccupancy, 0.);
390 m_tHistSvc->regHist("/histfile/occupancy",globalOccupancy).ignore();
391
392 std::map<std::string, TH1D*> h_occupancy;
393
394 // occupancy histograms for different components of the Pixel detector
395 std::vector<std::string> vcomponent;
396 vcomponent.push_back("Disk1A");
397 vcomponent.push_back("Disk2A");
398 vcomponent.push_back("Disk3A");
399 vcomponent.push_back("Disk1C");
400 vcomponent.push_back("Disk2C");
401 vcomponent.push_back("Disk3C");
402 vcomponent.push_back("IBL");
403 vcomponent.push_back("B-layer");
404 vcomponent.push_back("Layer1");
405 vcomponent.push_back("Layer2");
406 vcomponent.push_back("DBMA");
407 vcomponent.push_back("DBMC");
408
409 for(std::vector<std::string>::const_iterator cit=vcomponent.begin(); cit!=vcomponent.end(); ++cit) {
410 const std::string comp = (*cit);
411 h_occupancy[comp] = new TH1D( ("occupancy"+comp).c_str(), ("Pixel occupancy "+comp).c_str(),
412 minLogOccupancy*10, -minLogOccupancy, 0);
413 m_tHistSvc->regHist(("/histfile/occupancy"+comp).c_str(), h_occupancy[comp]).ignore();
414 }
415 vcomponent.clear();
416
417 // occupancy histograms for different pixel types
418 std::vector<std::string> vtype;
419 vtype.push_back("Normal");
420 vtype.push_back("Ganged");
421 vtype.push_back("InterGanged");
422 vtype.push_back("Long");
423 vtype.push_back("Long-Ganged");
424 vtype.push_back("Long-InterGanged");
425 for(std::vector<std::string>::const_iterator cit=vtype.begin(); cit!=vtype.end(); ++cit){
426 const std::string type = (*cit);
427 h_occupancy[type] =
428 new TH1D( ("occupancy"+type).c_str(), ("Pixel occupancy "+type).c_str(),
429 minLogOccupancy*10, -minLogOccupancy, 0);
430 m_tHistSvc->regHist(("/histfile/occupancy"+type).c_str(), h_occupancy[type]).ignore();
431 }
432 vtype.clear();
433
434 //------------------------
435 // number of hits
436 //------------------------
437
438 // IBL
439 TH2F* nhitsPlotBI=new TH2F("nhitsPlotBI", "Number of hits BI;module_eta;module_phi", 20, -10, 10, 14, -0.5, 13.5);
440 m_tHistSvc->regHist("/histfile/nhitsPlotBI",nhitsPlotBI).ignore();
441
442 // B-layer
443 TH2F* nhitsPlotB0=new TH2F("nhitsPlotB0", "Number of hits B0;module_eta;module_phi", 13, -6.5, 6.5, 22, -0.5, 21.5);
444 m_tHistSvc->regHist("/histfile/nhitsPlotB0",nhitsPlotB0).ignore();
445
446 // barrel layer 1
447 TH2F* nhitsPlotB1=new TH2F("nhitsPlotB1", "Number of hits B1;module_eta;module_phi", 13, -6.5, 6.5, 38, -0.5, 37.5);
448 m_tHistSvc->regHist("/histfile/nhitsPlotB1",nhitsPlotB1).ignore();
449
450 // barrel layer 2
451 TH2F* nhitsPlotB2=new TH2F("nhitsPlotB2", "Number of hits B2;module_eta;module_phi", 13,- 6.5, 6.5, 52, -0.5, 51.5);
452 m_tHistSvc->regHist("/histfile/nhitsPlotB2",nhitsPlotB2).ignore();
453
454 // endcap
455 TH2F* nhitsPlotEC=new TH2F("nhitsPlotEC", "Number of hits Endcap;Disk;module_phi", 7, -3.5, 3.5, 48, -0.5, 47.5);
456 m_tHistSvc->regHist("/histfile/nhitsPlotEC",nhitsPlotEC).ignore();
457
458 // DBM
459 TH2F* nhitsPlotDBM=new TH2F("nhitsPlotDBM", "Number of hits DBM;Layer;module_phi",7,-3.5,3.5,4,-0.5,3.5);
460 m_tHistSvc->regHist("/histfile/nhitsPlotDBM",nhitsPlotDBM).ignore();
461
462 //------------------------
463 // hits w/o noise
464 //------------------------
465
466 // IBL
467 TH2F* nhitsNoNoisePlotBI=new TH2F("nhitsNoNoisePlotBI","Number of hits without Noise BI;module_eta;module_phi", 20, -10, 10, 14, -0.5, 13.5);
468 m_tHistSvc->regHist("/histfile/nhitsNoNoisePlotBI",nhitsNoNoisePlotBI).ignore();
469
470 // B-layer
471 TH2F* nhitsNoNoisePlotB0=new TH2F("nhitsNoNoisePlotB0","Number of hits without Noise B0;module_eta;module_phi", 13, -6.5, 6.5, 22, -0.5, 21.5);
472 m_tHistSvc->regHist("/histfile/nhitsNoNoisePlotB0",nhitsNoNoisePlotB0).ignore();
473
474 // barrel layer 1
475 TH2F* nhitsNoNoisePlotB1=new TH2F("nhitsNoNoisePlotB1","Number of hits without Noise B1;module_eta;module_phi", 13, -6.5, 6.5, 38, -0.5, 37.5);
476 m_tHistSvc->regHist("/histfile/nhitsNoNoisePlotB1",nhitsNoNoisePlotB1).ignore();
477
478 // barrel layer 2
479 TH2F* nhitsNoNoisePlotB2=new TH2F("nhitsNoNoisePlotB2","Number of hits without Noise B2;module_eta;module_phi", 13, -6.5, 6.5, 52, -0.5, 51.5);
480 m_tHistSvc->regHist("/histfile/nhitsNoNoisePlotB2",nhitsNoNoisePlotB2).ignore();
481
482 //------------------------
483 // disabled pixels
484 //------------------------
485
486 // IBL
487 TH2F* disablePlotBI=new TH2F("disablePlotBI", "Disabled pixels BI;module_eta;module_phi", 20, -10, 10, 14, -0.5, 13.5);
488 m_tHistSvc->regHist("/histfile/disablePlotBI",disablePlotBI).ignore();
489
490 // B-layer
491 TH2F* disablePlotB0=new TH2F("disablePlotB0", "Disabled pixels B0;module_eta;module_phi", 13,- 6.5, 6.5, 22, -0.5, 21.5);
492 m_tHistSvc->regHist("/histfile/disablePlotB0",disablePlotB0).ignore();
493
494 // barrel layer 1
495 TH2F* disablePlotB1=new TH2F("disablePlotB1", "Disabled pixels B1;module_eta;module_phi", 13, -6.5, 6.5, 38, -0.5, 37.5);
496 m_tHistSvc->regHist("/histfile/disablePlotB1",disablePlotB1).ignore();
497
498 // barrel layer 2
499 TH2F* disablePlotB2=new TH2F("disablePlotB2", "Disabled pixels B2;module_eta;module_phi", 13, -6.5, 6.5, 52, -0.5, 51.5);
500 m_tHistSvc->regHist("/histfile/disablePlotB2",disablePlotB2).ignore();
501
502 // endcap
503 TH2F* disablePlotEC=new TH2F("disablePlotEC", "Disabled pixels Endcap;Disk;module_phi", 7, -3.5, 3.5, 48, -0.5, 47.5);
504 m_tHistSvc->regHist("/histfile/disablePlotEC",disablePlotEC).ignore();
505
506 // DBM
507 TH2F* disablePlotDBM=new TH2F("disablePlotDBM", "Disabled pixels DBM;Layer;module_phi", 7, -3.5, 3.5, 4, -0.5, 3.5);
508 m_tHistSvc->regHist("/histfile/disablePlotDBM",disablePlotDBM).ignore();
509
510 TH1D* maskedPlot= new TH1D("maskedPlot","Disabled pixel per module",50,0.5,50.5);
511 m_tHistSvc->regHist("/histfile/maskedPlot",maskedPlot).ignore();
512
513 int totalDisabledPixels=0;
514 int totalDisabledModules=0;
515 int modulesWithHits=0;
516 int modulesWithDisabledPixels=0;
517
518 const EventContext& ctx{Gaudi::Hive::currentContext()};
519 for (PixelID::const_id_iterator wafer_it=m_pixelID->wafer_begin(); wafer_it!=m_pixelID->wafer_end(); ++wafer_it) {
520 Identifier ident = *wafer_it;
521 if(!m_pixelID->is_pixel(ident)) continue;
522
523 int bec = m_pixelID->barrel_ec (ident);
524 int layer = m_pixelID->layer_disk(ident);
525 int modPhi = m_pixelID->phi_module(ident);
526 int modEta = m_pixelID->eta_module(ident);
527 int modHash = m_pixelID->wafer_hash(ident);
528 int phi_max = m_pixelID->phi_index_max(ident);
529 int eta_max = m_pixelID->eta_index_max(ident);
530
531 TH2F* nhitsNoNoisePlot=0;
532 std::string comp;
533 double cut = 0.;
534
535 if(bec != 0) { // Disk or DBM
536 if(bec == 2) {
537 if(layer == 0) {cut=m_disk1ACut; comp="Disk1A"; }
538 else if(layer == 1) {cut=m_disk2ACut; comp="Disk2A"; }
539 else if(layer == 2) {cut=m_disk3ACut; comp="Disk3A"; }
540 }
541 else if(bec == -2) {
542 if(layer == 0) { cut=m_disk1CCut; comp="Disk1C"; }
543 else if(layer == 1) { cut=m_disk2CCut; comp="Disk2C"; }
544 else if(layer == 2) { cut=m_disk3CCut; comp="Disk3C"; }
545 }
546 else if(bec == 4) { cut=m_dbmCut; comp="DBMA"; }
547 else if(bec == -4) { cut=m_dbmCut; comp="DBMC"; }
548 }
549 else if(bec == 0) { // Barrel
550 if(layer == 0) { cut=m_iblCut; nhitsNoNoisePlot=nhitsNoNoisePlotBI; comp="IBL"; }
551 else if(layer == 1) { cut=m_bLayerCut; nhitsNoNoisePlot=nhitsNoNoisePlotB0; comp="B-layer"; }
552 else if(layer == 2) { cut=m_layer1Cut; nhitsNoNoisePlot=nhitsNoNoisePlotB1; comp="Layer1"; }
553 else if(layer == 3) { cut=m_layer2Cut; nhitsNoNoisePlot=nhitsNoNoisePlotB2; comp="Layer2"; }
554 }
555
556 if (!m_pixelConditionsTool->hasBSError(modHash, ctx) && m_hitMaps[modHash]->GetEntries()==0) {
557 if(bec == 0) {
558 if(layer == 0) { disablePlotBI->Fill(modEta, modPhi, -1); }
559 else if(layer == 1) { disablePlotB0->Fill(modEta, modPhi, -1); }
560 else if(layer == 2) { disablePlotB1->Fill(modEta, modPhi, -1); }
561 else if(layer == 3) { disablePlotB2->Fill(modEta, modPhi, -1); }
562 }
563 else if(bec == 2) { disablePlotEC->Fill(layer+1, modPhi, -1); }
564 else if(bec == -2) { disablePlotEC->Fill(-(layer+1), modPhi, -1); }
565 else if(bec == 4) { disablePlotDBM->Fill(layer+1, modPhi, -1); }
566 else if(bec == -4) { disablePlotDBM->Fill(-(layer+1), modPhi, -1); }
567
568 totalDisabledModules++;
569 continue;
570 }
571 else if( m_hitMaps[modHash]->GetEntries() != 0 ) {
572 if(bec == 0) {
573 if(layer == 0) { nhitsPlotBI->Fill(modEta, modPhi, m_hitMaps[modHash]->GetEntries()); }
574 else if(layer == 1) { nhitsPlotB0->Fill(modEta, modPhi, m_hitMaps[modHash]->GetEntries()); }
575 else if(layer == 2) { nhitsPlotB1->Fill(modEta, modPhi, m_hitMaps[modHash]->GetEntries()); }
576 else if(layer == 3) { nhitsPlotB2->Fill(modEta, modPhi, m_hitMaps[modHash]->GetEntries()); }
577 }
578 else if(bec == 2) { nhitsPlotEC->Fill(layer+1, modPhi, m_hitMaps[modHash]->GetEntries()); }
579 else if(bec == -2) { nhitsPlotEC->Fill(-(layer+1), modPhi, m_hitMaps[modHash]->GetEntries()); }
580 else if(bec == 4) { nhitsPlotDBM->Fill(layer+1, modPhi, m_hitMaps[modHash]->GetEntries()); }
581 else if(bec == -4) { nhitsPlotDBM->Fill(-(layer+1), modPhi, m_hitMaps[modHash]->GetEntries()); }
582
583 modulesWithHits++;
584 }
585
586 int thisModuleCut = 0;
587 bool isIBL3D = ( bec==0 && layer==0 && (modEta <= -7 || modEta >= 6) ) ? true : false;
588
589 for(int pixel_eta=0; pixel_eta<=eta_max; pixel_eta++){
590 for(int pixel_phi=0; pixel_phi<=phi_max; pixel_phi++){
591
592 // kazuki added from here
593 int pixel_eta_on_chip = (bec==0 && layer==0) ? pixel_eta % 80 : pixel_eta % 18; // column
594 int pixel_phi_on_chip = (pixel_phi <= 163) ? pixel_phi : 327 - pixel_phi; // eta
595 if (bec == 0 && layer == 0) pixel_phi_on_chip = pixel_phi;
596 int pixelType = 0;
597
598 if (bec == 0 && layer == 0) { // ----- IBL ----- //
599 if( !isIBL3D && (pixel_eta_on_chip == 0 || pixel_eta_on_chip == 80 - 1) ){
600 pixelType = 1; // long
601 }
602 else { // pixel size = 50x250 um2
603 pixelType = 0; // normal
604 }
605 } else { // Pixel
606 if(pixel_eta_on_chip > 0 && pixel_eta_on_chip < 18 - 1){ // pixel size = 50x400 um2
607 pixelType = 0; // normal
608 for(int kk = 0; kk < 3; kk++){
609 // row 154,156,158 = inter-ganged
610 // row 153,155,157,159, 160,161,162,163 = ganged
611 if(pixel_phi_on_chip == (153 + 2 * kk + 1)){
612 pixelType = 5; // inter-ganged (dealt as normal)
613 break;
614 }
615 if(pixel_phi_on_chip == (153 + 2 * kk) || pixel_phi_on_chip >= 159){
616 pixelType = 2; // ganged
617 break;
618 }
619 }
620 }
621 else if(pixel_eta_on_chip == 0 || pixel_eta_on_chip == 18 - 1){
622 pixelType = 1; //long
623 for(int kk = 0; kk < 3; kk++){
624 if(pixel_phi_on_chip == (153 + 2 * kk + 1)){
625 pixelType = 6; // long inter-ganged (dealt as long)
626 break;
627 }
628 if(pixel_phi_on_chip == (153 + 2 * kk) || pixel_phi_on_chip >= 159){
629 pixelType = 3; // long ganged
630 break;
631 }
632 }
633 }
634 else
635 pixelType = 8; //invalid pixel_phi/pixel_eta pair
636 }
637 // to here
638
639 std::string type;
640
641
642 switch(pixelType) {
643 case 0:
644 type = "Normal";
645 break;
646 case 1:
647 type = "Long";
648 break;
649 case 2:
650 type = "Ganged";
651 break;
652 case 3:
653 type = "Long-Ganged";
654 break;
655 case 5:
656 type = "Long-InterGanged";
657 break;
658 case 6:
659 type = "InterGanged";
660 break;
661 case 8:
662 default:
663 type = "Invalid";
664 break;
665 }
666
667 double thiscut = cut;
668 if( type == "Ganged" ) thiscut *= m_gangedPixelMultiplier;
669 else if( type == "Long" ) thiscut *= m_longPixelMultiplier;
670 else if( type == "Long-InterGanged" ) thiscut *= m_longPixelMultiplier;
671 else if( type == "Long-Ganged" ) thiscut *= m_longPixelMultiplier * m_gangedPixelMultiplier;
672
673 if( type != "Invalid" ){
674 double occupancy = 0;
675 if( m_nEvents != 0 )
676 occupancy = static_cast<double>(m_hitMaps[modHash]->GetBinContent(pixel_eta+1, pixel_phi+1)) /
677 static_cast<double>(m_nEvents);
678
679 if( occupancy < minOccupancy ) occupancy = minOccupancy;
680 globalOccupancy->Fill(log10(occupancy));
681 h_occupancy[comp]->Fill(log10(occupancy));
682 h_occupancy[type]->Fill(log10(occupancy));
683
684 if( occupancy > thiscut ) {
685 thisModuleCut++;
686
688 m_noiseMaps[modHash]->Fill(pixel_eta, pixel_phi);
689 if (comp == "IBL") {
690 if(modEta >= -6 && modEta <= 5) m_overlayedIBLDCNoiseMap->Fill(pixel_eta, pixel_phi); // Planar
691 if(modEta <= -7 || modEta >= 6) m_overlayedIBLSCNoiseMap->Fill(pixel_eta, pixel_phi); // 3D
692 }
693 else m_overlayedPixelNoiseMap->Fill(pixel_eta, pixel_phi);
694 }
695 } else {
696 if(bec == 0) nhitsNoNoisePlot->Fill(modEta, modPhi, m_hitMaps[modHash]->GetBinContent(pixel_eta+1, pixel_phi+1));
697 }
698 } // end if ( type != "Invalid" )
699 } // end for loop on pixel_phi
700 } // end for loop on pixel_eta
701
702 if ( thisModuleCut > 0 ) {
703 totalDisabledPixels+=thisModuleCut;
704 maskedPlot->Fill( static_cast<double>(thisModuleCut) );
705 modulesWithDisabledPixels++;
706
707 if(bec == 0) {
708 if(layer == 0) { disablePlotBI->Fill(modEta, modPhi, thisModuleCut); }
709 else if(layer == 1) { disablePlotB0->Fill(modEta, modPhi, thisModuleCut); }
710 else if(layer == 2) { disablePlotB1->Fill(modEta, modPhi, thisModuleCut); }
711 else if(layer == 3) { disablePlotB2->Fill(modEta, modPhi, thisModuleCut); }
712 }
713 else if(bec == 2) { disablePlotEC->Fill(layer+1, modPhi, thisModuleCut); }
714 else if(bec == -2) { disablePlotEC->Fill(-(layer+1), modPhi, thisModuleCut); }
715 }
716 } // end loop in detector elements
717
718 ATH_MSG_INFO("Modules disabled = " << totalDisabledModules);
719 ATH_MSG_INFO("Modules with hits = " << modulesWithHits);
720 ATH_MSG_INFO("Modules with disabled pixels = " << modulesWithDisabledPixels);
721 ATH_MSG_INFO("Total disabled pixels = " << totalDisabledPixels);
722
723 return StatusCode::SUCCESS;
724
725} // end finalize
#define ATH_MSG_INFO(x)
TGraphErrors * GetEntries(TH2F *histo)
constexpr int pow(int base, int exp) noexcept
std::vector< TH2C * > m_noiseMaps
std::vector< Identifier >::const_iterator const_id_iterator
Definition PixelID.h:72
cut
This script demonstrates how to call a C++ class from Python Also how to use PyROOT is shown.
@ layer
Definition HitInfo.h:79
@ ident
Definition HitInfo.h:77
TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)

◆ getDCSIDFromPosition()

std::string OccupancyMapMaker::getDCSIDFromPosition ( int bec,
int layer,
int modPhi,
int modEta )
private

Definition at line 111 of file OccupancyMapMaker.cxx.

111 {
112 for(unsigned int ii = 0; ii < m_pixelMapping.size(); ii++) {
113 if (m_pixelMapping[ii].second.size() != 4) {
114 ATH_MSG_WARNING( "getDCSIDFromPosition: Vector size is not 4!" );
115 return std::string("Error!");
116 }
117 if (m_pixelMapping[ii].second[0] != barrel_ec) continue;
118 if (m_pixelMapping[ii].second[1] != layer) continue;
119 if (m_pixelMapping[ii].second[2] != modPhi) continue;
120 if (m_pixelMapping[ii].second[3] != module_eta) continue;
121 return m_pixelMapping[ii].first;
122 }
123 ATH_MSG_WARNING( "Not found!" );
124 return std::string("Error!");
125}
#define ATH_MSG_WARNING(x)
std::vector< std::pair< std::string, std::vector< int > > > m_pixelMapping

◆ histoSuffix()

const std::string OccupancyMapMaker::histoSuffix ( const int bec,
const int layer )
private

Definition at line 127 of file OccupancyMapMaker.cxx.

127 {
128 std::ostringstream out;
129
130 switch(bec) {
131 case 0:
132 out << "barrel/";
133 if(layer==0) { out << "IBL"; }
134 else if(layer==1) { out << "B-layer"; }
135 else { out << "Layer" << layer-1; }
136 break;
137 case +2: out << "endcapA/Disk" << layer+1; break;
138 case -2: out << "endcapC/Disk" << layer+1; break;
139 case +4: out << "DBMA/Layer" << layer+1; break;
140 case -4: out << "DBMC/Layer" << layer+1; break;
141 default: break;
142 }
143 return out.str();
144}

◆ initialize()

StatusCode OccupancyMapMaker::initialize ( )

Definition at line 91 of file OccupancyMapMaker.cxx.

91 {
92 ATH_MSG_INFO("Initializing OccupancyMapMaker");
93
94 ATH_CHECK(m_tHistSvc.retrieve());
96 ATH_CHECK(detStore()->retrieve(m_pixelID, "PixelID"));
97
98 // resize vectors of histograms
99 const Identifier::size_type maxHash = m_pixelID->wafer_hash_max();
100 ATH_MSG_INFO("PixelID maxHash = " << maxHash);
101 m_hitMaps.resize(maxHash);
102 m_LBdependence.resize(maxHash);
103 m_BCIDdependence.resize(maxHash);
104 m_TOTdistributions.resize(maxHash);
106 m_noiseMaps.resize(maxHash);
107 }
108 return registerHistograms();
109}
#define ATH_CHECK
Evaluate an expression and check for errors.
const ServiceHandle< StoreGateSvc > & detStore() const
StatusCode registerHistograms()
retrieve(aClass, aKey=None)
Definition PyKernel.py:110

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ msg()

MsgStream & AthCommonMsg< Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ registerHistograms()

StatusCode OccupancyMapMaker::registerHistograms ( )
private

Definition at line 164 of file OccupancyMapMaker.cxx.

164 {
165
166 char* getenvPath = std::getenv("DATAPATH");
167 const unsigned int maxPathStringLength{3000};
168 if((not getenvPath) or (strlen(getenvPath) > maxPathStringLength) ){
169 ATH_MSG_FATAL( "Unable to retrieve environmental DATAPATH" );
170 return StatusCode::FAILURE;
171 }
172 std::stringstream tmpSstr{};
173 tmpSstr<<getenvPath;
174 std::string tmppath(tmpSstr.str());
175
176 std::vector<std::string> paths = splitter(tmppath, ':');
177 bool found(false);
178 for(const auto& x : paths){
179 std::ifstream infile( (x+"/"+m_mapFile).c_str() );
180 if( infile.is_open() ){
181 ATH_MSG_INFO("Mapping file '" << m_mapFile << "' found in " << x);
182
183 int tmp_barrel_ec; int tmp_layer; int tmp_modPhi; int tmp_module_eta; std::string tmp_module_name;
184 std::vector<int> tmp_position;
185 tmp_position.resize(4);
186 while(infile >> tmp_barrel_ec >> tmp_layer >> tmp_modPhi >> tmp_module_eta >> tmp_module_name) {
187 tmp_position[0] = tmp_barrel_ec;
188 tmp_position[1] = tmp_layer;
189 tmp_position[2] = tmp_modPhi;
190 tmp_position[3] = tmp_module_eta;
191 m_pixelMapping.push_back(std::make_pair(tmp_module_name, tmp_position));
192 }
193
194 found=true;
195 infile.close();
196 break;
197 }
198 }
199
200 if( !found ){
201 ATH_MSG_FATAL("Mapping file '" << m_mapFile << "' not found in DATAPATH !!!");
202 return StatusCode::FAILURE;
203 }
204
205 m_nEventsHist = new TH1D("NEvents", "NEvents", 1, 0, 1);
206 m_tHistSvc->regHist("/histfile/NEvents", m_nEventsHist).ignore();
207
208 m_nEventsLBHist = new TH1D("NEventsLB", "NEventsLB", m_hist_lbMax, -0.5, m_hist_lbMax+0.5);
209 m_tHistSvc->regHist("/histfile/NEventsLB", m_nEventsLBHist).ignore();
210
211 for (PixelID::const_id_iterator wafer_it=m_pixelID->wafer_begin(); wafer_it!=m_pixelID->wafer_end(); ++wafer_it) {
212 Identifier ident = *wafer_it;
213 if(!m_pixelID->is_pixel(ident)) continue;
214
215 //const InDetDD::PixelModuleDesign* design = dynamic_cast<const InDetDD::PixelModuleDesign*>(&element->design());
216 //if(!design) continue;
217 //unsigned int mchips = design->numberOfCircuits();
218
219 int bec = m_pixelID->barrel_ec(ident);
220 int layer = m_pixelID->layer_disk(ident);
221 int modPhi = m_pixelID->phi_module(ident);
222 int module_eta = m_pixelID->eta_module(ident);
223 int modHash = m_pixelID->wafer_hash(ident);
224
225 std::string onlineID =
226 getDCSIDFromPosition(bec,layer,modPhi,module_eta);
227
228 std::ostringstream name;
229
230 // hitmap
231 if( bec == 0 && layer == 0) // IBL
232 m_hitMaps[modHash] = new TH2D(onlineID.c_str(), onlineID.c_str(), 160, 0, 160, 336, 0, 336);
233 else if( abs(bec) == 4 ) // DBM
234 m_hitMaps[modHash] = new TH2D(onlineID.c_str(), onlineID.c_str(), 80, 0, 80, 336, 0, 336);
235 else
236 m_hitMaps[modHash] = new TH2D(onlineID.c_str(), onlineID.c_str(), 144, 0, 144, 328, 0, 328);
237 name << "/histfile/hitMaps_" << histoSuffix(bec,layer) << "/" << onlineID;
238 m_tHistSvc->regHist(name.str().c_str(), m_hitMaps[modHash]).ignore();
239 name.str(""); name.clear();
240
241
242 // LB dependence
243 m_LBdependence[modHash] = new TH1D(onlineID.c_str(), onlineID.c_str(), m_hist_lbMax, -0.5, m_hist_lbMax + 0.5);
244 name << "/histfile/LBdep_" << histoSuffix(bec,layer) << "/" << onlineID;
245 m_tHistSvc->regHist(name.str().c_str(), m_LBdependence[modHash]).ignore();
246 name.str(""); name.clear();
247
248 // BCID dependence
249 m_BCIDdependence[modHash] = new TH1D(onlineID.c_str(), onlineID.c_str(), 301, -0.5, 300.5);
250 name << "/histfile/BCIDdep_" << histoSuffix(bec,layer) << "/" << onlineID;
251 m_tHistSvc->regHist(name.str().c_str(), m_BCIDdependence[modHash]).ignore();
252 name.str(""); name.clear();
253
254 // TOT
255 if( bec == 0 && layer == 0) // IBL
256 m_TOTdistributions[modHash] = new TH1D(onlineID.c_str(), onlineID.c_str(), 19, -0.5, 18.5);
257 else
258 m_TOTdistributions[modHash] = new TH1D(onlineID.c_str(), onlineID.c_str(), 256, -0.5, 255.5);
259 name << "/histfile/TOT_" << histoSuffix(bec,layer) << "/" << onlineID;
260 m_tHistSvc->regHist(name.str().c_str(), m_TOTdistributions[modHash]).ignore();
261 name.str(""); name.clear();
262
263 // noisemap
265 if( bec == 0 && layer == 0) // IBL
266 m_noiseMaps[modHash] = new TH2C(onlineID.c_str(), onlineID.c_str(), 160, 0, 160, 336, 0, 336);
267 else if( abs(bec) == 4 ) // DBM
268 m_noiseMaps[modHash] = new TH2C(onlineID.c_str(), onlineID.c_str(), 80, 0, 80, 336, 0, 336);
269 else
270 m_noiseMaps[modHash] = new TH2C(onlineID.c_str(), onlineID.c_str(), 144, 0, 144, 328, 0, 328);
271 name << "/histfile/noiseMaps_" << histoSuffix(bec,layer) << "/" << onlineID;
272 m_tHistSvc->regHist(name.str().c_str(), m_noiseMaps[modHash]).ignore();
273 name.str(""); name.clear();
274 }
275 } // end loop in detector elements
276
277 m_disabledModules = new TH1D("DisabledModules", "Number of events disabled vs. IdentifierHash", 2048, 0, 2048);
278 m_tHistSvc->regHist("/histfile/DisabledModules", m_disabledModules).ignore();
279
281 m_overlayedPixelNoiseMap = new TH2D("overlayedPixelNoiseMap", "Noisy pixel map overlayed all Pixel modules", 144, 0, 144, 328, 0, 328);
282 m_tHistSvc->regHist("/histfile/overlayedPixelNoiseMap", m_overlayedPixelNoiseMap).ignore();
283
284 m_overlayedIBLDCNoiseMap = new TH2D("overlayedIBLDCNoiseMap", "Noisy pixel map overlayed all IBL Planar modules", 160, 0, 160, 336, 0, 336);
285 m_tHistSvc->regHist("/histfile/overlayedIBLDCNoiseMap", m_overlayedIBLDCNoiseMap).ignore();
286
287 m_overlayedIBLSCNoiseMap = new TH2D("overlayedIBLSCNoiseMap", "Noisy pixel map overlayed all IBL 3D modules", 80, 0, 80, 336, 0, 336);
288 m_tHistSvc->regHist("/histfile/overlayedIBLSCNoiseMap", m_overlayedIBLSCNoiseMap).ignore();
289 }
290
291 return StatusCode::SUCCESS;
292}
#define x
const std::string histoSuffix(const int bec, const int layer)
std::vector< std::string > & splitter(const std::string &str, char delim, std::vector< std::string > &elems)
std::string getDCSIDFromPosition(int bec, int layer, int modPhi, int modEta)
str infile
Definition run.py:13

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ splitter() [1/2]

std::vector< std::string > OccupancyMapMaker::splitter ( const std::string & str,
char delim )
private

Definition at line 157 of file OccupancyMapMaker.cxx.

158 {
159 std::vector<std::string> elems;
160 splitter(str, delim, elems);
161 return elems;
162}

◆ splitter() [2/2]

std::vector< std::string > & OccupancyMapMaker::splitter ( const std::string & str,
char delim,
std::vector< std::string > & elems )
private

Definition at line 146 of file OccupancyMapMaker.cxx.

148 {
149 std::stringstream ss(str);
150 std::string item;
151 while (std::getline(ss, item, delim)) {
152 elems.push_back(item);
153 }
154 return elems;
155}
static Double_t ss

◆ sysInitialize()

StatusCode AthAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, and PyAthena::Alg.

Definition at line 66 of file AthAlgorithm.cxx.

66 {
68
69 if (sc.isFailure()) {
70 return sc;
71 }
72 ServiceHandle<ICondSvc> cs("CondSvc",name());
73 for (auto h : outputHandles()) {
74 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75 // do this inside the loop so we don't create the CondSvc until needed
76 if ( cs.retrieve().isFailure() ) {
77 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78 return StatusCode::SUCCESS;
79 }
80 if (cs->regHandle(this,*h).isFailure()) {
81 sc = StatusCode::FAILURE;
82 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83 << " with CondSvc");
84 }
85 }
86 }
87 return sc;
88}
#define ATH_MSG_ERROR(x)
virtual StatusCode sysInitialize() override
Override sysInitialize.
AthCommonDataStore(const std::string &name, T... args)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_BCIDdependence

std::vector<TH1D*> OccupancyMapMaker::m_BCIDdependence
private

Definition at line 66 of file OccupancyMapMaker.h.

◆ m_bLayerCut

double OccupancyMapMaker::m_bLayerCut
private

Definition at line 83 of file OccupancyMapMaker.h.

◆ m_calculateNoiseMaps

bool OccupancyMapMaker::m_calculateNoiseMaps
private

Definition at line 102 of file OccupancyMapMaker.h.

◆ m_dbmCut

double OccupancyMapMaker::m_dbmCut
private

Definition at line 86 of file OccupancyMapMaker.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_disabledModules

TH1D* OccupancyMapMaker::m_disabledModules
private

Definition at line 69 of file OccupancyMapMaker.h.

◆ m_disk1ACut

double OccupancyMapMaker::m_disk1ACut
private

Definition at line 76 of file OccupancyMapMaker.h.

◆ m_disk1CCut

double OccupancyMapMaker::m_disk1CCut
private

Definition at line 79 of file OccupancyMapMaker.h.

◆ m_disk2ACut

double OccupancyMapMaker::m_disk2ACut
private

Definition at line 77 of file OccupancyMapMaker.h.

◆ m_disk2CCut

double OccupancyMapMaker::m_disk2CCut
private

Definition at line 80 of file OccupancyMapMaker.h.

◆ m_disk3ACut

double OccupancyMapMaker::m_disk3ACut
private

Definition at line 78 of file OccupancyMapMaker.h.

◆ m_disk3CCut

double OccupancyMapMaker::m_disk3CCut
private

Definition at line 81 of file OccupancyMapMaker.h.

◆ m_evt_lbMax

unsigned int OccupancyMapMaker::m_evt_lbMax
private

Definition at line 100 of file OccupancyMapMaker.h.

◆ m_evt_lbMin

unsigned int OccupancyMapMaker::m_evt_lbMin
private

Definition at line 99 of file OccupancyMapMaker.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_gangedPixelMultiplier

double OccupancyMapMaker::m_gangedPixelMultiplier
private

Definition at line 91 of file OccupancyMapMaker.h.

◆ m_hist_lbMax

int OccupancyMapMaker::m_hist_lbMax
private

Definition at line 88 of file OccupancyMapMaker.h.

◆ m_hitMaps

std::vector<TH2D*> OccupancyMapMaker::m_hitMaps
private

Definition at line 63 of file OccupancyMapMaker.h.

◆ m_iblCut

double OccupancyMapMaker::m_iblCut
private

Definition at line 82 of file OccupancyMapMaker.h.

◆ m_layer1Cut

double OccupancyMapMaker::m_layer1Cut
private

Definition at line 84 of file OccupancyMapMaker.h.

◆ m_layer2Cut

double OccupancyMapMaker::m_layer2Cut
private

Definition at line 85 of file OccupancyMapMaker.h.

◆ m_LBdependence

std::vector<TH1D*> OccupancyMapMaker::m_LBdependence
private

Definition at line 65 of file OccupancyMapMaker.h.

◆ m_longPixelMultiplier

double OccupancyMapMaker::m_longPixelMultiplier
private

Definition at line 90 of file OccupancyMapMaker.h.

◆ m_mapFile

std::string OccupancyMapMaker::m_mapFile
private

Definition at line 104 of file OccupancyMapMaker.h.

◆ m_moduleHashList

std::vector<int> OccupancyMapMaker::m_moduleHashList
private

Definition at line 56 of file OccupancyMapMaker.h.

◆ m_nBCReadout

unsigned int OccupancyMapMaker::m_nBCReadout
private

Definition at line 97 of file OccupancyMapMaker.h.

◆ m_nEvents

double OccupancyMapMaker::m_nEvents
private

Definition at line 58 of file OccupancyMapMaker.h.

◆ m_nEventsHist

TH1D* OccupancyMapMaker::m_nEventsHist
private

Definition at line 61 of file OccupancyMapMaker.h.

◆ m_nEventsLBHist

TH1D* OccupancyMapMaker::m_nEventsLBHist
private

Definition at line 62 of file OccupancyMapMaker.h.

◆ m_noiseMaps

std::vector<TH2C*> OccupancyMapMaker::m_noiseMaps
private

Definition at line 64 of file OccupancyMapMaker.h.

◆ m_occupancyPerBC

bool OccupancyMapMaker::m_occupancyPerBC
private

Definition at line 95 of file OccupancyMapMaker.h.

◆ m_overlayedIBLDCNoiseMap

TH2D* OccupancyMapMaker::m_overlayedIBLDCNoiseMap
private

Definition at line 71 of file OccupancyMapMaker.h.

◆ m_overlayedIBLSCNoiseMap

TH2D* OccupancyMapMaker::m_overlayedIBLSCNoiseMap
private

Definition at line 72 of file OccupancyMapMaker.h.

◆ m_overlayedPixelNoiseMap

TH2D* OccupancyMapMaker::m_overlayedPixelNoiseMap
private

Definition at line 70 of file OccupancyMapMaker.h.

◆ m_pixelConditionsTool

ToolHandle<IInDetConditionsTool> OccupancyMapMaker::m_pixelConditionsTool {this, "PixelConditionsSummaryTool", "PixelConditionsSummaryTool", "Tool to retrieve Pixel Conditions summary"}
private

Definition at line 47 of file OccupancyMapMaker.h.

48{this, "PixelConditionsSummaryTool", "PixelConditionsSummaryTool", "Tool to retrieve Pixel Conditions summary"};

◆ m_pixelID

const PixelID* OccupancyMapMaker::m_pixelID
private

Definition at line 50 of file OccupancyMapMaker.h.

◆ m_pixelMapping

std::vector< std::pair< std::string, std::vector<int> > > OccupancyMapMaker::m_pixelMapping
private

Definition at line 53 of file OccupancyMapMaker.h.

◆ m_pixelRDOKey

std::string OccupancyMapMaker::m_pixelRDOKey
private

Definition at line 55 of file OccupancyMapMaker.h.

◆ m_tHistSvc

ServiceHandle<ITHistSvc> OccupancyMapMaker::m_tHistSvc
private

Definition at line 45 of file OccupancyMapMaker.h.

◆ m_TOTdistributions

std::vector<TH1D*> OccupancyMapMaker::m_TOTdistributions
private

Definition at line 67 of file OccupancyMapMaker.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


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