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

#include <L2MuonSAIOMon.h>

Inheritance diagram for L2MuonSAIOMon:
Collaboration diagram for L2MuonSAIOMon:

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

 L2MuonSAIOMon (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual StatusCode initialize () override
 initialize More...
 
virtual StatusCode fillHistograms (const EventContext &ctx) const override
 Function that steers anlayses. 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, V, H > &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

virtual StatusCode fillVariablesPerChain (const EventContext &ctx, const std::string &chain) const override
 Function that fills variables of trigger objects associated to specified trigger chains. More...
 
virtual StatusCode fillVariablesPerOfflineMuonPerChain (const EventContext &ctx, const xAOD::Muon *mu, const std::string &chain) const override
 Function that fills variables of trigger objects associated to specified trigger chains comparing offline muons. More...
 
virtual bool selectEvents () const
 Function that defines the event selection for anlayses User should reimlement in a subclass if needed. More...
 
virtual StatusCode selectMuons (SG::ReadHandle< xAOD::MuonContainer > &muons, std::vector< const xAOD::Muon * > &probes) const
 Function that defines the event selection for anlayses Users should reimlement in a subclass if needed. More...
 
virtual StatusCode fillVariables (const EventContext &ctx) const
 Function that fills variables by just retrieving containers of trigger objects. More...
 
virtual StatusCode fillVariablesPerOfflineMuon (const EventContext &ctx, const xAOD::Muon *mu) const
 Function that fills variables that are compared to offline muons but the trigger chains are not specified. More...
 
template<class T , class FUNCT >
StatusCode fillVariablesRatioPlots (const EventContext &ctx, const xAOD::Muon *mu, std::string &&trigstep, xAOD::Muon::TrackParticleType type, FUNCT matchFunc) const
 Function that fills variables of ratio plots. More...
 
template<class T >
StatusCode fillVariableEtaPhi (const EventContext &ctx, SG::ReadHandleKey< DataVector< T > > ReadHandleKey, std::string &&trigstep, std::tuple< bool, double, double >(*PosFunc)(const T *)=&TrigMuonMonitorAlgorithm::defaultPosFunc< T >) const
 Function that fills variables of etaphi2D plots. More...
 
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...
 

Static Protected Member Functions

template<class T >
static std::tuple< bool, double, double > defaultPosFunc (const T *trig)
 

Protected Attributes

ToolHandle< MuonMatchingToolm_matchTool {this, "MuonMatchingTool", "MuonMatchingTool", "Tool for matching offline and online objects"}
 
ToolHandle< CP::IMuonSelectionToolm_muonSelectionTool {this,"MuonSelectionTool","CP::MuonSelectionTool/MuonSelectionTool","MuonSelectionTool"}
 
SG::ReadHandleKey< xAOD::MuonContainerm_MuonContainerKey {this, "MuonContainerName", "Muons", "Offline muon container"}
 
Gaudi::Property< std::vector< std::string > > m_monitored_chains {this, "MonitoredChains", {}, "Trigger chains that are monitored"}
 List of trigger chains that are monitored in fillVariablesPerChain and fillVariablesPerOfflineMuonPerChain. More...
 
Gaudi::Property< int > m_muontype {this, "MuonType", xAOD::Muon::MuonType::Combined, "MuonType used for monitoring"}
 Requirement for the offline muon type considered in analyses. More...
 
Gaudi::Property< std::string > m_group {this, "Group", "", "Histogram group"}
 Name of monitored group. More...
 
const float m_ratio_measurement_threshold = 4
 Threshold for ratio measurement. More...
 
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 matchL2IO_wContainer (const EventContext &ctx, const std::string &chain, std::vector< const xAOD::L2CombinedMuon * > &Trig_L2IOobjects) const
 
StatusCode L2OverlapRemover (const std::vector< const xAOD::L2CombinedMuon * > &matchSA_L2IOobjects, std::vector< bool > &isoverlap, std::vector< bool > &passOR) const
 
bool isOverlap (const xAOD::L2CombinedMuon *matchSA_L2IOobject1, const xAOD::L2CombinedMuon *matchSA_L2IOobject2) const
 
StatusCode chooseBestMuon (const std::vector< const xAOD::L2CombinedMuon * > &matchSA_L2IOobjects, std::vector< bool > &passOR, std::vector< unsigned int > &mucombResult) const
 
StatusCode muCombHypo_TDTworkaround (const std::string &chain, const std::vector< const xAOD::L2CombinedMuon * > &Trig_L2IOobjects, std::vector< bool > &pass_muCombHypo) const
 
StatusCode isPassedmuCombHypo (const std::string &chain, const xAOD::L2CombinedMuon *Trig_L2IOobjects, bool &pass_muCombHypo) const
 
StatusCode decision_ptthreshold (const std::string &chain, std::vector< float > &my_EtaBins, std::vector< float > &my_muCombThres, bool &my_pikCuts, float &my_maxPtToApplyPik, float &my_chi2MaxID) const
 
const xAOD::L2CombinedMuonsearchL2InsideOut (const EventContext &ctx, const xAOD::Muon *mu, const std::string &trigger) const
 
const xAOD::MuonsearchTagOfflineMuon (const EventContext &ctx, const xAOD::Muon *probe) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Static Private Member Functions

static std::tuple< float, float, float > L2ORPosForMatchFunc (const xAOD::L2StandAloneMuon *trig)
 
static std::tuple< float, float, float > L2ORPosForMatchFunc (const xAOD::L2CombinedMuon *trig)
 

Private Attributes

Gaudi::Property< std::vector< float > > m_monitored_chains_plateau {this, "Plateaus", {}, "List of plateaus of measured trigger"}
 
std::map< std::string, double > m_plateaus {}
 
SG::ReadHandleKey< xAOD::L2CombinedMuonContainerm_L2MuonCBIOContainerKey {this, "L2CombinedMuonContainerName_IO", "HLT_MuonL2CBInfoIOmode", "L2MuonCBIO container"}
 
Gaudi::Property< std::vector< float > > m_etaBins {this, "EtaBins", {0, 0.9, 1.1, 1.9, 2.1, 9.9}, "eta bins of DR and mass thresholds"}
 
Gaudi::Property< std::vector< float > > m_dRCBThres {this, "DRThres", {0.002, 0.001, 0.002, 0.002, 0.002}, "DR threshold of L2CB"}
 
Gaudi::Property< std::vector< float > > m_dRbySAThres {this, "dRbySAThres", {0, 0, 0, 0, 0}, "mufast DR threshold of L2CB"}
 
Gaudi::Property< std::vector< float > > m_massCBThres {this, "MassThres", {0.004, 0.002, 0.006, 0.006, 0.006}, "mass threshold of L2CB"}
 
bool m_RequireDR = true
 
bool m_RequireDRbySA = false
 
bool m_RequireMass = true
 
bool m_RequireSameSign = 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 15 of file L2MuonSAIOMon.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

◆ L2MuonSAIOMon()

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

Definition at line 11 of file L2MuonSAIOMon.cxx.

12  : TrigMuonMonitorAlgorithm(name, pSvcLocator)
13 {}

Member Function Documentation

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality
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 75 of file AthCommonReentrantAlgorithm.cxx.

64 {
65  return 0;
66 }

◆ chooseBestMuon()

StatusCode L2MuonSAIOMon::chooseBestMuon ( const std::vector< const xAOD::L2CombinedMuon * > &  matchSA_L2IOobjects,
std::vector< bool > &  passOR,
std::vector< unsigned int > &  mucombResult 
) const
private

Definition at line 860 of file L2MuonSAIOMon.cxx.

860  {
861 
862  const double ZERO_LIMIT = 1e-4;
863  unsigned int i,j,k;
864 
865  ATH_MSG_DEBUG( "--- choose best among overlaps & disable EVs (muComb based) ---" );
866  for(i=0; i<matchSA_L2IOobjects.size(); i++) {
867  ATH_MSG_DEBUG( "++ i=" << i << ": result=" << mucombResult[i] );
868  if( mucombResult[i] != i ) {
869  ATH_MSG_DEBUG( " overlap to some one. skip." );
870  continue;
871  }
872  std::vector<unsigned int> others;
873  for(j=0; j<matchSA_L2IOobjects.size(); j++) {
874  if( mucombResult[j] == mucombResult[i] ) others.emplace_back(j);
875  }
876  if( others.size() == 1 ) {
877  ATH_MSG_DEBUG( " unique object. keep it active." );
878  continue;
879  }
880  else { // must choose one best
881  ATH_MSG_DEBUG( " overlapped objects among: " << others );
882  unsigned int bestMuon = 0;
883  float maxPtCombMf = 0.;
884  float mindRRoadRoI = 999.;
885  for(k=0; k<others.size(); k++) {
886  j=others[k];
887 
888  float ptCombMf = std::abs(matchSA_L2IOobjects.at(j)->pt()/1e3);
889 
890  const float roadPhiP = std::atan2(matchSA_L2IOobjects.at(j)->muSATrack()->dirPhiMS(),1.);
891  const float roadPhiM = std::atan2(-1*matchSA_L2IOobjects.at(j)->muSATrack()->dirPhiMS(),-1.);
892  const float roadPhi = (std::abs(xAOD::P4Helpers::deltaPhi(roadPhiP, matchSA_L2IOobjects.at(j)->muSATrack()->roiPhi()))
893  < std::abs(xAOD::P4Helpers::deltaPhi(roadPhiM, matchSA_L2IOobjects.at(j)->muSATrack()->roiPhi())))? roadPhiP : roadPhiM;
894  float roadAw = 0.;
895  if(std::abs(matchSA_L2IOobjects.at(j)->muSATrack()->roiEta()) < 1.05) { // barrel
896  if( std::abs(matchSA_L2IOobjects.at(j)->muSATrack()->roadAw(1,0)) > ZERO_LIMIT ) roadAw = matchSA_L2IOobjects.at(j)->muSATrack()->roadAw(1,0);
897  else if( std::abs(matchSA_L2IOobjects.at(j)->muSATrack()->roadAw(2,0)) > ZERO_LIMIT ) roadAw = matchSA_L2IOobjects.at(j)->muSATrack()->roadAw(2,0);
898  else if( std::abs(matchSA_L2IOobjects.at(j)->muSATrack()->roadAw(0,0)) > ZERO_LIMIT ) roadAw = matchSA_L2IOobjects.at(j)->muSATrack()->roadAw(0,0);
899  }
900  else { // endcap
901  if( std::abs(matchSA_L2IOobjects.at(j)->muSATrack()->roadAw(4,0)) > ZERO_LIMIT ) roadAw = matchSA_L2IOobjects.at(j)->muSATrack()->roadAw(4,0);
902  else if( std::abs(matchSA_L2IOobjects.at(j)->muSATrack()->roadAw(5,0)) > ZERO_LIMIT ) roadAw = matchSA_L2IOobjects.at(j)->muSATrack()->roadAw(5,0);
903  else if( std::abs(matchSA_L2IOobjects.at(j)->muSATrack()->roadAw(3,0)) > ZERO_LIMIT ) roadAw = matchSA_L2IOobjects.at(j)->muSATrack()->roadAw(3,0);
904  }
905  float roadEta = 999.;
906  if(std::abs(roadAw) > ZERO_LIMIT) roadEta = -std::log(std::tan(0.5*std::atan(std::abs(roadAw))));
907  if(roadAw < 0) roadEta *= -1.;
908  float detaRoadRoI = roadEta - matchSA_L2IOobjects.at(j)->muSATrack()->roiEta();
909  float dphiRoadRoI = xAOD::P4Helpers::deltaPhi(roadPhi, matchSA_L2IOobjects.at(j)->muSATrack()->roiPhi());
910  float dRRoadRoI = std::sqrt(detaRoadRoI*detaRoadRoI + dphiRoadRoI*dphiRoadRoI);
911  ATH_MSG_DEBUG(" j="<< j << " , ptCombMf=" << ptCombMf << ", dRRoadRoI=" << dRRoadRoI);
912 
913 
914  if( (ptCombMf > maxPtCombMf) ||
915  (std::abs(ptCombMf - maxPtCombMf) < ZERO_LIMIT &&
916  dRRoadRoI < mindRRoadRoI) ) {
917  maxPtCombMf = ptCombMf;
918  mindRRoadRoI = dRRoadRoI;
919  bestMuon = j;
920  }
921  }
922  ATH_MSG_DEBUG( " best is: bestMuon/maxPtCombMf=" << bestMuon << " / " << maxPtCombMf );
923 
924  for(k=0; k<others.size(); k++) {
925  j=others[k];
926  if( j != bestMuon ) {
927  ATH_MSG_DEBUG( " EventView( j=" << j << " ) is not active" );
928 
929  passOR.at(j) = false;
930  }
931  else{
932  ATH_MSG_DEBUG( " EventView( j=" << j << " ) is best one" );
933  }
934  }
935  }
936  }
937 
938 
939  return StatusCode::SUCCESS;
940 }

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

◆ decision_ptthreshold()

StatusCode L2MuonSAIOMon::decision_ptthreshold ( const std::string &  chain,
std::vector< float > &  my_EtaBins,
std::vector< float > &  my_muCombThres,
bool &  my_pikCuts,
float &  my_maxPtToApplyPik,
float &  my_chi2MaxID 
) const
private

Definition at line 1005 of file L2MuonSAIOMon.cxx.

1006  {
1007 
1008  my_maxPtToApplyPik = 25.;
1009  my_chi2MaxID = 3.5;
1010  ATH_MSG_DEBUG("this chain is" << chain);
1011  if(chain == "HLT_mu4_l2io_L1MU3V"){
1012  my_EtaBins = {0, 1.05, 1.5, 2.0, 9.9}; //4GeV_v15a
1013  my_muCombThres = {3.86, 3.77, 3.69, 3.70}; //4GeV_v15a
1014  my_pikCuts = false;
1015  }else if(chain == "HLT_mu24_ivarmedium_mu6_l2io_probe_L1MU14FCH"){
1016  my_EtaBins = {0, 1.05, 1.5, 2.0, 9.9}; //6GeV_v15a
1017  my_muCombThres = {5.87, 5.79, 5.70, 5.62}; //6GeV_v15a
1018  my_pikCuts = false;
1019  }else if(chain == "HLT_mu24_ivarmedium_mu6_l2io_probe_L1MU18VFCH"){
1020  my_EtaBins = {0, 1.05, 1.5, 2.0, 9.9}; //6GeV_v15a
1021  my_muCombThres = {5.87, 5.79, 5.70, 5.62}; //6GeV_v15a
1022  my_pikCuts = false;
1023  }else{
1024  ATH_MSG_ERROR("muCombHypo config is NOT defined in this package:chain = " << chain);
1025  }
1026  return StatusCode::SUCCESS;
1027 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  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, V, H > &  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, V, H > &  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, V, H > &  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, V, H > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

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

◆ defaultPosFunc()

template<class T >
static std::tuple<bool, double, double> TrigMuonMonitorAlgorithm::defaultPosFunc ( const T *  trig)
inlinestaticprotectedinherited

◆ 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 & AthCommonReentrantAlgorithm< Gaudi::Algorithm >::extraOutputDeps
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.

90 {
91  // If we didn't find any symlinks to add, just return the collection
92  // from the base class. Otherwise, return the extended collection.
93  if (!m_extendedExtraObjects.empty()) {
95  }
96  return BaseAlg::extraOutputDeps();
97 }

◆ fillHistograms()

StatusCode TrigMuonMonitorAlgorithm::fillHistograms ( const EventContext &  ctx) const
overridevirtualinherited

Function that steers anlayses.

It currently calles four types of analyses, fillVariables, fillVariablesPerOfflineMuon, fillVariablesPerChain and fillVariablesPerOfflineMuonPerChain that can be overridden in subclasses to do specific analyses.

See also
fillVariables, fillVariablesPerOfflineMuon, fillVariablesPerChain and fillVariablesPerOfflineMuonPerChain
Parameters
ctxEventContext provided by athenaMT

Implements AthMonitorAlgorithm.

Definition at line 22 of file TrigMuonMonitorAlgorithm.cxx.

22  {
23 
24 
25  bool passToMonitor = selectEvents();
26 
27  if(passToMonitor){
28 
31 
33  for(const std::string& chain : m_monitored_chains){
35  }
36 
37 
40  if (! muons.isValid() ) {
41  ATH_MSG_ERROR("evtStore() does not contain muon Collection with name "<< m_MuonContainerKey);
42  return StatusCode::FAILURE;
43  }
44  std::vector<const xAOD::Muon*> probes;
45  ATH_CHECK(selectMuons(muons, probes));
46 
47  for(const xAOD::Muon* mu : probes){
49 
51  for(const std::string& chain : m_monitored_chains){
53  }
54  }
55 
56  }
57 
58 
59 
60  return StatusCode::SUCCESS;
61 }

◆ fillVariableEtaPhi()

template<class T >
StatusCode TrigMuonMonitorAlgorithm::fillVariableEtaPhi ( const EventContext &  ctx,
SG::ReadHandleKey< DataVector< T > >  ReadHandleKey,
std::string &&  trigstep,
std::tuple< bool, double, double >(*)(const T *)  PosFunc = &TrigMuonMonitorAlgorithm::defaultPosFunc< T > 
) const
protectedinherited

Function that fills variables of etaphi2D plots.

See also
TrigMuonMonitorAlgorithm.icc for the implementation
Parameters
ctxEventContext provided by athenaMT
ReadHandleKeySG::ReadHandleKey of online muon.
trigsteptrigger step
PosFuncFunction pointer that implements cuts for the online muon candidates.

◆ fillVariables()

StatusCode TrigMuonMonitorAlgorithm::fillVariables ( const EventContext &  ctx) const
protectedvirtualinherited

Function that fills variables by just retrieving containers of trigger objects.

Users should reimlement in a subclass if needed.

See also
fillHistograms
Parameters
ctxEventContext provided by athenaMT

Reimplemented in EFMuonMon, L2muCombMon, L2MuonSAMon, L1MuonMon, and MuonTriggerCount.

Definition at line 82 of file TrigMuonMonitorAlgorithm.cxx.

82  {
83  return StatusCode::SUCCESS;
84 }

◆ fillVariablesPerChain()

StatusCode L2MuonSAIOMon::fillVariablesPerChain ( const EventContext &  ctx,
const std::string &  chain 
) const
overrideprotectedvirtual

Function that fills variables of trigger objects associated to specified trigger chains.

This is called in the for loop of trigger chains in fillHistograms. Users should reimlement in a subclass if needed.

See also
fillHistograms
Parameters
ctxEventContext provided by athenaMT
chainTrigger chain provided in @cfillHistograms

Reimplemented from TrigMuonMonitorAlgorithm.

Definition at line 34 of file L2MuonSAIOMon.cxx.

34  {
35 
36  ATH_MSG_DEBUG ("Filling histograms for " << name() << "...");
37 
38  if( chain.find("probe") != std::string::npos ) return StatusCode::SUCCESS; // don't use TagAndProbe chains
39 
40 
41  const float ZERO_LIMIT = 0.00001;
42 
43 
44  //TDT workaround
45  std::vector< const xAOD::L2CombinedMuon* > Trig_L2IOobjects;
46  //std::vector< bool > pass_muCombHypo;
47  ATH_CHECK( matchL2IO_wContainer(ctx, chain, Trig_L2IOobjects) );
48  //bool pass_muCombHypo_evt = muCombHypo_TDTworkaround(chain, Trig_L2IOobjects, pass_muCombHypo);
49  ATH_MSG_DEBUG(" Trig_L2IOobjects.size(): " << Trig_L2IOobjects.size() );
50 
51  // check basic EDM variables using single muon chain
52  for(const auto& Trig_L2IOobject : Trig_L2IOobjects){
53  ATH_MSG_DEBUG(" Trig_L2IOobject->muSATrack()->roiWord()/Trig_L2IOobject->pt(): " << Trig_L2IOobject->muSATrack()->roiWord() << "/" << Trig_L2IOobject->pt() );
54  // basic EDM variables
55  bool mf_failure = false;
56  auto cbioPt = Monitored::Scalar<float>(chain+"_Pt",-999.);
57  auto cbioEta = Monitored::Scalar<float>(chain+"_Eta",-999.);
58  auto cbioPhi = Monitored::Scalar<float>(chain+"_Phi",-999.);
59  cbioPt = Trig_L2IOobject->pt()/1e3 * Trig_L2IOobject->charge(); // convert to GeV
60  cbioEta = Trig_L2IOobject->eta();
61  cbioPhi = Trig_L2IOobject->phi();
62  ATH_MSG_DEBUG("cbioPt = " << cbioPt << ", cbioEta =" << cbioEta << ", cbioPhi = " << cbioPhi);
63  if(std::abs(cbioPt) < ZERO_LIMIT || std::abs(Trig_L2IOobject->muSATrack()->pt()) < ZERO_LIMIT) mf_failure = true;
64 
65  if( mf_failure ) continue;
66 
67  // region variables
68  auto isBarrel = Monitored::Scalar<bool>(chain+"_isBarrel",false);
69  auto isEndcap = Monitored::Scalar<bool>(chain+"_isEndcap",false);
70 
71  // define regions
72  int saddr = Trig_L2IOobject->muSATrack()->sAddress();
73  if(saddr == -1) isEndcap = true;
74  else isBarrel = true;;
75 
76 
77  fill(m_group+"_"+chain, cbioPt, isBarrel, isEndcap);
78  fill(m_group+"_"+chain, cbioEta);
79  fill(m_group+"_"+chain, cbioPhi, isBarrel, isEndcap);
80 
81  }
82 
83  return StatusCode::SUCCESS;
84 }

◆ fillVariablesPerOfflineMuon()

StatusCode TrigMuonMonitorAlgorithm::fillVariablesPerOfflineMuon ( const EventContext &  ctx,
const xAOD::Muon mu 
) const
protectedvirtualinherited

Function that fills variables that are compared to offline muons but the trigger chains are not specified.

This is called in the for loop of offline muons in fillHistograms. Users should reimlement in a subclass if needed.

See also
fillHistograms
Parameters
ctxEventContext provided by athenaMT
muPointer to an offline muon provided in fillHistograms

Reimplemented in EFMuonMon, L2muCombMon, and L2MuonSAMon.

Definition at line 87 of file TrigMuonMonitorAlgorithm.cxx.

87  {
88  return StatusCode::SUCCESS;
89 }

◆ fillVariablesPerOfflineMuonPerChain()

StatusCode L2MuonSAIOMon::fillVariablesPerOfflineMuonPerChain ( const EventContext &  ctx,
const xAOD::Muon mu,
const std::string &  chain 
) const
overrideprotectedvirtual

Function that fills variables of trigger objects associated to specified trigger chains comparing offline muons.

This is called in the for loop of trigger chains and offline muons in fillHistograms. Users should reimlement in a subclass if needed.

See also
fillHistograms
Parameters
ctxEventContext provided by athenaMT
muPointer to an offline muon provided in fillHistograms
chainTrigger chain provided in fillHistograms

Reimplemented from TrigMuonMonitorAlgorithm.

Definition at line 87 of file L2MuonSAIOMon.cxx.

87  {
88 
89  ATH_MSG_DEBUG ("Filling histograms for " << name() << "...");
90 
91  const float ZERO_LIMIT = 0.00001;
92 
93  // get the best L2Inside-Out object matched to offline muon(dR between L2Inside-Out object and offline muon is minimum)
94  const xAOD::L2CombinedMuon* Trig_L2IOobject = searchL2InsideOut(ctx, mu, chain);
95 
96  // offline muon variables
97  auto offPt = Monitored::Scalar<float>(chain+"_offPt",-999.);
98  auto offEta = Monitored::Scalar<float>(chain+"_offEta",-999.);
99  auto offPhi = Monitored::Scalar<float>(chain+"_offPhi",-999.);
100  offPt = mu->pt()/1e3 * mu->charge(); // convert to GeV
101  offEta = mu->eta();
102  offPhi = mu->phi();
103  float offCharge = mu->charge();
104 
105 
106  if( chain.find("probe") != std::string::npos ){ // L2Inside-Out efficiency using Tag&Probe chain
107  if(chain.find("L1MU14FCH") != std::string::npos){
108  if ( !getTrigDecisionTool()->isPassed("HLT_mu24_ivarmedium_L1MU14FCH", TrigDefs::requireDecision) ) return StatusCode::SUCCESS; // impose trigger pass in order to eliminate bias
109  }
110  else if(chain.find("L1MU18VFCH") != std::string::npos){
111  if ( !getTrigDecisionTool()->isPassed("HLT_mu24_ivarmedium_L1MU18VFCH", TrigDefs::requireDecision) ) return StatusCode::SUCCESS; // impose trigger pass in order to eliminate bias
112  }
113  else
114  {
115  return StatusCode::SUCCESS;
116  }
117 
118  // search tag offline muon
119  const xAOD::Muon* tag = searchTagOfflineMuon( ctx, mu );
120  if( tag == nullptr ) return StatusCode::SUCCESS; // mu doesn't have no tag muons
121 
122 
123  // efficiency variables
124  auto passL2InsideOut = Monitored::Scalar<bool>(chain+"_passL2InsideOut",false);
125  auto passL2SA = Monitored::Scalar<bool>(chain+"_passL2SA",false);
126  auto offdR = Monitored::Scalar<float>(chain+"_offdR",1000.);
127  const ElementLink<xAOD::TrackParticleContainer> &tag_ms_track = tag->muonSpectrometerTrackParticleLink();
128  if( !tag_ms_track.isValid() ) return StatusCode::SUCCESS; // tag muon dosen't have ms track
129  const ElementLink<xAOD::TrackParticleContainer> &probe_ms_track = mu->muonSpectrometerTrackParticleLink();
130  if( !probe_ms_track.isValid() ) return StatusCode::SUCCESS; // probe muon dosen't have ms track
131  float tpext_deta = (*tag_ms_track)->eta() - (*probe_ms_track)->eta();
132  float tpext_dphi = xAOD::P4Helpers::deltaPhi((*tag_ms_track)->phi(), (*probe_ms_track)->phi());
133  offdR = std::sqrt(tpext_deta*tpext_deta + tpext_dphi*tpext_dphi);
134 
135  passL2InsideOut = false;
136  passL2SA = false;
137 
138  // retrieve probe l2SA objects
139  int legIndex_probe = 1; // probe
140  std::vector< TrigCompositeUtils::LinkInfo<xAOD::L2StandAloneMuonContainer> > featureCont = getTrigDecisionTool()->features<xAOD::L2StandAloneMuonContainer>( chain,
141  TrigDefs::includeFailedDecisions,
142  "HLT_MuonL2SAInfo",
143  TrigDefs::lastFeatureOfType,
145  legIndex_probe );
146 
147  for(const TrigCompositeUtils::LinkInfo<xAOD::L2StandAloneMuonContainer>& probe_L2SALinkInfo : featureCont){
148  ATH_CHECK( probe_L2SALinkInfo.isValid() );
149  const ElementLink<xAOD::L2StandAloneMuonContainer> probe_L2SAobject = probe_L2SALinkInfo.link;
150  if( m_matchTool->isMatchedL2SA( (*probe_L2SAobject), mu ) ){
151  if( probe_L2SALinkInfo.state == TrigCompositeUtils::ActiveState::ACTIVE ) passL2SA = true;
152  }
153  }
154 
155  if(passL2SA == true){
156  if(m_matchTool->isMatchedL2InsideOut( Trig_L2IOobject, mu ))
157  {
158  bool isPass = false;
159  ATH_CHECK(isPassedmuCombHypo( chain, Trig_L2IOobject ,isPass));
160  passL2InsideOut = isPass;
161  }
162  }
163  else{
164  return StatusCode::SUCCESS;
165  }
166 
167 
168  fill(m_group+"_"+chain, passL2InsideOut, passL2SA, offPt);
169 
170  if( mu->pt()/1e3 > m_plateaus.at(chain) ){
171  fill(m_group+"_"+chain, passL2InsideOut, passL2SA, offEta, offPhi, offdR);
172  }
173  }
174  else{ // make detail histograms using normal L2Inside-Out chain
175  if( Trig_L2IOobject == nullptr ) return StatusCode::SUCCESS; // no L2Inside-Out objects
176  if( ! m_matchTool->isMatchedL2InsideOut(Trig_L2IOobject, mu) ) return StatusCode::SUCCESS; // offline muons is not matched to any L2Inside-Out objects
177 
178 
179  //L2Muon chamberID index
180  enum chamberID {
181  Inn_Barrel = 0,
182  Mid_Barrel,
183  Out_Barrel,
184  Inn_Endcap,
185  Mid_Endcap,
186  Out_Endcap
187  };
188  std::vector< int > L2Muon_chamberID_index;
189  auto mon_L2Muon_chamberID_index = Monitored::Collection(chain+"_L2Muon_chamberID_index",L2Muon_chamberID_index);
190  for( int i = 0; i < 6; i++){
191  L2Muon_chamberID_index.push_back(i);
192  }
193 
194  // dR wrt offline
195  auto dRmin = Monitored::Scalar<float>(chain+"_dRmin",1000.);
196  dRmin = xAOD::P4Helpers::deltaR(mu, Trig_L2IOobject, false);
197 
198  // region variables
199  const float ETA_OF_BARREL = 1.05;
200  auto regionBE = Monitored::Scalar<int>(chain+"_regionBE",-999);
201  auto isBarrel = Monitored::Scalar<bool>(chain+"_isBarrel",false);
202  auto isBarrelA = Monitored::Scalar<bool>(chain+"_isBarrelA",false);
203  auto isBarrelC = Monitored::Scalar<bool>(chain+"_isBarrelC",false);
204  auto isEndcap = Monitored::Scalar<bool>(chain+"_isEndcap",false);
205  auto isEndcapA = Monitored::Scalar<bool>(chain+"_isEndcapA",false);
206  auto isEndcapC = Monitored::Scalar<bool>(chain+"_isEndcapC",false);
207 
208  // offline pt variables
209  auto pt4to6 = Monitored::Scalar<bool>(chain+"_pt4to6",false);
210  auto pt6to8 = Monitored::Scalar<bool>(chain+"_pt6to8",false);
211  auto ptover8 = Monitored::Scalar<bool>(chain+"_ptover8",false);
212 
213  // define region
214  if( std::abs(offEta) < ETA_OF_BARREL ) {
215  regionBE = 0;
216  isBarrel = true;
217  if( offEta > 0. ) isBarrelA = true;
218  else isBarrelC = true;
219  }
220  else{
221  regionBE = 1;
222  isEndcap = true;
223  if( offEta > 0. ) isEndcapA = true;
224  else isEndcapC = true;
225  }
226 
227  if( std::abs(offPt) > 4 ){
228  if( std::abs(offPt) < 6 ) pt4to6 = true;
229  else if( std::abs(offPt) < 8 ) pt6to8 = true;
230  else ptover8 = true;
231  }
232 
233  // basic variables
234  auto cbioPt = Monitored::Scalar<float>(chain+"_Pt_wrt_offline",-999.);
235  auto cbioEta = Monitored::Scalar<float>(chain+"_Eta_wrt_offline",-999.);
236  auto cbioPhi = Monitored::Scalar<float>(chain+"_Phi_wrt_offline",-999.);
237  cbioPt = Trig_L2IOobject->pt()/1e3 * Trig_L2IOobject->charge(); // convert to GeV
238  cbioEta = Trig_L2IOobject->eta();
239  cbioPhi = Trig_L2IOobject->phi();
240 
241  // L2Inside-Out track multiplicity per L2SA track
242  auto L2InsideOut_multiplicity = Monitored::Scalar<float>(chain+"_L2InsideOut_track_multiplicity",-999.);
243  L2InsideOut_multiplicity = 0;
244  std::vector< const xAOD::L2CombinedMuon* > Trig_L2IOobjects_tmp;
245  ATH_CHECK( matchL2IO_wContainer(ctx, chain, Trig_L2IOobjects_tmp) );
246  for(const auto& Trig_L2IOobject_tmp : Trig_L2IOobjects_tmp){
247  if( Trig_L2IOobject_tmp->muSATrack()->roiWord() == Trig_L2IOobject->muSATrack()->roiWord() ) L2InsideOut_multiplicity++;
248  }
249 
250  // pt resolution
251  auto ptresol = Monitored::Scalar<float>(chain+"_ptresol",-999.);
252  if ( std::abs(offPt) > ZERO_LIMIT && std::abs(cbioPt) > ZERO_LIMIT ){
253  ptresol = std::abs(cbioPt)/std::abs(offPt) - 1.;
254  }
255 
256  std::vector< float > ptresol_pos, ptresol_neg;
257  auto mon_ptresol_pos = Monitored::Collection(chain+"_ptresol_pos",ptresol_pos);
258  auto mon_ptresol_neg = Monitored::Collection(chain+"_ptresol_neg",ptresol_neg);
259  if( offCharge > 0. ) ptresol_pos.push_back(ptresol);
260  else ptresol_neg.push_back(ptresol);
261 
262  // distance bw FTFroad and offlinesegment
263  std::vector< float > distance_bw_FTFroad_and_offlinesegment_Inn_Barrel;
264  std::vector< float > distance_bw_FTFroad_and_offlinesegment_Mid_Barrel;
265  std::vector< float > distance_bw_FTFroad_and_offlinesegment_Out_Barrel;
266  std::vector< float > distance_bw_FTFroad_and_offlinesegment_Inn_Endcap;
267  std::vector< float > distance_bw_FTFroad_and_offlinesegment_Mid_Endcap;
268  std::vector< float > distance_bw_FTFroad_and_offlinesegment_Out_Endcap;
269  auto mon_distance_bw_FTFroad_and_offlinesegment_Inn_Barrel = Monitored::Collection(chain+"_distance_bw_FTFroad_and_offlinesegment_Inn_Barrel",distance_bw_FTFroad_and_offlinesegment_Inn_Barrel);
270  auto mon_distance_bw_FTFroad_and_offlinesegment_Mid_Barrel = Monitored::Collection(chain+"_distance_bw_FTFroad_and_offlinesegment_Mid_Barrel",distance_bw_FTFroad_and_offlinesegment_Mid_Barrel);
271  auto mon_distance_bw_FTFroad_and_offlinesegment_Out_Barrel = Monitored::Collection(chain+"_distance_bw_FTFroad_and_offlinesegment_Out_Barrel",distance_bw_FTFroad_and_offlinesegment_Out_Barrel);
272  auto mon_distance_bw_FTFroad_and_offlinesegment_Inn_Endcap = Monitored::Collection(chain+"_distance_bw_FTFroad_and_offlinesegment_Inn_Endcap",distance_bw_FTFroad_and_offlinesegment_Inn_Endcap);
273  auto mon_distance_bw_FTFroad_and_offlinesegment_Mid_Endcap = Monitored::Collection(chain+"_distance_bw_FTFroad_and_offlinesegment_Mid_Endcap",distance_bw_FTFroad_and_offlinesegment_Mid_Endcap);
274  auto mon_distance_bw_FTFroad_and_offlinesegment_Out_Endcap = Monitored::Collection(chain+"_distance_bw_FTFroad_and_offlinesegment_Out_Endcap",distance_bw_FTFroad_and_offlinesegment_Out_Endcap);
275 
276  std::vector< float > distance_bw_FTFroad_and_offlinesegment_vec;
277  std::vector< float > FTFroad_Aw;
278  std::vector< float > FTFroad_Bw;
279  std::vector< bool > FTFroad_fill;
280  for(int i=0; i<6; i++){
281  distance_bw_FTFroad_and_offlinesegment_vec.push_back(10000.);
282  FTFroad_Aw.push_back(Trig_L2IOobject->muSATrack()->roadAw(i, 0));
283  FTFroad_Bw.push_back(Trig_L2IOobject->muSATrack()->roadBw(i, 0));
284  FTFroad_fill.push_back(false);
285  }
286 
287  // MDT hits residual
288  std::vector<float> res_Inn_Barrel, res_Mid_Barrel, res_Out_Barrel, res_Inn_Endcap, res_Mid_Endcap, res_Out_Endcap;
289  auto mon_res_Inn_Barrel = Monitored::Collection(chain+"_MDT_residual_Inn_Barrel",res_Inn_Barrel);
290  auto mon_res_Mid_Barrel = Monitored::Collection(chain+"_MDT_residual_Mid_Barrel",res_Mid_Barrel);
291  auto mon_res_Out_Barrel = Monitored::Collection(chain+"_MDT_residual_Out_Barrel",res_Out_Barrel);
292  auto mon_res_Inn_Endcap = Monitored::Collection(chain+"_MDT_residual_Inn_Endcap",res_Inn_Endcap);
293  auto mon_res_Mid_Endcap = Monitored::Collection(chain+"_MDT_residual_Mid_Endcap",res_Mid_Endcap);
294  auto mon_res_Out_Endcap = Monitored::Collection(chain+"_MDT_residual_Out_Endcap",res_Out_Endcap);
295 
296  // distance bw MDT hits and offlinesegment
297  std::vector< float > distance_bw_MDT_and_offlinesegment_Inn_Barrel;
298  std::vector< float > distance_bw_MDT_and_offlinesegment_Mid_Barrel;
299  std::vector< float > distance_bw_MDT_and_offlinesegment_Out_Barrel;
300  std::vector< float > distance_bw_MDT_and_offlinesegment_Inn_Endcap;
301  std::vector< float > distance_bw_MDT_and_offlinesegment_Mid_Endcap;
302  std::vector< float > distance_bw_MDT_and_offlinesegment_Out_Endcap;
303  auto mon_distance_bw_MDT_and_offlinesegment_Inn_Barrel = Monitored::Collection(chain+"_distance_bw_MDT_and_offlinesegment_Inn_Barrel",distance_bw_MDT_and_offlinesegment_Inn_Barrel);
304  auto mon_distance_bw_MDT_and_offlinesegment_Mid_Barrel = Monitored::Collection(chain+"_distance_bw_MDT_and_offlinesegment_Mid_Barrel",distance_bw_MDT_and_offlinesegment_Mid_Barrel);
305  auto mon_distance_bw_MDT_and_offlinesegment_Out_Barrel = Monitored::Collection(chain+"_distance_bw_MDT_and_offlinesegment_Out_Barrel",distance_bw_MDT_and_offlinesegment_Out_Barrel);
306  auto mon_distance_bw_MDT_and_offlinesegment_Inn_Endcap = Monitored::Collection(chain+"_distance_bw_MDT_and_offlinesegment_Inn_Endcap",distance_bw_MDT_and_offlinesegment_Inn_Endcap);
307  auto mon_distance_bw_MDT_and_offlinesegment_Mid_Endcap = Monitored::Collection(chain+"_distance_bw_MDT_and_offlinesegment_Mid_Endcap",distance_bw_MDT_and_offlinesegment_Mid_Endcap);
308  auto mon_distance_bw_MDT_and_offlinesegment_Out_Endcap = Monitored::Collection(chain+"_distance_bw_MDT_and_offlinesegment_Out_Endcap",distance_bw_MDT_and_offlinesegment_Out_Endcap);
309  std::vector< float > distance_bw_MDT_and_offlinesegment_vec;
310  std::vector< int > MDTHitChamber_fill;
311  std::vector< int > MDTHitChamber;
312  std::vector< float > MDTHitR;
313  std::vector< float > MDTHitZ;
314 
315  // # of MDT hits
316  std::vector<int> MDT_N_Inn_Barrel, MDT_N_Mid_Barrel, MDT_N_Out_Barrel, MDT_N_Inn_Endcap, MDT_N_Mid_Endcap, MDT_N_Out_Endcap;
317  auto mon_MDT_N_Inn_Barrel = Monitored::Collection(chain+"_MDT_N_Inn_Barrel",MDT_N_Inn_Barrel);
318  auto mon_MDT_N_Mid_Barrel = Monitored::Collection(chain+"_MDT_N_Mid_Barrel",MDT_N_Mid_Barrel);
319  auto mon_MDT_N_Out_Barrel = Monitored::Collection(chain+"_MDT_N_Out_Barrel",MDT_N_Out_Barrel);
320  auto mon_MDT_N_Inn_Endcap = Monitored::Collection(chain+"_MDT_N_Inn_Endcap",MDT_N_Inn_Endcap);
321  auto mon_MDT_N_Mid_Endcap = Monitored::Collection(chain+"_MDT_N_Mid_Endcap",MDT_N_Mid_Endcap);
322  auto mon_MDT_N_Out_Endcap = Monitored::Collection(chain+"_MDT_N_Out_Endcap",MDT_N_Out_Endcap);
323  int n_mdthits_BI = 0;
324  int n_mdthits_BM = 0;
325  int n_mdthits_BO = 0;
326  int n_mdthits_EI = 0;
327  int n_mdthits_EM = 0;
328  int n_mdthits_EO = 0;
329 
330  int n_mdt_hits = Trig_L2IOobject->muSATrack()->nMdtHits();
331  for(int i_tube=0; i_tube<n_mdt_hits; i_tube++){
332  if( Trig_L2IOobject->muSATrack()->mdtHitIsOutlier(i_tube) != 0 ) continue;
333  float res = Trig_L2IOobject->muSATrack()->mdtHitResidual(i_tube);
334  int imr = Trig_L2IOobject->muSATrack()->mdtHitChamber(i_tube);
335  MDTHitChamber.push_back(imr);
336  MDTHitR.push_back(Trig_L2IOobject->muSATrack()->mdtHitR(i_tube));
337  MDTHitZ.push_back(Trig_L2IOobject->muSATrack()->mdtHitZ(i_tube));
338 
339  if( imr == Inn_Barrel ){
340  n_mdthits_BI++;
341  res_Inn_Barrel.push_back(res);
342  }
343  else if( imr == Mid_Barrel ){
344  n_mdthits_BM++;
345  res_Mid_Barrel.push_back(res);
346  }
347  else if( imr == Out_Barrel ){
348  n_mdthits_BO++;
349  res_Out_Barrel.push_back(res);
350  }
351  else if( imr == Inn_Endcap ){
352  n_mdthits_EI++;
353  res_Inn_Endcap.push_back(res);
354  }
355  else if( imr == Mid_Endcap ){
356  n_mdthits_EM++;
357  res_Mid_Endcap.push_back(res);
358  }
359  else if( imr == Out_Endcap ){
360  n_mdthits_EO++;
361  res_Out_Endcap.push_back(res);
362  }
363  }
364 
365  // reconstruction efficiency of superpoint
366  std::vector<bool> superpoint_exist_pt4to6, superpoint_exist_pt6to8, superpoint_exist_ptover8;
367  auto mon_superpoint_exist_pt4to6 = Monitored::Collection(chain+"_superpoint_pt4to6",superpoint_exist_pt4to6);
368  auto mon_superpoint_exist_pt6to8 = Monitored::Collection(chain+"_superpoint_pt6to8",superpoint_exist_pt6to8);
369  auto mon_superpoint_exist_ptover8 = Monitored::Collection(chain+"_superpoint_ptover8",superpoint_exist_ptover8);
370  std::vector<bool> segment_superpoint_exist(6, false);
371  std::vector<bool> offlinesegment_exist_pt4to6, offlinesegment_exist_pt6to8, offlinesegment_exist_ptover8;
372  auto mon_offlinesegment_exist_pt4to6 = Monitored::Collection(chain+"_offlinesegment_pt4to6",offlinesegment_exist_pt4to6);
373  auto mon_offlinesegment_exist_pt6to8 = Monitored::Collection(chain+"_offlinesegment_pt6to8",offlinesegment_exist_pt6to8);
374  auto mon_offlinesegment_exist_ptover8 = Monitored::Collection(chain+"_offlinesegment_ptover8",offlinesegment_exist_ptover8);
375 
376  // # of superpoint
377  auto superpoint_multiplicity = Monitored::Scalar<int>(chain+"_superpoint_multiplicity",0);
378  std::vector< bool > superpoint_exist;
379  std::vector< float > superpointR;
380  int Num_L2Muon_chamberID = 12;
381  for( int i_chamber = 0; i_chamber < Num_L2Muon_chamberID; i_chamber++){
382  if( Trig_L2IOobject->muSATrack()->superPointR(i_chamber) < ZERO_LIMIT ){
383  superpoint_exist.push_back(false);
384  }
385  else{
386  superpoint_exist.push_back(true);
387  superpoint_multiplicity++;
388  }
389  superpointR.push_back(Trig_L2IOobject->muSATrack()->superPointR(i_chamber));
390  }
391 
392 
393  std::vector< bool > segment_exist(6, false);
394  for(unsigned int i_seg = 0; i_seg < mu->nMuonSegments(); i_seg++){
395  const xAOD::MuonSegment* segment = mu->muonSegment(i_seg);
396  if(!segment) continue;
397  float segmentX = segment->x();
398  float segmentY = segment->y();
399  float segmentZ = segment->z();
400  float segmentR = std::sqrt( std::pow(segmentX, 2.0) + std::pow(segmentY, 2.0) );
401  float segmentPx = segment->px();
402  float segmentPy = segment->py();
403  float segmentPz = segment->pz();
404  float segmentSector = segment->sector();
405  using namespace Muon::MuonStationIndex;
406  int segmentChamberIndex = toInt(segment->chamberIndex());
407  float distance_bw_FTFroad_and_offlinesegment = 99999.;
408  float distance_bw_MDT_and_offlinesegment = 99999.;
409  int roadChamberIndex = -1;
410  int MDTChamberIndex = -1;
411  if( segmentChamberIndex == 0 || segmentChamberIndex == 1 ){ // Inner Barrel
412  segment_exist.at(Inn_Barrel) = true;
413  roadChamberIndex = Inn_Barrel;
414  MDTChamberIndex = Inn_Barrel;
415  }
416  else if( segmentChamberIndex == 2 || segmentChamberIndex == 3 ){ // Middle Barrel
417  segment_exist.at(Mid_Barrel) = true;
418  roadChamberIndex = Mid_Barrel;
419  MDTChamberIndex = Mid_Barrel;
420  }
421  else if( segmentChamberIndex == 4 || segmentChamberIndex == 5 ){ // Outer Barrel
422  segment_exist.at(Out_Barrel) = true;
423  roadChamberIndex = Out_Barrel;
424  MDTChamberIndex = Out_Barrel;
425  }
426  else if( segmentChamberIndex == 7 || segmentChamberIndex == 8 ){ // Inner Endcap
427  segment_exist.at(Inn_Endcap) = true;
428  roadChamberIndex = Inn_Endcap;
429  MDTChamberIndex = Inn_Endcap;
430  }
431  else if( segmentChamberIndex == 9 || segmentChamberIndex == 10 ){ // Middle Endcap
432  segment_exist.at(Mid_Endcap) = true;
433  roadChamberIndex = Mid_Endcap;
434  MDTChamberIndex = Mid_Endcap;
435  }
436  else if( segmentChamberIndex == 11 || segmentChamberIndex == 12 ){ // Outer Endcap
437  segment_exist.at(Out_Endcap) = true;
438  roadChamberIndex = Out_Endcap;
439  MDTChamberIndex = Out_Endcap;
440  }
441 
442  // Calc distance bw FTFroad and offlinesegment
443  if( roadChamberIndex != -1 ){
444  if( FTFroad_Aw.at(roadChamberIndex) > ZERO_LIMIT || FTFroad_Bw.at(roadChamberIndex) > ZERO_LIMIT ){
445  FTFroad_fill.at(roadChamberIndex) = true;
446  if( FTFroad_Aw.at(roadChamberIndex) < ZERO_LIMIT) distance_bw_FTFroad_and_offlinesegment = segmentR - FTFroad_Bw.at(roadChamberIndex);
447  else{
448  float ia = 1.0/FTFroad_Aw.at(roadChamberIndex);
449  float iaq = ia * ia;
450  distance_bw_FTFroad_and_offlinesegment = (segmentZ - ia * (segmentR - FTFroad_Bw.at(roadChamberIndex)))/std::sqrt(1.0 + iaq);
451  }
452  if( std::abs(distance_bw_FTFroad_and_offlinesegment) < std::abs(distance_bw_FTFroad_and_offlinesegment_vec.at(roadChamberIndex)) )
453  distance_bw_FTFroad_and_offlinesegment_vec.at(roadChamberIndex) = distance_bw_FTFroad_and_offlinesegment;
454  }
455  }
456 
457  // Calc distance bw MDT hits and offlinesegment
458  if( MDTChamberIndex != -1 ){
459  float sector_phi = M_PI*(segmentSector - 1.0)/8.0;
460  float segmentR_projection = segmentX * std::cos(sector_phi) + segmentY * std::sin(sector_phi);
461  float segmentPr_projection = segmentPx * std::cos(sector_phi) + segmentPy * std::sin(sector_phi);
462 
463  for(unsigned int i_tube=0; i_tube<MDTHitChamber.size(); i_tube++){
464  if( MDTHitChamber.at(i_tube) != MDTChamberIndex ) continue;
465  if( MDTChamberIndex < 3 ){ //Barrel
466  if( std::abs(segmentPz) < ZERO_LIMIT ) distance_bw_MDT_and_offlinesegment = MDTHitZ.at(i_tube) - segmentZ;
467  else{
468  float denominator = segmentPr_projection/segmentPz;
469  if( std::abs(denominator) < ZERO_LIMIT ) continue;
470  distance_bw_MDT_and_offlinesegment = MDTHitZ.at(i_tube) - ((MDTHitR.at(i_tube) - segmentR_projection)/denominator + segmentZ);
471  }
472  }
473  else{ //Endcap
474  if( std::abs(segmentPz) < ZERO_LIMIT ){
475  distance_bw_MDT_and_offlinesegment = MDTHitR.at(i_tube) - segmentR;
476  }
477  else{
478  float coeffi = (MDTHitZ.at(i_tube) - segmentZ)/segmentPz;
479  float segmentR_extrapolated = std::sqrt(std::pow(segmentX + coeffi * segmentPx, 2.0) + std::pow(segmentY + coeffi * segmentPy, 2.0));
480  distance_bw_MDT_and_offlinesegment = MDTHitR.at(i_tube) - segmentR_extrapolated;
481  }
482  }
483  distance_bw_MDT_and_offlinesegment_vec.push_back(distance_bw_MDT_and_offlinesegment);
484  MDTHitChamber_fill.push_back(MDTHitChamber.at(i_tube));
485  }
486  }
487  }
488 
489  if( FTFroad_fill.at(Inn_Barrel) ){
490  distance_bw_FTFroad_and_offlinesegment_Inn_Barrel.push_back(distance_bw_FTFroad_and_offlinesegment_vec.at(Inn_Barrel));
491  }
492  if( FTFroad_fill.at(Mid_Barrel) ){
493  distance_bw_FTFroad_and_offlinesegment_Mid_Barrel.push_back(distance_bw_FTFroad_and_offlinesegment_vec.at(Mid_Barrel));
494  }
495  if( FTFroad_fill.at(Out_Barrel) ){
496  distance_bw_FTFroad_and_offlinesegment_Out_Barrel.push_back(distance_bw_FTFroad_and_offlinesegment_vec.at(Out_Barrel));
497  }
498  if( FTFroad_fill.at(Inn_Endcap) ){
499  distance_bw_FTFroad_and_offlinesegment_Inn_Endcap.push_back(distance_bw_FTFroad_and_offlinesegment_vec.at(Inn_Endcap));
500  }
501  if( FTFroad_fill.at(Mid_Endcap) ){
502  distance_bw_FTFroad_and_offlinesegment_Mid_Endcap.push_back(distance_bw_FTFroad_and_offlinesegment_vec.at(Mid_Endcap));
503  }
504  if( FTFroad_fill.at(Out_Endcap) ){
505  distance_bw_FTFroad_and_offlinesegment_Out_Endcap.push_back(distance_bw_FTFroad_and_offlinesegment_vec.at(Out_Endcap));
506  }
507 
508  for( unsigned int i = 0; i < distance_bw_MDT_and_offlinesegment_vec.size(); i++ ){
509  if( MDTHitChamber_fill.at(i) == Inn_Barrel ){
510  distance_bw_MDT_and_offlinesegment_Inn_Barrel.push_back(distance_bw_MDT_and_offlinesegment_vec.at(i));
511  }
512  else if( MDTHitChamber_fill.at(i) == Mid_Barrel ){
513  distance_bw_MDT_and_offlinesegment_Mid_Barrel.push_back(distance_bw_MDT_and_offlinesegment_vec.at(i));
514  }
515  else if( MDTHitChamber_fill.at(i) == Out_Barrel ){
516  distance_bw_MDT_and_offlinesegment_Out_Barrel.push_back(distance_bw_MDT_and_offlinesegment_vec.at(i));
517  }
518  else if( MDTHitChamber_fill.at(i) == Inn_Endcap ){
519  distance_bw_MDT_and_offlinesegment_Inn_Endcap.push_back(distance_bw_MDT_and_offlinesegment_vec.at(i));
520  }
521  else if( MDTHitChamber_fill.at(i) == Mid_Endcap ){
522  distance_bw_MDT_and_offlinesegment_Mid_Endcap.push_back(distance_bw_MDT_and_offlinesegment_vec.at(i));
523  }
524  else if( MDTHitChamber_fill.at(i) == Out_Endcap ){
525  distance_bw_MDT_and_offlinesegment_Out_Endcap.push_back(distance_bw_MDT_and_offlinesegment_vec.at(i));
526  }
527  else{
528  ATH_MSG_WARNING( "undefined chamberID is pushed back into MDTHitChamber_fill" );
529  }
530  }
531 
532  if( segment_exist.at(Inn_Barrel) ){
533  MDT_N_Inn_Barrel.push_back(n_mdthits_BI);
534  segment_superpoint_exist.at(Inn_Barrel) = superpoint_exist.at(Inn_Barrel);
535  }
536  if( segment_exist.at(Mid_Barrel) ){
537  MDT_N_Mid_Barrel.push_back(n_mdthits_BM);
538  segment_superpoint_exist.at(Mid_Barrel) = superpoint_exist.at(Mid_Barrel);
539  }
540  if( segment_exist.at(Out_Barrel) ){
541  MDT_N_Out_Barrel.push_back(n_mdthits_BO);
542  segment_superpoint_exist.at(Out_Barrel) = superpoint_exist.at(Out_Barrel);
543  }
544  if( segment_exist.at(Inn_Endcap) ){
545  MDT_N_Inn_Endcap.push_back(n_mdthits_EI);
546  segment_superpoint_exist.at(Inn_Endcap) = superpoint_exist.at(Inn_Endcap);
547  }
548  if( segment_exist.at(Mid_Endcap) ){
549  MDT_N_Mid_Endcap.push_back(n_mdthits_EM);
550  segment_superpoint_exist.at(Mid_Endcap) = superpoint_exist.at(Mid_Endcap);
551  }
552  if( segment_exist.at(Out_Endcap) ){
553  MDT_N_Out_Endcap.push_back(n_mdthits_EO);
554  segment_superpoint_exist.at(Out_Endcap) = superpoint_exist.at(Out_Endcap);
555  }
556 
557  if( pt4to6 ){
558  offlinesegment_exist_pt4to6 = segment_exist;
559  superpoint_exist_pt4to6 = segment_superpoint_exist;
560  }
561  else if( pt6to8 ){
562  offlinesegment_exist_pt6to8 = segment_exist;
563  superpoint_exist_pt6to8 = segment_superpoint_exist;
564  }
565  else if( ptover8 ){
566  offlinesegment_exist_ptover8 = segment_exist;
567  superpoint_exist_ptover8 = segment_superpoint_exist;
568  }
569 
570  fill(m_group+"_"+chain, dRmin, isBarrel, isEndcap);
571  fill(m_group+"_"+chain, cbioPt, isBarrel, isEndcap);
572  fill(m_group+"_"+chain, cbioEta);
573  fill(m_group+"_"+chain, cbioPhi, isBarrel, isEndcap);
574  fill(m_group+"_"+chain, L2InsideOut_multiplicity, offPt, isBarrel, isEndcap);
575  fill(m_group+"_"+chain, ptresol, offEta, pt4to6, pt6to8, ptover8);
576  fill(m_group+"_"+chain, ptresol, offPt, isBarrelA, isBarrelC, isEndcapA, isEndcapC);
577  fill(m_group+"_"+chain, mon_ptresol_pos, mon_ptresol_neg, isBarrelA, isBarrelC, isEndcapA, isEndcapC);
578  fill(m_group+"_"+chain, mon_distance_bw_FTFroad_and_offlinesegment_Inn_Barrel, pt4to6, pt6to8, ptover8);
579  fill(m_group+"_"+chain, mon_distance_bw_FTFroad_and_offlinesegment_Mid_Barrel, pt4to6, pt6to8, ptover8);
580  fill(m_group+"_"+chain, mon_distance_bw_FTFroad_and_offlinesegment_Out_Barrel, pt4to6, pt6to8, ptover8);
581  fill(m_group+"_"+chain, mon_distance_bw_FTFroad_and_offlinesegment_Inn_Endcap, pt4to6, pt6to8, ptover8);
582  fill(m_group+"_"+chain, mon_distance_bw_FTFroad_and_offlinesegment_Mid_Endcap, pt4to6, pt6to8, ptover8);
583  fill(m_group+"_"+chain, mon_distance_bw_FTFroad_and_offlinesegment_Out_Endcap, pt4to6, pt6to8, ptover8);
584  fill(m_group+"_"+chain, mon_res_Inn_Barrel);
585  fill(m_group+"_"+chain, mon_res_Mid_Barrel);
586  fill(m_group+"_"+chain, mon_res_Out_Barrel);
587  fill(m_group+"_"+chain, mon_res_Inn_Endcap);
588  fill(m_group+"_"+chain, mon_res_Mid_Endcap);
589  fill(m_group+"_"+chain, mon_res_Out_Endcap);
590  fill(m_group+"_"+chain, mon_distance_bw_MDT_and_offlinesegment_Inn_Barrel);
591  fill(m_group+"_"+chain, mon_distance_bw_MDT_and_offlinesegment_Mid_Barrel);
592  fill(m_group+"_"+chain, mon_distance_bw_MDT_and_offlinesegment_Out_Barrel);
593  fill(m_group+"_"+chain, mon_distance_bw_MDT_and_offlinesegment_Inn_Endcap);
594  fill(m_group+"_"+chain, mon_distance_bw_MDT_and_offlinesegment_Mid_Endcap);
595  fill(m_group+"_"+chain, mon_distance_bw_MDT_and_offlinesegment_Out_Endcap);
596  fill(m_group+"_"+chain, mon_MDT_N_Inn_Barrel);
597  fill(m_group+"_"+chain, mon_MDT_N_Mid_Barrel);
598  fill(m_group+"_"+chain, mon_MDT_N_Out_Barrel);
599  fill(m_group+"_"+chain, mon_MDT_N_Inn_Endcap);
600  fill(m_group+"_"+chain, mon_MDT_N_Mid_Endcap);
601  fill(m_group+"_"+chain, mon_MDT_N_Out_Endcap);
602  fill(m_group+"_"+chain, superpoint_multiplicity, regionBE, pt4to6, pt6to8, ptover8);
603  fill(m_group+"_"+chain, mon_L2Muon_chamberID_index, mon_superpoint_exist_pt4to6, mon_offlinesegment_exist_pt4to6);
604  fill(m_group+"_"+chain, mon_L2Muon_chamberID_index, mon_superpoint_exist_pt6to8, mon_offlinesegment_exist_pt6to8);
605  fill(m_group+"_"+chain, mon_L2Muon_chamberID_index, mon_superpoint_exist_ptover8, mon_offlinesegment_exist_ptover8);
606  }
607 
608  return StatusCode::SUCCESS;
609 }

◆ fillVariablesRatioPlots()

template<class T , class FUNCT >
StatusCode TrigMuonMonitorAlgorithm::fillVariablesRatioPlots ( const EventContext &  ctx,
const xAOD::Muon mu,
std::string &&  trigstep,
xAOD::Muon::TrackParticleType  type,
FUNCT  matchFunc 
) const
protectedinherited

Function that fills variables of ratio plots.

See also
TrigMuonMonitorAlgorithm.icc for the implementation
Parameters
ctxEventContext provided by athenaMT
muPointer to an offline muon provided in fillHistograms
trigsteptrigger step
typexAOD::Muon::TrackParticleType of offline muon
matchFuncFunction pointer that implements cuts for the online muon candidates gotten by ReadHandle.

◆ filterPassed()

virtual bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext &  ctx) const
inlinevirtualinherited

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96  {
97  return execState( ctx ).filterPassed();
98  }

◆ 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  // treat empty tool handle case as in Monitored::Group
172  if (m_toolLookupMap.empty()) {
173  return m_dummy;
174  }
175 
176  if (!isInitialized()) {
178  "It seems that the AthMonitorAlgorithm::initialize was not called "
179  "in derived class initialize method");
180  } else {
181  std::string available = std::accumulate(
182  m_toolLookupMap.begin(), m_toolLookupMap.end(), std::string(""),
183  [](const std::string& s, auto h) { return s + "," + h.first; });
184  ATH_MSG_FATAL("The tool " << name << " could not be found in the tool array of the "
185  << "monitoring algorithm " << m_name << ". This probably reflects a discrepancy between "
186  << "your python configuration and c++ filling code. Note: your available groups are {"
187  << available << "}.");
188  }
189  }
190  return m_dummy;
191 }

