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 (const EventContext &ctx)
 Execute method.
StatusCode finalize ()
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
bool filterPassed (const EventContext &ctx) const
void setFilterPassed (bool state, const EventContext &ctx) const
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
const EventContext & getContext () const
 Deprecated methods (use the ones with EventContext).
bool filterPassed () const
void setFilterPassed (bool state) const

Protected Member Functions

virtual bool isReEntrant () const override final
 Legacy algorithms are not thread-safe.
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< Gaudi::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(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
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< Gaudi::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< Gaudi::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< Gaudi::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< Gaudi::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 ( const EventContext & ctx)
virtual

Execute method.

Provides access to the EventContext if needed but is non-const as opposed to AthReentrantAlgorithm.

Implements AthAlgorithm.

Definition at line 299 of file OccupancyMapMaker.cxx.

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

◆ filterPassed() [1/2]

bool AthAlgorithm::filterPassed ( ) const
inherited

Definition at line 94 of file AthAlgorithm.cxx.

94 {
95 return filterPassed( Gaudi::Hive::currentContext() );
96}
bool filterPassed() const

◆ filterPassed() [2/2]

bool AthAlgorithm::filterPassed ( const EventContext & ctx) const
inherited

Definition at line 98 of file AthAlgorithm.cxx.

98 {
99 return execState( ctx ).filterPassed();
100}

◆ finalize()

StatusCode OccupancyMapMaker::finalize ( )

Definition at line 379 of file OccupancyMapMaker.cxx.

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

◆ getContext()

const EventContext & AthAlgorithm::getContext ( ) const
inherited

Deprecated methods (use the ones with EventContext).

Definition at line 90 of file AthAlgorithm.cxx.

90 {
91 return Gaudi::Hive::currentContext();
92}

◆ 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()

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::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.

◆ isReEntrant()

virtual bool AthAlgorithm::isReEntrant ( ) const
inlinefinaloverrideprotectedvirtualinherited

Legacy algorithms are not thread-safe.

Definition at line 111 of file AthAlgorithm.h.

111{ return false; }

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

bool AthCommonMsg< Gaudi::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< Gaudi::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)
list paths
Definition grepfile.py:35

◆ 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< Gaudi::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< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed() [1/2]

void AthAlgorithm::setFilterPassed ( bool state) const
inherited

Definition at line 102 of file AthAlgorithm.cxx.

102 {
103 setFilterPassed( state, Gaudi::Hive::currentContext() );
104}
void setFilterPassed(bool state) const

◆ setFilterPassed() [2/2]

void AthAlgorithm::setFilterPassed ( bool state,
const EventContext & ctx ) const
inherited

Definition at line 106 of file AthAlgorithm.cxx.

106 {
107 execState( ctx ).setFilterPassed(state);
108}

◆ 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< Gaudi::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< Gaudi::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< Gaudi::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 }

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< Gaudi::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< Gaudi::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 114 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< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


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