ATLAS Offline Software
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
MMRawDataMonAlg Class Reference

#include <MMRawDataMonAlg.h>

Inheritance diagram for MMRawDataMonAlg:
Collaboration diagram for MMRawDataMonAlg:

Public Types

enum  Environment_t {
  Environment_t::user = 0, Environment_t::online, Environment_t::tier0, Environment_t::tier0Raw,
  Environment_t::tier0ESD, Environment_t::AOD, Environment_t::altprod
}
 Specifies the processing environment. More...
 
enum  DataType_t {
  DataType_t::userDefined = 0, DataType_t::monteCarlo, DataType_t::collisions, DataType_t::cosmics,
  DataType_t::heavyIonCollisions
}
 Specifies what type of input data is being monitored. More...
 

Public Member Functions

 MMRawDataMonAlg (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual ~MMRawDataMonAlg ()=default
 
virtual StatusCode initialize () override
 initialize More...
 
virtual StatusCode fillHistograms (const EventContext &ctx) const override
 adds event to the monitoring histograms More...
 
virtual StatusCode execute (const EventContext &ctx) const override
 Applies filters and trigger requirements. More...
 
void fill (const ToolHandle< GenericMonitoringTool > &groupHandle, std::vector< std::reference_wrapper< Monitored::IMonitoredVariable >> &&variables) const
 Fills a vector of variables to a group by reference. More...
 
void fill (const ToolHandle< GenericMonitoringTool > &groupHandle, const std::vector< std::reference_wrapper< Monitored::IMonitoredVariable >> &variables) const
 Fills a vector of variables to a group by reference. More...
 
template<typename... T>
void fill (const ToolHandle< GenericMonitoringTool > &groupHandle, T &&... variables) const
 Fills a variadic list of variables to a group by reference. More...
 
void fill (const std::string &groupName, std::vector< std::reference_wrapper< Monitored::IMonitoredVariable >> &&variables) const
 Fills a vector of variables to a group by name. More...
 
void fill (const std::string &groupName, const std::vector< std::reference_wrapper< Monitored::IMonitoredVariable >> &variables) const
 Fills a vector of variables to a group by name. More...
 
template<typename... T>
void fill (const std::string &groupName, T &&... variables) const
 Fills a variadic list of variables to a group by name. More...
 
Environment_t environment () const
 Accessor functions for the environment. More...
 
Environment_t envStringToEnum (const std::string &str) const
 Convert the environment string from the python configuration to an enum object. More...
 
DataType_t dataType () const
 Accessor functions for the data type. More...
 
DataType_t dataTypeStringToEnum (const std::string &str) const
 Convert the data type string from the python configuration to an enum object. More...
 
const ToolHandle< GenericMonitoringTool > & getGroup (const std::string &name) const
 Get a specific monitoring tool from the tool handle array. More...
 
const ToolHandle< Trig::TrigDecisionTool > & getTrigDecisionTool () const
 Get the trigger decision tool member. More...
 
bool trigChainsArePassed (const std::vector< std::string > &vTrigNames) const
 Check whether triggers are passed. More...
 
SG::ReadHandle< xAOD::EventInfoGetEventInfo (const EventContext &) const
 Return a ReadHandle for an EventInfo object (get run/event numbers, etc.) More...
 
virtual float lbAverageInteractionsPerCrossing (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate the average mu, i.e. More...
 
virtual float lbInteractionsPerCrossing (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate instantaneous number of interactions, i.e. More...
 
virtual float lbAverageLuminosity (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate average luminosity (in ub-1 s-1 => 10^30 cm-2 s-1). More...
 
virtual float lbLuminosityPerBCID (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate the instantaneous luminosity per bunch crossing. More...
 
virtual double lbDuration (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate the duration of the luminosity block (in seconds) More...
 
virtual float lbAverageLivefraction (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate the average luminosity livefraction. More...
 
virtual float livefractionPerBCID (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate the live fraction per bunch crossing ID. More...
 
virtual double lbLumiWeight (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate the average integrated luminosity multiplied by the live fraction. More...
 
virtual StatusCode parseList (const std::string &line, std::vector< std::string > &result) const
 Parse a string into a vector. More...
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual bool isClonable () const override
 Specify if the algorithm is clonable. More...
 
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
 
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
virtual bool filterPassed (const EventContext &ctx) const
 
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
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. More...
 

Protected Attributes

ToolHandleArray< GenericMonitoringToolm_tools {this,"GMTools",{}}
 Array of Generic Monitoring Tools. More...
 
PublicToolHandle< Trig::TrigDecisionToolm_trigDecTool {this, "TrigDecisionTool",""}
 Tool to tell whether a specific trigger is passed. More...
 
ToolHandleArray< IDQFilterToolm_DQFilterTools {this,"FilterTools",{}}
 Array of Data Quality filter tools. More...
 
SG::ReadCondHandleKey< LuminosityCondDatam_lumiDataKey {this,"LuminosityCondDataKey","LuminosityCondData","SG Key of LuminosityCondData object"}
 
SG::ReadCondHandleKey< LBDurationCondDatam_lbDurationDataKey {this,"LBDurationCondDataKey","LBDurationCondData","SG Key of LBDurationCondData object"}
 
SG::ReadCondHandleKey< TrigLiveFractionCondDatam_trigLiveFractionDataKey {this,"TrigLiveFractionCondDataKey","TrigLiveFractionCondData", "SG Key of TrigLiveFractionCondData object"}
 
AthMonitorAlgorithm::Environment_t m_environment
 Instance of the Environment_t enum. More...
 
AthMonitorAlgorithm::DataType_t m_dataType
 Instance of the DataType_t enum. More...
 
Gaudi::Property< std::string > m_environmentStr {this,"Environment","user"}
 Environment string pulled from the job option and converted to enum. More...
 
Gaudi::Property< std::string > m_dataTypeStr {this,"DataType","userDefined"}
 DataType string pulled from the job option and converted to enum. More...
 
Gaudi::Property< std::string > m_triggerChainString {this,"TriggerChain",""}
 Trigger chain string pulled from the job option and parsed into a vector. More...
 
std::vector< std::string > m_vTrigChainNames
 Vector of trigger chain names parsed from trigger chain string. More...
 
Gaudi::Property< std::string > m_fileKey {this,"FileKey",""}
 Internal Athena name for file. More...
 
Gaudi::Property< bool > m_useLumi {this,"EnableLumi",false}
 Allows use of various luminosity functions. More...
 
Gaudi::Property< float > m_defaultLBDuration {this,"DefaultLBDuration",60.}
 Default duration of one lumi block. More...
 
Gaudi::Property< int > m_detailLevel {this,"DetailLevel",0}
 Sets the level of detail used in the monitoring. More...
 
SG::ReadHandleKey< xAOD::EventInfom_EventInfoKey {this,"EventInfoKey","EventInfo"}
 Key for retrieving EventInfo from StoreGate. More...
 

Private Types

typedef std::vector< std::reference_wrapper< Monitored::IMonitoredVariable > > MonVarVec_t
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

StatusCode fillMMOverviewVects (const Muon::MMPrepData *, MMOverviewHistogramStruct &vects, MMByPhiStruct(&occupancyPlots)[16][2]) const
 
void fillMMOverviewHistograms (const MMOverviewHistogramStruct &vects, MMByPhiStruct(&occupancyPlots)[16][2], const int lb) const
 
StatusCode fillMMSummaryVects (const Muon::MMPrepData *, MMSummaryHistogramStruct(&vects)[2][16][2][2][4]) const
 
StatusCode fillMMHistograms (const Muon::MMPrepData *) const
 
StatusCode fillMMSummaryHistograms (const MMSummaryHistogramStruct(&vects)[2][16][2][2][4]) const
 
void clusterFromTrack (const xAOD::TrackParticleContainer *, const int lb) const
 
void clusterFromSegments (const Trk::SegmentCollection *, const int lb) const
 
int get_PCB_from_channel (const int channel) const
 
int get_FEB_from_channel (const int channel, const int stEta) const
 
int get_sectorPhi_from_stationPhi_stName (const int stationPhi, const std::string &stName) const
 
int get_sectorEta_from_stationEta (const int stationEta) const
 
int get_bin_for_occ_CSide_hist (const int stationEta, const int multiplet, const int gas_gap) const
 
int get_bin_for_occ_ASide_hist (const int stationEta, const int multiplet, const int gas_gap) const
 
int get_bin_for_occ (const int gas_gap, const int PCB) const
 
int get_bin_for_feb_occ (const int gas_gap, const int FEB) const
 
int get_bin_for_occ_CSide_pcb_eta2_hist (const int stationEta, const int multiplet, const int gas_gap, const int PCB) const
 
int get_bin_for_occ_CSide_pcb_eta1_hist (const int stationEta, const int multiplet, const int gas_gap, const int PCB) const
 
int get_bin_for_occ_ASide_pcb_eta2_hist (const int stationEta, const int multiplet, const int gas_gap, const int PCB) const
 
int get_bin_for_occ_ASide_pcb_eta1_hist (const int stationEta, const int multiplet, const int gas_gap, const int PCB) const
 
int get_bin_for_occ_lb_CSide_pcb_eta2_hist (const int stationEta, const int multiplet, const int gas_gap, const int PCB, const int isector) const
 
int get_bin_for_occ_lb_CSide_pcb_eta1_hist (const int stationEta, const int multiplet, const int gas_gap, const int PCB, int isector) const
 
int get_bin_for_occ_lb_ASide_pcb_eta1_hist (const int stationEta, const int multiplet, const int gas_gap, const int PCB, int isector) const
 
int get_bin_for_occ_lb_ASide_pcb_eta2_hist (const int stationEta, const int multiplet, const int gas_gap, const int PCB, const int isector) const
 
int get_bin_for_occ_lb_pcb_hist (const int multiplet, const int gas_gap, const int PCB) const
 
void MMEfficiency (const xAOD::TrackParticleContainer *) const
 
void fillMMTrigger (const xAOD::NSWMMTPRDOContainer *, const int) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
 
ToolHandle< CP::IMuonSelectionToolm_muonSelectionTool {this,"MuonSelectionTool","CP::MuonSelectionTool/MuonSelectionTool"}
 
SG::ReadCondHandleKey< MuonGM::MuonDetectorManagerm_DetectorManagerKey {this, "DetectorManagerKey", "MuonDetectorManager","Key of input MuonDetectorManager condition data"}
 
SG::ReadHandleKey< Trk::SegmentCollectionm_segm_type {this,"Eff_segm_type","TrackMuonSegments","muon segments"}
 
SG::ReadHandleKey< Muon::MMPrepDataContainerm_MMContainerKey {this,"MMPrepDataContainerName","MM_Measurements"}
 
SG::ReadHandleKey< xAOD::MuonContainerm_muonKey {this,"MuonKey","Muons","muons"}
 
SG::ReadHandleKey< xAOD::TrackParticleContainerm_meTrkKey {this, "METrkContainer", "ExtrapolatedMuonTrackParticles"}
 
SG::ReadHandleKey< xAOD::NSWMMTPRDOContainerm_mmtpRdoKey {this, "NSW_MMTPDataKey", "NSW_MMTrigProcessor_RDO"}
 
Gaudi::Property< bool > m_doMMESD {this,"DoMMESD",true}
 
Gaudi::Property< bool > m_do_mm_overview {this,"do_mm_overview",true}
 
Gaudi::Property< bool > m_do_stereoCorrection {this,"do_stereoCorrection",false}
 
Gaudi::Property< float > m_cut_pt {this,"cut_pt",15000}
 
Gaudi::Property< bool > m_doDetailedHists {this,"doDetailedHists",true}
 
std::string m_name
 
std::unordered_map< std::string, size_t > m_toolLookupMap
 
const ToolHandle< GenericMonitoringToolm_dummy
 
Gaudi::Property< bool > m_enforceExpressTriggers
 
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 50 of file MMRawDataMonAlg.h.

Member Typedef Documentation

◆ MonVarVec_t

typedef std::vector<std::reference_wrapper<Monitored::IMonitoredVariable> > AthMonitorAlgorithm::MonVarVec_t
privateinherited

Definition at line 365 of file AthMonitorAlgorithm.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ DataType_t

enum AthMonitorAlgorithm::DataType_t
stronginherited

Specifies what type of input data is being monitored.

An enumeration of the different types of data the monitoring application may be running over. This can be used to select which histograms to produce, e.g. to prevent the production of colliding-beam histograms when running on cosmic-ray data. Strings of the same names may be given as jobOptions.

Enumerator
userDefined 
monteCarlo 
collisions 
cosmics 
heavyIonCollisions 

Definition at line 191 of file AthMonitorAlgorithm.h.

191  {
192  userDefined = 0,
193  monteCarlo,
194  collisions,
195  cosmics,
196  heavyIonCollisions,
197  };

◆ Environment_t

enum AthMonitorAlgorithm::Environment_t
stronginherited

Specifies the processing environment.

The running environment may be used to select which histograms are produced, and where they are located in the output. For example, the output paths of the histograms are different for the "user", "online" and the various offline flags. Strings of the same names may be given as jobOptions.

Enumerator
user 
online 
tier0 
tier0Raw 
tier0ESD 
AOD 
altprod 

Definition at line 172 of file AthMonitorAlgorithm.h.

172  {
173  user = 0,
174  online,
175  tier0,
176  tier0Raw,
177  tier0ESD,
178  AOD,
179  altprod,
180  };

Constructor & Destructor Documentation

◆ MMRawDataMonAlg()

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

Definition at line 98 of file MMRawDataMonAlg.cxx.

98  :
99  AthMonitorAlgorithm(name,pSvcLocator)
100 { }

◆ ~MMRawDataMonAlg()

virtual MMRawDataMonAlg::~MMRawDataMonAlg ( )
virtualdefault

Member Function Documentation

◆ cardinality()

unsigned int AthReentrantAlgorithm::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Override this to return 0 for reentrant algorithms.

Definition at line 55 of file AthReentrantAlgorithm.cxx.

56 {
57  return 0;
58 }

◆ clusterFromSegments()

void MMRawDataMonAlg::clusterFromSegments ( const Trk::SegmentCollection segms,
const int  lb 
) const
private

Definition at line 845 of file MMRawDataMonAlg.cxx.

846 {
847  MMOverviewHistogramStruct overviewPlots;
848  MMByPhiStruct occupancyPlots[16][2];
849  MMSummaryHistogramStruct summaryPlots[2][16][2][2][4];
850  int nseg=0;
851 
852  for (Trk::SegmentCollection::const_iterator s = segms->begin(); s != segms->end(); ++s) {
853  const Muon::MuonSegment* segment = dynamic_cast<const Muon::MuonSegment*>(*s);
854  if (segment == nullptr) {
855  ATH_MSG_DEBUG("no pointer to segment!!!");
856  break;
857  }
858  bool isMM=false;
859  for(unsigned int irot=0;irot<segment->numberOfContainedROTs();irot++){
860  const Trk::RIO_OnTrack* rot = segment->rioOnTrack(irot);
861  if(!rot) continue;
862  Identifier rot_id = rot->identify();
863  if(!m_idHelperSvc->isMM(rot_id)) continue;
864  isMM=true;
865  const Muon::MMClusterOnTrack* cluster = dynamic_cast<const Muon::MMClusterOnTrack*>(rot);
866  if(!cluster) continue;
867 
868  std::string stName = m_idHelperSvc->mmIdHelper().stationNameString(m_idHelperSvc->mmIdHelper().stationName(rot_id));
869  int stEta = m_idHelperSvc->mmIdHelper().stationEta(rot_id);
870  int stPhi = m_idHelperSvc->mmIdHelper().stationPhi(rot_id);
871  int multi = m_idHelperSvc->mmIdHelper().multilayer(rot_id);
872  int gap = m_idHelperSvc->mmIdHelper().gasGap(rot_id);
873  int ch = m_idHelperSvc->mmIdHelper().channel(rot_id);
874 
875  // MMS and MML phi sectors
876  int sectorPhi = get_sectorPhi_from_stationPhi_stName(stPhi,stName);
877  int PCB = get_PCB_from_channel(ch);
878  int iside = (stEta > 0) ? 1 : 0;
879 
880  const Muon::MMPrepData* prd = cluster->prepRawData();
881  const std::vector<Identifier>& stripIds = prd->rdoList();
882  unsigned int csize = stripIds.size();
883  const std::vector<uint16_t>& stripNumbers = prd->stripNumbers();
884 
885  auto& pcb_vects = summaryPlots[iside][sectorPhi-1][std::abs(stEta)-1][multi-1][gap-1];
886  pcb_vects.cl_size.push_back(csize);
887  pcb_vects.pcb.push_back(PCB);
888  std::vector<short int> s_times = prd->stripTimes();
889  float c_time = 0;
890  for(unsigned int sIdx=0; sIdx<csize; ++sIdx) {
891  pcb_vects.strp_times.push_back(s_times.at(sIdx));
892  pcb_vects.pcb_strip.push_back( get_PCB_from_channel(stripNumbers[sIdx]));
893  c_time += s_times.at(sIdx);
894  }
895  c_time /= s_times.size();
896  pcb_vects.cl_times.push_back(c_time);
897 
898  float charge = prd->charge()*conversion_charge;
899  pcb_vects.charge.push_back(charge);
900 
901  auto& vects = overviewPlots;
902 
903  auto& thisSect = occupancyPlots[sectorPhi-1][iside];
904 
905  const int gap_offset=4;
906  int gas_gap8 = (multi==1) ? gap : gap + gap_offset;
907  int FEB = get_FEB_from_channel(ch, stEta);
908 
909  int bin=get_bin_for_feb_occ(gas_gap8,FEB);
910  thisSect.sector_lb_onseg.push_back(bin);
911 
912  if(stEta<0) {
913  vects.sector_CSide_onseg.push_back(bin);
914  vects.stationPhi_CSide_onseg.push_back(sectorPhi);
915  } else {
916  vects.sector_ASide_onseg.push_back(bin);
917  vects.stationPhi_ASide_onseg.push_back(sectorPhi);
918  }
919 
920  } // loop on ROT container
921  if (isMM==true) ++nseg;
922 
923  } // loop on segment collection
924  auto nsegs = Monitored::Scalar<int>("nseg",nseg);
925  fill("mmMonitor", nsegs);
926 
927  auto& vects = overviewPlots;
928  auto stationPhi_CSide_onseg = Monitored::Collection("stationPhi_CSide_onseg",vects.stationPhi_CSide_onseg);
929  auto stationPhi_ASide_onseg = Monitored::Collection("stationPhi_ASide_onseg",vects.stationPhi_ASide_onseg);
930  auto sector_ASide_onseg = Monitored::Collection("sector_ASide_onseg",vects.sector_ASide_onseg);
931  auto sector_CSide_onseg = Monitored::Collection("sector_CSide_onseg",vects.sector_CSide_onseg);
932 
933  auto lb_onseg = Monitored::Scalar<int>("lb_onseg", lb);
934 
935  fill("mmMonitor", stationPhi_CSide_onseg, stationPhi_ASide_onseg, sector_CSide_onseg, sector_ASide_onseg, lb_onseg);
936 
937  for(int iside = 0; iside < 2; ++iside) {
938  std::string MM_sideGroup = "MM_sideGroup" + MM_Side[iside];
939  for(int statPhi=0; statPhi<16; ++statPhi) {
940  auto& occ_lb = occupancyPlots[statPhi][iside];
941  auto sector_lb_onseg = Monitored::Collection("sector_lb_"+MM_Side[iside]+"_phi"+std::to_string(statPhi+1)+"_onseg",occ_lb.sector_lb_onseg);
942  fill(MM_sideGroup, lb_onseg, sector_lb_onseg);
943 
944  for(int statEta = 0; statEta < 2; ++statEta) {
945  for(int multiplet = 0; multiplet < 2; ++multiplet) {
946  for(int gas_gap = 0; gas_gap < 4; ++gas_gap) {
947  auto& pcb_vects = summaryPlots[iside][statPhi][statEta][multiplet][gas_gap];
948 
949  if(pcb_vects.pcb.empty()) continue;
950  if(m_doDetailedHists){
951  auto pcb_mon = Monitored::Collection("pcb_mon_onseg_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_eta" + std::to_string(statEta+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), pcb_vects.pcb);
952  auto pcb_strip_mon = Monitored::Collection("pcb_strip_mon_onseg_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_eta" + std::to_string(statEta+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), pcb_vects.pcb_strip);
953  auto strip_times = Monitored::Collection("strp_time_onseg_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_eta" + std::to_string(statEta+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), pcb_vects.strp_times);
954  auto cluster_time = Monitored::Collection("cluster_time_onseg_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_eta" + std::to_string(statEta+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), pcb_vects.cl_times);
955  auto clus_size = Monitored::Collection("cluster_size_onseg_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_eta" + std::to_string(statEta+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), pcb_vects.cl_size);
956  auto charge_perPCB = Monitored::Collection("charge_perPCB_onseg_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_eta" + std::to_string(statEta+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), pcb_vects.charge);
957 
958  fill(MM_sideGroup, clus_size, strip_times, charge_perPCB, cluster_time, pcb_mon, pcb_strip_mon);
959  }
960  auto clus_size_all = Monitored::Collection("cluster_size_onseg", pcb_vects.cl_size);
961  auto charge_all = Monitored::Collection("charge_onseg", pcb_vects.charge);
962  auto strip_times_all = Monitored::Collection("strp_time_onseg", pcb_vects.strp_times);
963  fill("mmMonitor", clus_size_all, charge_all, strip_times_all);
964  }
965  }
966  }
967  }
968  }
969 }

◆ clusterFromTrack()

void MMRawDataMonAlg::clusterFromTrack ( const xAOD::TrackParticleContainer muonContainer,
const int  lb 
) const
private

Definition at line 497 of file MMRawDataMonAlg.cxx.

498 {
499  MMSummaryHistogramStruct summaryPlots[2][2][4]; // side, multilayer, gas gap
500  MMSummaryHistogramStruct summaryPlots_full[2][16][2][2][4]; // side, phi, eta, multilayer, gas gap
501  MMSummaryHistogramStruct sumPlots[2][16][2][2][4]; // side, phi, eta, multilayer, gas gap
502  MMOverviewHistogramStruct overviewPlots;
503  MMByPhiStruct occupancyPlots[16][2]; // sector, side
504  int ntrk=0;
505  for(const xAOD::TrackParticle* meTP : *muonContainer) {
506 
507  if(!meTP) continue;
508  auto eta_trk = Monitored::Scalar<float>("eta_trk", meTP->eta());
509  auto phi_trk = Monitored::Scalar<float>("phi_trk", meTP->phi());
510  auto pt_trk = Monitored::Scalar<float>("pt_trk", meTP->pt()/1000.);
511 
512  //retrieve the original track
513  const Trk::Track* meTrack = meTP->track();
514 
515  if(!meTrack) continue;
516 
517  // get the vector of measurements on track
519  bool isMM=false;
520  for(const Trk::MeasurementBase* it : *meas) {
521  const Trk::RIO_OnTrack* rot = dynamic_cast<const Trk::RIO_OnTrack*>(it);
522  if(!rot) continue;
523  Identifier rot_id = rot->identify();
524  if(!m_idHelperSvc->isMM(rot_id)) continue;
525  isMM=true;
526  const Muon::MMClusterOnTrack* cluster = dynamic_cast<const Muon::MMClusterOnTrack*>(rot);
527  if(!cluster) continue;
528 
529  std::string stName = m_idHelperSvc->mmIdHelper().stationNameString(m_idHelperSvc->mmIdHelper().stationName(rot_id));
530  int stEta = m_idHelperSvc->mmIdHelper().stationEta(rot_id);
531  int stPhi = m_idHelperSvc->mmIdHelper().stationPhi(rot_id);
532  int multi = m_idHelperSvc->mmIdHelper().multilayer(rot_id);
533  int gap = m_idHelperSvc->mmIdHelper().gasGap(rot_id);
534  int ch = m_idHelperSvc->mmIdHelper().channel(rot_id);
535 
536  // MMS and MML phi sectors
537  // int phisec = (stNumber%2==0) ? 1 : 0;
538  int sectorPhi = get_sectorPhi_from_stationPhi_stName(stPhi,stName); // 1->16
539  int PCB = get_PCB_from_channel(ch);
540  int iside = (stEta > 0) ? 1 : 0;
541  auto& vects = overviewPlots;
542  auto& thisSect = occupancyPlots[sectorPhi-1][iside];
543 
544 
545  const Muon::MMPrepData* prd = cluster->prepRawData();
546  const std::vector<Identifier>& stripIds = prd->rdoList();
547  unsigned int csize = stripIds.size();
548  const std::vector<uint16_t>& stripNumbers = prd->stripNumbers();
549  float charge = prd->charge()*conversion_charge;
550  std::vector<short int> s_times = prd->stripTimes();
551 
552  vects.charge_all.push_back(charge);
553 
554  float c_time = 0;
555  for(unsigned int sIdx=0; sIdx<stripIds.size(); ++sIdx){
556  vects.strp_times.push_back(s_times.at(sIdx));
557  c_time += s_times.at(sIdx);
558  }
559  c_time /= s_times.size();
560  vects.cl_times.push_back(c_time);
561 
562  if(m_doDetailedHists){
563  auto& vect = sumPlots[iside][sectorPhi-1][std::abs(stEta)-1][multi-1][gap-1];
564  vect.cl_size.push_back(csize);
565  vect.pcb.push_back(PCB);
566  for(unsigned int sIdx=0; sIdx<stripIds.size(); ++sIdx)
567  {
568  vect.strip_number.push_back(stripNumbers[sIdx]);
569  vect.strp_times.push_back(s_times.at(sIdx));
570  vect.pcb_strip.push_back(get_PCB_from_channel(stripNumbers[sIdx]));
571  }
572  vect.cl_times.push_back(c_time);
573  vect.charge.push_back(charge);
574  }
575 
576 
577  const int gap_offset=4;
578  int gas_gap8 = (multi==1) ? gap : gap + gap_offset;
579 
580  int FEB = get_FEB_from_channel(ch, stEta);
581  int bin = get_bin_for_feb_occ(gas_gap8,FEB);
582  thisSect.sector_lb_ontrack.push_back(bin);
583  // Occupancy plots with FEB granularity further divided for each eta sector: -2, -1, 1, 2
584  // Filling Vectors for stationEta=-1 - cluster on track
585  if(stEta<0) {
586  vects.sector_CSide_ontrack.push_back(bin);
587  vects.stationPhi_CSide_ontrack.push_back(sectorPhi);
588  } else {
589  vects.sector_ASide_ontrack.push_back(bin);
590  vects.stationPhi_ASide_ontrack.push_back(sectorPhi);
591  }
592 
593  float x = cluster->localParameters()[Trk::loc1];
594  for(const Trk::TrackStateOnSurface* trkState : *meTrack->trackStateOnSurfaces()) {
595 
596  if(!(trkState)) continue;
597  if (!trkState->type(Trk::TrackStateOnSurface::Measurement)) continue;
598 
599  Identifier surfaceId = (trkState)->surface().associatedDetectorElementIdentifier();
600  if(!m_idHelperSvc->isMM(surfaceId)) continue;
601 
602  int trk_stEta = m_idHelperSvc->mmIdHelper().stationEta(surfaceId);
603  int trk_stPhi = m_idHelperSvc->mmIdHelper().stationPhi(surfaceId);
604  int trk_multi = m_idHelperSvc->mmIdHelper().multilayer(surfaceId);
605  int trk_gap = m_idHelperSvc->mmIdHelper().gasGap(surfaceId);
606 
607  if( (trk_stPhi == stPhi) && (trk_stEta == stEta) && (trk_multi == multi) && (trk_gap == gap)) {
608  double x_trk = trkState->trackParameters()->parameters()[Trk::loc1];
609  int sectorPhi = get_sectorPhi_from_stationPhi_stName(trk_stPhi,stName); // 1->16
610  int side = (stEta > 0) ? 1 : 0;
611  float res_stereo = (x - x_trk);
613  float stereo_angle = ((multi == 1 && gap < 3) || (multi == 2 && gap > 2)) ? 0 : 0.02618;
614  double y_trk = trkState->trackParameters()->parameters()[Trk::locY];
615  float stereo_correction = ( (multi == 1 && gap < 3) || (multi == 2 && gap > 2) ) ? 0 : ( ((multi == 1 && gap == 3) || (multi == 2 && gap ==1 )) ? (-std::sin(stereo_angle)*y_trk) : std::sin(stereo_angle)*y_trk );
616  res_stereo = (x - x_trk)*std::cos(stereo_angle) - stereo_correction;
617  }
618  auto residual_mon = Monitored::Scalar<float>("residual", res_stereo);
619  auto stPhi_mon = Monitored::Scalar<float>("stPhi_mon",sectorPhi);
620 
621  fill("mmMonitor", residual_mon, eta_trk, phi_trk, stPhi_mon);
622  int abs_stEta = get_sectorEta_from_stationEta(stEta); // 0 or 1
623 
624  if(m_doDetailedHists){
625  auto& vectors = summaryPlots_full[side][sectorPhi-1][abs_stEta][multi-1][gap-1];
626  vectors.residuals.push_back(res_stereo);
627  }
628  }
629  }//TrackStates
630 
631  } // loop on meas
632  if(isMM) {
633  ++ntrk;
634  fill("mmMonitor", pt_trk);
635  }
636 
637  if(m_doDetailedHists){
638  for(int iside = 0; iside < 2; ++iside) {
639  std::string MM_sideGroup = "MM_sideGroup" + MM_Side[iside];
640  for(int statPhi = 0; statPhi < 16; ++statPhi) {
641  // for(int statEta = 0; statEta < 2; ++statEta) {
642  for(int multiplet = 0; multiplet < 2; ++multiplet) {
643  for(int gas_gap = 0; gas_gap < 4; ++gas_gap) {
644  auto layer=gas_gap+multiplet*4;
645  MMSummaryHistogramStruct vects;
646  for(int statEta = 0; statEta < 2; ++statEta) {
647  vects = summaryPlots_full[iside][statPhi][statEta][multiplet][gas_gap];
648  auto residuals_gap = Monitored::Collection("residuals_"+MM_Side[iside]+"_phi"+std::to_string(statPhi+1)+"_stationEta"+EtaSector[statEta]+"_multiplet"+std::to_string(multiplet+1)+"_gas_gap"+std::to_string(gas_gap+1),vects.residuals);
649  auto residuals_layer = Monitored::Collection("residuals_"+MM_Side[iside]+"_phi"+std::to_string(statPhi+1)+"_layer"+std::to_string(layer+1),vects.residuals);
650 
651  fill(MM_sideGroup, residuals_gap,residuals_layer);
652  }
653  }
654  }
655  }
656  }
657  }
658 
659  for(const Trk::TrackStateOnSurface* trkState : *meTrack->trackStateOnSurfaces()) {
660  if(!(trkState)) continue;
661  if (!trkState->type(Trk::TrackStateOnSurface::Measurement)) continue;
662  Identifier surfaceId = (trkState)->surface().associatedDetectorElementIdentifier();
663  if(!m_idHelperSvc->isMM(surfaceId)) continue;
664 
665  const Trk::MeasurementBase* meas = trkState->measurementOnTrack() ;
666  if(!meas) continue;
667 
668  const Trk::RIO_OnTrack* rot = dynamic_cast<const Trk::RIO_OnTrack*>(meas);
669  if(!rot) continue;
670  Identifier rot_id = rot->identify();
671  if(!m_idHelperSvc->isMM(rot_id)) continue;
672 
673  const Amg::Vector3D& pos = (trkState)->trackParameters()->position();
674  int stEta = m_idHelperSvc->mmIdHelper().stationEta(surfaceId);
675  int multi = m_idHelperSvc->mmIdHelper().multilayer(surfaceId);
676  int gap = m_idHelperSvc->mmIdHelper().gasGap(surfaceId);
677 
678  // CSide and ASide
679  int iside = (stEta > 0) ? 1 : 0;
680  auto& Vectors = summaryPlots[iside][multi-1][gap-1];
681 
682  // Filling x-y position vectors using the trackStateonSurface
683  Vectors.x_ontrack.push_back(pos.x());
684  Vectors.y_ontrack.push_back(pos.y());
685  }
686  } // loop on muonContainer
687 
688  auto ntrack = Monitored::Scalar<int>("ntrk",ntrk);
689  fill("mmMonitor", ntrack);
690 
691  auto& vects = overviewPlots;
692  auto stationPhi_CSide_ontrack = Monitored::Collection("stationPhi_CSide_ontrack",vects.stationPhi_CSide_ontrack);
693  auto stationPhi_ASide_ontrack = Monitored::Collection("stationPhi_ASide_ontrack",vects.stationPhi_ASide_ontrack);
694  auto sector_ASide_ontrack = Monitored::Collection("sector_ASide_ontrack",vects.sector_ASide_ontrack);
695  auto sector_CSide_ontrack = Monitored::Collection("sector_CSide_ontrack",vects.sector_CSide_ontrack);
696 
697  auto lb_ontrack = Monitored::Scalar<int>("lb_ontrack", lb);
698  auto csize = Monitored::Collection("nstrips_ontrack", vects.numberofstrips_percluster);
699  auto charge = Monitored::Collection("charge_ontrack", vects.charge_all);
700  auto stime = Monitored::Collection("strip_time_on_track", vects.strp_times);
701  auto ctime = Monitored::Collection("cluster_time_on_track", vects.cl_times);
702 
703  fill("mmMonitor", csize, charge, stime, ctime, stationPhi_CSide_ontrack, stationPhi_ASide_ontrack, sector_CSide_ontrack,sector_ASide_ontrack, lb_ontrack);
704 
705  for(int iside = 0; iside < 2; ++iside) {
706  std::string MM_sideGroup = "MM_sideGroup" + MM_Side[iside];
707  for(int statPhi = 0; statPhi < 16; ++statPhi) {
708  for(int statEta = 0; statEta < 2; ++statEta) {
709  for(int multiplet = 0; multiplet < 2; ++multiplet) {
710  for(int gas_gap = 0; gas_gap < 4; ++gas_gap) {
711  auto& vects = sumPlots[iside][statPhi][statEta][multiplet][gas_gap];
712  if(m_doDetailedHists){
713  if(!vects.strip_number.empty())
714  {
715  auto clus_size = Monitored::Collection("cluster_size_ontrack_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_eta" + std::to_string(statEta+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), vects.cl_size);
716  auto strip_times = Monitored::Collection("strp_time_ontrack_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_eta" + std::to_string(statEta+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), vects.strp_times);
717  auto cluster_time = Monitored::Collection("cluster_time_ontrack_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_eta" + std::to_string(statEta+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), vects.cl_times);
718  auto charge_perPCB = Monitored::Collection("charge_perPCB_ontrack_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_eta" + std::to_string(statEta+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), vects.charge);
719  auto charge_perlayer = Monitored::Collection("charge_perlayer_ontrack_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), vects.charge);
720  auto clus_size_perlayer = Monitored::Collection("cluster_size_perlayer_ontrack_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), vects.cl_size);
721  auto pcb_mon = Monitored::Collection("pcb_mon_ontrack_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_eta" + std::to_string(statEta+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), vects.pcb);
722  auto pcb_strip_mon = Monitored::Collection("pcb_strip_mon_ontrack_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_eta" + std::to_string(statEta+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), vects.pcb_strip);
723 
724  fill(MM_sideGroup, clus_size, strip_times, cluster_time, charge_perPCB, pcb_mon, pcb_strip_mon,charge_perlayer,clus_size_perlayer);
725  }
726  }
727 
728  }
729  }
730  }
731  auto& occ_lb = occupancyPlots[statPhi][iside];
732  auto sector_lb_ontrack = Monitored::Collection("sector_lb_"+MM_Side[iside]+"_phi"+std::to_string(statPhi+1)+"_ontrack",occ_lb.sector_lb_ontrack);
733  fill(MM_sideGroup, lb_ontrack, sector_lb_ontrack);
734  }
735  for(int multiplet=0; multiplet<2; ++multiplet) {
736  for(int gas_gap=0; gas_gap<4; ++gas_gap) {
737  auto& Vectors = summaryPlots[iside][multiplet][gas_gap];
738  auto x_ontrack = Monitored::Collection("x_"+MM_Side[iside]+"_multiplet"+std::to_string(multiplet+1)+"_gas_gap_"+std::to_string(gas_gap+1)+"_ontrack", Vectors.x_ontrack);
739  auto y_ontrack = Monitored::Collection("y_"+MM_Side[iside]+"_multiplet"+std::to_string(multiplet+1)+"_gas_gap_"+std::to_string(gas_gap+1)+"_ontrack", Vectors.y_ontrack);
740  fill(MM_sideGroup, x_ontrack, y_ontrack);
741  }
742  }
743  }
744 
745 }

◆ dataType()

DataType_t AthMonitorAlgorithm::dataType ( ) const
inlineinherited

Accessor functions for the data type.

Returns
the current value of the class's DataType_t instance.

Definition at line 221 of file AthMonitorAlgorithm.h.

221 { return m_dataType; }

◆ dataTypeStringToEnum()

AthMonitorAlgorithm::DataType_t AthMonitorAlgorithm::dataTypeStringToEnum ( const std::string &  str) const
inherited

Convert the data type string from the python configuration to an enum object.

Returns
a value in the DataType_t enumeration which matches the input string.

Definition at line 140 of file AthMonitorAlgorithm.cxx.

140  {
141  // convert the string to all lowercase
142  std::string lowerCaseStr = str;
143  std::transform(lowerCaseStr.begin(), lowerCaseStr.end(), lowerCaseStr.begin(), ::tolower);
144 
145  // check if it matches one of the enum choices
146  if( lowerCaseStr == "userdefined" ) {
148  } else if( lowerCaseStr == "montecarlo" ) {
149  return DataType_t::monteCarlo;
150  } else if( lowerCaseStr == "collisions" ) {
151  return DataType_t::collisions;
152  } else if( lowerCaseStr == "cosmics" ) {
153  return DataType_t::cosmics;
154  } else if( lowerCaseStr == "heavyioncollisions" ) {
156  } else { // otherwise, warn the user and return "userDefined"
157  ATH_MSG_WARNING("AthMonitorAlgorithm::dataTypeStringToEnum(): Unknown data type "
158  <<str<<", returning userDefined.");
160  }
161 }

◆ declareGaudiProperty() [1/4]

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

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

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

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

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

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

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

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

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

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

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ 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.

95 { return m_detStore; }

◆ environment()

Environment_t AthMonitorAlgorithm::environment ( ) const
inlineinherited

Accessor functions for the environment.

Returns
the current value of the class's Environment_t instance.

Definition at line 205 of file AthMonitorAlgorithm.h.

205 { return m_environment; }

◆ envStringToEnum()

AthMonitorAlgorithm::Environment_t AthMonitorAlgorithm::envStringToEnum ( const std::string &  str) const
inherited

Convert the environment string from the python configuration to an enum object.

Returns
a value in the Environment_t enumeration which matches the input string.

Definition at line 112 of file AthMonitorAlgorithm.cxx.

112  {
113  // convert the string to all lowercase
114  std::string lowerCaseStr = str;
115  std::transform(lowerCaseStr.begin(), lowerCaseStr.end(), lowerCaseStr.begin(), ::tolower);
116 
117  // check if it matches one of the enum choices
118  if( lowerCaseStr == "user" ) {
119  return Environment_t::user;
120  } else if( lowerCaseStr == "online" ) {
121  return Environment_t::online;
122  } else if( lowerCaseStr == "tier0" ) {
123  return Environment_t::tier0;
124  } else if( lowerCaseStr == "tier0raw" ) {
126  } else if( lowerCaseStr == "tier0esd" ) {
128  } else if( lowerCaseStr == "aod" ) {
129  return Environment_t::AOD;
130  } else if( lowerCaseStr == "altprod" ) {
131  return Environment_t::altprod;
132  } else { // otherwise, warn the user and return "user"
133  ATH_MSG_WARNING("AthMonitorAlgorithm::envStringToEnum(): Unknown environment "
134  <<str<<", returning user.");
135  return Environment_t::user;
136  }
137 }

◆ evtStore() [1/2]

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.

85 { return m_evtStore; }

◆ evtStore() [2/2]

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

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

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode AthMonitorAlgorithm::execute ( const EventContext &  ctx) const
overridevirtualinherited

Applies filters and trigger requirements.

Then, calls fillHistograms().

Parameters
ctxevent context for reentrant Athena call
Returns
StatusCode

Definition at line 73 of file AthMonitorAlgorithm.cxx.

73  {
74 
75  // Checks that all of the DQ filters are passed. If any one of the filters
76  // fails, return SUCCESS code and do not fill the histograms with the event.
77  for ( const auto& filterItr : m_DQFilterTools ) {
78  if (!filterItr->accept()) {
79  ATH_MSG_DEBUG("Event rejected due to filter tool.");
80  return StatusCode::SUCCESS;
81  }
82  }
83 
84  // Trigger: If there is a decision tool and the chains fail, skip the event.
86  ATH_MSG_DEBUG("Event rejected due to trigger filter.");
87  return StatusCode::SUCCESS;
88  }
89 
90  ATH_MSG_DEBUG("Event accepted!");
91  return fillHistograms(ctx);
92 }

◆ 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 & AthReentrantAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 79 of file AthReentrantAlgorithm.cxx.

80 {
81  // If we didn't find any symlinks to add, just return the collection
82  // from the base class. Otherwise, return the extended collection.
83  if (!m_extendedExtraObjects.empty()) {
85  }
86  return Algorithm::extraOutputDeps();
87 }

◆ fillHistograms()

StatusCode MMRawDataMonAlg::fillHistograms ( const EventContext &  ctx) const
overridevirtual

adds event to the monitoring histograms

User will overwrite this function. Histogram booking is no longer done in C++. This function is called in execute once the filters are all passed.

Parameters
ctxforwarded from execute
Returns
StatusCode

Implements AthMonitorAlgorithm.

Definition at line 129 of file MMRawDataMonAlg.cxx.

130 {
131  int lumiblock = -1;
132  lumiblock = GetEventInfo(ctx)->lumiBlock();
133  ATH_MSG_DEBUG("MMRawDataMonAlg::MM RawData Monitoring Histograms being filled" );
134 
136  ATH_MSG_DEBUG("****** mmContainer->size() : " << mm_container->size());
137 
138  if(m_doMMESD) {
139  MMOverviewHistogramStruct overviewPlots;
140  MMSummaryHistogramStruct summaryPlots[2][16][2][2][4];
141  MMByPhiStruct occupancyPlots[16][2];
142 
143  //loop in MMPrepDataContainer
144  for(const Muon::MMPrepDataCollection* coll : *mm_container) {
145  for(const Muon::MMPrepData* prd : *coll) {
146  ATH_CHECK(fillMMOverviewVects(prd, overviewPlots, occupancyPlots));
147  ATH_CHECK(fillMMSummaryVects(prd, summaryPlots));
149  }
150  }
151 
152  if(m_do_mm_overview) fillMMOverviewHistograms(overviewPlots, occupancyPlots, lumiblock);
153 
154  ATH_CHECK(fillMMSummaryHistograms(summaryPlots));
156  if (!meTPContainer.isValid()) {
157  ATH_MSG_FATAL("Nope. Could not retrieve "<<m_meTrkKey.fullKey());
158  return StatusCode::FAILURE;
159  }
160  clusterFromTrack(meTPContainer.cptr(),lumiblock);
161  MMEfficiency(meTPContainer.cptr());
162 
163 
164 
165  //trigger
167  if (not rdos.isValid()) {
168  ATH_MSG_INFO("NSW MMTP failed. Skipping");
169  // return StatusCode::SUCCESS;
170  } else fillMMTrigger(rdos.cptr(),lumiblock);
171 
173 
174  if (!segms.isValid()) {
175  ATH_MSG_INFO("evtStore() does not contain MM segms Collection with name " << m_segm_type);
176  // return StatusCode::FAILURE;
177  }else
178  clusterFromSegments(segms.cptr(),lumiblock);
179  }
180 
181 
182  return StatusCode::SUCCESS;
183 }

◆ fillMMHistograms()

StatusCode MMRawDataMonAlg::fillMMHistograms ( const Muon::MMPrepData ) const
private

Definition at line 393 of file MMRawDataMonAlg.cxx.

393  {
394  return StatusCode::SUCCESS;
395 }

◆ fillMMOverviewHistograms()

void MMRawDataMonAlg::fillMMOverviewHistograms ( const MMOverviewHistogramStruct &  vects,
MMByPhiStruct(&)  occupancyPlots[16][2],
const int  lb 
) const
private

Definition at line 259 of file MMRawDataMonAlg.cxx.

260 {
261  auto charge_all = Monitored::Collection("charge_all", vects.charge_all);
262  auto numberofstrips_percluster = Monitored::Collection("numberofstrips_percluster", vects.numberofstrips_percluster);
263  fill("mmMonitor", charge_all, numberofstrips_percluster);
264 
265  auto strip_times = Monitored::Collection("strip_times", vects.strp_times);
266  auto cluster_times = Monitored::Collection("cluster_times", vects.cl_times);
267  auto strip_number = Monitored::Collection("strip_number", vects.strip_number);
268  auto statEta_strip = Monitored::Collection("statEta_strip", vects.statEta_strip);
269  fill("mmMonitor", strip_times, cluster_times, strip_number, statEta_strip);
270 
271  auto x_mon = Monitored::Collection("x_mon", vects.x_mon);
272  auto y_mon = Monitored::Collection("y_mon", vects.y_mon);
273  auto z_mon = Monitored::Collection("z_mon", vects.z_mon);
274  auto R_mon = Monitored::Collection("R_mon", vects.R_mon);
275  fill("mmMonitor", x_mon, y_mon, z_mon, R_mon);
276 
277  auto lb_mon = Monitored::Scalar<int>("lb_mon", lb);
278 
279  for(int statPhi=0; statPhi<16; ++statPhi) {
280  for(int iside=0; iside<2; ++iside) {
281  auto& occ_lb = occupancyPlots[statPhi][iside];
282  auto sector_lb = Monitored::Collection("sector_lb_"+MM_Side[iside]+"_phi"+std::to_string(statPhi+1),occ_lb.sector_lb);
283  std::string MM_sideGroup = "MM_sideGroup" + MM_Side[iside];
284  fill(MM_sideGroup, lb_mon, sector_lb);
285  }
286  }
287  auto sector_CSide = Monitored::Collection("sector_CSide",vects.sector_CSide);
288  auto sector_ASide = Monitored::Collection("sector_ASide",vects.sector_ASide);
289  auto stationPhi_CSide = Monitored::Collection("stationPhi_CSide",vects.stationPhi_CSide);
290  auto stationPhi_ASide = Monitored::Collection("stationPhi_ASide",vects.stationPhi_ASide);
291 
292  fill("mmMonitor", sector_CSide, sector_ASide, stationPhi_CSide, stationPhi_ASide );
293 }

◆ fillMMOverviewVects()

StatusCode MMRawDataMonAlg::fillMMOverviewVects ( const Muon::MMPrepData prd,
MMOverviewHistogramStruct &  vects,
MMByPhiStruct(&)  occupancyPlots[16][2] 
) const
private

Definition at line 185 of file MMRawDataMonAlg.cxx.

186 {
187  Identifier Id = prd->identify();
188  const std::vector<Identifier>& stripIds = prd->rdoList();
189  unsigned int nStrips = stripIds.size(); // number of strips in this cluster (cluster size)
190  const std::vector<uint16_t>& stripNumbers = prd->stripNumbers();
191 
192  std::string stName = m_idHelperSvc->mmIdHelper().stationNameString(m_idHelperSvc->mmIdHelper().stationName(Id));
193  int gas_gap = m_idHelperSvc->mmIdHelper().gasGap(Id);
194  int stationEta = m_idHelperSvc->mmIdHelper().stationEta(Id);
195  int stationPhi = m_idHelperSvc->mmIdHelper().stationPhi(Id);
196  int multiplet = m_idHelperSvc->mmIdHelper().multilayer(Id);
197  int channel = m_idHelperSvc->mmIdHelper().channel(Id);
198 
199  // Returns the charge (number of electrons) converted in fC
200  float charge = prd->charge()*conversion_charge;
201  // Returns the times of each strip (in ns)
202  std::vector<short int> strip_times = prd->stripTimes();
203 
205  float R = std::hypot(pos.x(),pos.y());
206 
207  // MM gaps are back to back, so the direction of the drift (time) is different for the even and odd gaps -> flip for the even gaps
208 
209  vects.charge_all.push_back(charge);
210  vects.numberofstrips_percluster.push_back(nStrips);
211  vects.x_mon.push_back(pos.x());
212  vects.y_mon.push_back(pos.y());
213  vects.z_mon.push_back(pos.z());
214  vects.R_mon.push_back(R);
215 
216  // 16 phi sectors, 8 stationPhi times 2 stName, MMS and MML
217  int sectorPhi = get_sectorPhi_from_stationPhi_stName(stationPhi,stName);
218 
219  // Occupancy plots with PCB granularity further divided for each eta sector: -2, -1, 1, 2
220  // CSide and ASide
221  int iside = (stationEta>0) ? 1 : 0;
222 
223  auto& thisSect = occupancyPlots[sectorPhi-1][iside];
224  const int gap_offset=4;
225  int gas_gap8 = (multiplet==1) ? gas_gap : gas_gap + gap_offset;
227 
228  int bin = get_bin_for_feb_occ(gas_gap8,FEB);
229 
230  thisSect.sector_lb.push_back(bin);
231 
232  if(stationEta<0) {
233  vects.sector_CSide.push_back(bin);
234  vects.stationPhi_CSide.push_back(sectorPhi);
235  } else {
236  vects.sector_ASide.push_back(bin);
237  vects.stationPhi_ASide.push_back(sectorPhi);
238  }
239 
240  // loop on each strip
241  int sIdx = 0; // index-counter for the vector of Id's
242  float cluster_time = 0;
243  for(const Identifier& id: stripIds) {
244 
245  std::string stName_strip = m_idHelperSvc->mmIdHelper().stationNameString(m_idHelperSvc->mmIdHelper().stationName(id));
246  int stationEta_strip = m_idHelperSvc->mmIdHelper().stationEta(id);
247  vects.statEta_strip.push_back(stationEta_strip);
248  vects.strip_number.push_back(stripNumbers[sIdx]);
249  vects.strp_times.push_back(strip_times.at(sIdx));
250  cluster_time += strip_times.at(sIdx);
251  ++sIdx;
252  }
253  cluster_time /= strip_times.size();
254  vects.cl_times.push_back(cluster_time);
255 
256  return StatusCode::SUCCESS;
257 }

◆ fillMMSummaryHistograms()

StatusCode MMRawDataMonAlg::fillMMSummaryHistograms ( const MMSummaryHistogramStruct(&)  vects[2][16][2][2][4]) const
private

Definition at line 351 of file MMRawDataMonAlg.cxx.

351  {
352 
353  for(int iside=0; iside<2; ++iside) {
354  std::string MM_sideGroup = "MM_sideGroup" + MM_Side[iside];
355 
356 
357 
358  for(int statPhi=0; statPhi<16; ++statPhi) {
359  for(int multiplet=0; multiplet<2; ++multiplet) {
360 
361 
362  for(int statEta=0; statEta<2; ++statEta) {
363 
364  for(int gas_gap=0; gas_gap<4; ++gas_gap) {
365  auto& Vectors = vects[iside][statPhi][statEta][multiplet][gas_gap];
366  auto sector_strip = Monitored::Collection("sector_strip_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1), Vectors.sector_strip);
367  auto strip_number = Monitored::Collection("strip_number_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1), Vectors.strip_number);
368  if(m_doDetailedHists){
369  if(!Vectors.strip_number.empty())
370  {
371  auto cluster_size = Monitored::Collection("cluster_size_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_eta" + std::to_string(statEta+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), Vectors.cl_size);
372  auto strip_times = Monitored::Collection("strp_time_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_eta" + std::to_string(statEta+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), Vectors.strp_times);
373  auto cluster_time = Monitored::Collection("cluster_time_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_eta" + std::to_string(statEta+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), Vectors.cl_times);
374  auto charge_perPCB = Monitored::Collection("charge_perPCB_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_eta" + std::to_string(statEta+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), Vectors.charge);
375  auto charge_perlayer = Monitored::Collection("charge_perlayer_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), Vectors.charge);
376  auto cluster_size_perlayer = Monitored::Collection("cluster_size_perlayer_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), Vectors.cl_size);
377  auto pcb_mon = Monitored::Collection("pcb_mon_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_eta" + std::to_string(statEta+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), Vectors.pcb);
378  auto pcb_strip_mon = Monitored::Collection("pcb_strip_mon_" + MM_Side[iside] + "_phi" + std::to_string(statPhi+1) + "_eta" + std::to_string(statEta+1) + "_ml" + std::to_string(multiplet+1) + "_gap" + std::to_string(gas_gap+1), Vectors.pcb_strip);
379  fill(MM_sideGroup, cluster_size, strip_times, cluster_time, charge_perPCB, pcb_mon, pcb_strip_mon, charge_perlayer, cluster_size_perlayer);
380  }
381  }
382 
383  fill(MM_sideGroup, strip_number, sector_strip);
384  }
385  }
386  }
387  }
388  }
389 
390  return StatusCode::SUCCESS;
391 }

◆ fillMMSummaryVects()

StatusCode MMRawDataMonAlg::fillMMSummaryVects ( const Muon::MMPrepData prd,
MMSummaryHistogramStruct(&)  vects[2][16][2][2][4] 
) const
private

Definition at line 295 of file MMRawDataMonAlg.cxx.

296 {
297  Identifier Id = prd->identify();
298  const std::vector<Identifier>& stripIds = prd->rdoList();
299 
300  std::string stName = m_idHelperSvc->mmIdHelper().stationNameString(m_idHelperSvc->mmIdHelper().stationName(Id));
301  int thisStationEta = m_idHelperSvc->mmIdHelper().stationEta(Id);
302  int thisStationPhi = m_idHelperSvc->mmIdHelper().stationPhi(Id);
303  int thisMultiplet = m_idHelperSvc->mmIdHelper().multilayer(Id);
304  int thisGasgap = m_idHelperSvc->mmIdHelper().gasGap(Id);
305  int ch = m_idHelperSvc->mmIdHelper().channel(Id);
306  float thisCharge=prd->charge()*conversion_charge;
307  std::vector<short int> strip_times = prd->stripTimes();
308 
309 
310  int phi=get_sectorPhi_from_stationPhi_stName(thisStationPhi ,stName);
311 
312  // CSide and ASide
313  int iside = (thisStationEta>0) ? 1 : 0;
314 
315  // 2 eta sectors depending on Eta=+-1 (0) and +-2 (1)
316  int sectorEta=get_sectorEta_from_stationEta(thisStationEta);
317  unsigned int csize = stripIds.size();
318  int PCB = get_PCB_from_channel(ch);
319  auto& Vectors = vects[iside][phi-1][sectorEta][thisMultiplet-1][thisGasgap-1];
320 
321  // loop on strips
322  int sIdx = 0;
323  const std::vector<uint16_t>& stripNumbers=prd->stripNumbers();
324  float cluster_time = 0;
325  for ( const Identifier& id : stripIds) {
326 
327  int stationEta = m_idHelperSvc->mmIdHelper().stationEta(id);
328  int gas_gap = m_idHelperSvc->mmIdHelper().gasGap(Id);
329  int multiplet = m_idHelperSvc->mmIdHelper().multilayer(Id);
330  // Filling Vectors for both sides, considering each strip
331  if(m_doDetailedHists){
332  Vectors.strp_times.push_back(strip_times.at(sIdx));
333  cluster_time += strip_times.at(sIdx);
334  }
335  Vectors.strip_number.push_back(stripNumbers[sIdx]);
336  Vectors.pcb_strip.push_back( get_PCB_from_channel(stripNumbers[sIdx]));
337  ++sIdx;
338  if(iside==1) Vectors.sector_strip.push_back(get_bin_for_occ_ASide_hist(stationEta,multiplet,gas_gap));
339  if(iside==0) Vectors.sector_strip.push_back(get_bin_for_occ_CSide_hist(stationEta,multiplet,gas_gap));
340  }
341  if(m_doDetailedHists){
342  Vectors.cl_size.push_back(csize);
343  Vectors.pcb.push_back(PCB);
344  cluster_time /= strip_times.size();
345  Vectors.cl_times.push_back(cluster_time);
346  Vectors.charge.push_back(thisCharge);
347  }
348  return StatusCode::SUCCESS;
349 }

◆ fillMMTrigger()

void MMRawDataMonAlg::fillMMTrigger ( const xAOD::NSWMMTPRDOContainer mmtp,
const int  lb 
) const
private

Definition at line 397 of file MMRawDataMonAlg.cxx.

397  {
398 
399  auto lb_tri=Monitored::Scalar<int>("lb_tri",lb);
400 
401  for (const auto* rdo : *mmtp) {
402  auto sourceID = rdo->sourceID();
403  auto moduleID = rdo->moduleID();
404  int s_side = (sourceID >> 16) == 107 ? 1:-1; // 1 for A; -1 for C
405  auto side = Monitored::Scalar<int>("tri_side", s_side);
406  int iside= s_side>0 ? s_side : 0;
407  uint s_sector = (moduleID & 0xF) + 1; //0-15 --> 1-16
408  int oct = (int)((s_sector-1)/2.);
409  float sector_pos=(45/180.)*M_PI*oct; //large
410  if(s_sector%2==0 ) sector_pos=(45*oct+22.5)*M_PI/180.; //small
411  if(sector_pos>M_PI) sector_pos=sector_pos-2*M_PI;
412 
413  auto trig_sector = Monitored::Scalar<int>("trig_sector", s_sector*s_side);
414 
415  auto event_bcid=rdo->ROD_BCID();
416 
417  auto bcid=Monitored::Scalar<int>("bcid",event_bcid);
418 
419  std::vector<short unsigned int> art_bcids = rdo->art_BCID();
420  std::vector<unsigned char> layers=rdo->art_layer();
421  auto channels=rdo->art_channel();
422 
423  fill("mmTrigger", trig_sector, lb_tri);
424 
425  for (long unsigned int i=0; i< rdo->art_BCID().size(); i++ ){
426  auto art_layer=static_cast<unsigned int>(layers[i]);
427  auto art_channel = Monitored::Scalar<int>("art_channel", channels[i]);
428  auto art_sector_layer = Monitored::Scalar<int>("art_sector_layer", s_side*8*(s_sector-1)+art_layer);
429 
430  const int rollover=3564;
431  int art_bc=art_bcids[i];
432  int relative = art_bc - event_bcid;;
433  if (relative > rollover / 2) {
434  relative -= rollover;
435  } else if (relative <= -rollover / 2) {
436  relative += rollover;
437  }
438  if (relative > (rollover-2048) / 2) {
439  relative -= (rollover-2048);
440  }
441  auto art_deltaBC=Monitored::Scalar<int>("art_deltaBC",relative);
442  auto art_deltaBC_perSector=Monitored::Scalar<int>("art_deltaBC_"+MM_Side[iside]+"_s"+std::to_string(s_sector),relative);
443  auto art_bc_mon=Monitored::Scalar<int>("art_bc",art_bc);
444 
445  fill("mmTrigger", art_channel, trig_sector, art_sector_layer, art_deltaBC, art_bc_mon, bcid, lb_tri, art_deltaBC_perSector);
446  }
447 
448  auto bcids =rdo->trig_BCID();
449  auto dthetas=rdo->trig_dTheta();
450  auto rids=rdo->trig_ROI_rID();
451  auto phiids=rdo->trig_ROI_phiID() ;
452 
453 
454  std::unordered_map<int, int> NROIPerBC;
455  for (int bc : bcids) NROIPerBC[bc]++;
456  for (const auto& [value, count] : NROIPerBC) {
457  auto nROIPerBC=Monitored::Scalar<int>("nROIPerBC",count);
458  fill("mmTrigger_roi", nROIPerBC, trig_sector);
459  }
460 
461  int nROI=rdo->trig_BCID().size();
462  for (int i=0; i< nROI; i++ ){
463  auto phiID = (phiids[i] & 0b11111) * ((phiids[i] >> 5) ? 1 : -1);
464  int sign = phiID > 0 ? 1 : -1;
465  auto phi_conv = (phiID-0.5*sign)*(16./31.)*M_PI/180. + sector_pos;
466  if(phi_conv> M_PI)phi_conv = phi_conv - 2*M_PI;
467 
468  const float z_ref=7824.46;
469  const float r_step=(5000-900)/256.;
470  auto rID = static_cast<unsigned int>(rids[i]);
471  float r_conv=r_step*rID+900;
472  float eta_conv=-log(0.5*atan(r_conv/z_ref))*s_side;
473  // auto dTheta=Monitored::Scalar<float>("dTheta_roi",static_cast<float>(dthetas[i]));
474  auto deltaBC= Monitored::Scalar<int>("deltaBC", bcids[i]-event_bcid);
475  auto deltaBC_perSector= Monitored::Scalar<int>("deltaBC_"+MM_Side[iside]+"_s"+std::to_string(s_sector), bcids[i]-event_bcid);
476  auto rid=Monitored::Scalar<int>("rid",rID);
477  auto phiid=Monitored::Scalar<int>("phiid",phiID);
478  auto rid_sector=Monitored::Scalar<int>("rid_"+MM_Side[iside]+"_s"+std::to_string(s_sector),rID);
479  auto phiid_sector=Monitored::Scalar<int>("phiid_"+MM_Side[iside]+"_s"+std::to_string(s_sector),phiID);
480  auto r_roi=Monitored::Scalar<float>("r_roi",r_conv);
481  auto phi_roi=Monitored::Scalar<float>("phi_roi",phi_conv);
482  auto eta_roi=Monitored::Scalar<float>("eta_roi",eta_conv);
483  auto x_roi_sideA=Monitored::Scalar<float>("x_roi_sideA", r_conv*cos(phi_roi));
484  auto y_roi_sideA=Monitored::Scalar<float>("y_roi_sideA", r_conv*sin(phi_roi));
485  auto x_roi_sideC=Monitored::Scalar<float>("x_roi_sideC", r_conv*cos(phi_roi) );
486  auto y_roi_sideC=Monitored::Scalar<float>("y_roi_sideC", r_conv*sin(phi_roi));
487 
488  fill("mmTrigger_roi", deltaBC, phiid, rid, trig_sector, phi_roi, eta_roi,r_roi, lb_tri, rid_sector, phiid_sector, deltaBC_perSector);
489  if(s_side>0) fill("mmTrigger_roi", x_roi_sideA, y_roi_sideA);
490  if(s_side<0) fill("mmTrigger_roi", x_roi_sideC, y_roi_sideC);
491 
492  }
493  }
494 
495 }

◆ filterPassed()

virtual bool AthReentrantAlgorithm::filterPassed ( const EventContext &  ctx) const
inlinevirtualinherited

Definition at line 135 of file AthReentrantAlgorithm.h.

135  {
136  return execState( ctx ).filterPassed();
137  }

◆ get_bin_for_feb_occ()

int MMRawDataMonAlg::get_bin_for_feb_occ ( const int  gas_gap,
const int  FEB 
) const
private

Definition at line 136 of file MMRawDataUtils.cxx.

136  {
137 
138  static const int max_feb = 16;
139 
140  return (gas_gap-1)*max_feb + (FEB-1);
141 
142 }

◆ get_bin_for_occ()

int MMRawDataMonAlg::get_bin_for_occ ( const int  gas_gap,
const int  PCB 
) const
private

Definition at line 128 of file MMRawDataUtils.cxx.

128  {
129 
130  static const int max_pcb = 8;
131 
132  return (gas_gap-1)*max_pcb + (PCB-1);
133 
134 }

◆ get_bin_for_occ_ASide_hist()

int MMRawDataMonAlg::get_bin_for_occ_ASide_hist ( const int  stationEta,
const int  multiplet,
const int  gas_gap 
) const
private

Definition at line 106 of file MMRawDataUtils.cxx.

106  {
107 
108  static const int max_gas_gap = 4;
109  static const int max_multiplet = 2;
110 
111  return (stationEta-1)*(max_gas_gap*max_multiplet)+(multiplet-1)*max_gas_gap +(gas_gap-1);
112 
113 }

◆ get_bin_for_occ_ASide_pcb_eta1_hist()

int MMRawDataMonAlg::get_bin_for_occ_ASide_pcb_eta1_hist ( const int  stationEta,
const int  multiplet,
const int  gas_gap,
const int  PCB 
) const
private

Definition at line 167 of file MMRawDataUtils.cxx.

167  {
168 
169  static const int max_pcb = 5;
170  static const int max_gas_gap = 4;
171  if (stationEta != 1) return -1;
172 
173  return (multiplet-1)*max_gas_gap*max_pcb+ (gas_gap-1)*max_pcb + (PCB-1);
174 }

◆ get_bin_for_occ_ASide_pcb_eta2_hist()

int MMRawDataMonAlg::get_bin_for_occ_ASide_pcb_eta2_hist ( const int  stationEta,
const int  multiplet,
const int  gas_gap,
const int  PCB 
) const
private

Definition at line 156 of file MMRawDataUtils.cxx.

156  {
157 
158  static const int max_pcb = 3;
159  static const int max_gas_gap = 4;
160  if (stationEta != 2) return -1;
161 
162  return (multiplet-1)*max_gas_gap*max_pcb+ (gas_gap-1)*max_pcb + (PCB-1);
163 
164 }

◆ get_bin_for_occ_CSide_hist()

int MMRawDataMonAlg::get_bin_for_occ_CSide_hist ( const int  stationEta,
const int  multiplet,
const int  gas_gap 
) const
private

Definition at line 97 of file MMRawDataUtils.cxx.

97  {
98 
99  static const int max_gas_gap = 4;
100  static const int max_multiplet = 2;
101 
102  return (stationEta+2)*(max_gas_gap*max_multiplet)+(multiplet-1)*max_gas_gap +(gas_gap-1);
103 
104 }

◆ get_bin_for_occ_CSide_pcb_eta1_hist()

int MMRawDataMonAlg::get_bin_for_occ_CSide_pcb_eta1_hist ( const int  stationEta,
const int  multiplet,
const int  gas_gap,
const int  PCB 
) const
private

Definition at line 145 of file MMRawDataUtils.cxx.

145  {
146 
147  static const int max_pcb = 5;
148  static const int max_gas_gap = 4;
149  if (stationEta != -1) return -1;
150 
151  return (multiplet-1)*max_gas_gap*max_pcb+ (gas_gap-1)*max_pcb + (PCB-1);
152 
153 }

◆ get_bin_for_occ_CSide_pcb_eta2_hist()

int MMRawDataMonAlg::get_bin_for_occ_CSide_pcb_eta2_hist ( const int  stationEta,
const int  multiplet,
const int  gas_gap,
const int  PCB 
) const
private

Definition at line 116 of file MMRawDataUtils.cxx.

116  {
117 
118  static const int max_pcb = 3;
119  static const int max_gas_gap = 4;
120  if (stationEta != -2) return -1;
121 
122  return (multiplet-1)*max_gas_gap*max_pcb+ (gas_gap-1)*max_pcb + (PCB-1);
123 
124 }

◆ get_bin_for_occ_lb_ASide_pcb_eta1_hist()

int MMRawDataMonAlg::get_bin_for_occ_lb_ASide_pcb_eta1_hist ( const int  stationEta,
const int  multiplet,
const int  gas_gap,
const int  PCB,
int  isector 
) const
private

Definition at line 200 of file MMRawDataUtils.cxx.

200  {
201 
202  static const int max_pcb = 5;
203  static const int max_gas_gap = 4;
204  static const int max_isector = 2;
205  if (stationEta != 1) return -1;
206 
207  return (multiplet-1)*max_gas_gap*max_pcb*max_isector+ (gas_gap-1)*max_pcb*max_isector + isector*max_pcb + (PCB-1);
208 }

◆ get_bin_for_occ_lb_ASide_pcb_eta2_hist()

int MMRawDataMonAlg::get_bin_for_occ_lb_ASide_pcb_eta2_hist ( const int  stationEta,
const int  multiplet,
const int  gas_gap,
const int  PCB,
const int  isector 
) const
private

Definition at line 211 of file MMRawDataUtils.cxx.

211  {
212 
213  static const int max_pcb = 3;
214  static const int max_gas_gap = 4;
215  static const int max_isector = 2;
216  if (stationEta != 2) return -1;
217 
218  return (multiplet-1)*max_gas_gap*max_pcb*max_isector+ (gas_gap-1)*max_pcb*max_isector + isector*max_pcb + (PCB-1);
219 
220 }

◆ get_bin_for_occ_lb_CSide_pcb_eta1_hist()

int MMRawDataMonAlg::get_bin_for_occ_lb_CSide_pcb_eta1_hist ( const int  stationEta,
const int  multiplet,
const int  gas_gap,
const int  PCB,
int  isector 
) const
private

Definition at line 189 of file MMRawDataUtils.cxx.

189  {
190 
191  static const int max_pcb = 5;
192  static const int max_gas_gap = 4;
193  static const int max_isector = 2;
194  if (stationEta != -1) return -1;
195 
196  return (multiplet-1)*max_gas_gap*max_pcb*max_isector+ (gas_gap-1)*max_pcb*max_isector + isector*max_pcb + (PCB-1);
197 
198 }

◆ get_bin_for_occ_lb_CSide_pcb_eta2_hist()

int MMRawDataMonAlg::get_bin_for_occ_lb_CSide_pcb_eta2_hist ( const int  stationEta,
const int  multiplet,
const int  gas_gap,
const int  PCB,
const int  isector 
) const
private

Definition at line 177 of file MMRawDataUtils.cxx.

177  {
178 
179  static const int max_pcb = 3;
180  static const int max_gas_gap = 4;
181  static const int max_isector = 2;
182  if (stationEta != -2) return -1;
183 
184  return (multiplet-1)*max_gas_gap*max_pcb*max_isector+ (gas_gap-1)*max_pcb*max_isector + isector*max_pcb+ (PCB-1);
185 
186 }

◆ get_bin_for_occ_lb_pcb_hist()

int MMRawDataMonAlg::get_bin_for_occ_lb_pcb_hist ( const int  multiplet,
const int  gas_gap,
const int  PCB 
) const
private

Definition at line 222 of file MMRawDataUtils.cxx.

222  {
223 
224  static const int max_pcb = 8;
225  static const int max_gas_gap = 4;
226 
227  return (multiplet-1)*max_gas_gap*max_pcb + (gas_gap-1)*max_pcb + (PCB-1);
228 
229 }

◆ get_FEB_from_channel()

int MMRawDataMonAlg::get_FEB_from_channel ( const int  channel,
const int  stEta 
) const
private

Definition at line 34 of file MMRawDataUtils.cxx.

34  {
35 
36  if(fabs(stEta)==1){
37  if (channel>0 && channel<=512) return 1;
38  if (channel>512 && channel<=1024) return 2;
39 
40  if (channel>1024 && channel<=1536) return 3;
41  if (channel>1536 && channel<=2048) return 4;
42 
43  if (channel>2048 && channel<=2560) return 5;
44  if (channel>2560 && channel<=3072) return 6;
45 
46  if (channel>3072 && channel<=3584) return 7;
47  if (channel>3584 && channel<=4096) return 8;
48 
49  if (channel>4096 && channel<=4608) return 9;
50  if (channel>4608 && channel<=5120) return 10;
51  }else if(fabs(stEta)==2){
52  if (channel>0 && channel<=512) return 11;
53  if (channel>512 && channel<=1024) return 12;
54 
55  if (channel>1024 && channel<=1536) return 13;
56  if (channel>1536 && channel<=2048) return 14;
57 
58  if (channel>2048 && channel<=2560) return 15;
59  if (channel>2560 && channel<=3072) return 16;
60  }
61  throw std::invalid_argument( "channel is not valid!" );
62 }

◆ get_PCB_from_channel()

int MMRawDataMonAlg::get_PCB_from_channel ( const int  channel) const
private

Definition at line 23 of file MMRawDataUtils.cxx.

23  {
24 
25  if (channel>0 && channel<=1024) return 1;
26  if (channel>1024 && channel<=2048) return 2;
27  if (channel>2048 && channel<=3072) return 3;
28  if (channel>3072 && channel<=4096) return 4;
29  if (channel>4096 && channel<=5120) return 5;
30 
31  throw std::invalid_argument( "channel is not valid!" );
32 }

◆ get_sectorEta_from_stationEta()

int MMRawDataMonAlg::get_sectorEta_from_stationEta ( const int  stationEta) const
private

Definition at line 87 of file MMRawDataUtils.cxx.

87  {
88 
89  // 1<-0 0-> 1
90  if (std::abs(stationEta)==1) return 0;
91  if (std::abs(stationEta)==2) return 1;
92 
93  return -1;
94 
95 }

◆ get_sectorPhi_from_stationPhi_stName()

int MMRawDataMonAlg::get_sectorPhi_from_stationPhi_stName ( const int  stationPhi,
const std::string &  stName 
) const
private

Definition at line 64 of file MMRawDataUtils.cxx.

64  {
65 
66  if (stationPhi==1 && stName=="MML") return 1;
67  if (stationPhi==1 && stName=="MMS") return 2;
68  if (stationPhi==2 && stName=="MML") return 3;
69  if (stationPhi==2 && stName=="MMS") return 4;
70  if (stationPhi==3 && stName=="MML") return 5;
71  if (stationPhi==3 && stName=="MMS") return 6;
72  if (stationPhi==4 && stName=="MML") return 7;
73  if (stationPhi==4 && stName=="MMS") return 8;
74  if (stationPhi==5 && stName=="MML") return 9;
75  if (stationPhi==5 && stName=="MMS") return 10;
76  if (stationPhi==6 && stName=="MML") return 11;
77  if (stationPhi==6 && stName=="MMS") return 12;
78  if (stationPhi==7 && stName=="MML") return 13;
79  if (stationPhi==7 && stName=="MMS") return 14;
80  if (stationPhi==8 && stName=="MML") return 15;
81  if (stationPhi==8 && stName=="MMS") return 16;
82 
83  throw std::invalid_argument( "stationPhi and stName are not valid!" );
84 
85 }

◆ GetEventInfo()

SG::ReadHandle< xAOD::EventInfo > AthMonitorAlgorithm::GetEventInfo ( const EventContext &  ctx) const
inherited

Return a ReadHandle for an EventInfo object (get run/event numbers, etc.)

Parameters
ctxEventContext for the event
Returns
a SG::ReadHandle<xAOD::EventInfo>

Definition at line 107 of file AthMonitorAlgorithm.cxx.

107  {
109 }

◆ getGroup()

const ToolHandle< GenericMonitoringTool > & AthMonitorAlgorithm::getGroup ( const std::string &  name) const
inherited

Get a specific monitoring tool from the tool handle array.

Finds a specific GenericMonitoringTool instance from the list of monitoring tools (a ToolHandleArray). Throws a FATAL warning if the object found is empty.

Parameters
namestring name of the desired tool
Returns
reference to the desired monitoring tool

Definition at line 164 of file AthMonitorAlgorithm.cxx.

164  {
165  // get the pointer to the tool, and check that it exists
166  auto idx = m_toolLookupMap.find(name);
167  if (ATH_LIKELY(idx != m_toolLookupMap.end())) {
168  return m_tools[idx->second];
169  }
170  else {
171  if (!isInitialized()) {
173  "It seems that the AthMonitorAlgorithm::initialize was not called "
174  "in derived class initialize method");
175  } else {
176  std::string available = std::accumulate(
177  m_toolLookupMap.begin(), m_toolLookupMap.end(), std::string(""),
178  [](const std::string& s, auto h) { return s + "," + h.first; });
179  ATH_MSG_FATAL("The tool " << name << " could not be found in the tool array of the "
180  << "monitoring algorithm " << m_name << ". This probably reflects a discrepancy between "
181  << "your python configuration and c++ filling code. Note: your available groups are {"
182  << available << "}.");
183  }
184  }
185  return m_dummy;
186 }

◆ getTrigDecisionTool()

const ToolHandle< Trig::TrigDecisionTool > & AthMonitorAlgorithm::getTrigDecisionTool ( ) const
inherited

Get the trigger decision tool member.

The trigger decision tool is used to check whether a specific trigger is passed by an event.

Returns
m_trigDecTool

Definition at line 189 of file AthMonitorAlgorithm.cxx.

189  {
190  return m_trigDecTool;
191 }

◆ initialize()

StatusCode MMRawDataMonAlg::initialize ( )
overridevirtual

initialize

Returns
StatusCode

Reimplemented from AthMonitorAlgorithm.

Definition at line 103 of file MMRawDataMonAlg.cxx.

105 {
106  //init message stream
107  ATH_MSG_DEBUG("initialize MMRawDataMonAlg");
108  ATH_MSG_DEBUG("******************");
109  ATH_MSG_DEBUG("doMMESD: " << m_doMMESD );
110  ATH_MSG_DEBUG("******************");
111 
114  ATH_CHECK(m_idHelperSvc.retrieve());
115 
116  ATH_MSG_INFO(" Found the MuonIdHelperSvc ");
117  ATH_CHECK(m_muonKey.initialize());
118  ATH_CHECK(m_MMContainerKey.initialize());
120  ATH_CHECK(m_segm_type.initialize());
121  ATH_CHECK(m_mmtpRdoKey.initialize());
122 
123  ATH_MSG_DEBUG(" end of initialize " );
124  ATH_MSG_INFO("MMRawDataMonAlg initialization DONE " );
125 
126  return StatusCode::SUCCESS;
127 }

◆ 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.

◆ isClonable()

bool AthReentrantAlgorithm::isClonable ( ) const
overridevirtualinherited

◆ MMEfficiency()

void MMRawDataMonAlg::MMEfficiency ( const xAOD::TrackParticleContainer muonContainer) const
private

Definition at line 747 of file MMRawDataMonAlg.cxx.

748 {
749  MMEfficiencyHistogramStruct effPlots[2][2][16][2][4];
750  MMEfficiencyHistogramStruct Gaps[2][2][16][2];
751 
752  static const std::array<std::string,2> MM_Side = {"CSide", "ASide"};
753  static const std::array<std::string,2> EtaSector = {"1","2"};
754 
755  for (const xAOD::TrackParticle* meTP : *muonContainer) {
756  if (!meTP) continue;
757  auto eta_trk = Monitored::Scalar<float>("eta_trk", meTP->eta());
758  auto phi_trk = Monitored::Scalar<float>("phi_trk", meTP->phi());
759 
760  float pt_trk = meTP->pt();
761  if(pt_trk < m_cut_pt) continue;
762  // retrieve the original track
763  const Trk::Track* meTrack = meTP->track();
764  if(!meTrack) continue;
765  // get the vector of measurements on track
767 
768  for(const Trk::MeasurementBase* it: *meas) {
769  const Trk::RIO_OnTrack* rot = dynamic_cast<const Trk::RIO_OnTrack*>(it);
770  if (!rot) continue;
771  Identifier rot_id = rot->identify();
772  if (!m_idHelperSvc->isMM(rot_id)) continue;
773 
774  const Muon::MMClusterOnTrack* cluster = dynamic_cast<const Muon::MMClusterOnTrack*>(rot);
775  if (!cluster) continue;
776  std::string stName = m_idHelperSvc->mmIdHelper().stationNameString(m_idHelperSvc->mmIdHelper().stationName(rot_id));
777  int stEta= m_idHelperSvc->mmIdHelper().stationEta(rot_id);
778  int stPhi= m_idHelperSvc->mmIdHelper().stationPhi(rot_id);
779  int phi = get_sectorPhi_from_stationPhi_stName(stPhi,stName);
780  int multi = m_idHelperSvc->mmIdHelper().multilayer(rot_id);
781  int gap= m_idHelperSvc->mmIdHelper().gasGap(rot_id);
782  int ch= m_idHelperSvc->mmIdHelper().channel(rot_id);
783  int pcb=get_PCB_from_channel(ch);
784  int abs_stEta= get_sectorEta_from_stationEta(stEta);
785  int iside = (stEta > 0) ? 1 : 0;
786  if( ! (std::find( Gaps[iside][abs_stEta][phi-1][multi-1].nGaps.begin(), Gaps[iside][abs_stEta][phi-1][multi-1].nGaps.end(), gap ) != Gaps[iside][abs_stEta][phi-1][multi-1].nGaps.end()) )
787  Gaps[iside][abs_stEta][phi-1][multi-1].nGaps.push_back(gap);
788  //numerator
789  if(effPlots[iside][abs_stEta][phi-1][multi-1][gap-1].num.size()==0) effPlots[iside][abs_stEta][phi-1][multi-1][gap-1].num.push_back(pcb-1);
790  }
791  } // loop on tracks
792 
793  unsigned int nGaptag=3;
794 
795  for(int s=0; s<2; ++s) {
796  std::string MM_sideGroup = "MM_sideGroup"+MM_Side[s];
797  for(int e=0; e<2; ++e) {
798  for(int p=0; p<16; ++p) {
799  for(int m=0; m<2; ++m) {
800  if(Gaps[s][e][p][m].nGaps.size()<nGaptag) continue;
801  if(Gaps[s][e][p][m].nGaps.size()>4) continue;
802  //find the missing gap
803  int gapsum=0;
804  for (unsigned int g=0; g<Gaps[s][e][p][m].nGaps.size(); ++g)
805  gapsum+= Gaps[s][e][p][m].nGaps.at(g);
806  int missing_gap=10-gapsum-1;
807  //if missing gap = -1 --> nGaps=4 --> all efficient
808  if(Gaps[s][e][p][m].nGaps.size()==4){
809  for (unsigned int ga=0; ga<Gaps[s][e][p][m].nGaps.size(); ++ga){
810  for (unsigned int i=0; i<effPlots[s][e][p][m][ga].num.size(); ++i){
811  int pcb = effPlots[s][e][p][m][ga].num.at(i);
812  auto traversed_pcb = Monitored::Scalar<int>("pcb_eta"+std::to_string(e+1)+"_"+MM_Side[s]+"_phi"+std::to_string(p)+"_multiplet"+std::to_string(m+1)+"_gas_gap"+std::to_string(ga+1),pcb);
813  int layer=ga+4*m+8*p;
814 
815  auto traversed_gap = Monitored::Scalar<int>(MM_Side[s]+"_eta"+std::to_string(e+1),layer);
816  auto isHit = 1;
817  auto hitcut = Monitored::Scalar<int>("hitcut", (int)isHit);
818  fill(MM_sideGroup, traversed_pcb, traversed_gap, hitcut);
819  }
820  }
821  } else {// 3 gaps, the fourth is inefficient
822  int ref_gap = missing_gap+1;
823  if(missing_gap==3) ref_gap=0;
824  if (ref_gap>3){
825  ATH_MSG_FATAL("ref_gap is out of range in MMRawDataMonAlg::MMEfficiency");
826  return;
827  }
828  int ref_pcb=effPlots[s][e][p][m][ref_gap].num.at(0);
829  auto traversed_pcb = Monitored::Scalar<int>("pcb_eta"+std::to_string(e+1)+"_"+MM_Side[s]+"_phi"+std::to_string(p)+"_multiplet"+std::to_string(m+1)+"_gas_gap"+std::to_string(missing_gap+1), ref_pcb);
830  int layer=missing_gap+4*m+8*p;
831  auto traversed_gap = Monitored::Scalar<int>(MM_Side[s]+"_eta"+std::to_string(e+1),layer);
832  auto isHit = 0;
833  auto hitcut = Monitored::Scalar<int>("hitcut", (int)isHit);
834  fill(MM_sideGroup, traversed_pcb, traversed_gap, hitcut);
835  }
836 
837 
838  }
839  }
840  }
841  }
842 }

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

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

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ 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.

◆ parseList()

StatusCode AthMonitorAlgorithm::parseList ( const std::string &  line,
std::vector< std::string > &  result 
) const
virtualinherited

Parse a string into a vector.

The input string is a single long string of all of the trigger names. It parses this string and turns it into a vector, where each element is one trigger or trigger category.

Parameters
lineThe input string.
resultThe parsed output vector of strings.
Returns
StatusCode

Definition at line 336 of file AthMonitorAlgorithm.cxx.

336  {
337  std::string item;
338  std::stringstream ss(line);
339 
340  ATH_MSG_DEBUG( "AthMonitorAlgorithm::parseList()" );
341 
342  while ( std::getline(ss, item, ',') ) {
343  std::stringstream iss(item); // remove whitespace
344  iss >> item;
345  result.push_back(item);
346  }
347 
348  return StatusCode::SUCCESS;
349 }

◆ 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();
383  PBASE::renounce (h);
384  }

◆ 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  {
365  handlesArray.renounce();
366  }

◆ setFilterPassed()

virtual void AthReentrantAlgorithm::setFilterPassed ( bool  state,
const EventContext &  ctx 
) const
inlinevirtualinherited

Definition at line 139 of file AthReentrantAlgorithm.h.

139  {
140  execState( ctx ).setFilterPassed( state );
141  }

◆ sysExecute()

StatusCode AthReentrantAlgorithm::sysExecute ( const EventContext &  ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 67 of file AthReentrantAlgorithm.cxx.

68 {
69  return Gaudi::Algorithm::sysExecute (ctx);
70 }

◆ sysInitialize()

StatusCode AthReentrantAlgorithm::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 InputMakerBase, and HypoBase.

Definition at line 96 of file AthReentrantAlgorithm.cxx.

96  {
98 
99  if (sc.isFailure()) {
100  return sc;
101  }
102 
103  ServiceHandle<ICondSvc> cs("CondSvc",name());
104  for (auto h : outputHandles()) {
105  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
106  // do this inside the loop so we don't create the CondSvc until needed
107  if ( cs.retrieve().isFailure() ) {
108  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
109  return StatusCode::SUCCESS;
110  }
111  if (cs->regHandle(this,*h).isFailure()) {
112  sc = StatusCode::FAILURE;
113  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
114  << " with CondSvc");
115  }
116  }
117  }
118  return sc;
119 }

◆ 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.

◆ trigChainsArePassed()

bool AthMonitorAlgorithm::trigChainsArePassed ( const std::vector< std::string > &  vTrigNames) const
inherited

Check whether triggers are passed.

For the event, use the trigger decision tool to check that at least one of the triggers listed in the supplied vector is passed.

Parameters
vTrigNamesList of trigger names.
Returns
If empty input, default to true. If at least one trigger is specified, returns whether at least one trigger was passed.

Definition at line 194 of file AthMonitorAlgorithm.cxx.

194  {
195 
196 
197  // If no triggers were given, return true.
198  if (vTrigNames.empty()) return true;
199 
200 
201  // Trigger: Check if this Algorithm is being run as an Express Stream job.
202  // Events are entering the express stream are chosen randomly, and by chain,
203  // Hence an additional check should be aplied to see if the chain(s)
204  // monitored here are responsible for the event being selected for
205  // the express stream.
206 
207  const auto group = m_trigDecTool->getChainGroup(vTrigNames);
209  const auto passedBits = m_trigDecTool->isPassedBits(group);
210  bool expressPass = passedBits & TrigDefs::Express_passed; //bitwise AND
211  if(!expressPass) {
212  return false;
213  }
214  }
215 
216  // monitor the event if any of the chains in the chain group passes the event.
217  return group->isPassed();
218 
219 }

◆ 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) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_cut_pt

Gaudi::Property<float> MMRawDataMonAlg::m_cut_pt {this,"cut_pt",15000}
private

Definition at line 109 of file MMRawDataMonAlg.h.

◆ m_dataType

AthMonitorAlgorithm::DataType_t AthMonitorAlgorithm::m_dataType
protectedinherited

Instance of the DataType_t enum.

Definition at line 351 of file AthMonitorAlgorithm.h.

◆ m_dataTypeStr

Gaudi::Property<std::string> AthMonitorAlgorithm::m_dataTypeStr {this,"DataType","userDefined"}
protectedinherited

DataType string pulled from the job option and converted to enum.

Definition at line 353 of file AthMonitorAlgorithm.h.

◆ m_defaultLBDuration

Gaudi::Property<float> AthMonitorAlgorithm::m_defaultLBDuration {this,"DefaultLBDuration",60.}
protectedinherited

Default duration of one lumi block.

Definition at line 360 of file AthMonitorAlgorithm.h.

◆ m_detailLevel

Gaudi::Property<int> AthMonitorAlgorithm::m_detailLevel {this,"DetailLevel",0}
protectedinherited

Sets the level of detail used in the monitoring.

Definition at line 361 of file AthMonitorAlgorithm.h.

◆ m_DetectorManagerKey

SG::ReadCondHandleKey<MuonGM::MuonDetectorManager> MMRawDataMonAlg::m_DetectorManagerKey {this, "DetectorManagerKey", "MuonDetectorManager","Key of input MuonDetectorManager condition data"}
private

Definition at line 65 of file MMRawDataMonAlg.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_do_mm_overview

Gaudi::Property<bool> MMRawDataMonAlg::m_do_mm_overview {this,"do_mm_overview",true}
private

Definition at line 107 of file MMRawDataMonAlg.h.

◆ m_do_stereoCorrection

Gaudi::Property<bool> MMRawDataMonAlg::m_do_stereoCorrection {this,"do_stereoCorrection",false}
private

Definition at line 108 of file MMRawDataMonAlg.h.

◆ m_doDetailedHists

Gaudi::Property<bool> MMRawDataMonAlg::m_doDetailedHists {this,"doDetailedHists",true}
private

Definition at line 110 of file MMRawDataMonAlg.h.

◆ m_doMMESD

Gaudi::Property<bool> MMRawDataMonAlg::m_doMMESD {this,"DoMMESD",true}
private

Definition at line 106 of file MMRawDataMonAlg.h.

◆ m_DQFilterTools

ToolHandleArray<IDQFilterTool> AthMonitorAlgorithm::m_DQFilterTools {this,"FilterTools",{}}
protectedinherited

Array of Data Quality filter tools.

Definition at line 341 of file AthMonitorAlgorithm.h.

◆ m_dummy

const ToolHandle<GenericMonitoringTool> AthMonitorAlgorithm::m_dummy
privateinherited

Definition at line 369 of file AthMonitorAlgorithm.h.

◆ m_enforceExpressTriggers

Gaudi::Property<bool> AthMonitorAlgorithm::m_enforceExpressTriggers
privateinherited
Initial value:
{this,
"EnforceExpressTriggers", false,
"Requires that matched triggers made the event enter the express stream"}

Definition at line 372 of file AthMonitorAlgorithm.h.

◆ m_environment

AthMonitorAlgorithm::Environment_t AthMonitorAlgorithm::m_environment
protectedinherited

Instance of the Environment_t enum.

Definition at line 350 of file AthMonitorAlgorithm.h.

◆ m_environmentStr

Gaudi::Property<std::string> AthMonitorAlgorithm::m_environmentStr {this,"Environment","user"}
protectedinherited

Environment string pulled from the job option and converted to enum.

Definition at line 352 of file AthMonitorAlgorithm.h.

◆ m_EventInfoKey

SG::ReadHandleKey<xAOD::EventInfo> AthMonitorAlgorithm::m_EventInfoKey {this,"EventInfoKey","EventInfo"}
protectedinherited

Key for retrieving EventInfo from StoreGate.

Definition at line 362 of file AthMonitorAlgorithm.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 AthReentrantAlgorithm::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 153 of file AthReentrantAlgorithm.h.

◆ m_fileKey

Gaudi::Property<std::string> AthMonitorAlgorithm::m_fileKey {this,"FileKey",""}
protectedinherited

Internal Athena name for file.

Definition at line 358 of file AthMonitorAlgorithm.h.

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> MMRawDataMonAlg::m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
private

Definition at line 62 of file MMRawDataMonAlg.h.

◆ m_lbDurationDataKey

SG::ReadCondHandleKey<LBDurationCondData> AthMonitorAlgorithm::m_lbDurationDataKey {this,"LBDurationCondDataKey","LBDurationCondData","SG Key of LBDurationCondData object"}
protectedinherited

Definition at line 345 of file AthMonitorAlgorithm.h.

◆ m_lumiDataKey

SG::ReadCondHandleKey<LuminosityCondData> AthMonitorAlgorithm::m_lumiDataKey {this,"LuminosityCondDataKey","LuminosityCondData","SG Key of LuminosityCondData object"}
protectedinherited

Definition at line 343 of file AthMonitorAlgorithm.h.

◆ m_meTrkKey

SG::ReadHandleKey<xAOD::TrackParticleContainer> MMRawDataMonAlg::m_meTrkKey {this, "METrkContainer", "ExtrapolatedMuonTrackParticles"}
private

Definition at line 69 of file MMRawDataMonAlg.h.

◆ m_MMContainerKey

SG::ReadHandleKey<Muon::MMPrepDataContainer> MMRawDataMonAlg::m_MMContainerKey {this,"MMPrepDataContainerName","MM_Measurements"}
private

Definition at line 67 of file MMRawDataMonAlg.h.

◆ m_mmtpRdoKey

SG::ReadHandleKey<xAOD::NSWMMTPRDOContainer> MMRawDataMonAlg::m_mmtpRdoKey {this, "NSW_MMTPDataKey", "NSW_MMTrigProcessor_RDO"}
private

Definition at line 70 of file MMRawDataMonAlg.h.

◆ m_muonKey

SG::ReadHandleKey<xAOD::MuonContainer> MMRawDataMonAlg::m_muonKey {this,"MuonKey","Muons","muons"}
private

Definition at line 68 of file MMRawDataMonAlg.h.

◆ m_muonSelectionTool

ToolHandle<CP::IMuonSelectionTool> MMRawDataMonAlg::m_muonSelectionTool {this,"MuonSelectionTool","CP::MuonSelectionTool/MuonSelectionTool"}
private

Definition at line 64 of file MMRawDataMonAlg.h.

◆ m_name

std::string AthMonitorAlgorithm::m_name
privateinherited

Definition at line 366 of file AthMonitorAlgorithm.h.

◆ m_segm_type

SG::ReadHandleKey<Trk::SegmentCollection> MMRawDataMonAlg::m_segm_type {this,"Eff_segm_type","TrackMuonSegments","muon segments"}
private

Definition at line 66 of file MMRawDataMonAlg.h.

◆ m_toolLookupMap

std::unordered_map<std::string, size_t> AthMonitorAlgorithm::m_toolLookupMap
privateinherited

Definition at line 367 of file AthMonitorAlgorithm.h.

◆ m_tools

ToolHandleArray<GenericMonitoringTool> AthMonitorAlgorithm::m_tools {this,"GMTools",{}}
protectedinherited

Array of Generic Monitoring Tools.

Definition at line 338 of file AthMonitorAlgorithm.h.

◆ m_trigDecTool

PublicToolHandle<Trig::TrigDecisionTool> AthMonitorAlgorithm::m_trigDecTool {this, "TrigDecisionTool",""}
protectedinherited

Tool to tell whether a specific trigger is passed.

Definition at line 340 of file AthMonitorAlgorithm.h.

◆ m_triggerChainString

Gaudi::Property<std::string> AthMonitorAlgorithm::m_triggerChainString {this,"TriggerChain",""}
protectedinherited

Trigger chain string pulled from the job option and parsed into a vector.

Definition at line 355 of file AthMonitorAlgorithm.h.

◆ m_trigLiveFractionDataKey

SG::ReadCondHandleKey<TrigLiveFractionCondData> AthMonitorAlgorithm::m_trigLiveFractionDataKey {this,"TrigLiveFractionCondDataKey","TrigLiveFractionCondData", "SG Key of TrigLiveFractionCondData object"}
protectedinherited

Definition at line 347 of file AthMonitorAlgorithm.h.

◆ m_useLumi

Gaudi::Property<bool> AthMonitorAlgorithm::m_useLumi {this,"EnableLumi",false}
protectedinherited

Allows use of various luminosity functions.

Definition at line 359 of file AthMonitorAlgorithm.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.

◆ m_vTrigChainNames

std::vector<std::string> AthMonitorAlgorithm::m_vTrigChainNames
protectedinherited

Vector of trigger chain names parsed from trigger chain string.

Definition at line 356 of file AthMonitorAlgorithm.h.


The documentation for this class was generated from the following files:
muonContainer
xAOD::MuonContainer * muonContainer
Definition: TrigGlobEffCorrValidation.cxx:188
MMRawDataMonAlg::m_doMMESD
Gaudi::Property< bool > m_doMMESD
Definition: MMRawDataMonAlg.h:106
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
MMRawDataMonAlg::m_MMContainerKey
SG::ReadHandleKey< Muon::MMPrepDataContainer > m_MMContainerKey
Definition: MMRawDataMonAlg.h:67
MMRawDataMonAlg::get_bin_for_occ_ASide_hist
int get_bin_for_occ_ASide_hist(const int stationEta, const int multiplet, const int gas_gap) const
Definition: MMRawDataUtils.cxx:106
Muon::nsw::STGTPSegments::moduleIDBits::stationPhi
constexpr uint8_t stationPhi
station Phi 1 to 8
Definition: NSWSTGTPDecodeBitmaps.h:158
AthMonitorAlgorithm::Environment_t::tier0Raw
@ tier0Raw
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
checkFileSG.line
line
Definition: checkFileSG.py:75
sendEI_SPB.ch
ch
Definition: sendEI_SPB.py:35
Muon::MMPrepData
Class to represent MM measurements.
Definition: MMPrepData.h:22
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
get_generator_info.result
result
Definition: get_generator_info.py:21
MMRawDataMonAlg::m_do_mm_overview
Gaudi::Property< bool > m_do_mm_overview
Definition: MMRawDataMonAlg.h:107
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
Muon::MMPrepData::globalPosition
virtual const Amg::Vector3D & globalPosition() const override final
Returns the global position.
Definition: MMPrepData.h:211
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
Muon::nsw::STGTPSegments::MergedSegmentProperty::phiID
@ phiID
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
AthMonitorAlgorithm::m_trigDecTool
PublicToolHandle< Trig::TrigDecisionTool > m_trigDecTool
Tool to tell whether a specific trigger is passed.
Definition: AthMonitorAlgorithm.h:340
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
Trk::locY
@ locY
local cartesian
Definition: ParamDefs.h:38
SG::ReadHandle::cptr
const_pointer_type cptr()
Dereference the pointer.
MMRawDataMonAlg::m_meTrkKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_meTrkKey
Definition: MMRawDataMonAlg.h:69
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
python.MagFieldUtils.lumiblock
lumiblock
Definition: MagFieldUtils.py:188
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
MMRawDataMonAlg::m_mmtpRdoKey
SG::ReadHandleKey< xAOD::NSWMMTPRDOContainer > m_mmtpRdoKey
Definition: MMRawDataMonAlg.h:70
AthMonitorAlgorithm::Environment_t::tier0
@ tier0
AthMonitorAlgorithm::Environment_t::AOD
@ AOD
MMRawDataMonAlg::m_do_stereoCorrection
Gaudi::Property< bool > m_do_stereoCorrection
Definition: MMRawDataMonAlg.h:108
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Trk::Track::trackStateOnSurfaces
const Trk::TrackStates * trackStateOnSurfaces() const
return a pointer to a const DataVector of const TrackStateOnSurfaces.
MMRawDataMonAlg::m_cut_pt
Gaudi::Property< float > m_cut_pt
Definition: MMRawDataMonAlg.h:109
accumulate
bool accumulate(AccumulateMap &map, std::vector< module_t > const &modules, FPGATrackSimMatrixAccumulator const &acc)
Accumulates an accumulator (e.g.
Definition: FPGATrackSimMatrixAccumulator.cxx:22
MMRawDataMonAlg::get_bin_for_feb_occ
int get_bin_for_feb_occ(const int gas_gap, const int FEB) const
Definition: MMRawDataUtils.cxx:136
AthMonitorAlgorithm::m_vTrigChainNames
std::vector< std::string > m_vTrigChainNames
Vector of trigger chain names parsed from trigger chain string.
Definition: AthMonitorAlgorithm.h:356
AthCommonDataStore::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 > renounce(T &h)
Definition: AthCommonDataStore.h:380
AthMonitorAlgorithm::m_EventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_EventInfoKey
Key for retrieving EventInfo from StoreGate.
Definition: AthMonitorAlgorithm.h:362
MMRawDataMonAlg::m_muonKey
SG::ReadHandleKey< xAOD::MuonContainer > m_muonKey
Definition: MMRawDataMonAlg.h:68
module_driven_slicing.layers
layers
Definition: module_driven_slicing.py:114
skel.it
it
Definition: skel.GENtoEVGEN.py:396
MMRawDataMonAlg::fillMMOverviewHistograms
void fillMMOverviewHistograms(const MMOverviewHistogramStruct &vects, MMByPhiStruct(&occupancyPlots)[16][2], const int lb) const
Definition: MMRawDataMonAlg.cxx:259
Muon::MMClusterOnTrack::prepRawData
virtual const MMPrepData * prepRawData() const
Returns the MMPrepData - is a TRT_DriftCircle in this scope.
Definition: MMClusterOnTrack.h:128
M_PI
#define M_PI
Definition: ActiveFraction.h:11
bin
Definition: BinsDiffFromStripMedian.h:43
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
Trk::PrepRawData::rdoList
const std::vector< Identifier > & rdoList() const
return the List of rdo identifiers (pointers)
AthMonitorAlgorithm::m_toolLookupMap
std::unordered_map< std::string, size_t > m_toolLookupMap
Definition: AthMonitorAlgorithm.h:367
AthMonitorAlgorithm::m_environment
AthMonitorAlgorithm::Environment_t m_environment
Instance of the Environment_t enum.
Definition: AthMonitorAlgorithm.h:350
athena.value
value
Definition: athena.py:124
MMRawDataMonAlg::get_PCB_from_channel
int get_PCB_from_channel(const int channel) const
Definition: MMRawDataUtils.cxx:23
Trk::RIO_OnTrack
Definition: RIO_OnTrack.h:70
cosmics
Definition: cosmics.py:1
stime
std::string stime()
return the current data and time
Definition: computils.cxx:213
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
PlotCalibFromCool.multi
multi
Definition: PlotCalibFromCool.py:99
x
#define x
CaloSwCorrections.gap
def gap(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:212
AthMonitorAlgorithm::trigChainsArePassed
bool trigChainsArePassed(const std::vector< std::string > &vTrigNames) const
Check whether triggers are passed.
Definition: AthMonitorAlgorithm.cxx:194
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
MMRawDataMonAlg::clusterFromSegments
void clusterFromSegments(const Trk::SegmentCollection *, const int lb) const
Definition: MMRawDataMonAlg.cxx:845
AthMonitorAlgorithm::Environment_t::user
@ user
MMRawDataMonAlg::MMEfficiency
void MMEfficiency(const xAOD::TrackParticleContainer *) const
Definition: MMRawDataMonAlg.cxx:747
drawFromPickle.atan
atan
Definition: drawFromPickle.py:36
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
dq_defect_copy_defect_database.channels
def channels
Definition: dq_defect_copy_defect_database.py:56
Monitored::Collection
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
Definition: MonitoredCollection.h:38
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
AthMonitorAlgorithm::m_dummy
const ToolHandle< GenericMonitoringTool > m_dummy
Definition: AthMonitorAlgorithm.h:369
MMRawDataMonAlg::m_segm_type
SG::ReadHandleKey< Trk::SegmentCollection > m_segm_type
Definition: MMRawDataMonAlg.h:66
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
TRT::Hit::side
@ side
Definition: HitInfo.h:83
MMRawDataMonAlg::get_bin_for_occ_CSide_hist
int get_bin_for_occ_CSide_hist(const int stationEta, const int multiplet, const int gas_gap) const
Definition: MMRawDataUtils.cxx:97
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
PyPoolBrowser.item
item
Definition: PyPoolBrowser.py:129
MMRawDataMonAlg::fillMMTrigger
void fillMMTrigger(const xAOD::NSWMMTPRDOContainer *, const int) const
Definition: MMRawDataMonAlg.cxx:397
TileSynchronizeBch.online
online
Definition: TileSynchronizeBch.py:88
uint
unsigned int uint
Definition: LArOFPhaseFill.cxx:20
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthMonitorAlgorithm::m_DQFilterTools
ToolHandleArray< IDQFilterTool > m_DQFilterTools
Array of Data Quality filter tools.
Definition: AthMonitorAlgorithm.h:341
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
MMRawDataMonAlg::get_FEB_from_channel
int get_FEB_from_channel(const int channel, const int stEta) const
Definition: MMRawDataUtils.cxx:34
python.BunchSpacingUtils.lb
lb
Definition: BunchSpacingUtils.py:88
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
lumiFormat.i
int i
Definition: lumiFormat.py:85
python.CaloCondTools.g
g
Definition: CaloCondTools.py:15
AthMonitorAlgorithm::DataType_t::heavyIonCollisions
@ heavyIonCollisions
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
tolower
void tolower(std::string &s)
Definition: AthenaSummarySvc.cxx:111
AthMonitorAlgorithm::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) const =0
adds event to the monitoring histograms
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
MMRawDataMonAlg::get_sectorEta_from_stationEta
int get_sectorEta_from_stationEta(const int stationEta) const
Definition: MMRawDataUtils.cxx:87
sign
int sign(int a)
Definition: TRT_StrawNeighbourSvc.h:107
MMRawDataMonAlg::m_DetectorManagerKey
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
Definition: MMRawDataMonAlg.h:65
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MMRawDataMonAlg::fillMMOverviewVects
StatusCode fillMMOverviewVects(const Muon::MMPrepData *, MMOverviewHistogramStruct &vects, MMByPhiStruct(&occupancyPlots)[16][2]) const
Definition: MMRawDataMonAlg.cxx:185
MMRawDataMonAlg::get_sectorPhi_from_stationPhi_stName
int get_sectorPhi_from_stationPhi_stName(const int stationPhi, const std::string &stName) const
Definition: MMRawDataUtils.cxx:64
AnalysisUtils::Delta::R
double R(const INavigable4Momentum *p1, const double v_eta, const double v_phi)
Definition: AnalysisMisc.h:49
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
Muon::MMPrepData::stripNumbers
const std::vector< uint16_t > & stripNumbers() const
returns the list of strip numbers
Definition: MMPrepData.h:247
AthMonitorAlgorithm::fill
void fill(const ToolHandle< GenericMonitoringTool > &groupHandle, std::vector< std::reference_wrapper< Monitored::IMonitoredVariable >> &&variables) const
Fills a vector of variables to a group by reference.
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
Muon::MuonPrepDataCollection
Template to hold collections of MuonPrepRawData objects.
Definition: MuonPrepDataCollection.h:46
AthMonitorAlgorithm::GetEventInfo
SG::ReadHandle< xAOD::EventInfo > GetEventInfo(const EventContext &) const
Return a ReadHandle for an EventInfo object (get run/event numbers, etc.)
Definition: AthMonitorAlgorithm.cxx:107
DataVector< const Trk::MeasurementBase >
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
AthMonitorAlgorithm::m_dataType
AthMonitorAlgorithm::DataType_t m_dataType
Instance of the DataType_t enum.
Definition: AthMonitorAlgorithm.h:351
AthReentrantAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthReentrantAlgorithm.h:153
Muon::MMPrepData::stripTimes
const std::vector< short int > & stripTimes() const
returns the list of times
Definition: MMPrepData.h:252
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
AthMonitorAlgorithm::DataType_t::cosmics
@ cosmics
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
trigbs_pickEvents.num
num
Definition: trigbs_pickEvents.py:76
Muon::MMClusterOnTrack
Class to represent calibrated clusters formed from TGC strips.
Definition: MMClusterOnTrack.h:26
Trk::MeasurementBase
Definition: MeasurementBase.h:58
MuonGM::nStrips
int nStrips(const MuonGM::TgcReadoutElement &readoutEle, int layer)
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.cxx:46
Trk::PrepRawData::identify
Identifier identify() const
return the identifier
AthMonitorAlgorithm::m_tools
ToolHandleArray< GenericMonitoringTool > m_tools
Array of Generic Monitoring Tools.
Definition: AthMonitorAlgorithm.h:338
AthMonitorAlgorithm::Environment_t::online
@ online
MMRawDataMonAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MMRawDataMonAlg.h:62
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
Trk::TrackStateOnSurface
represents the track state (measurement, material, fit parameters and quality) at a surface.
Definition: TrackStateOnSurface.h:71
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
MMRawDataMonAlg::fillMMSummaryVects
StatusCode fillMMSummaryVects(const Muon::MMPrepData *, MMSummaryHistogramStruct(&vects)[2][16][2][2][4]) const
Definition: MMRawDataMonAlg.cxx:295
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
AthMonitorAlgorithm::Environment_t::tier0ESD
@ tier0ESD
AthMonitorAlgorithm::Environment_t::altprod
@ altprod
AthReentrantAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthReentrantAlgorithm.cxx:96
charge
double charge(const T &p)
Definition: AtlasPID.h:538
AthMonitorAlgorithm::m_enforceExpressTriggers
Gaudi::Property< bool > m_enforceExpressTriggers
Definition: AthMonitorAlgorithm.h:372
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133
MMRawDataMonAlg::fillMMHistograms
StatusCode fillMMHistograms(const Muon::MMPrepData *) const
Definition: MMRawDataMonAlg.cxx:393
item
Definition: ItemListSvc.h:43
WriteBchToCool.user
user
Definition: WriteBchToCool.py:76
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
Trk::MeasurementBase::localParameters
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
Definition: MeasurementBase.h:132
MMRawDataMonAlg::m_doDetailedHists
Gaudi::Property< bool > m_doDetailedHists
Definition: MMRawDataMonAlg.h:110
AthMonitorAlgorithm::initialize
virtual StatusCode initialize() override
initialize
Definition: AthMonitorAlgorithm.cxx:18
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
Trk::Track::measurementsOnTrack
const DataVector< const MeasurementBase > * measurementsOnTrack() const
return a pointer to a vector of MeasurementBase (NOT including any that come from outliers).
Definition: Tracking/TrkEvent/TrkTrack/src/Track.cxx:178
ATH_LIKELY
#define ATH_LIKELY(x)
Definition: AthUnlikelyMacros.h:16
a
TList * a
Definition: liststreamerinfos.cxx:10
CaloLCW_tf.group
group
Definition: CaloLCW_tf.py:28
h
python.CaloScaleNoiseConfig.str
str
Definition: CaloScaleNoiseConfig.py:78
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
AthMonitorAlgorithm::DataType_t::collisions
@ collisions
AthMonitorAlgorithm::m_name
std::string m_name
Definition: AthMonitorAlgorithm.h:366
Trk::RIO_OnTrack::identify
Identifier identify() const
return the identifier -extends MeasurementBase
Definition: RIO_OnTrack.h:152
MMRawDataMonAlg::fillMMSummaryHistograms
StatusCode fillMMSummaryHistograms(const MMSummaryHistogramStruct(&vects)[2][16][2][2][4]) const
Definition: MMRawDataMonAlg.cxx:351
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
MMRawDataMonAlg::clusterFromTrack
void clusterFromTrack(const xAOD::TrackParticleContainer *, const int lb) const
Definition: MMRawDataMonAlg.cxx:497
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
AthMonitorAlgorithm::AthMonitorAlgorithm
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition: AthMonitorAlgorithm.cxx:7
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
str
Definition: BTagTrackIpAccessor.cxx:11
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
Muon::MuonSegment
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment/MuonSegment/MuonSegment.h:45
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
Monitored::Scalar
Declare a monitored scalar variable.
Definition: MonitoredScalar.h:34
Muon::nsw::STGTPSegments::moduleIDBits::stationEta
constexpr uint8_t stationEta
1 to 3
Definition: NSWSTGTPDecodeBitmaps.h:156
AthMonitorAlgorithm::DataType_t::userDefined
@ userDefined
Trk::loc1
@ loc1
Definition: ParamDefs.h:34
Muon::MMPrepData::charge
int charge() const
Returns the AD.
Definition: MMPrepData.h:227
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
Trk::TrackStateOnSurface::Measurement
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
Definition: TrackStateOnSurface.h:101
AthMonitorAlgorithm::DataType_t::monteCarlo
@ monteCarlo
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
fitman.k
k
Definition: fitman.py:528
NSWL1::PadTriggerAdapter::segment
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
Definition: PadTriggerAdapter.cxx:5
ServiceHandle< ICondSvc >
collisions
Definition: collisions.py:1
Identifier
Definition: IdentifierFieldParser.cxx:14