◆ 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 194 of file AthMonitorAlgorithm.cxx.

194  {
195  return m_trigDecTool;
196 }

◆ initialize()

StatusCode L2MuonSAIOMon::initialize ( )
overridevirtual

initialize

Returns
StatusCode

Reimplemented from TrigMuonMonitorAlgorithm.

Definition at line 15 of file L2MuonSAIOMon.cxx.

15  {
16 
19 
20  unsigned int nchains = m_monitored_chains.size();
21  if(nchains!=m_monitored_chains_plateau.size()){
22  ATH_MSG_ERROR("Configuration seems to be wrong. The size of \"Plateaus\" should be same as \"MonitoredChainds\".");
23  return StatusCode::FAILURE;
24  } else {
25  for(unsigned int ichain=0; ichain<nchains; ++ichain){
27  }
28  }
29  return StatusCode::SUCCESS;
30 }

◆ 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 AthCommonReentrantAlgorithm< Gaudi::Algorithm >::isClonable
overridevirtualinherited

Specify if the algorithm is clonable.

Reentrant algorithms are clonable.

Definition at line 68 of file AthCommonReentrantAlgorithm.cxx.

52 {
53  // Reentrant algorithms are clonable.
54  return true;
55 }

◆ isOverlap()

bool L2MuonSAIOMon::isOverlap ( const xAOD::L2CombinedMuon matchSA_L2IOobject1,
const xAOD::L2CombinedMuon matchSA_L2IOobject2 
) const
private

Definition at line 755 of file L2MuonSAIOMon.cxx.

755  {
756 
757  ATH_MSG_DEBUG( " ...matchSA_L2IOobject1: pt/eta/phi=" << matchSA_L2IOobject1->pt()/Gaudi::Units::GeV << " / " << matchSA_L2IOobject1->eta() << " / " << matchSA_L2IOobject1->phi() );
758  ATH_MSG_DEBUG( " ...matchSA_L2IOobject2: pt/eta/phi=" << matchSA_L2IOobject2->pt()/Gaudi::Units::GeV << " / " << matchSA_L2IOobject2->eta() << " / " << matchSA_L2IOobject2->phi() );
759 
760  const auto [mu1Pt, mu1Eta, mu1Phi] = L2ORPosForMatchFunc(matchSA_L2IOobject1);
761  const auto [mu2Pt, mu2Eta, mu2Phi] = L2ORPosForMatchFunc(matchSA_L2IOobject2);
762 
763  // if dR or invMass is necessary but (eta,phi) info is not avaiable
764  // (i.e. eta,phi=0,0; rec failed)
765  const double ZERO_LIMIT_FOR_ETAPHI = 1e-4;
766  if( (std::abs(matchSA_L2IOobject1->eta()) <ZERO_LIMIT_FOR_ETAPHI && std::abs(matchSA_L2IOobject1->phi()) < ZERO_LIMIT_FOR_ETAPHI) ||
767  (std::abs(matchSA_L2IOobject2->eta()) <ZERO_LIMIT_FOR_ETAPHI && std::abs(matchSA_L2IOobject2->phi()) < ZERO_LIMIT_FOR_ETAPHI) ) {
768  ATH_MSG_DEBUG( " ...-> (eta,phi) info not available (rec at (eta,phi)=(0,0))" );
769  if( m_RequireDR || m_RequireMass ) {
770  ATH_MSG_DEBUG( " ...-> but dR of invMass check is required. cannot judge overlap -> return with false" );
771  return false;
772  }
773  }
774 
775  // if charge or invMass is necessary but charge(=pT) info is not avaiable
776  const double ZERO_LIMIT_FOR_PT = 1e-4;
777  if( (std::abs(matchSA_L2IOobject1->pt()) <ZERO_LIMIT_FOR_PT) || (std::abs(matchSA_L2IOobject2->pt()) < ZERO_LIMIT_FOR_PT) ) {
778  ATH_MSG_DEBUG( " ...-> pT info not available (rec at pT=0)" );
780  ATH_MSG_DEBUG( " ...-> but same sign or invMass check is required. cannot judge overlap -> return with false" );
781  return false;
782  }
783  }
784 
785 
786  double absEta = (std::abs(mu1Pt) > std::abs(mu2Pt)) ? std::abs(mu1Eta) : std::abs(mu2Eta);
787  unsigned int iThres=0;
788  for(unsigned int i=0; i<(m_etaBins.size()-1); i++) {
789  if ( m_etaBins[i] <= absEta && absEta < m_etaBins[i+1] ) iThres = i;
790  }
791  float dRThres = m_dRCBThres[iThres];
792  float dRbySAThres = m_dRbySAThres[iThres];
793  float massThres = m_massCBThres[iThres];
794  ATH_MSG_DEBUG( " ...iThres=" << iThres );
795  if(m_RequireDR) ATH_MSG_DEBUG( " ...dR threshold=" << dRThres );
796  if(m_RequireDRbySA) ATH_MSG_DEBUG( " ...dR(byMF) threshold=" << dRbySAThres );
797  if(m_RequireMass) ATH_MSG_DEBUG( " ...mass threshold=" << massThres );
798 
799 
800 
801  // same sign cut
802  bool sameSign = false;
803  if( m_RequireSameSign ) {
804  sameSign = ((mu1Pt*mu2Pt) > 0);
805  ATH_MSG_DEBUG( " ...-> sameSign=" << sameSign );
806  }
807 
808  // dR cut
809  bool dRisClose = false;
810  float deta = mu1Eta - mu2Eta;
811  float dphi = xAOD::P4Helpers::deltaPhi(mu1Phi, mu2Phi);
812  float dR = std::sqrt(deta*deta + dphi*dphi);
813  if( m_RequireDR ) {
814  if( dR < dRThres ) dRisClose = true;
815  ATH_MSG_DEBUG( " ...-> dR=" << dR << " : dRisClose=" << dRisClose );
816  }
817 
818  // dR(by L2SA) cut
819  bool dRbySAisClose = false;
820  const xAOD::L2StandAloneMuon* muSA1 = matchSA_L2IOobject1->muSATrack();
821  const xAOD::L2StandAloneMuon* muSA2 = matchSA_L2IOobject2->muSATrack();
822  if( m_RequireDRbySA ) {
823  // here, we do not check (eta,phi) of mF is not (0,0)
824  // (i.e. we apply muComb based cut even if muFast rec is failed)
825  float deta = muSA1->etaMS() - muSA2->etaMS();
826  float dphi = xAOD::P4Helpers::deltaPhi(muSA1->phiMS(), muSA2->phiMS());
827  float dRBySA = std::sqrt(deta*deta + dphi*dphi);
828  if( dRBySA < dRbySAThres ) dRbySAisClose = true;
829  ATH_MSG_DEBUG( " ...-> dR(by MF)=" << dRBySA << " : dRbySAisClose=" << dRbySAisClose );
830  }
831 
832  // mass cut
833  const double TRACK_MASS = 0.; // just assume zero mass
834  bool massIsClose = false;
835  TLorentzVector lvioobj1, lvioobj2;
836  lvioobj1.SetPtEtaPhiM(std::abs(mu1Pt), mu1Eta, mu1Phi, TRACK_MASS);
837  lvioobj2.SetPtEtaPhiM(std::abs(mu2Pt), mu2Eta, mu2Phi, TRACK_MASS);
838  TLorentzVector lvsum = lvioobj1 + lvioobj2;
839  float invMass = lvsum.M();
840  if( m_RequireMass ) {
841  if( invMass < massThres ) massIsClose = true;
842  ATH_MSG_DEBUG( " ...-> invMass=" << invMass << " : massIsClose=" << massIsClose );
843  }
844 
845 
846  // total judge
847  bool overlap = false;
848  if( ((m_RequireSameSign && sameSign) || (! m_RequireSameSign)) &&
849  ((m_RequireDR && dRisClose) || (! m_RequireDR)) &&
850  ((m_RequireDRbySA && dRbySAisClose) || (! m_RequireDRbySA)) &&
851  ((m_RequireMass && massIsClose) || (! m_RequireMass)) ) {
852  overlap = true;
853  }
854  ATH_MSG_DEBUG( " ...=> isOverlap=" << overlap );
855 
856  return overlap;
857 }

◆ isPassedmuCombHypo()

StatusCode L2MuonSAIOMon::isPassedmuCombHypo ( const std::string &  chain,
const xAOD::L2CombinedMuon Trig_L2IOobjects,
bool &  pass_muCombHypo 
) const
private

Definition at line 964 of file L2MuonSAIOMon.cxx.

964  {
965  pass_muCombHypo = false;
966 
967  // config
968  std::vector< float > my_EtaBins = {0, 1.05, 1.5, 2.0, 9.9};
969  std::vector< float > my_muCombThres = {0., 0., 0., 0.};
970  bool my_pikCuts = true;
971  float my_maxPtToApplyPik = 25.;
972  float my_chi2MaxID = 3.5;
973  ATH_CHECK( decision_ptthreshold( chain, my_EtaBins, my_muCombThres, my_pikCuts, my_maxPtToApplyPik, my_chi2MaxID ) );
974  bool pikCut = true;
975  bool stdCut = true;
976 
977  auto ptValue = Trig_L2IOobject->pt() * Trig_L2IOobject->charge()/1e3;
978  float fexPt = ptValue;
979  if(my_pikCuts && (std::abs(fexPt) < my_maxPtToApplyPik)){
980  if(Trig_L2IOobject->idTrack()->chiSquared() > my_chi2MaxID){
981  ATH_MSG_DEBUG("this obj failed at Kpi rejection:idTrack_chiSquared = " << Trig_L2IOobject->idTrack()->chiSquared() );
982  pikCut = false;
983  }
984  }
985 
986  float absEta = std::abs(Trig_L2IOobject->eta());
987  unsigned int iThres = 0;
988  for(unsigned int i=0; i<(my_EtaBins.size()-1); i++) {
989  if ( my_EtaBins[i] <= absEta && absEta < my_EtaBins[i+1] ) iThres = i;
990  }
991  const float muCombThres = my_muCombThres[iThres];
992  if(Trig_L2IOobject->pt()/1e3 < muCombThres){
993  ATH_MSG_DEBUG("this obj failed at std Pt cut:muCombThres = " << muCombThres);
994  stdCut = false;
995  }
996 
997  if(stdCut && pikCut){
998  ATH_MSG_DEBUG("this obj passed muCombhypo");
999  pass_muCombHypo = true;
1000  }
1001  return StatusCode::SUCCESS;
1002 }

◆ L2ORPosForMatchFunc() [1/2]

std::tuple< float, float, float > L2MuonSAIOMon::L2ORPosForMatchFunc ( const xAOD::L2CombinedMuon trig)
inlinestaticprivate

Definition at line 1035 of file L2MuonSAIOMon.cxx.

1035  {
1036  return std::forward_as_tuple( (trig->pt()/1e3 * trig->charge() ), trig->eta(), trig->phi());
1037 }

◆ L2ORPosForMatchFunc() [2/2]

std::tuple< float, float, float > L2MuonSAIOMon::L2ORPosForMatchFunc ( const xAOD::L2StandAloneMuon trig)
inlinestaticprivate

Definition at line 1030 of file L2MuonSAIOMon.cxx.

1030  {
1031  return std::forward_as_tuple(trig->pt(), trig->etaMS(), trig->phiMS());
1032 }

◆ L2OverlapRemover()

StatusCode L2MuonSAIOMon::L2OverlapRemover ( const std::vector< const xAOD::L2CombinedMuon * > &  matchSA_L2IOobjects,
std::vector< bool > &  isoverlap,
std::vector< bool > &  passOR 
) const
private

Definition at line 678 of file L2MuonSAIOMon.cxx.

678  {
679 
680  ATH_MSG_DEBUG ("L2OverlapRemover ..." );
681 
682  const size_t numMuon = matchSA_L2IOobjects.size();
683  bool errorWhenIdentifyingOverlap = false;
684 
685  if(numMuon > 1){
686  std::vector<unsigned int> mucombResult;
687  //unsigned int i,j;
688  for(unsigned int i=0; i<numMuon; i++) {mucombResult.emplace_back(i); }
689  for(unsigned int i=0; i<numMuon-1; i++){
690  for(unsigned int j=i+1; j<numMuon; j++){
691  ATH_MSG_DEBUG("++ i=" << i << " vs j=" << j);
692  bool overlapped = isOverlap(matchSA_L2IOobjects.at(i), matchSA_L2IOobjects.at(j));
693  ATH_MSG_DEBUG("matchSA_L2IOobjects: i/j/Overlap = " << i << "/" << j << "/" << overlapped );
694  if( ! overlapped ){ // judged as different
695  ATH_MSG_DEBUG(" judged as: differenr objects");
696  if( mucombResult[i] == mucombResult[j] ) { // but marked as same by someone
697  ATH_MSG_DEBUG( "inconsistentency in muComb overlap removal for more than two objects" );
698  ATH_MSG_DEBUG( "two objects are judged as different but both were already marked as identical by someone else as: " );
699  ATH_MSG_DEBUG( "i/j/result[i]/result[j]=" << i << " / " << j << " / " << mucombResult[i] << " / " << mucombResult[j] );
700  errorWhenIdentifyingOverlap = true;
701  }
702  }
703  else{ // judged as overlap
704  if( (mucombResult[j] != j && mucombResult[i] != mucombResult[j]) || (mucombResult[j] == j && mucombResult[i] != i) ){
705  ATH_MSG_DEBUG( "inconsistentency in muComb based overlap removal for more than two objects" );
706  ATH_MSG_DEBUG( "two objects are judged as overlap but only either was already marked as overlap to someone else: " );
707  ATH_MSG_DEBUG( "i/j/result[i]/result[j]=" << i << " / " << j << " / " << mucombResult[i] << " / " << mucombResult[j] );
708  errorWhenIdentifyingOverlap = true;
709  }
710  ATH_MSG_DEBUG(" judged as: overlapped objects");
711  if( mucombResult[i] == i ) {
712  ATH_MSG_DEBUG( " i is not yet marked as overlap. so, it is a newly found overlap" );
713  ATH_MSG_DEBUG( " -> marking mucombResult[j] as i..." );
714  mucombResult[j] = i;
715  isoverlap[i] = true;
716  isoverlap[j] = true;
717  } else {
718  ATH_MSG_DEBUG( " both i/j already marked as overlap by: mucombResult[i]=" << mucombResult[i] );
719  ATH_MSG_DEBUG( " -> do nothing..." );
720  }
721  }
722  }
723  }
724 
725 
726  if( errorWhenIdentifyingOverlap ) {
727  ATH_MSG_WARNING( "error when resolving overlap. exitting with all EVs active..." );
728  } else {
729 
730  unsigned int n_uniqueMuon = 0;
731  for(unsigned int i=0; i<numMuon; i++) {
732  ATH_MSG_DEBUG( "muComb based results: i=" << i << ": ");
733  if( mucombResult[i] != i ) {
734  ATH_MSG_DEBUG( " overlap to j=" << mucombResult[i] );
735  } else {
736  n_uniqueMuon++;
737  ATH_MSG_DEBUG( " unique" );
738  }
739  }
740 
741  ATH_MSG_DEBUG( "nr of unique Muons after muComb-based removal=" << n_uniqueMuon );
742 
743  if( numMuon != n_uniqueMuon ){
744  ATH_CHECK( chooseBestMuon(matchSA_L2IOobjects, passOR, mucombResult) );
745  } else {
746  ATH_MSG_DEBUG( "no overlap identified. exitting with all EventViews active" );
747  }
748  }
749  }
750 
751  return StatusCode::SUCCESS;
752 }

◆ matchL2IO_wContainer()

StatusCode L2MuonSAIOMon::matchL2IO_wContainer ( const EventContext &  ctx,
const std::string &  chain,
std::vector< const xAOD::L2CombinedMuon * > &  Trig_L2IOobjects 
) const
private

Definition at line 612 of file L2MuonSAIOMon.cxx.

612  {
613 
614  ATH_MSG_DEBUG ("matchL2IO_wContainer ..." );
615 
616  // retrieve l2io objects
618 
619  // retrieve l2SA objects
620  std::vector< TrigCompositeUtils::LinkInfo<xAOD::L2StandAloneMuonContainer> > featureCont;
621  if( chain.find("probe") != std::string::npos ){ // if tag & probe chain, retrieve probe L2SA objects
622  int legIndex_probe = 1; // probe
623  featureCont = getTrigDecisionTool()->features<xAOD::L2StandAloneMuonContainer>( chain,
624  TrigDefs::includeFailedDecisions,
625  "HLT_MuonL2SAInfo",
626  TrigDefs::lastFeatureOfType,
628  legIndex_probe );
629  }
630  else{
631  featureCont = getTrigDecisionTool()->features<xAOD::L2StandAloneMuonContainer>( chain,
632  TrigDefs::includeFailedDecisions,
633  "HLT_MuonL2SAInfo" );
634  }
635 
636  // match l2io objects to l2sa objects using roiWord
637  std::vector< const xAOD::L2CombinedMuon* > matchSA_L2IOobjects;
638  for(const auto L2IOobject : *L2IOobjects){
639  ATH_MSG_DEBUG(" L2IOobject->muSATrack()->roiWord()/L2IOobject->pt(): " << L2IOobject->muSATrack()->roiWord() << "/" << L2IOobject->pt() );
640  for(const TrigCompositeUtils::LinkInfo<xAOD::L2StandAloneMuonContainer>& L2SALinkInfo : featureCont){
641  ATH_CHECK( L2SALinkInfo.isValid() );
642  const ElementLink<xAOD::L2StandAloneMuonContainer> L2SAobject = L2SALinkInfo.link;
643  if( !L2SAobject.isValid() ) continue;
644  ATH_MSG_DEBUG(" L2SAobject->roiWord()/L2SALinkInfo.state: " << (*L2SAobject)->roiWord() << "/" << L2SALinkInfo.state );
645 
646  if( L2IOobject->muSATrack()->roiWord() != (*L2SAobject)->roiWord() ) continue;
647  if( L2SALinkInfo.state != TrigCompositeUtils::ActiveState::ACTIVE ){
648  break;
649  }else{
650  matchSA_L2IOobjects.push_back(L2IOobject);
651  ATH_MSG_DEBUG(" matchSA_L2IOobject->muSATrack()->roiWord()/matchSA_L2IOobject->pt(): " << L2IOobject->muSATrack()->roiWord() << "/" << L2IOobject->pt() );
652  break;
653  }
654  }
655  }
656  ATH_MSG_DEBUG(" matchSA_L2IOobjects.size(): " << matchSA_L2IOobjects.size() );
657 
658  const size_t num_matchSAMuon = matchSA_L2IOobjects.size();
659  if( num_matchSAMuon == 0 ){
660  ATH_MSG_DEBUG(" NO matchSA_L2IOobjects ");
661  return StatusCode::SUCCESS;
662  }
663 
664  std::vector< bool > isoverlap( num_matchSAMuon, false );
665  std::vector< bool > passOR( num_matchSAMuon, true );
666 
667  // L2CBOverlapRemover
668  ATH_CHECK( L2OverlapRemover( matchSA_L2IOobjects, isoverlap, passOR ) );
669  for(unsigned int i=0; i<num_matchSAMuon; i++) { // push back trig Inside-Out objects passing L2CBOverlapRemover
670  if( isoverlap[i] && !passOR[i] ) continue;
671  Trig_L2IOobjects.push_back(matchSA_L2IOobjects.at(i));
672  }
673 
674  return StatusCode::SUCCESS;
675 }

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

◆ muCombHypo_TDTworkaround()

StatusCode L2MuonSAIOMon::muCombHypo_TDTworkaround ( const std::string &  chain,
const std::vector< const xAOD::L2CombinedMuon * > &  Trig_L2IOobjects,
std::vector< bool > &  pass_muCombHypo 
) const
private

Definition at line 943 of file L2MuonSAIOMon.cxx.

943  {
944 
945 
946  int requireMuonNum = 1;
947 
948  int passHypo_MuonNum = 0;
949  for(auto &Trig_L2IOobject : Trig_L2IOobjects){
950  bool isPass_muCombHypo = false;
951  ATH_CHECK(isPassedmuCombHypo( chain, Trig_L2IOobject ,isPass_muCombHypo));
952  bool pass_muCombHypo_obj = isPass_muCombHypo;
953  pass_muCombHypo.push_back(pass_muCombHypo_obj);
954  if( pass_muCombHypo_obj ) passHypo_MuonNum++;
955  }
956 
957  if( passHypo_MuonNum >= requireMuonNum ){
958  ATH_MSG_DEBUG("this evt passed muCombhypo");
959  }
960  return StatusCode::SUCCESS;
961 }

◆ 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 341 of file AthMonitorAlgorithm.cxx.

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

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

◆ searchL2InsideOut()

const xAOD::L2CombinedMuon * L2MuonSAIOMon::searchL2InsideOut ( const EventContext &  ctx,
const xAOD::Muon mu,
const std::string &  trigger 
) const
private

Definition at line 1040 of file L2MuonSAIOMon.cxx.

1040  {
1041  ATH_MSG_DEBUG("MuonMonitoring::searchL2InsideOut()");
1042 
1043  const xAOD::L2CombinedMuon* offlinematched_L2IOobject = nullptr;
1044 
1045  //TDT workaround
1046  std::vector< const xAOD::L2CombinedMuon* > Trig_L2IOobjects;
1047  if( !matchL2IO_wContainer(ctx, trig, Trig_L2IOobjects).isSuccess() ) {
1048  ATH_MSG_WARNING("matchL2IO_wContainer failed, returning nullptr");
1049  return offlinematched_L2IOobject;
1050  }
1051  if( Trig_L2IOobjects.empty() ) {
1052  return offlinematched_L2IOobject;
1053  }
1054 
1055  float reqdR = 1000.;
1056 
1057  double offlEta = mu->eta();
1058  double offlPhi = mu->phi();
1059 
1060  int loop_counter = 0;
1061  int match_index = 0;
1062  for(auto Trig_L2IOobject : Trig_L2IOobjects){
1063  double trigEta = Trig_L2IOobject->eta();
1064  double trigPhi = Trig_L2IOobject->phi();
1065  double deta = offlEta - trigEta;
1066  double dphi = xAOD::P4Helpers::deltaPhi(offlPhi, trigPhi);
1067  double dR = std::sqrt(deta*deta + dphi*dphi);
1068 
1069  ATH_MSG_VERBOSE("Trigger muon candidate eta=" << trigEta << " phi=" << trigPhi << " pt=" << Trig_L2IOobject->pt() << " dR=" << dR);
1070  if( dR<reqdR ){
1071  reqdR = dR;
1072  match_index = loop_counter;
1073  ATH_MSG_DEBUG("* Trigger muon eta=" << trigEta << " phi=" << trigPhi << " pt=" << Trig_L2IOobject->pt() << " dR=" << dR );
1074  }
1075  loop_counter++;
1076  }
1077 
1078  offlinematched_L2IOobject = Trig_L2IOobjects.at(match_index);
1079  return offlinematched_L2IOobject;
1080 }

◆ searchTagOfflineMuon()

const xAOD::Muon * L2MuonSAIOMon::searchTagOfflineMuon ( const EventContext &  ctx,
const xAOD::Muon probe 
) const
private

Definition at line 1083 of file L2MuonSAIOMon.cxx.

1083  {
1084  ATH_MSG_DEBUG("MuonMonitoring::searchTagOfflineMuon()");
1085 
1086  const double ZERO_LIMIT = 0.00001;
1087 
1088  double Jpsimass = 3.0969;
1089  double Zmass = 91.1876;
1090  double my_Jpsimass_lowlim = 81.;
1091  double my_Jpsimass_highlim = 101.;
1092  double my_Zmass_lowlim = 2.7;
1093  double my_Zmass_highlim = 3.5;
1094 
1095  const xAOD::Muon *tag = nullptr;
1096 
1098  if (! muons.isValid() ) {
1099  ATH_MSG_ERROR("evtStore() does not contain muon Collection with name "<< m_MuonContainerKey);
1100  return tag;
1101  }
1102 
1103  double mass_diff_min = 999.;
1104  double tpdR_min = 999.;
1105  bool tpfromZ = false;
1106  for( const xAOD::Muon* mu : *muons ){
1107  if( mu->muonType()>m_muontype ) continue;
1108  if( mu->quality() != xAOD::Muon::Medium && mu->quality() != xAOD::Muon::Tight ) continue;
1109  if( mu->charge()*probe->charge() > 0 ) continue;
1110  const ElementLink<xAOD::TrackParticleContainer> &tag_ms_track = mu->muonSpectrometerTrackParticleLink();
1111  if( !tag_ms_track.isValid() ) continue; // tag muon dosen't have ms track
1112  TLorentzVector lvmu = mu->p4();
1113  TLorentzVector lvprobe = probe->p4();
1114  double dimu_mass = (lvmu+lvprobe).M()/1.e3;
1115  double tpdR = lvmu.DeltaR(lvprobe);
1116  if( dimu_mass > my_Jpsimass_lowlim && dimu_mass < my_Jpsimass_highlim ){
1117  if( tpfromZ ) continue; // Z has higher priority than Jpsi
1118  double mass_diff = std::abs(dimu_mass - Jpsimass);
1119  if( mass_diff - mass_diff_min < -1.*ZERO_LIMIT ){
1120  mass_diff_min = mass_diff;
1121  tpdR_min =tpdR;
1122  tag = mu;
1123  }
1124  else if( std::abs(mass_diff - mass_diff_min) < ZERO_LIMIT){
1125  if( tpdR - tpdR_min < 0. ){
1126  mass_diff_min = mass_diff;
1127  tpdR_min = tpdR;
1128  tag = mu;
1129  }
1130  }
1131  }
1132  else if( dimu_mass > my_Zmass_lowlim && dimu_mass < my_Zmass_highlim ){
1133  tpfromZ = true;
1134  double mass_diff = std::abs(dimu_mass - Zmass);
1135  if( mass_diff - mass_diff_min < -1.*ZERO_LIMIT ){
1136  mass_diff_min = mass_diff;
1137  tpdR_min =tpdR;
1138  tag = mu;
1139  }
1140  else if( std::abs(mass_diff - mass_diff_min) < ZERO_LIMIT){
1141  if( tpdR - tpdR_min < 0. ){
1142  mass_diff_min = mass_diff;
1143  tpdR_min =tpdR;
1144  tag = mu;
1145  }
1146  }
1147  }
1148  }
1149 
1150  return tag;
1151 }

◆ selectEvents()

bool TrigMuonMonitorAlgorithm::selectEvents ( ) const
protectedvirtualinherited

Function that defines the event selection for anlayses User should reimlement in a subclass if needed.

Returns
True if the event is used for an analysis.

Reimplemented in TrigMuonEfficiencyMon.

Definition at line 65 of file TrigMuonMonitorAlgorithm.cxx.

65  {
66  return true;
67 }

◆ selectMuons()

StatusCode TrigMuonMonitorAlgorithm::selectMuons ( SG::ReadHandle< xAOD::MuonContainer > &  muons,
std::vector< const xAOD::Muon * > &  probes 
) const
protectedvirtualinherited

Function that defines the event selection for anlayses Users should reimlement in a subclass if needed.

Parameters
muonsOffline muons in the MuonContainer
probesList of offline muons that are used in analyses

Reimplemented in TrigMuonEfficiencyMon.

Definition at line 70 of file TrigMuonMonitorAlgorithm.cxx.

70  {
71  for (const xAOD::Muon* mu : *muons) {
72  if(mu->muonType()<=m_muontype &&
73  (mu->author()==xAOD::Muon::Author::MuidCo || mu->author()==xAOD::Muon::Author::STACO) &&
74  m_muonSelectionTool->getQuality(*mu)<=xAOD::Muon::Medium ){
75  probes.push_back(mu);
76  }
77  }
78  return StatusCode::SUCCESS;
79 }

◆ setFilterPassed()

virtual void AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool  state,
const EventContext &  ctx 
) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100  {
101  execState( ctx ).setFilterPassed( state );
102  }

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::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 85 of file AthCommonReentrantAlgorithm.cxx.

77 {
78  return BaseAlg::sysExecute (ctx);
79 }

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::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 61 of file AthCommonReentrantAlgorithm.cxx.

107  {
109 
110  if (sc.isFailure()) {
111  return sc;
112  }
113 
114  ServiceHandle<ICondSvc> cs("CondSvc",name());
115  for (auto h : outputHandles()) {
116  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117  // do this inside the loop so we don't create the CondSvc until needed
118  if ( cs.retrieve().isFailure() ) {
119  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120  return StatusCode::SUCCESS;
121  }
122  if (cs->regHandle(this,*h).isFailure()) {
123  sc = StatusCode::FAILURE;
124  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125  << " with CondSvc");
126  }
127  }
128  }
129  return sc;
130 }

◆ 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 199 of file AthMonitorAlgorithm.cxx.

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

◆ 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_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_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_DQFilterTools

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

Array of Data Quality filter tools.

Definition at line 341 of file AthMonitorAlgorithm.h.

◆ m_dRbySAThres

Gaudi::Property< std::vector<float> > L2MuonSAIOMon::m_dRbySAThres {this, "dRbySAThres", {0, 0, 0, 0, 0}, "mufast DR threshold of L2CB"}
private

Definition at line 48 of file L2MuonSAIOMon.h.

◆ m_dRCBThres

Gaudi::Property< std::vector<float> > L2MuonSAIOMon::m_dRCBThres {this, "DRThres", {0.002, 0.001, 0.002, 0.002, 0.002}, "DR threshold of L2CB"}
private

Definition at line 47 of file L2MuonSAIOMon.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_etaBins

Gaudi::Property< std::vector<float> > L2MuonSAIOMon::m_etaBins {this, "EtaBins", {0, 0.9, 1.1, 1.9, 2.1, 9.9}, "eta bins of DR and mass thresholds"}
private

Definition at line 46 of file L2MuonSAIOMon.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 AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

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

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.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_group

Gaudi::Property<std::string> TrigMuonMonitorAlgorithm::m_group {this, "Group", "", "Histogram group"}
protectedinherited

Name of monitored group.

Definition at line 141 of file TrigMuonMonitorAlgorithm.h.

◆ m_L2MuonCBIOContainerKey

SG::ReadHandleKey<xAOD::L2CombinedMuonContainer> L2MuonSAIOMon::m_L2MuonCBIOContainerKey {this, "L2CombinedMuonContainerName_IO", "HLT_MuonL2CBInfoIOmode", "L2MuonCBIO container"}
private

Definition at line 29 of file L2MuonSAIOMon.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_massCBThres

Gaudi::Property< std::vector<float> > L2MuonSAIOMon::m_massCBThres {this, "MassThres", {0.004, 0.002, 0.006, 0.006, 0.006}, "mass threshold of L2CB"}
private

Definition at line 49 of file L2MuonSAIOMon.h.

◆ m_matchTool

ToolHandle<MuonMatchingTool> TrigMuonMonitorAlgorithm::m_matchTool {this, "MuonMatchingTool", "MuonMatchingTool", "Tool for matching offline and online objects"}
protectedinherited

Definition at line 129 of file TrigMuonMonitorAlgorithm.h.

◆ m_monitored_chains

Gaudi::Property<std::vector<std::string> > TrigMuonMonitorAlgorithm::m_monitored_chains {this, "MonitoredChains", {}, "Trigger chains that are monitored"}
protectedinherited

List of trigger chains that are monitored in fillVariablesPerChain and fillVariablesPerOfflineMuonPerChain.

Definition at line 137 of file TrigMuonMonitorAlgorithm.h.

◆ m_monitored_chains_plateau

Gaudi::Property<std::vector<float> > L2MuonSAIOMon::m_monitored_chains_plateau {this, "Plateaus", {}, "List of plateaus of measured trigger"}
private

Definition at line 27 of file L2MuonSAIOMon.h.

◆ m_MuonContainerKey

SG::ReadHandleKey<xAOD::MuonContainer> TrigMuonMonitorAlgorithm::m_MuonContainerKey {this, "MuonContainerName", "Muons", "Offline muon container"}
protectedinherited

Definition at line 133 of file TrigMuonMonitorAlgorithm.h.

◆ m_muonSelectionTool

ToolHandle<CP::IMuonSelectionTool> TrigMuonMonitorAlgorithm::m_muonSelectionTool {this,"MuonSelectionTool","CP::MuonSelectionTool/MuonSelectionTool","MuonSelectionTool"}
protectedinherited

Definition at line 130 of file TrigMuonMonitorAlgorithm.h.

◆ m_muontype

Gaudi::Property<int> TrigMuonMonitorAlgorithm::m_muontype {this, "MuonType", xAOD::Muon::MuonType::Combined, "MuonType used for monitoring"}
protectedinherited

Requirement for the offline muon type considered in analyses.

Definition at line 139 of file TrigMuonMonitorAlgorithm.h.

◆ m_name

std::string AthMonitorAlgorithm::m_name
privateinherited

Definition at line 366 of file AthMonitorAlgorithm.h.

◆ m_plateaus

std::map<std::string, double> L2MuonSAIOMon::m_plateaus {}
private

Definition at line 28 of file L2MuonSAIOMon.h.

◆ m_ratio_measurement_threshold

const float TrigMuonMonitorAlgorithm::m_ratio_measurement_threshold = 4
protectedinherited

Threshold for ratio measurement.

Definition at line 144 of file TrigMuonMonitorAlgorithm.h.

◆ m_RequireDR

bool L2MuonSAIOMon::m_RequireDR = true
private

Definition at line 52 of file L2MuonSAIOMon.h.

◆ m_RequireDRbySA

bool L2MuonSAIOMon::m_RequireDRbySA = false
private

Definition at line 53 of file L2MuonSAIOMon.h.

◆ m_RequireMass

bool L2MuonSAIOMon::m_RequireMass = true
private

Definition at line 54 of file L2MuonSAIOMon.h.

◆ m_RequireSameSign

bool L2MuonSAIOMon::m_RequireSameSign = true
private

Definition at line 55 of file L2MuonSAIOMon.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:
xAOD::L2CombinedMuon_v1::phi
virtual double phi() const
The azimuthal angle ( ) of the particle.
TrigMuonMonitorAlgorithm::selectEvents
virtual bool selectEvents() const
Function that defines the event selection for anlayses User should reimlement in a subclass if needed...
Definition: TrigMuonMonitorAlgorithm.cxx:65
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
L2MuonSAIOMon::m_massCBThres
Gaudi::Property< std::vector< float > > m_massCBThres
Definition: L2MuonSAIOMon.h:49
L2MuonSAIOMon::L2OverlapRemover
StatusCode L2OverlapRemover(const std::vector< const xAOD::L2CombinedMuon * > &matchSA_L2IOobjects, std::vector< bool > &isoverlap, std::vector< bool > &passOR) const
Definition: L2MuonSAIOMon.cxx:678
AthMonitorAlgorithm::Environment_t::tier0Raw
@ tier0Raw
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:18
TrigMuonMonitorAlgorithm::m_MuonContainerKey
SG::ReadHandleKey< xAOD::MuonContainer > m_MuonContainerKey
Definition: TrigMuonMonitorAlgorithm.h:133
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
get_generator_info.result
result
Definition: get_generator_info.py:21
TrigMuonMonitorAlgorithm::m_group
Gaudi::Property< std::string > m_group
Name of monitored group.
Definition: TrigMuonMonitorAlgorithm.h:141
L2MuonSAIOMon::m_RequireDR
bool m_RequireDR
Definition: L2MuonSAIOMon.h:52
runLayerRecalibration.chain
chain
Definition: runLayerRecalibration.py:175
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
P4Helpers::invMass
double invMass(const I4Momentum &pA, const I4Momentum &pB)
invariant mass from two I4momentum references
Definition: P4Helpers.h:252
xAOD::L2StandAloneMuon_v2::etaMS
float etaMS() const
Get the eta at muon spectrometer.
AthMonitorAlgorithm::m_trigDecTool
PublicToolHandle< Trig::TrigDecisionTool > m_trigDecTool
Tool to tell whether a specific trigger is passed.
Definition: AthMonitorAlgorithm.h:340
TrigMuonMonitorAlgorithm::m_matchTool
ToolHandle< MuonMatchingTool > m_matchTool
Definition: TrigMuonMonitorAlgorithm.h:129
AthMonitorAlgorithm::Environment_t::tier0
@ tier0
AthMonitorAlgorithm::Environment_t::AOD
@ AOD
Muon::MuonStationIndex
Definition: MuonStationIndex.h:13
xAOD::Muon_v1::p4
virtual FourMom_t p4() const
The full 4-momentum of the particle.
Definition: Muon_v1.cxx:80
xAOD::L2StandAloneMuon_v2
Class describing standalone muons reconstructed in the LVL2 trigger.
Definition: L2StandAloneMuon_v2.h:36
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
xAOD::L2StandAloneMuon_v2::mdtHitR
float mdtHitR(unsigned int tube) const
Definition: L2StandAloneMuon_v2.cxx:1437
L2MuonSAIOMon::m_L2MuonCBIOContainerKey
SG::ReadHandleKey< xAOD::L2CombinedMuonContainer > m_L2MuonCBIOContainerKey
Definition: L2MuonSAIOMon.h:29
AthMonitorAlgorithm::m_vTrigChainNames
std::vector< std::string > m_vTrigChainNames
Vector of trigger chain names parsed from trigger chain string.
Definition: AthMonitorAlgorithm.h:356
xAOD::L2StandAloneMuon_v2::roadAw
float roadAw(int station, int sector) const
Slope.
Definition: L2StandAloneMuon_v2.cxx:481
L2MuonSAIOMon::chooseBestMuon
StatusCode chooseBestMuon(const std::vector< const xAOD::L2CombinedMuon * > &matchSA_L2IOobjects, std::vector< bool > &passOR, std::vector< unsigned int > &mucombResult) const
Definition: L2MuonSAIOMon.cxx:860
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
xAOD::L2CombinedMuon_v1::charge
float charge() const
get seeding muon charge
AthMonitorAlgorithm::getTrigDecisionTool
const ToolHandle< Trig::TrigDecisionTool > & getTrigDecisionTool() const
Get the trigger decision tool member.
Definition: AthMonitorAlgorithm.cxx:194
M_PI
#define M_PI
Definition: ActiveFraction.h:11
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
xAOD::MuonSegment_v1
Class describing a MuonSegment.
Definition: MuonSegment_v1.h:33
AthMonitorAlgorithm::m_toolLookupMap
std::unordered_map< std::string, size_t > m_toolLookupMap
Definition: AthMonitorAlgorithm.h:367
xAOD::P4Helpers::deltaPhi
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
Definition: xAODP4Helpers.h:69
AthMonitorAlgorithm::m_environment
AthMonitorAlgorithm::Environment_t m_environment
Instance of the Environment_t enum.
Definition: AthMonitorAlgorithm.h:350
xAOD::L2StandAloneMuon_v2::phiMS
float phiMS() const
Get the phi at muon spectrometer.
cosmics
Definition: cosmics.py:1
L2MuonSAIOMon::isOverlap
bool isOverlap(const xAOD::L2CombinedMuon *matchSA_L2IOobject1, const xAOD::L2CombinedMuon *matchSA_L2IOobject2) const
Definition: L2MuonSAIOMon.cxx:755
L2MuonSAIOMon::searchL2InsideOut
const xAOD::L2CombinedMuon * searchL2InsideOut(const EventContext &ctx, const xAOD::Muon *mu, const std::string &trigger) const
Definition: L2MuonSAIOMon.cxx:1040
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
L2MuonSAIOMon::m_plateaus
std::map< std::string, double > m_plateaus
Definition: L2MuonSAIOMon.h:28
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
L2MuonSAIOMon::m_RequireSameSign
bool m_RequireSameSign
Definition: L2MuonSAIOMon.h:55
dq_defect_bulk_create_defects.line
line
Definition: dq_defect_bulk_create_defects.py:27
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
AthMonitorAlgorithm::trigChainsArePassed
bool trigChainsArePassed(const std::vector< std::string > &vTrigNames) const
Check whether triggers are passed.
Definition: AthMonitorAlgorithm.cxx:199
AthMonitorAlgorithm::Environment_t::user
@ user
drawFromPickle.atan
atan
Definition: drawFromPickle.py:36
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
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
xAOD::L2CombinedMuon_v1
Class describing combined muon reconstructed in the LVL2 trigger.
Definition: L2CombinedMuon_v1.h:41
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
xAOD::Muon_v1::charge
float charge() const
xAOD::L2CombinedMuon_v1::muSATrack
const xAOD::L2StandAloneMuon * muSATrack() const
Get the SA muon as a bare pointer.
PyPoolBrowser.item
item
Definition: PyPoolBrowser.py:129
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
TileSynchronizeBch.online
online
Definition: TileSynchronizeBch.py:88
AthCommonReentrantAlgorithm::extraOutputDeps
virtual const DataObjIDColl & extraOutputDeps() const override
Return the list of extra output dependencies.
Definition: AthCommonReentrantAlgorithm.cxx:89
xAOD::L2StandAloneMuon_v2::superPointR
float superPointR(int chamber) const
Get the measured radious of the muon in one particular super point.
Definition: L2StandAloneMuon_v2.cxx:180
xAOD::L2CombinedMuon_v1::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
TrigMuonMonitorAlgorithm::TrigMuonMonitorAlgorithm
TrigMuonMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Definition: TrigMuonMonitorAlgorithm.cxx:8
L2MuonSAIOMon::m_RequireMass
bool m_RequireMass
Definition: L2MuonSAIOMon.h:54
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
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
CheckAppliedSFs.e3
e3
Definition: CheckAppliedSFs.py:264
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
xAOD::P4Helpers::deltaR
double deltaR(double rapidity1, double phi1, double rapidity2, double phi2)
from bare bare rapidity,phi
Definition: xAODP4Helpers.h:150
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
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
tolower
void tolower(std::string &s)
Definition: AthenaSummarySvc.cxx:108
python.CaloAddPedShiftConfig.str
str
Definition: CaloAddPedShiftConfig.py:42
AthMonitorAlgorithm::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) const =0
adds event to the monitoring histograms
AthCommonReentrantAlgorithm::sysExecute
virtual StatusCode sysExecute(const EventContext &ctx) override
Execute an algorithm.
Definition: AthCommonReentrantAlgorithm.cxx:76
res
std::pair< std::vector< unsigned int >, bool > res
Definition: JetGroupProductTest.cxx:11
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
xAOD::L2CombinedMuon_v1::pt
virtual double pt() const
The transverse momentum ( ) of the particle.
xAOD::L2StandAloneMuon_v2::mdtHitChamber
int mdtHitChamber(unsigned int tube) const
Definition: L2StandAloneMuon_v2.cxx:1429
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
drawFromPickle.tan
tan
Definition: drawFromPickle.py:36
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
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
ReadTripsProbsFromCool.denominator
denominator
Definition: ReadTripsProbsFromCool.py:96
L2MuonSAIOMon::m_RequireDRbySA
bool m_RequireDRbySA
Definition: L2MuonSAIOMon.h:53
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
TrigMuonMonitorAlgorithm::fillVariables
virtual StatusCode fillVariables(const EventContext &ctx) const
Function that fills variables by just retrieving containers of trigger objects.
Definition: TrigMuonMonitorAlgorithm.cxx:82
TrigMuonMonitorAlgorithm::m_monitored_chains
Gaudi::Property< std::vector< std::string > > m_monitored_chains
List of trigger chains that are monitored in fillVariablesPerChain and fillVariablesPerOfflineMuonPer...
Definition: TrigMuonMonitorAlgorithm.h:137
AthMonitorAlgorithm::m_dataType
AthMonitorAlgorithm::DataType_t m_dataType
Instance of the DataType_t enum.
Definition: AthMonitorAlgorithm.h:351
ZERO_LIMIT
const float ZERO_LIMIT
Definition: VP1TriggerHandleL2.cxx:37
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
LikeEnum::Tight
@ Tight
Definition: LikelihoodEnums.h:15
TrigCompositeUtils::featureString
const std::string & featureString()
Definition: TrigCompositeUtilsRoot.cxx:898
AthMonitorAlgorithm::m_tools
ToolHandleArray< GenericMonitoringTool > m_tools
Array of Generic Monitoring Tools.
Definition: AthMonitorAlgorithm.h:338
xAOD::L2StandAloneMuon_v2::mdtHitIsOutlier
int mdtHitIsOutlier(unsigned int tube) const
Definition: L2StandAloneMuon_v2.cxx:1421
AthMonitorAlgorithm::Environment_t::online
@ online
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
AthMonitorAlgorithm::Environment_t::tier0ESD
@ tier0ESD
MuonR4::SegmentFit::toInt
constexpr int toInt(const ParamDefs p)
Definition: MuonHoughDefs.h:42
AthMonitorAlgorithm::Environment_t::altprod
@ altprod
L2MuonSAIOMon::m_etaBins
Gaudi::Property< std::vector< float > > m_etaBins
Definition: L2MuonSAIOMon.h:46
L2MuonSAIOMon::m_dRCBThres
Gaudi::Property< std::vector< float > > m_dRCBThres
Definition: L2MuonSAIOMon.h:47
AthMonitorAlgorithm::m_enforceExpressTriggers
Gaudi::Property< bool > m_enforceExpressTriggers
Definition: AthMonitorAlgorithm.h:372
item
Definition: ItemListSvc.h:43
WriteBchToCool.user
user
Definition: WriteBchToCool.py:76
TrigMuonMonitorAlgorithm::selectMuons
virtual StatusCode selectMuons(SG::ReadHandle< xAOD::MuonContainer > &muons, std::vector< const xAOD::Muon * > &probes) const
Function that defines the event selection for anlayses Users should reimlement in a subclass if neede...
Definition: TrigMuonMonitorAlgorithm.cxx:70
TrigMuonMonitorAlgorithm::m_muontype
Gaudi::Property< int > m_muontype
Requirement for the offline muon type considered in analyses.
Definition: TrigMuonMonitorAlgorithm.h:139
MuonParameters::MuidCo
@ MuidCo
Definition: MuonParamDefs.h:60
ATH_LIKELY
#define ATH_LIKELY(x)
Definition: AthUnlikelyMacros.h:16
L2MuonSAIOMon::isPassedmuCombHypo
StatusCode isPassedmuCombHypo(const std::string &chain, const xAOD::L2CombinedMuon *Trig_L2IOobjects, bool &pass_muCombHypo) const
Definition: L2MuonSAIOMon.cxx:964
runIDAlign.accumulate
accumulate
Update flags based on parser line args.
Definition: runIDAlign.py:60
TrigCompositeUtils::LinkInfo
Helper to keep a Decision object, ElementLink and ActiveState (with respect to some requested ChainGr...
Definition: LinkInfo.h:28
a
TList * a
Definition: liststreamerinfos.cxx:10
CaloLCW_tf.group
group
Definition: CaloLCW_tf.py:28
xAOD::L2StandAloneMuon_v2::nMdtHits
uint32_t nMdtHits() const
Get the online ID, offline ID, R, Z, redidual, time, space and sigma of each MDT tube.
Definition: L2StandAloneMuon_v2.cxx:1401
h
xAOD::L2StandAloneMuon_v2::mdtHitResidual
float mdtHitResidual(unsigned int tube) const
Definition: L2StandAloneMuon_v2.cxx:1461
LikeEnum::Medium
@ Medium
Definition: LikelihoodEnums.h:14
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
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
TrigMuonMonitorAlgorithm::initialize
virtual StatusCode initialize() override
initialize
Definition: TrigMuonMonitorAlgorithm.cxx:13
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
python.LArCondContChannels.isBarrel
isBarrel
Definition: LArCondContChannels.py:659
TauGNNUtils::Variables::absEta
bool absEta(const xAOD::TauJet &tau, double &out)
Definition: TauGNNUtils.cxx:245
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
xAOD::L2StandAloneMuon_v2::roadBw
float roadBw(int station, int sector) const
Intercept.
Definition: L2StandAloneMuon_v2.cxx:508
python.SystemOfUnits.s
float s
Definition: SystemOfUnits.py:147
TrigMuonMonitorAlgorithm::fillVariablesPerOfflineMuonPerChain
virtual StatusCode fillVariablesPerOfflineMuonPerChain(const EventContext &ctx, const xAOD::Muon *mu, const std::string &chain) const
Function that fills variables of trigger objects associated to specified trigger chains comparing off...
Definition: TrigMuonMonitorAlgorithm.cxx:95
xAOD::L2StandAloneMuon_v2::pt
virtual double pt() const
The transverse momentum ( ) of the particle.
AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthCommonReentrantAlgorithm.cxx:107
ACTIVE
@ ACTIVE
Definition: ZdcID.h:21
str
Definition: BTagTrackIpAccessor.cxx:11
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
xAOD::STACO
@ STACO
Tracks produced by STACO.
Definition: TrackingPrimitives.h:100
L2MuonSAIOMon::L2ORPosForMatchFunc
static std::tuple< float, float, float > L2ORPosForMatchFunc(const xAOD::L2StandAloneMuon *trig)
Definition: L2MuonSAIOMon.cxx:1030
xAOD::L2StandAloneMuon_v2::roiWord
uint32_t roiWord() const
Get the RoI ID of the seeding LVL1 muon.
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:23
L2MuonSAIOMon::searchTagOfflineMuon
const xAOD::Muon * searchTagOfflineMuon(const EventContext &ctx, const xAOD::Muon *probe) const
Definition: L2MuonSAIOMon.cxx:1083
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
Monitored::Scalar
Declare a monitored scalar variable.
Definition: MonitoredScalar.h:34
TrigMuonMonitorAlgorithm::fillVariablesPerOfflineMuon
virtual StatusCode fillVariablesPerOfflineMuon(const EventContext &ctx, const xAOD::Muon *mu) const
Function that fills variables that are compared to offline muons but the trigger chains are not speci...
Definition: TrigMuonMonitorAlgorithm.cxx:87
AthMonitorAlgorithm::DataType_t::userDefined
@ userDefined
L2MuonSAIOMon::m_monitored_chains_plateau
Gaudi::Property< std::vector< float > > m_monitored_chains_plateau
Definition: L2MuonSAIOMon.h:27
AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthCommonReentrantAlgorithm.h:114
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:51
pow
constexpr int pow(int base, int exp) noexcept
Definition: ap_fixedTest.cxx:15
xAOD::L2StandAloneMuon_v2::mdtHitZ
float mdtHitZ(unsigned int tube) const
Definition: L2StandAloneMuon_v2.cxx:1445
passOR
@ passOR
Definition: SUSYToolsTester.cxx:100
TrigMuonMonitorAlgorithm::m_muonSelectionTool
ToolHandle< CP::IMuonSelectionTool > m_muonSelectionTool
Definition: TrigMuonMonitorAlgorithm.h:130
TrigMuonMonitorAlgorithm::fillVariablesPerChain
virtual StatusCode fillVariablesPerChain(const EventContext &ctx, const std::string &chain) const
Function that fills variables of trigger objects associated to specified trigger chains.
Definition: TrigMuonMonitorAlgorithm.cxx:91
L2MuonSAIOMon::decision_ptthreshold
StatusCode decision_ptthreshold(const std::string &chain, std::vector< float > &my_EtaBins, std::vector< float > &my_muCombThres, bool &my_pikCuts, float &my_maxPtToApplyPik, float &my_chi2MaxID) const
Definition: L2MuonSAIOMon.cxx:1005
AthMonitorAlgorithm::DataType_t::monteCarlo
@ monteCarlo
fitman.k
k
Definition: fitman.py:528
L2MuonSAIOMon::m_dRbySAThres
Gaudi::Property< std::vector< float > > m_dRbySAThres
Definition: L2MuonSAIOMon.h:48
NSWL1::PadTriggerAdapter::segment
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
Definition: PadTriggerAdapter.cxx:5
ServiceHandle< ICondSvc >
collisions
Definition: collisions.py:1
L2MuonSAIOMon::matchL2IO_wContainer
StatusCode matchL2IO_wContainer(const EventContext &ctx, const std::string &chain, std::vector< const xAOD::L2CombinedMuon * > &Trig_L2IOobjects) const
Definition: L2MuonSAIOMon.cxx:612