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

#include <MdtVsTgcRawDataValAlg.h>

Inheritance diagram for MdtVsTgcRawDataValAlg:
Collaboration diagram for MdtVsTgcRawDataValAlg:

Public Types

enum  Interval_t {
  file = 0, eventsBlock, lumiBlock, lowStat,
  medStat, higStat, run, fill,
  all
}
 An enumeration describing how detailed a particular monitoring object is. More...
 
enum  MgmtAttr_t { ATTRIB_MANAGED = 0, ATTRIB_UNMANAGED = 1, ATTRIB_X_VS_LB = 2 }
 An enumeration describing how the class handles the histogram. More...
 

Public Member Functions

 MdtVsTgcRawDataValAlg (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~MdtVsTgcRawDataValAlg ()
 
StatusCode initialize ()
 
virtual StatusCode bookHistogramsRecurrent ()
 An inheriting class should either override this function, bookHists() or bookHistograms(). More...
 
virtual StatusCode fillHistograms ()
 An inheriting class should either override this function or fillHists(). More...
 
virtual StatusCode procHistograms ()
 An inheriting class should either override this function or finalHists(). More...
 
virtual StreamNameFcnstreamNameFunction ()
 Returns the function object that converts logical paramters into a physical stream name. More...
 
virtual StatusCode bookHists ()
 Calls bookHists( true, true, true ) and initializes lumiBlock and run numbers. More...
 
virtual StatusCode fillHists ()
 Calls fillHists( bool, bool, bool ); if an eventBlock,lumiBlock, or run has turned over, calls procHists( bool, bool, bool ) and bookHists( bool, bool, bool ). More...
 
virtual StatusCode finalHists ()
 Calls procHists( true, true, true ). More...
 
virtual StatusCode bookHistograms ()
 An inheriting class should either override this function or bookHists(). More...
 
virtual void setMonManager (AthenaMonManager *manager)
 Takes a pointer to a managing object to get information from it when needed. More...
 
virtual StatusCode regHist (TH1 *h, const std::string &system, Interval_t interval, MgmtAttr_t histo_mgmt=ATTRIB_MANAGED, const std::string &chain="", const std::string &merge="")
 Registers a TH1 (including TH2, TH3, and TProfile) to be included in the output stream using logical parameters that describe the histogram. More...
 
virtual StatusCode regHist (TH1 *h, const MonGroup &group)
 Registers a TH1 (including TH2, TH3, and TProfile) to be included in the output stream using logical parameters that describe the histogram. More...
 
virtual StatusCode getHist (TH1 *&h, const std::string &hName, const std::string &system, Interval_t interval)
 Returns a TH1 via the pointer passed as the first argument. More...
 
virtual StatusCode getHist (TH1 *&h, const std::string &hName, const MonGroup &group)
 Returns a TH1 via the pointer passed as the first argument. More...
 
virtual StatusCode getHist (TH2 *&h, const std::string &hName, const std::string &system, Interval_t interval)
 Returns a TH2 via the pointer passed as the first argument. More...
 
virtual StatusCode getHist (TH2 *&h, const std::string &hName, const MonGroup &group)
 Returns a TH2 via the pointer passed as the first argument. More...
 
virtual StatusCode regEfficiency (TEfficiency *e, const MonGroup &group)
 Registers a TEfficiency to be included in the output stream using logical parameters that describe the plot. More...
 
virtual StatusCode regGraph (TGraph *g, const std::string &system, Interval_t interval, MgmtAttr_t histo_mgmt=ATTRIB_MANAGED, const std::string &chain="", const std::string &merge="")
 Registers a TGraph to be included in the output stream using logical parameters that describe the graph. More...
 
virtual StatusCode regGraph (TGraph *g, const MonGroup &group)
 Registers a TGraph to be included in the output stream using logical parameters that describe the graph. More...
 
virtual StatusCode regTree (TTree *t, const std::string &system, Interval_t interval, MgmtAttr_t histo_mgmt=ATTRIB_MANAGED, const std::string &chain="", const std::string &merge="")
 Registers a TTree to be included in the output stream using logical parameters that describe it. More...
 
virtual StatusCode regTree (TTree *t, const MonGroup &group)
 Registers a TTree to be included in the output stream using logical parameters that describe it. More...
 
virtual StatusCode writeAndDelete (TH1 *h, const MonGroup &group)
 Write out histogram and delete it. More...
 
virtual StatusCode deregHist (TH1 *h)
 De-registers a TH1 from the THistSvc, but does NOT delete the object. More...
 
virtual StatusCode deregGraph (TGraph *g)
 De-registers a TGraph from the THistSvc, but does NOT delete the object. More...
 
virtual StatusCode deregObject (const std::string &objName, const std::string &system, Interval_t interval)
 De-registers a TObject from the THistSvc, but does NOT delete the object. More...
 
virtual StatusCode deregObject (const std::string &objName, const MonGroup &group)
 De-registers a TObject from the THistSvc, but does NOT delete the object. More...
 
virtual StatusCode setupOutputStreams (std::vector< std::string > Mapping=std::vector< std::string >())
 This implementation does nothing—streams in this class should be managed by the AthenaMonManager. More...
 
virtual StatusCode runStat ()
 This implementation does nothing; equivalent functionality may be provided by procHists( true, true, true ). More...
 
virtual StatusCode checkHists (bool calledFromFinalize)
 This implementation does nothing; equivalent functionality may be provided by procHists(...) with appropriate arguments. More...
 
virtual bool preSelector ()
 
virtual float lbAverageInteractionsPerCrossing (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Average mu, i.e. More...
 
virtual float lbInteractionsPerCrossing (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Instantaneous number of interactions, i.e. More...
 
virtual float lbAverageLuminosity (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Average luminosity (in ub-1 s-1 => 10^30 cm-2 s-1) More...
 
virtual float lbLuminosityPerBCID (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Instantaneous luminosity. More...
 
virtual double lbDuration (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Luminosity block time (in seconds) More...
 
virtual float lbAverageLivefraction (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Average luminosity livefraction. More...
 
virtual float livefractionPerBCID (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Livefraction per bunch crossing ID. More...
 
virtual double lbLumiWeight (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Average Integrated Luminosity Live Fraction. More...
 
 MMTB_DEPRECATED (newLowStatInterval)
 
 MMTB_DEPRECATED (newMedStatInterval)
 
 MMTB_DEPRECATED (newHigStatInterval)
 
 MMTB_DEPRECATED (newLowStat)
 
 MMTB_DEPRECATED (newLumiBlock)
 
 MMTB_DEPRECATED (newRun)
 
 MMTB_DEPRECATED (newEventsBlock)
 
 MMTB_DEPRECATED (endOfEventsBlock)
 
 MMTB_DEPRECATED (endOfLowStat)
 
 MMTB_DEPRECATED (endOfLumiBlock)
 
 MMTB_DEPRECATED (endOfRun)
 
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 sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static std::string intervalEnumToString (Interval_t interval)
 Converts a LevelOfDetail_t to a string of the same name. More...
 
static Interval_t intervalStringToEnum (const std::string &str)
 Converts a string to the corresponding Interval_t. More...
 
static const InterfaceID & interfaceID ()
 

Protected Types

typedef std::map< std::string, OutputMetadata * > MDMap_t
 

Protected Member Functions

StatusCode regManagedHistograms (std::vector< MgmtParams< TH1 > > &templateHistograms)
 
StatusCode regManagedGraphs (std::vector< MgmtParams< TGraph > > &templateGraphs)
 
StatusCode regManagedTrees (std::vector< MgmtParams< TTree > > &templateTrees)
 
StatusCode regManagedEfficiencies (std::vector< MgmtParams< TEfficiency > > &templateEfficiencies)
 
StatusCode parseList (const std::string &, std::vector< std::string > &)
 
void updateTriggersForGroups (std::vector< std::string > &)
 
StatusCode registerMetadata (const std::string &streamName, const std::string &hName, const MonGroup &group)
 
StatusCode THistSvc_deReg_fixTGraph (TFile *file, TGraph *theGraph, std::string &directoryName)
 Fixes THistSvc->deReg(obj) when obj is TGraph instance. More...
 
unsigned int get_nEvents () const
 
long get_procNEventsProp () const
 
virtual bool trigChainsArePassed (std::vector< std::string > &)
 
virtual StreamNameFcngetNewStreamNameFcn () const
 
bool newLowStatIntervalFlag () const
 Flag functions allowing clients to determine when to book new and process old histograms; values are updated by fillHists() based on counting lumiBlocks, and are correctly set when fillHistograms(), bookHistograms() and procHistograms() are called. More...
 
bool newMedStatIntervalFlag () const
 
bool newHigStatIntervalFlag () const
 
bool newLowStatFlag () const
 
bool newLumiBlockFlag () const
 
bool newRunFlag () const
 
bool newEventsBlockFlag () const
 
bool endOfEventsBlockFlag () const
 
bool endOfLowStatFlag () const
 
bool endOfLumiBlockFlag () const
 
bool endOfRunFlag () const
 
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Protected Attributes

std::map< Interval_t, std::vector< MgmtParams< TH1 > > > m_templateHistograms
 
std::map< Interval_t, std::vector< MgmtParams< TGraph > > > m_templateGraphs
 
std::map< Interval_t, std::vector< MgmtParams< TTree > > > m_templateTrees
 
std::map< Interval_t, std::vector< MgmtParams< TEfficiency > > > m_templateEfficiencies
 
std::vector< std::string > m_vTrigChainNames
 
std::vector< std::string > m_vTrigGroupNames
 
MDMap_t m_metadataMap
 
AthenaMonManagerm_manager
 
std::string m_managerNameProp
 
std::string m_fileKey
 
std::string m_dataTypeStr
 
std::string m_environmentStr
 
unsigned int m_detailLevel
 
AthenaMonManager::DataType_t m_dataType
 
AthenaMonManager::Environment_t m_environment
 
StreamNameFcnm_streamNameFcn
 
ServiceHandle< ITHistSvc > m_THistSvc
 
PublicToolHandle< Trig::ITrigDecisionToolm_trigDecTool {this, "TrigDecisionTool",""}
 
PublicToolHandle< ITriggerTranslatorToolm_trigTranslator {this,"TriggerTranslatorTool",""}
 
ToolHandleArray< IDQFilterToolm_DQFilterTools {this,"FilterTools",{}}
 
long m_procNEventsProp
 
std::string m_path
 
long m_preScaleProp
 
std::string m_triggerChainProp
 
std::string m_triggerGroupProp
 
bool m_useTrigger
 
unsigned int m_lastLumiBlock
 
unsigned int m_lastRun
 
int m_lastLowStatInterval
 
int m_lastMedStatInterval
 
int m_lastHigStatInterval
 
unsigned int m_nEvents
 
unsigned int m_nEventsIgnoreTrigger
 
unsigned int m_nLumiBlocks
 
bool m_haveClearedLastEventBlock
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

void correlation (const Muon::MdtPrepDataContainer *mdt_hit_container, const Muon::TgcCoinDataContainer *tgc_trigger_container)
 
int numberOfSL (const Muon::TgcCoinDataContainer *tgctrgcontainer)
 
void roi2etaphi (const Muon::TgcCoinData &cd, int &eta, int &phi)
 
int phi2sector (int phi, int ef)
 
int roiphi2mdtSector (int roiphi, int ef)
 
int roitotalphi2sectorphi (int phi)
 
int stationGasGap2layer (int station, int GasGap)
 
void prepareTREarray (const MuonGM::MuonDetectorManager *MuonDetMgrDS)
 
int TGCgetlayer (int stationName, int g)
 
int TGClayer2stationindex (int l)
 
int TGCstationname2stationindex (int stationName)
 
StatusCode bookmaphists (MonGroup &mdtvstgclv1_expert_a, MonGroup &mdtvstgclv1_expert_c)
 
void maphists (const xAOD::MuonSegmentContainer *m_newsegment, const Muon::TgcPrepDataContainer *tgc_prepcontainer)
 
void maphistsfinalize ()
 
StatusCode bookeffhists (MonGroup &mdtvstgclv1_expert_a, MonGroup &mdtvstgclv1_expert_c)
 
void tgceffcalc (const xAOD::MuonSegmentContainer *m_newsegment, const Muon::TgcPrepDataContainer *tgc_prepcontainer)
 
void SortMDTSegments (const xAOD::MuonSegmentContainer *m_newsegment, std::vector< const Muon::MuonSegment * >(&sortedSegments)[2][4])
 
void DQCheckMDTSegments (std::vector< const Muon::MuonSegment * >(&sortedSegments)[2][4], std::vector< const Muon::MuonSegment * >(&disqualifiedSegments)[2][4])
 
void MatchMDTSegments (std::vector< const Muon::MuonSegment * >(&sortedSegments)[2][4], std::vector< const Muon::MuonSegment * >(&disqualifiedSegments)[2][4], std::vector< SegmTrack >(&matchedSegments)[2])
 
void CheckTGConTrack (std::vector< SegmTrack >(&matchedSegments)[2], const Muon::TgcPrepDataContainer *tgc_prepcontainer)
 
void MidstationOnlyCheck (std::vector< const Muon::MuonSegment * >(&sortedSegments)[2][4], std::vector< const Muon::MuonSegment * >(&disqualifiedSegments)[2][4], const Muon::TgcPrepDataContainer *tgc_prepcontainer)
 
void tgceffcalcfinalize ()
 
int getStationMapIndex (int x, int l, int stationFE, int stationEta, int stationPhi)
 
void labelStationMap (TH2 *h2, int i=-1, int k=-1)
 
void putBox (TH2 *h2, float x1, float y1, float x2, float y2)
 
void BlankPhi24 (TH2 *h2, int binx)
 
void BlankStationMap (TH2 *h2, int ws)
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

MuonDQAHistMap m_stationHists
 
SG::ReadCondHandleKey< MuonGM::MuonDetectorManagerm_DetectorManagerKey
 
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
 
bool m_checkCabling
 
bool m_tgclv1file
 
std::string m_chamberName
 
std::string m_StationSize
 
int m_sector
 
int m_side
 
int m_lastEvent
 
int m_cosmicStation
 
SG::ReadHandleKey< Muon::TgcPrepDataContainerm_tgc_PrepDataContainerName {this,"TgcPrepDataContainer","TGC_Measurements","TGC PRDs"}
 
SG::ReadHandleKey< Muon::TgcCoinDataContainerm_tgc_CoinContainerName {this,"OutputCoinCollection","TrigT1CoinDataCollection","TGC coincidences"}
 
SG::ReadHandleKey< Muon::MdtPrepDataContainerm_mdt_PrepDataContainerName {this,"MdtPrepDataContainer","MDT_DriftCircles","MDT PRDs"}
 
SG::ReadHandleKey< xAOD::MuonSegmentContainerm_mdt_SegmentCollectionName {this,"MdtSegmentCollection","MuonSegments","muon segments"}
 
int m_MdtAdcCut
 
int m_MdtTdcCut
 
const MuonGM::TgcReadoutElementm_TREarray [8][2][9][49] {}
 
TH1 * m_mvt_cutspassed [2] {}
 
TH2 * m_mdt_segmmap [2][4] {}
 
TH2 * m_eff_stationmapbase [2][2][4] {}
 
TH2 * m_eff_stationmapmid [2][2][4] {}
 
TH2 * m_eff_stationmap [2][2][4] {}
 
TH1 * m_mvt_extrprdsag [2][4][2][2][4] {}
 
TH1 * m_mvt_extrprdsag2 [2][4][2][2][4] {}
 
TH1 * m_tgc_prdcompsag [2][2][4] {}
 
TH1 * m_mdt_segmmatchsag [2][4][4][4] {}
 
TH1 * m_mdt_segmposdirsag [2][4][4] {}
 
TH1 * m_mdt_trackdirdirsag [2][4][4][4] {}
 
TH1 * m_mdt_trackchecksag [2][4][4][4][2] {}
 
bool m_newLowStatInterval
 
bool m_newMedStatInterval
 
bool m_newHigStatInterval
 
bool m_newLowStat
 
bool m_newLumiBlock
 
bool m_newRun
 
bool m_newEventsBlock
 
bool m_endOfEventsBlock
 
bool m_endOfLowStat
 
bool m_endOfLumiBlock
 
bool m_endOfRun
 
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"}
 
bool m_bookHistogramsInitial
 
bool m_useLumi
 
float m_defaultLBDuration
 
std::set< Interval_tm_supportedIntervalsForRebooking
 
Impm_d
 
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 38 of file MdtVsTgcRawDataValAlg.h.

Member Typedef Documentation

◆ MDMap_t

typedef std::map<std::string,OutputMetadata*> ManagedMonitorToolBase::MDMap_t
protectedinherited

Definition at line 826 of file ManagedMonitorToolBase.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ Interval_t

An enumeration describing how detailed a particular monitoring object is.

summary: used to summarize the state of the system

runstat: same as summary

shift: used to flag potential problems

expert: essential for diagnosing problems identified by shift-level objects

debug: useful for standalone debugging, but not for routine monitoring; not essential for diagnosing problems during normal running

transient: too detailed to ever be written; always summarized by the user by means of another object An enumeration describing the interval over which a particular monitoring object is filled (i.e., interval over which the method Fill(...) is called). This information may be stored with the monitoring object if an application is only able to partially fill the object (i.e., a job sees only part of a run or fill). This information may be ignored in some running Environments. The 'fill' interval corresponds to a fill of the LHC. The 'all' interval corresponds to all available data. The 'lumiBlock' and 'fill' intervals are only valid for the 'collisions' DataType_t.

Enumerator
file 
eventsBlock 
lumiBlock 
lowStat 
medStat 
higStat 
run 
fill 
all 

Definition at line 113 of file ManagedMonitorToolBase.h.

113  { file = 0, eventsBlock, lumiBlock,
115  run, fill, all };

◆ MgmtAttr_t

An enumeration describing how the class handles the histogram.

attrib_unmanaged: histograms with this attribute will not be rebooked automatically and must be managed by the user code.

attrib_x_is_lb: indicates that the x-axis of the histogram is the luminosity block number and that the histogram should be rebooked as necessary if the current LB exceeds the range.

Enumerator
ATTRIB_MANAGED 
ATTRIB_UNMANAGED 
ATTRIB_X_VS_LB 

Definition at line 130 of file ManagedMonitorToolBase.h.

Constructor & Destructor Documentation

◆ MdtVsTgcRawDataValAlg()

MdtVsTgcRawDataValAlg::MdtVsTgcRawDataValAlg ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 34 of file MdtVsTgcRawDataValAlg.cxx.

36 {
37  // Declare the properties
38  declareProperty("CheckCabling", m_checkCabling=false);
39  declareProperty("TgcLv1File", m_tgclv1file=true);
40  declareProperty("ChamberName", m_chamberName="XXX");
41  declareProperty("StationSize", m_StationSize="XXX");
42  declareProperty("Sector", m_sector=0);
43  declareProperty("Side", m_side=0);
44  declareProperty("LastEvent", m_lastEvent=0);
45  declareProperty("CosmicStation", m_cosmicStation=0);
46  declareProperty("MdtAdcCut", m_MdtAdcCut=50);
47  declareProperty("MdtTdcCut", m_MdtTdcCut=1600);
48 
49  // initialize class members
50 
51  for(int ac=0; ac<2; ac++){
52  m_mvt_cutspassed[ac] = nullptr;
53  for(int jMDT=0; jMDT<4; jMDT++){
54  m_mdt_segmmap[ac][jMDT] = nullptr;
55  for(int sMDT=0; sMDT<4; sMDT++){
56  m_mdt_segmposdirsag[ac][jMDT][sMDT] = nullptr;
57  for(int iREPT=0; iREPT<4; iREPT++){
58  m_mdt_segmmatchsag[ac][jMDT][sMDT][iREPT] = nullptr;
59  m_mdt_trackdirdirsag[ac][jMDT][sMDT][iREPT] = nullptr;
60  m_mdt_trackchecksag[ac][jMDT][sMDT][iREPT][0] = nullptr;
61  m_mdt_trackchecksag[ac][jMDT][sMDT][iREPT][1] = nullptr;
62  }
63  }
64  }
65  for(int WS=0; WS<2; WS++){
66  for(int EffNDE=0; EffNDE<4; EffNDE++){
67  m_eff_stationmapbase[ac][WS][EffNDE] = nullptr;
68  m_eff_stationmapmid[ac][WS][EffNDE] = nullptr;
69  m_eff_stationmap[ac][WS][EffNDE] = nullptr;
70  }
71  }
72  }
73 
74  // Initialize to zero
75  for(int i=0;i<2;i++)// AC
76  for(int jTGC=0;jTGC<4;jTGC++)// TGC Station
77  for(int f=0;f<2;f++)// FE
78  for(int k=0;k<2;k++)// WireStrip
79  for(int x=0;x<4;x++){
80  m_mvt_extrprdsag[i][jTGC][f][k][x]=nullptr;
81  m_mvt_extrprdsag2[i][jTGC][f][k][x]=nullptr;
82  }
83  for(int k=0;k<2;k++)
84  for(int i=0;i<2;i++)
85  for(int x=0;x<4;x++){
86  m_tgc_prdcompsag[i][k][x]=nullptr;
87  }
88 
89 }

◆ ~MdtVsTgcRawDataValAlg()

MdtVsTgcRawDataValAlg::~MdtVsTgcRawDataValAlg ( )
virtual

Definition at line 91 of file MdtVsTgcRawDataValAlg.cxx.

91  {
92  ATH_MSG_INFO( " deleting MdtVsTgcRawDataValAlg " );
93 }

Member Function Documentation

◆ BlankPhi24()

void MdtVsTgcRawDataValAlg::BlankPhi24 ( TH2 *  h2,
int  binx 
)
private

Definition at line 144 of file MdtVsTgcRawData_functions.cxx.

144  {
145  float x1=h->GetXaxis()->GetBinLowEdge(binx);
146  float x2=h->GetXaxis()->GetBinUpEdge(binx);
147  for(int i=0;i<24;i++){
148  int biny = (i+1)*2;
149  float y1=h->GetYaxis()->GetBinLowEdge(biny);
150  float y2=h->GetYaxis()->GetBinUpEdge(biny);
151  putBox(h, x1, y1, x2, y2);
152  }
153 }

◆ BlankStationMap()

void MdtVsTgcRawDataValAlg::BlankStationMap ( TH2 *  h2,
int  ws 
)
private

Definition at line 155 of file MdtVsTgcRawData_functions.cxx.

155  {
156  bool rebin=true;
157  if(rebin){//use new bin
158  for(int i=33; i<44;i++)BlankPhi24(h,i);
159  int x1=h->GetXaxis()->GetBinLowEdge(40);
160  int x2=h->GetXaxis()->GetBinUpEdge(40);
161  int x3=h->GetXaxis()->GetBinLowEdge(41);
162  int x4=h->GetXaxis()->GetBinUpEdge(41);
163  int y1=h->GetYaxis()->GetBinLowEdge(19);
164  int y2=h->GetYaxis()->GetBinUpEdge(19);
165  putBox(h, x1, y1, x2, y2);
166  putBox(h, x3, y1, x4, y2);
167  y1=h->GetYaxis()->GetBinLowEdge(35);
168  y2=h->GetYaxis()->GetBinUpEdge(35);
169  putBox(h, x1, y1, x2, y2);
170  putBox(h, x3, y1, x4, y2);
171  y1=h->GetYaxis()->GetBinLowEdge(43);
172  y2=h->GetYaxis()->GetBinUpEdge(43);
173  putBox(h, x1, y1, x2, y2);
174  putBox(h, x3, y1, x4, y2);
175 
176  if(ws==1){//Strip
177  x1=h->GetXaxis()->GetBinLowEdge(2);
178  y1=h->GetYaxis()->GetBinLowEdge(1);
179  x2=h->GetXaxis()->GetBinUpEdge(2);
180  y2=h->GetYaxis()->GetBinUpEdge(48);
181  putBox(h, x1, y1, x2, y2);
182  x1=h->GetXaxis()->GetBinLowEdge(9);
183  x2=h->GetXaxis()->GetBinUpEdge(9);
184  putBox(h, x1, y1, x2, y2);
185  x1=h->GetXaxis()->GetBinLowEdge(16);
186  x2=h->GetXaxis()->GetBinUpEdge(16);
187  putBox(h, x1, y1, x2, y2);
188  x1=h->GetXaxis()->GetBinLowEdge(23);
189  x2=h->GetXaxis()->GetBinUpEdge(23);
190  putBox(h, x1, y1, x2, y2);
191  x1=h->GetXaxis()->GetBinLowEdge(34);
192  x2=h->GetXaxis()->GetBinUpEdge(34);
193  putBox(h, x1, y1, x2, y2);
194  }
195  }else{//use old bin, logically dead code, comment out
196 // BlankPhi24(h, 5);
197 // BlankPhi24(h, 10);
198 // BlankPhi24(h, 15);
199 // BlankPhi24(h, 21);
200 // BlankPhi24(h, 27);
201 // BlankPhi24(h, 33);
202 // BlankPhi24(h, 39);
203 // BlankPhi24(h, 40);
204 // BlankPhi24(h, 41);
205 // BlankPhi24(h, 42);
206 // BlankPhi24(h, 43);
207 // int x1=h->GetXaxis()->GetBinLowEdge(40);
208 // int x2=h->GetXaxis()->GetBinUpEdge(40);
209 // int x3=h->GetXaxis()->GetBinLowEdge(42);
210 // int x4=h->GetXaxis()->GetBinUpEdge(42);
211 // int y1=h->GetYaxis()->GetBinLowEdge(19);
212 // int y2=h->GetYaxis()->GetBinUpEdge(19);
213 // putBox(h, x1, y1, x2, y2);
214 // putBox(h, x3, y1, x4, y2);
215 // y1=h->GetYaxis()->GetBinLowEdge(35);
216 // y2=h->GetYaxis()->GetBinUpEdge(35);
217 // putBox(h, x1, y1, x2, y2);
218 // putBox(h, x3, y1, x4, y2);
219 // y1=h->GetYaxis()->GetBinLowEdge(43);
220 // y2=h->GetYaxis()->GetBinUpEdge(43);
221 // putBox(h, x1, y1, x2, y2);
222 // putBox(h, x3, y1, x4, y2);
223  }
224 }

◆ bookeffhists()

StatusCode MdtVsTgcRawDataValAlg::bookeffhists ( MonGroup mdtvstgclv1_expert_a,
MonGroup mdtvstgclv1_expert_c 
)
private

Definition at line 100 of file MdtVsTgcRawData_bookhistograms.cxx.

101  {
102 
103  std::stringstream sst;
104  std::string AC[2]= {"A","C"};
105  std::string RhoEtaPhiThe[4]={"Rho","Eta","Phi","Theta"};
106  std::string RhoEtaPhiZ[4]= {"Rho","Eta","Phi","Z"};
107  std::string FE[2]= {"F","E"};// Forward, Endcap
108  std::string EffNumDenom[4]= {"","num","denom","error"};
109  std::string WireStrip[2]= {"Wire","Strip"};
110  int nbins3D_1[4]= { 0, 0, 0, 0};
111  float fGlobalCoords3Dlo[4]= { 0, 0, 0, 0};
112  float fGlobalCoords3Dup[4]= { 0, 0, 0, 0};
113  // **************************************************************
114  // ** EffCheck
115  // **************************************************************
117  // Efficiencies
118  nbins3D_1[0]= 100; nbins3D_1[1]= 8; nbins3D_1[2]= 48; nbins3D_1[3]= 100;
119  fGlobalCoords3Dlo[0]= -1000; fGlobalCoords3Dlo[1]= -1; fGlobalCoords3Dlo[2]= -M_PI; fGlobalCoords3Dlo[3]= 0;
120  fGlobalCoords3Dup[0]= 1000; fGlobalCoords3Dup[1]= 1; fGlobalCoords3Dup[2]= M_PI; fGlobalCoords3Dup[3]= 0.5*M_PI;
121  for(int i=0;i<2;i++){// AC
122  for(int k=0;k<2;k++){// WireStrip
123  for(int e=0;e<4;e++){// EffNumDenom
124  // Station Efficiency Map Segm Track
125  sst<<WireStrip[k];
126  sst<<"_EfficiencyAgainstMDT";
127  sst<<"_MapSegmTrack"<<EffNumDenom[e];
128  sst<<"_"<<AC[i];
129  ATH_MSG_DEBUG("Eff_StationMapBase "<<i<<" "<<k<<" "<<e<<sst.str().c_str() );
130  m_eff_stationmapbase[i][k][e]=new TH2F( sst.str().c_str(), sst.str().c_str(),43, 0, 43, 48, 0, 48 );
131  if(i==0){
132  ATH_CHECK( mdtvstgclv1_expert_a.regHist(m_eff_stationmapbase[i][k][e]) );
133  }else{
134  ATH_CHECK( mdtvstgclv1_expert_c.regHist(m_eff_stationmapbase[i][k][e]) );
135  }
136 
138  sst.str("");
139 
140  // Station Efficiency Map Midstation Segments
141  sst<<WireStrip[k];
142  sst<<"_EfficiencyAgainstMDT";
143  sst<<"_MapMidOnly"<<EffNumDenom[e];
144  sst<<"_"<<AC[i];
145  ATH_MSG_DEBUG("Eff_StationMapMid "<<i<<" "<<k<<" "<<e<<sst.str().c_str() );
146  m_eff_stationmapmid[i][k][e]=new TH2F( sst.str().c_str(), sst.str().c_str(),43, 0, 43, 48, 0, 48 );
147  if(i==0){
148  ATH_CHECK( mdtvstgclv1_expert_a.regHist(m_eff_stationmapmid[i][k][e]) );
149  }else{
150  ATH_CHECK( mdtvstgclv1_expert_c.regHist(m_eff_stationmapmid[i][k][e]) );
151  }
152 
154  sst.str("");
155 
156  // Station Efficiency Map Total
157  sst<<WireStrip[k];
158  sst<<"_EfficiencyAgainstMDT";
159  sst<<"_Map"<<EffNumDenom[e];
160  sst<<"_"<<AC[i];
161  ATH_MSG_DEBUG("Eff_StationMap "<<i<<" "<<k<<" "<<e<<sst.str().c_str() );
162  m_eff_stationmap[i][k][e]=new TH2F( sst.str().c_str(), sst.str().c_str(),43, 0, 43, 48, 0, 48 );
163  if(i==0){
164  ATH_CHECK( mdtvstgclv1_expert_a.regHist(m_eff_stationmap[i][k][e]) );
165  }else{
166  ATH_CHECK( mdtvstgclv1_expert_c.regHist(m_eff_stationmap[i][k][e]) );
167  }
168 
170  sst.str("");
171  }// EffNumDenom
172  }// WireStrip
173  }// AC
174 
176  // Sagittas
177 
178 
179  nbins3D_1[0]= 8000; nbins3D_1[1]= 200; nbins3D_1[2]= 4096; nbins3D_1[3]= 40000;
180  fGlobalCoords3Dlo[0]= -8000; fGlobalCoords3Dlo[1]= -1; fGlobalCoords3Dlo[2]= -M_PI; fGlobalCoords3Dlo[3]= -200000;
181  fGlobalCoords3Dup[0]= 8000; fGlobalCoords3Dup[1]= 1; fGlobalCoords3Dup[2]= M_PI; fGlobalCoords3Dup[3]= 200000;
182  for(int i=0;i<2;i++){// AC
183  for(int jTGC=0;jTGC<4;jTGC++){// TGC Station
184  for(int f=0;f<2;f++){// FE
185  for(int k=0;k<2;k++){// WireStrip
186  for(int x=0;x<4;x++){// RhoEtaPhi
187  if(x==0||x==2){ // Only interested in Rho and Phi
188  // TGC EIFI vs MDT extrapolated position, Sagitta
189  sst<<"TGC_SegmTrack_"<<RhoEtaPhiZ[x];
190  sst<<"Sagitta_T"<<jTGC+1;
191  sst<<FE[f];
192  sst<<WireStrip[k];
193  sst<<"_"<<AC[i];
194  ATH_MSG_DEBUG("TGC_Sagitta "<<i<<" "<<jTGC<<" "<<f<<" "<<k<<" "<<x<<" "<<sst.str().c_str() );
195  m_mvt_extrprdsag[i][jTGC][f][k][x] =new TH1F(sst.str().c_str(), sst.str().c_str(), nbins3D_1[x],fGlobalCoords3Dlo[x],fGlobalCoords3Dup[x]);
196  if(i==0){
197  ATH_CHECK( mdtvstgclv1_expert_a.regHist(m_mvt_extrprdsag[i][jTGC][f][k][x]) );
198  }else{
199  ATH_CHECK( mdtvstgclv1_expert_c.regHist(m_mvt_extrprdsag[i][jTGC][f][k][x]) );
200  }
201 
202  m_mvt_extrprdsag[i][jTGC][f][k][x]->GetXaxis()->SetTitle(RhoEtaPhiZ[x].c_str());
203  sst.str("");
204 
205  // TGC EIFI vs MDT extrapolated position, Sagitta
206  sst<<"TGC_MidSegm_"<<RhoEtaPhiZ[x];
207  sst<<"Sagitta_T"<<jTGC+1;
208  sst<<FE[f];
209  sst<<WireStrip[k];
210  sst<<"_"<<AC[i];
211  ATH_MSG_DEBUG("TGC_Sagitta "<<i<<" "<<jTGC<<" "<<f<<" "<<k<<" "<<x<<" "<<sst.str().c_str() );
212  m_mvt_extrprdsag2[i][jTGC][f][k][x] =new TH1F(sst.str().c_str(), sst.str().c_str(), nbins3D_1[x],fGlobalCoords3Dlo[x],fGlobalCoords3Dup[x]);
213  if(i==0){
214  ATH_CHECK( mdtvstgclv1_expert_a.regHist(m_mvt_extrprdsag2[i][jTGC][f][k][x]) );
215  }else{
216  ATH_CHECK( mdtvstgclv1_expert_c.regHist(m_mvt_extrprdsag2[i][jTGC][f][k][x]) );
217  }
218 
219  m_mvt_extrprdsag2[i][jTGC][f][k][x]->GetXaxis()->SetTitle(RhoEtaPhiZ[x].c_str());
220  sst.str("");
221  }
222  }// RhoEtaPhi
223  }// WireStrip
224  }// FE
225  }// TGC Station
226  }// AC
227 
228 
229  for(int k=0;k<2;k++){// WireStrip
230  if(k==0){
231  nbins3D_1[0]= 10000; nbins3D_1[1]= 1200; nbins3D_1[2]= 8192; nbins3D_1[3]= 40000;
232  fGlobalCoords3Dlo[0]= -1000; fGlobalCoords3Dlo[1]= -3; fGlobalCoords3Dlo[2]=-1*M_PI/8; fGlobalCoords3Dlo[3]= -200000;
233  fGlobalCoords3Dup[0]= 1000; fGlobalCoords3Dup[1]= 3; fGlobalCoords3Dup[2]= M_PI/8; fGlobalCoords3Dup[3]= 200000;
234  }
235  else{
236  nbins3D_1[0]= 10000; nbins3D_1[1]= 1200; nbins3D_1[2]= 8192; nbins3D_1[3]= 40000;
237  fGlobalCoords3Dlo[0]= -5000; fGlobalCoords3Dlo[1]= -3; fGlobalCoords3Dlo[2]=-1*M_PI/8; fGlobalCoords3Dlo[3]= -200000;
238  fGlobalCoords3Dup[0]= 5000; fGlobalCoords3Dup[1]= 3; fGlobalCoords3Dup[2]= M_PI/8; fGlobalCoords3Dup[3]= 200000;
239  }
240  for(int i=0;i<2;i++){// AC
241  for(int x=0;x<4;x++){// RhoEtaPhiZ
242  if(x==0||x==2){ // Only interested in Rho and Phi
243  // TGC PRD comparison for Mid Only Check
244  sst<<"TGC_MidStationPRD_"<<RhoEtaPhiZ[x];
245  sst<<"Sagitta_"<<WireStrip[k];
246  sst<<"_"<<AC[i];
247  ATH_MSG_DEBUG("TGC_PRDonly_Sagitta "<<i<<" "<<" "<<k<<" "<<x<<" "<<sst.str().c_str() );
248  m_tgc_prdcompsag[i][k][x] =new TH1F(sst.str().c_str(), sst.str().c_str(), nbins3D_1[x],fGlobalCoords3Dlo[x],fGlobalCoords3Dup[x]);
249  if(i==0){
250  ATH_CHECK( mdtvstgclv1_expert_a.regHist(m_tgc_prdcompsag[i][k][x]) );
251  }else{
252  ATH_CHECK( mdtvstgclv1_expert_c.regHist(m_tgc_prdcompsag[i][k][x]) );
253  }
254 
255  m_tgc_prdcompsag[i][k][x]->GetXaxis()->SetTitle(RhoEtaPhiZ[x].c_str());
256  sst.str("");
257  }
258  }// WireStrip
259  }// RhoEtaPhiThe
260  }// AC
261 
262 
264  // Segment Positions
265 
266  // Initialize to zero
267  for(int i=0;i<2;i++)// AC
268  for(int jMDT1=0;jMDT1<4;jMDT1++)// MDT Station1
269  for(int jMDT2=0;jMDT2<4;jMDT2++)// MDT Station2
270  for(int x=0;x<4;x++){
271  m_mdt_segmmatchsag[i][jMDT1][jMDT2][x]=nullptr;
272  }
273 
274  nbins3D_1[0]= 2000; nbins3D_1[1]= 200; nbins3D_1[2]= 4096; nbins3D_1[3]= 1024;
275  fGlobalCoords3Dlo[0]= -1000; fGlobalCoords3Dlo[1]= -1; fGlobalCoords3Dlo[2]= -M_PI/8; fGlobalCoords3Dlo[3]= 0;
276  fGlobalCoords3Dup[0]= 1000; fGlobalCoords3Dup[1]= 1; fGlobalCoords3Dup[2]= M_PI/8; fGlobalCoords3Dup[3]= 0.5*M_PI;
277  for(int i=0;i<2;i++){// AC
278  for(int jMDT1=0;jMDT1<4;jMDT1++){// MDT Station1
279  for(int jMDT2=0;jMDT2<4;jMDT2++){// MDT Station2
280  //if(jMDT1==jMDT2)continue;
281  for(int x=0;x<4;x++){// RhoEtaPhiThe
282  if(x==0||x==2||x==3){// Not interested in Eta
283  // Segm Matching Sag
284  sst<<"MDT_Matching_"<<RhoEtaPhiThe[x];
285  sst<<"Sagitta_MDT"<<jMDT1+1;
286  sst<<"vsMDT"<<jMDT2+1;
287  sst<<"_"<<AC[i];
288  ATH_MSG_DEBUG("MDT_MatchingSagitta "<<i<<" "<<jMDT1<<" "<<jMDT2<<" "<<x<<" "<<sst.str().c_str() );
289  m_mdt_segmmatchsag[i][jMDT1][jMDT2][x] =new TH1F(sst.str().c_str(),sst.str().c_str(), nbins3D_1[x], fGlobalCoords3Dlo[x], fGlobalCoords3Dup[x]);
290  if(i==0){
291  ATH_CHECK( mdtvstgclv1_expert_a.regHist(m_mdt_segmmatchsag[i][jMDT1][jMDT2][x]) );
292  }else{
293  ATH_CHECK( mdtvstgclv1_expert_c.regHist(m_mdt_segmmatchsag[i][jMDT1][jMDT2][x]) );
294  }
295 
296  m_mdt_segmmatchsag[i][jMDT1][jMDT2][x]->GetXaxis()->SetTitle(RhoEtaPhiThe[x].c_str());
297  sst.str("");
298  }
299  }
300  }
301  }
302  }
303 
304 
306  // Segment Directions
307 
308  for(int i=0;i<2;i++)// AC
309  for(int jMDT1=0;jMDT1<4;jMDT1++){// MDT Station2
310  for(int x=0;x<4;x++){// RhoEtaPhiThe
311  m_mdt_segmposdirsag[i][jMDT1][x]=nullptr;
312  }
313  for(int jMDT2=0;jMDT2<4;jMDT2++){
314  for(int x=0;x<4;x++){
315  m_mdt_trackdirdirsag[i][jMDT1][jMDT2][x]=nullptr;
316  for(int v=0;v<2;v++){
317  m_mdt_trackchecksag[i][jMDT1][jMDT2][x][v]=nullptr;
318  }
319  }
320  }
321  }
322 
323  nbins3D_1[0]= 2000; nbins3D_1[1]= 200; nbins3D_1[2]= 8192; nbins3D_1[3]= 2048;
324  fGlobalCoords3Dlo[0]= -1000; fGlobalCoords3Dlo[1]= -1; fGlobalCoords3Dlo[2]= -2*M_PI; fGlobalCoords3Dlo[3]=-0.5*M_PI;
325  fGlobalCoords3Dup[0]= 1000; fGlobalCoords3Dup[1]= 1; fGlobalCoords3Dup[2]= 2*M_PI; fGlobalCoords3Dup[3]= 0.5*M_PI;
326  for(int i=0;i<2;i++){// AC
327  for(int jMDT1=0;jMDT1<4;jMDT1++){// MDT Station2
328  for(int x=0;x<4;x++){// RhoEtaPhiThe
329  if(x==2||x==3){ // Only interested in Phi & Theta
330  // Segm Pos-Dir Sag
331  sst<<"MDT_PosDir_"<<RhoEtaPhiThe[x];
332  sst<<"Sagitta_MDT"<<jMDT1+1;
333  sst<<"_"<<AC[i];
334  ATH_MSG_DEBUG("MDT_PosDirSagitta "<<i<<" "<<jMDT1<<" "<<x<<" "<<sst.str().c_str() );
335  m_mdt_segmposdirsag[i][jMDT1][x] =new TH1F(sst.str().c_str(),sst.str().c_str(), nbins3D_1[x], fGlobalCoords3Dlo[x], fGlobalCoords3Dup[x]);
336  if(i==0){
337  ATH_CHECK( mdtvstgclv1_expert_a.regHist(m_mdt_segmposdirsag[i][jMDT1][x]) );
338  }else{
339  ATH_CHECK( mdtvstgclv1_expert_c.regHist(m_mdt_segmposdirsag[i][jMDT1][x]) );
340  }
341  m_mdt_segmposdirsag[i][jMDT1][x]->GetXaxis()->SetTitle(RhoEtaPhiThe[x].c_str());
342  sst.str("");
343  }
344  }// RhoEtaPhiThe
345 
346  for(int jMDT2=0;jMDT2<4;jMDT2++){// MDT Station2
347  //if(jMDT1==jMDT2)continue;// Cut same station comparison
348  for(int x=0;x<4;x++){// RhoEtaPhiThe
349  if(x==2||x==3){ // Only interested in Phi & Theta
350  // Track Dir-Dir Sag
351  sst<<"MDT_DirDir_"<<RhoEtaPhiThe[x];
352  sst<<"Sagitta_MDT"<<jMDT1+1;
353  sst<<"vsMDT"<<jMDT2+1;
354  sst<<"_"<<AC[i];
355  ATH_MSG_DEBUG("MDT_DirDirSagitta "<<i<<" "<<jMDT1<<" "<<jMDT2<<" "<<x<<" "<<sst.str().c_str() );
356  m_mdt_trackdirdirsag[i][jMDT1][jMDT2][x] =new TH1F(sst.str().c_str(),sst.str().c_str(), nbins3D_1[x], fGlobalCoords3Dlo[x], fGlobalCoords3Dup[x]);
357  if(i==0){
358  ATH_CHECK( mdtvstgclv1_expert_a.regHist(m_mdt_trackdirdirsag[i][jMDT1][jMDT2][x]) );
359  }else{
360  ATH_CHECK( mdtvstgclv1_expert_c.regHist(m_mdt_trackdirdirsag[i][jMDT1][jMDT2][x]) );
361  }
362 
363  m_mdt_trackdirdirsag[i][jMDT1][jMDT2][x]->GetXaxis()->SetTitle(RhoEtaPhiThe[x].c_str());
364  sst.str("");
365 
366  for(int v=0;v<2;v++){
367  if(jMDT1>=jMDT2)continue;// Regard vector comparison between two stations as
368  // Track Direction Check
369  sst<<"MDT_TrackCheck_"<<RhoEtaPhiThe[x];
370  sst<<"Sagitta_MDT"<<jMDT1+1;
371  sst<<"vs"<<jMDT2+1;
372  sst<<"_MDT";
373  if(v==0)sst<<jMDT1+1;
374  else sst<<jMDT2+1;
375  sst<<"_"<<AC[i];
376  ATH_MSG_DEBUG("MDT_TrackCheckSagitta "<<i<<" "<<jMDT1<<" "<<jMDT2<<" "<<x<<" "<<sst.str().c_str() );
377  m_mdt_trackchecksag[i][jMDT1][jMDT2][x][v] =new TH1F(sst.str().c_str(),sst.str().c_str(), nbins3D_1[x], fGlobalCoords3Dlo[x], fGlobalCoords3Dup[x]);
378  if(i==0){
379  ATH_CHECK( mdtvstgclv1_expert_a.regHist(m_mdt_trackchecksag[i][jMDT1][jMDT2][x][v]) );
380  }else{
381  ATH_CHECK( mdtvstgclv1_expert_c.regHist(m_mdt_trackchecksag[i][jMDT1][jMDT2][x][v]) );
382  }
383  m_mdt_trackchecksag[i][jMDT1][jMDT2][x][v]->GetXaxis()->SetTitle(RhoEtaPhiThe[x].c_str());
384  sst.str("");
385  }
386  }
387  }// RhoEtaPhiThe
388  }// MDT Station2
389  }// MDT Station1
390  }// AC
391 
392  return StatusCode::SUCCESS;
393 }

◆ bookHistograms()

StatusCode ManagedMonitorToolBase::bookHistograms ( )
virtualinherited

◆ bookHistogramsRecurrent()

StatusCode MdtVsTgcRawDataValAlg::bookHistogramsRecurrent ( )
virtual

An inheriting class should either override this function, bookHists() or bookHistograms().

Reimplemented from ManagedMonitorToolBase.

Definition at line 134 of file MdtVsTgcRawDataValAlg.cxx.

134  {
135 /*----------------------------------------------------------------------------------*/
136  ATH_MSG_DEBUG( "TGC RawData Monitoring Histograms being booked" );
137 
138  //declare a group of histograms
139  std::string generic_path_mdtvstgclv1 = "Muon/MuonRawDataMonitoring/MDTvsTGC";
140  //MonGroup mdtvstgclv1_expert( this, generic_path_mdtvstgclv1+"/Global", expert, run );
141  MonGroup mdtvstgclv1_expert_a( this, generic_path_mdtvstgclv1+"/TGCEA", run, ATTRIB_UNMANAGED );
142  MonGroup mdtvstgclv1_expert_c( this, generic_path_mdtvstgclv1+"/TGCEC", run, ATTRIB_UNMANAGED );
143 
144  if(newRunFlag()){
145  ATH_MSG_INFO( "MdtVsTgc RawData Monitoring : begin of run" );
146 
147  ATH_CHECK( bookmaphists(mdtvstgclv1_expert_a, mdtvstgclv1_expert_c) );
148  ATH_CHECK( bookeffhists(mdtvstgclv1_expert_a, mdtvstgclv1_expert_c) );
149  }//isNewRun
150  return StatusCode::SUCCESS;
151 }

◆ bookHists()

StatusCode ManagedMonitorToolBase::bookHists ( )
virtualinherited

Calls bookHists( true, true, true ) and initializes lumiBlock and run numbers.

Implements IMonitorToolBase.

Reimplemented in TileRawChannelMonTool, and TileDigitsMonTool.

Definition at line 730 of file ManagedMonitorToolBase.cxx.

732 {
733  // The Run/LumiBlock numbers are not set when beginRun() is called. Therefore,
734  // book histograms on the first call to fillHists(), which is called from execute().
735  return StatusCode::SUCCESS;
736 }

◆ bookmaphists()

StatusCode MdtVsTgcRawDataValAlg::bookmaphists ( MonGroup mdtvstgclv1_expert_a,
MonGroup mdtvstgclv1_expert_c 
)
private

Definition at line 27 of file MdtVsTgcRawData_bookhistograms.cxx.

28  {
29 
30  std::stringstream sst;
31  std::string AC[2]= {"A","C"};
32  int nbins3D_1[4]= { 0, 0, 0, 0};
33  float fGlobalCoords3Dlo[4]= { 0, 0, 0, 0};
34  float fGlobalCoords3Dup[4]= { 0, 0, 0, 0};
35  // **************************************************************
36  // ** maphists
37  // **************************************************************
39  // Number of~ hists
40  nbins3D_1[0]= 480; nbins3D_1[1]= 120; nbins3D_1[2]= 128; nbins3D_1[3]= 100;
41  fGlobalCoords3Dlo[0]= 0; fGlobalCoords3Dlo[1]= 0; fGlobalCoords3Dlo[2]= 0; fGlobalCoords3Dlo[3]= 0;
42  fGlobalCoords3Dup[0]= 12000; fGlobalCoords3Dup[1]= 3; fGlobalCoords3Dup[2]= 2*M_PI; fGlobalCoords3Dup[3]= 0.5*M_PI;
43  for(int i=0;i<2;i++){// AC
44  // nEvents passing cut criteria
45  sst<<"EffCheck_CutsPassed_"<<AC[i];
46  ATH_MSG_DEBUG("EffCheck_CutsPassed "<<i<<" "<<sst.str().c_str() );
47  m_mvt_cutspassed[i] =new TH1I(sst.str().c_str(), sst.str().c_str(), 14, 1, 15);
48  if(i==0){
49  ATH_CHECK( mdtvstgclv1_expert_a.regHist(m_mvt_cutspassed[i]) );
50  }else{
51  ATH_CHECK( mdtvstgclv1_expert_c.regHist(m_mvt_cutspassed[i]) );
52  }
53 
54  m_mvt_cutspassed[i]->GetYaxis()->SetTitle("nEvents");
55  m_mvt_cutspassed[i]->GetXaxis()->SetBinLabel(1, "Events");
56  m_mvt_cutspassed[i]->GetXaxis()->SetBinLabel(2, "matchedSegm=0");
57  m_mvt_cutspassed[i]->GetXaxis()->SetBinLabel(3, "matchedSegm>1");
58  m_mvt_cutspassed[i]->GetXaxis()->SetBinLabel(4, "matchedSegm=1");
59  m_mvt_cutspassed[i]->GetXaxis()->SetBinLabel(5, "+HasEIFI");
60  m_mvt_cutspassed[i]->GetXaxis()->SetBinLabel(6, "EIFIMatch");
61  m_mvt_cutspassed[i]->GetXaxis()->SetBinLabel(7, "+HasT1");
62  m_mvt_cutspassed[i]->GetXaxis()->SetBinLabel(8, "T1Match");
63  m_mvt_cutspassed[i]->GetXaxis()->SetBinLabel(9,"+HasT2");
64  m_mvt_cutspassed[i]->GetXaxis()->SetBinLabel(10,"T2Match");
65  m_mvt_cutspassed[i]->GetXaxis()->SetBinLabel(11,"+HasT3");
66  m_mvt_cutspassed[i]->GetXaxis()->SetBinLabel(12,"T3Match");
67  m_mvt_cutspassed[i]->GetXaxis()->SetBinLabel(13,"AllStationsMatch");
68  m_mvt_cutspassed[i]->GetXaxis()->SetBinLabel(14,"AllLayersMatch");
69  sst.str("");
70  }// AC
71 
72 
74  // Distributions
75  nbins3D_1[0]= 600; nbins3D_1[1]= 120; nbins3D_1[2]= 128; nbins3D_1[3]= 128;
76  fGlobalCoords3Dlo[0]= 0; fGlobalCoords3Dlo[1]= 0; fGlobalCoords3Dlo[2]= 0; fGlobalCoords3Dlo[3]= 0;
77  fGlobalCoords3Dup[0]= 12000; fGlobalCoords3Dup[1]= 3; fGlobalCoords3Dup[2]= 2*M_PI; fGlobalCoords3Dup[3]= 0.5*M_PI;
78  for(int i=0;i<2;i++){// AC
79  for(int jMDT=0;jMDT<4;jMDT++){// MDT Station
80  // MDT Segm Eta vs Phi
81  sst<<"MDT_SegmMap_MDT"<<jMDT+1;
82  sst<<"_"<<AC[i];
83  ATH_MSG_DEBUG("MDT_SegmMap "<<i<<" "<<jMDT<<" "<<sst.str().c_str() );
84  m_mdt_segmmap[i][jMDT] =new TH2F(sst.str().c_str(),sst.str().c_str(), nbins3D_1[2], fGlobalCoords3Dlo[2], fGlobalCoords3Dup[2], nbins3D_1[1], fGlobalCoords3Dlo[1], fGlobalCoords3Dup[1]);
85  if(i==0){
86  ATH_CHECK( mdtvstgclv1_expert_a.regHist(m_mdt_segmmap[i][jMDT]) );
87  }else{
88  ATH_CHECK( mdtvstgclv1_expert_c.regHist(m_mdt_segmmap[i][jMDT]) );
89  }
90 
91  m_mdt_segmmap[i][jMDT]->GetXaxis()->SetTitle("MDT Phi");
92  m_mdt_segmmap[i][jMDT]->GetYaxis()->SetTitle("MDT Eta");
93  sst.str("");
94  }// MDT Station
95  }// AC
96  return StatusCode::SUCCESS;
97 }

◆ checkHists()

StatusCode ManagedMonitorToolBase::checkHists ( bool  calledFromFinalize)
virtualinherited

This implementation does nothing; equivalent functionality may be provided by procHists(...) with appropriate arguments.

Implements IMonitorToolBase.

Reimplemented in TileRawChannelMonTool, TileDigitsMonTool, TileCellNoiseMonTool, and CscCalibMonToolBase.

Definition at line 1671 of file ManagedMonitorToolBase.cxx.

1673 {
1674  // Histograms will be checked using the data-quality monitoring framework (DQMF)
1675 
1676  return StatusCode::SUCCESS;
1677 }

◆ CheckTGConTrack()

void MdtVsTgcRawDataValAlg::CheckTGConTrack ( std::vector< SegmTrack >(&)  matchedSegments[2],
const Muon::TgcPrepDataContainer tgc_prepcontainer 
)
private

Definition at line 36 of file MdtVsTgcRawData_PRDonTrack.cxx.

37  {
38  // Define Cuts:
39  // Loose cut for PRD and Extrapolated
40  const float dPhiCut_Loose = M_PI/8;
41  // Cut for Global Position Efficiencies
42  const float dPhiCutGlobal[2] = {static_cast<float>(M_PI/24),static_cast<float>(M_PI/12)}; //[WireStrip]
43  const float dRhoCutGlobal[2] = { 0.08, 0.5}; //[WireStrip]
44  // Cut for Sector Efficiencies
45  const float dPhiCutSector[2] = { 0.2, 0.1}; //[WireStrip]
46  const float dRhoCutSector[2] = { 200, 2000}; //[WireStrip]
47 
48  // Loop over sides
49  for(int i=0;i<2;i++){// AC
50  // Get number of tracks
51  unsigned int nTrack=matchedSegments[i].size();
52 
53  // Fill nEvents histograms
54  m_mvt_cutspassed[i]->Fill(1);
55  if(nTrack==0)m_mvt_cutspassed[i]->Fill(2);
56  if(nTrack>1)m_mvt_cutspassed[i]->Fill(3);
57  if(nTrack==1)m_mvt_cutspassed[i]->Fill(4);
58 
59  // Cut events without exactly one set of matched Segments
60  if(nTrack!=1)continue;
61 
62  // Declare Position variables for inner
63  //Trk::GlobalPosition innerSegmPos;
64  Amg::Vector3D innerSegmPos = {0, 0, 0};
65 
66  // float innerSegmEta=0;
67  float innerSegmRho=0; float innerSegmPhi=0; float innerSegmZ=0;
68  //Trk::GlobalDirection innerSegmDirzunit;
69  Amg::Vector3D innerSegmDirzunit = {0, 0, 0};
70 
71  // Declare Position variables for midstation
72  //Trk::GlobalPosition midSegmPos;
73  Amg::Vector3D midSegmPos = {0, 0, 0};
74 
75  // float midSegmRho =0; float midSegmEta =0;
76  float midSegmPhi =0; float midSegmZ =0;
77  //Trk::GlobalDirection midSegmDirzunit;
78  Amg::Vector3D midSegmDirzunit = {0, 0, 0};
79 
80  // Check which layers have sufficienct segments to operate on for global coordinates
81  bool canCheckGlobal[4] = {0, 0, 0, 0};// [TGCStation]
82  if(matchedSegments[i].at(0).at(2)!=nullptr){
83  // Check Midstation
84  canCheckGlobal[0]=true; canCheckGlobal[1]=true; canCheckGlobal[2]=true;
85  // Read Midstation Segment Values into variables
86  midSegmPos = Amg::Vector3D(matchedSegments[i].at(0).at(2)->globalPosition());
87  midSegmPhi = midSegmPos.phi();
88  midSegmZ = midSegmPos.z();
89  if(midSegmPhi<0)midSegmPhi+=2*M_PI;
90  midSegmDirzunit = Amg::Vector3D(midSegmPos/std::abs(midSegmZ));
91  }
92  if((matchedSegments[i].at(0).at(0)!=nullptr)&&(matchedSegments[i].at(0).at(2)!=nullptr)){
93  // Check EIFI
94  canCheckGlobal[3]=true;
95  // Read Inner Segment Values
96  innerSegmPos = Amg::Vector3D(matchedSegments[i].at(0).at(0)->globalPosition());
97  innerSegmRho = std::abs(innerSegmPos.perp());
98  innerSegmZ = std::abs(innerSegmPos.z());
99  // Modify position
100  innerSegmPhi = midSegmPhi;
101 
102  innerSegmPos = Amg::Vector3D(innerSegmRho*std::cos(innerSegmPhi), innerSegmRho*std::sin(innerSegmPhi), innerSegmZ);
103  innerSegmDirzunit = Amg::Vector3D(innerSegmPos/std::abs(innerSegmZ));
104  }
105 
106  // If no layers can be checked (i.e. no midstation segment matched) skip side
107  bool skipSide = true;
108  for(int jTGC=0;jTGC<4;jTGC++)if(canCheckGlobal[jTGC]==true)skipSide=false;
109  if(skipSide==true)continue;
110 
111  // Initialize variables for TRE array search
112  int TGCStationNames[8] ={41, 42, 43, 44, 45, 46, 47, 48};
113  int TGCstation_StationFE[4] ={-1,-1,-1,-1};// [TGCStation]
114  int TGCstation_StationEta[4]={ 0, 0, 0, 0};// [TGCStation]
115  int TGCstation_StationPhi[4]={ 0, 0, 0, 0};// [TGCStation]
116  int nStationMatch[4] ={ 0, 0, 0, 0};// [TGCStation]
117  bool canCheckSector[4] ={ true, true, true, true};// [TGCStation]
118 
119  // Loop through TRE array, finding sectors which match the track in each layer
120  for(int stationnameindex=0; stationnameindex<8; stationnameindex++){// Station {T1F,T1E,T2F,T2E,T3F,T3E,T4F,T4E}
121  // Skip stations which don't have sufficient Segments to run efficiency check
122  int stationName = TGCStationNames[stationnameindex];
123  int stationIndex= TGCstationname2stationindex(stationName);
124  if(stationIndex<0) continue;
125  if(!canCheckGlobal[stationIndex])continue;
126 
127  // Loop over StationEta&StationPhi
128  for(int stationeta=1; stationeta<=8; stationeta++){// AbsStationEta
129  for(int stationphi=1; stationphi<=48; stationphi++){// StationPhi
130  // Cut Station EtaPhi combinations with no TGC element
131  if(m_TREarray[stationnameindex][i][stationeta][stationphi]==nullptr)continue;
132  const MuonGM::TgcReadoutElement *tre=m_TREarray[stationnameindex][i][stationeta][stationphi];
133 
134  // Extrapolate position from nearest Station's Segment to Sector's Z
135  float sectorZ=tre->globalPosition().z();
136  //Trk::GlobalPosition sectorExtrapolatedPos;
137  Amg::Vector3D sectorExtrapolatedPos;
138 
139  if(stationIndex==3){// Inner
140  float dZ_sector=std::abs(sectorZ)-std::abs(innerSegmZ);
141  //sectorExtrapolatedPos = Trk::GlobalPosition(innerSegmPos+(innerSegmDirzunit*dZ_sector));
142  sectorExtrapolatedPos = Amg::Vector3D(innerSegmPos+(innerSegmDirzunit*dZ_sector));
143  }
144  else{// Midstation
145  float dZ_sector=std::abs(sectorZ)-std::abs(midSegmZ);
146  sectorExtrapolatedPos = Amg::Vector3D(midSegmPos+(midSegmDirzunit*dZ_sector));
147  }
148 
149  // Convert extrapolated position to local position on the Sector
150  Identifier sector_id=tre->identify();
151  const Amg::Vector3D sectorLocalPos3D=tre->globalToLocalTransf(sector_id)*sectorExtrapolatedPos;
152  Amg::Vector2D sectorLocalPos2D(sectorLocalPos3D.y(),sectorLocalPos3D.z());
153 
154  double avWidth = (tre->getLongSsize()+tre->getSsize())/2;
155  //double dWidth = (tre->longWidth()-tre->shortWidth());
156  double length = tre->length();
157 
158  // Cut sectors which the track does not go through the central 80% of (avoids double counts)
159  double tol1=-0.1*(avWidth/2);
160  double tol2=-0.1*(length/2);
161 
162  bool insideSectorBounds=tre->bounds().inside(sectorLocalPos2D,tol1,tol2);
163  if(!insideSectorBounds)continue;
164 
165  // Assign values to matching station variables
166  TGCstation_StationFE[stationIndex]= (tre->isForward()==false);
167  TGCstation_StationEta[stationIndex]=stationeta;
168  TGCstation_StationPhi[stationIndex]=stationphi;
169  nStationMatch[stationIndex]++;
170  }// StationPhi
171  }// StationEta
172  }// StationName
173 
174  // Don't check stations that don't have exactly 1 match for this track
175  for(int jTGC=0;jTGC<4;jTGC++){// TGC Station
176  if(nStationMatch[jTGC]==0){
177  canCheckSector[jTGC]=false;
178  }
179  else if(nStationMatch[jTGC]>1){
180  canCheckSector[jTGC]=false;
181  // Should be impossible, but happens due a problem with the bounds().inside function
182  // commenting out until this bug is resolved
183  //m_log << MSG::WARNING << "SegmTrack: Number of matches for TGC" << jTGC+1 << " is " << nStationMatch[jTGC] << endl;
184  }
185  }// TGC Station
186 
187  // Loop through segments to check number of TGC Strips in each
188  int nTGCStrips[4] = {0, 0, 0, 0};//[TGCStation]
189  for(int jMDT=0;jMDT<4;jMDT++){// MDT Station
190  if(matchedSegments[i].at(0).at(jMDT)==nullptr)continue;
191  const Muon::MuonSegment *segm=matchedSegments[i].at(0).at(jMDT);
192  // Loop through contained ROTs and identify used stations
193  const std::vector<const Trk::MeasurementBase*> mMeasTrk = segm->containedMeasurements();
194  ATH_MSG_DEBUG( "number of MeasurementBase: "<<mMeasTrk.size() );
195  for (unsigned int i=0; i<mMeasTrk.size(); i++) {
196  const Trk::MeasurementBase* m = mMeasTrk[i];
197  //const Trk::RIO_OnTrack* rio = dynamic_cast<const Trk::RIO_OnTrack*>(m);
198  const Muon::CompetingMuonClustersOnTrack* crot = dynamic_cast<const Muon::CompetingMuonClustersOnTrack*>(m);
199  if(crot) {
200  const std::vector<const Muon::MuonClusterOnTrack*> mc_list = crot->containedROTs();
201  for(unsigned int iROT=0; iROT< mc_list.size(); iROT++){
202  const Muon::MuonClusterOnTrack * rio = mc_list[iROT];
203  //const Trk::RIO_OnTrack* rio = crot->rioOnTrack(iROT);
204  Identifier id = rio->identify();
205  int stationName = int(m_idHelperSvc->mdtIdHelper().stationName(id));
206  // 41=T1F 42=T1E 43=T2F 44=T2E 45=T3F 46=T3E 47=T4F 48=T4E
207  if(m_idHelperSvc->tgcIdHelper().isStrip(id)){
208  if((jMDT==2)&&((stationName==41)||(stationName==42)))nTGCStrips[0]++;// TGC
209  if((jMDT==2)&&((stationName==43)||(stationName==44)))nTGCStrips[1]++;// TGC
210  if((jMDT==2)&&((stationName==45)||(stationName==46)))nTGCStrips[2]++;// TGC
211  if((jMDT==0)&&((stationName==47)||(stationName==48)))nTGCStrips[3]++;// TGC
212  }
213 
214  ATH_MSG_DEBUG( " check if TGC strip: "<<m_idHelperSvc->tgcIdHelper().isStrip(id)<<" StationName: "<<stationName );
215  }
216  }
217  }
218  }// MDT Station
219 
220 
221  // Don't check mid-stations when there are no strips in other mid-stations
222  if((nTGCStrips[1]==0)&&(nTGCStrips[2]==0)){canCheckSector[0]=false;canCheckGlobal[0]=false;}
223  if((nTGCStrips[0]==0)&&(nTGCStrips[2]==0)){canCheckSector[1]=false;canCheckGlobal[1]=false;}
224  if((nTGCStrips[0]==0)&&(nTGCStrips[1]==0)){canCheckSector[2]=false;canCheckGlobal[2]=false;}
225 
226  // Initialise hit registered arrays
227  // bool hitregistered[9][2];
228  bool sectorhitregistered[9][2];
229  for(int l=0;l<9;l++){// Layer
230  for(int k=0;k<2;k++){// WireStrip
231  // hitregistered[l][k]=false;
232  sectorhitregistered[l][k]=false;
233  }// WireStrip
234  }// Layer
235 
236  // Initialise flags for whether a layer in this event has PRD and PRD which matched the current track
237  bool HasPRD[9] ={false,false,false,false,false,false,false,false,false};
238  bool PRDMatch[9]={false,false,false,false,false,false,false,false,false};
239 
240  // Loop over TGC Prep Data container
241  Muon::TgcPrepDataContainer::const_iterator prepit_end=tgc_prepcontainer->end();
242  for( Muon::TgcPrepDataContainer::const_iterator prepit=tgc_prepcontainer->begin();
243  prepit!=prepit_end;
244  ++prepit){
245 
246  //loop over TGC Prep Data collection
247  Muon::TgcPrepDataCollection::const_iterator prepitc_end=(*prepit)->end();
248  for( Muon::TgcPrepDataCollection::const_iterator prepitc=(*prepit)->begin();
249  prepitc!= prepitc_end;
250  ++prepitc){
251  // Get PRD and variables
252  const Muon::TgcPrepData* tpd=*prepitc;
253  const MuonGM::TgcReadoutElement *tre = tpd->detectorElement();
254  const std::string stationType = tre->getStationType();
255 
256  // Get id values
257  Identifier tgcid=(*prepitc)->identify();
258  int tgcAC=(tre->sideA()==false);//isNotAside a:0, c:1
259  int tgcFE=(tre->isForward()==false);//isNotForward f:0, e:1
260  int tgcWS=(m_idHelperSvc->tgcIdHelper().isStrip(tgcid));//isStrip w=0, s=1
261  int stationName = m_idHelperSvc->tgcIdHelper().stationName(tgcid);
262  int stationEta = std::abs(tre->getStationEta());
263  int stationPhi = tre->getStationPhi();
264  int gasGap = m_idHelperSvc->tgcIdHelper().gasGap(tgcid);
265 
266  // Cut hits except those from same side EIFI & Midstation
267  if(tgcAC!=i) continue;
268  if(stationName>48 || stationName<41) continue;
269 
270  // Get layer number and stationIndex
272  int stationIndex = TGCstationname2stationindex(stationName);
273 
274  // Skip PRD in stations which can't be checked
275  if(stationIndex<0) continue;
276  if(!(canCheckGlobal[stationIndex]||canCheckSector[stationIndex]))continue;
277  if(layer<0) continue;
278  HasPRD[layer]=true;
279 
280  // Get position variables
281  // const Trk::GlobalPosition prdPos = tpd->globalPosition();
282  const Amg::Vector3D prdPos = tpd->globalPosition();
283  float tgcRho = std::abs(prdPos.perp());
284  float tgcPhi = prdPos.phi();
285  float tgcZ = prdPos.z();
286  if(tgcPhi<0)tgcPhi+=2*M_PI;
287 
288  // Run Extrapolation
289  // Trk::GlobalPosition tgcExtrapolatedPos;
290  Amg::Vector3D tgcExtrapolatedPos;
291  if(stationIndex==3){// Extrapolate position from Inner Position to PRD Z position
292  //if(innerSegmPos=0)m_log << MSG::WARNING << "MidstationOnly: innerSegmPos=0 but passed canCheckGlobal" );
293  float dZ = std::abs(tgcZ) - std::abs(innerSegmZ);
294  //tgcExtrapolatedPos = Trk::GlobalPosition(innerSegmPos+(innerSegmDirzunit*dZ));
295  tgcExtrapolatedPos = Amg::Vector3D(innerSegmPos+(innerSegmDirzunit*dZ));
296  }
297  else{// Extrapolate position from Midstation Position to PRD Z position
298  float dZ = std::abs(tgcZ) - std::abs(midSegmZ);
299  //tgcExtrapolatedPos = Trk::GlobalPosition(midSegmPos+(midSegmDirzunit*dZ));
300  tgcExtrapolatedPos = Amg::Vector3D(midSegmPos+(midSegmDirzunit*dZ));
301  }
302  float tgcExtrRho = std::abs(tgcExtrapolatedPos.perp());
303  float tgcExtrPhi = tgcExtrapolatedPos.phi();
304  if(tgcExtrPhi<0)tgcExtrPhi+=2*M_PI;
305 
306  // Get differences between extrapolated and segm2 positions
307  float dRho = tgcRho-tgcExtrRho;
308  float dPhi = tgcPhi-tgcExtrPhi;
309  if(dPhi<-M_PI)dPhi+=2*M_PI;
310  if(dPhi> M_PI)dPhi-=2*M_PI;
311 
312  // Pass through loose phi cut to eliminate some noise
313  if(std::abs(dPhi)<dPhiCut_Loose){
314  // Fill PRD sagitta histograms
315  if(m_mvt_extrprdsag[i][stationIndex][tgcFE][tgcWS][0]) m_mvt_extrprdsag[i][stationIndex][tgcFE][tgcWS][0]->Fill(dRho);
316  if(m_mvt_extrprdsag[i][stationIndex][tgcFE][tgcWS][2]) m_mvt_extrprdsag[i][stationIndex][tgcFE][tgcWS][2]->Fill(dPhi);
317 
318  // Global efficiency check
319  if(canCheckGlobal[stationIndex]){
320  // Do check
321  float dRhoCut = dRhoCutGlobal[tgcWS]*tgcExtrRho;
322  if(std::abs(dPhi)<dPhiCutGlobal[tgcWS] && std::abs(dRho)<dRhoCut){
323  }
324  }
325 
326  // Sector Efficiency Check
327  if(canCheckSector[stationIndex]){// If this station can be checked
328  if((stationEta==TGCstation_StationEta[stationIndex])&&
329  (stationPhi==TGCstation_StationPhi[stationIndex])&&
330  (tgcFE==TGCstation_StationFE[stationIndex])){// If Station FE&Eta&Phi match
331  if(std::abs(dPhi)<dPhiCutSector[tgcWS] && std::abs(dRho)<dRhoCutSector[tgcWS]){
332  sectorhitregistered[layer][tgcWS]=true;
333  }
334  }// Station EtaPhi
335  }
336 
337  }// dPhi Loose Cut
338  }// TGC PRD Collection
339  }// TGC PRD Container
340 
341  // Fill Efficiency Histograms
342  for(int l=0;l<9;l++){// Layer
343  // Get Station Number
344  int stationIndex=TGClayer2stationindex(l);
345  if(stationIndex<0) continue;
346  for(int k=0;k<2;k++){// WireStrip
347  // If Segment Track matches a Sector
348  if(canCheckSector[stationIndex]){
349  if((TGCstation_StationFE[stationIndex]<0)||(TGCstation_StationEta[stationIndex]==0)||(TGCstation_StationPhi[stationIndex]==0)){
350  ATH_MSG_WARNING( "SegmTrack: canCheckSector passed for jTGC=" << stationIndex
351  << " but, FE=" << TGCstation_StationFE[stationIndex]
352  << " Eta=" << TGCstation_StationEta[stationIndex]
353  << " Phi=" << TGCstation_StationPhi[stationIndex] );
354  continue;
355  }
356  // Get Sector histogram indexes
357  int stationMap_EtaIndex=getStationMapIndex(1, l, TGCstation_StationFE[stationIndex], TGCstation_StationEta[stationIndex], TGCstation_StationPhi[stationIndex]);
358  int stationMap_PhiIndex=getStationMapIndex(2, l, TGCstation_StationFE[stationIndex], TGCstation_StationEta[stationIndex], TGCstation_StationPhi[stationIndex]);
359  // Fill Sector efficiency histograms
360  if(sectorhitregistered[l][k]){// Hit in Sector matches extrapolated track
361  m_eff_stationmapbase[i][k][1]->Fill(stationMap_EtaIndex, stationMap_PhiIndex);
362  }
363  m_eff_stationmapbase[i][k][2]->Fill(stationMap_EtaIndex, stationMap_PhiIndex);
364  }
365  }// WireStrip
366  }// Layer
367 
368  // Fill +Has Station bins of histogram
369  if(HasPRD[0]||HasPRD[1]||HasPRD[2])m_mvt_cutspassed[i]->Fill(7);
370  if(HasPRD[3]||HasPRD[4])m_mvt_cutspassed[i]->Fill(9);
371  if(HasPRD[5]||HasPRD[6])m_mvt_cutspassed[i]->Fill(11);
372  if(HasPRD[7]||HasPRD[8])m_mvt_cutspassed[i]->Fill(5);
373 
374  // Fill Match Station bins of histogram
375  if(PRDMatch[0]||PRDMatch[1]||PRDMatch[2])m_mvt_cutspassed[i]->Fill(8);
376  if(PRDMatch[3]||PRDMatch[4])m_mvt_cutspassed[i]->Fill(10);
377  if(PRDMatch[5]||PRDMatch[6])m_mvt_cutspassed[i]->Fill(12);
378  if(PRDMatch[7]||PRDMatch[8])m_mvt_cutspassed[i]->Fill(6);
379  if((PRDMatch[0]||PRDMatch[1]||PRDMatch[2])&&
380  (PRDMatch[3]||PRDMatch[4])&&
381  (PRDMatch[5]||PRDMatch[6])&&
382  (PRDMatch[7]||PRDMatch[8]))m_mvt_cutspassed[i]->Fill(13);
383  if((PRDMatch[0]&&PRDMatch[1]&&PRDMatch[2])&&
384  (PRDMatch[3]&&PRDMatch[4])&&
385  (PRDMatch[5]&&PRDMatch[6])&&
386  (PRDMatch[7]&&PRDMatch[8]))m_mvt_cutspassed[i]->Fill(14);
387 
388 
389  }// AC
390 }// End of function

◆ correlation()

void MdtVsTgcRawDataValAlg::correlation ( const Muon::MdtPrepDataContainer mdt_hit_container,
const Muon::TgcCoinDataContainer tgc_trigger_container 
)
private

<<"mmdtStationName "<<mdtStationName

Definition at line 27 of file MdtVsTgcRawData_correlation.cxx.

28  {
29 
30  ATH_MSG_DEBUG("inside correlation" );
31  //StatusCode sc=StatusCode::SUCCESS;
32 
33  // MuonDetectorManager from the conditions store
35  const MuonGM::MuonDetectorManager* MuonDetMgr = DetectorManagerHandle.cptr();
36  if(MuonDetMgr==nullptr){
37  ATH_MSG_ERROR("Null pointer to the read MuonDetectorManager conditions object");
38  return;
39  }
40 
41  //loop over TGC RoI container
42  Muon::TgcCoinDataContainer::const_iterator it_end=tgccontainer->end();
43  for( Muon::TgcCoinDataContainer::const_iterator it=tgccontainer->begin();
44  it!=it_end;
45  ++it){
46 
47 
48  ATH_MSG_DEBUG( "size of tgc collection is " << (*it) -> size() );
49 
50  //loop over TGC RoI collection
52  for( Muon::TgcCoinDataCollection::const_iterator itc=(*it)->begin();
53  itc!= itc_end;
54  ++itc){
55 
56  const Muon::TgcCoinData* tcd=*itc;
57  Identifier tgcid=(*itc)->identify();
58 
59  if( tcd->type() != Muon::TgcCoinData::TYPE_SL )continue;
60 
61  int ac=(tcd->isAside()==false);//isNotAside a:0, c:1
62  int ef=(tcd->isForward()==false);//isNotForward f:0, e:1
63  int phi48=tcd->phi();//48(24)
64  int roi=tcd->roi();
65  int roieta;//1-53
66  int roiphi;//1-192
67 
68  roi2etaphi(*tcd, roieta, roiphi);
69 
70  //int tgcMdtSector=roiphi2mdtSector(roiphi,ef);
71 
72  const MuonGM::TgcReadoutElement* pReadoutElementTGC = MuonDetMgr->getTgcReadoutElement(tgcid);
73  const Amg::Vector3D pos = pReadoutElementTGC->channelPos(tgcid);
74 
75  float tgcEta = std::abs(pos.eta());
76  float tgcPhi = pos.phi();
77  if(tgcPhi<0)tgcPhi+=2*M_PI;
78 
79 
80  ATH_MSG_DEBUG("ac "<<ac
81  <<" ef "<<ef
82  <<" phi48 "<<phi48
83  <<" roi "<<roi
84  <<" roieta "<<roieta
85  <<" roiphi "<<roiphi
86  <<" tgcEta "<<tgcEta
87  <<" tgcPhi "<<tgcPhi );
88 
89 
90  //loop over MDT container
92  Muon::MdtPrepDataContainer::const_iterator container_end=mdt_hit_container->end();
93  for (containerIt = mdt_hit_container->begin() ;
94  containerIt != container_end ;
95  ++containerIt){
96 
97  Identifier mdt_id = (*containerIt)->identify();
98  // Field Range Notes
99  // ==============================================================================
100  // StationName unsigned integer maps to "BIL", "EMS" ,etc.
101  // StationEta [-6,-1] backward endcap (-1 at lowest R)
102  // [-8,8] barrel (increases with Z)
103  // [-6,-1]+[1,6] forward endcap (1 at lowest R)
104  // StationPhi [1,8] increases with phi
105  // Technology [0] maps to "MDT"
106  // Multilayer [1,2] barrel: increases with R
107  // endcap: increases with |Z|
108  // TubeLayer [1,4] barrel: increases with R
109  // endcap: increases with |Z|
110  // Tube [1,n] barrel: increases with |Z|
111  // endcap: increases with R
112  // ==============================================================================
113 
114  int mdtStationName = int(m_idHelperSvc->mdtIdHelper().stationName(mdt_id)) ;
115 
116  //SN Layer Tube Radial
117  //13:EIL 2x4 x54 x4
118  //49:EIS 2x4 x36 x2
119  //17:EML 2x3 x64 x5
120  //18:EMS 2x3 x64 x5
121  //20:EOL 2x3 x48 x6
122  //21:EOS 2x3 x48 x6
123 
124  //only Endcap MDT
125  //if(mdtStationName!=13 && mdtStationName!=49 && mdtStationName!=17 && mdtStationName!=18 && mdtStationName!=20 && mdtStationName!=21 )continue;
126 
127  //if (m_debuglevel){
128  //m_log<<MSG::DEBUG
130  // <<endmsg;
131  //}
132 
133  //only Endcap middle MDT
134  if(mdtStationName!=17 && mdtStationName!=18 )continue;
135 
136  int mdtStationEta = int(m_idHelperSvc->mdtIdHelper().stationEta(mdt_id)) ;//backward:[-6,-1], forward:[1,6], (1 or -1 at lowest R)
137  int mdtStationPhi = int(m_idHelperSvc->mdtIdHelper().stationPhi(mdt_id)) ;//[1:8]
138  int mdtAC = (mdtStationEta<0);//a:0, c:1
139 
140  float mdtSector=mdtStationPhi*2.-1.;
141  if(mdtStationName==18)mdtSector+=1;
142  double mdtSectorPhi = (mdtSector-1.)*M_PI/8.;
143 
144  //same Side
145  if(ac!=mdtAC)continue;
146  ATH_MSG_DEBUG( "size of mdt collection is " << (*containerIt) -> size() );
147 
148  ATH_MSG_DEBUG("mdtStationName "<<mdtStationName
149  <<" mdtStationEta "<<mdtStationEta
150  <<" mdtStationPhi "<<mdtStationPhi
151  <<" mdtSectorPhi "<<mdtSectorPhi );
152 
153  //loop over MDT PRD Collection
154  Muon::MdtPrepDataCollection::const_iterator collection_it_end=(*containerIt)->end();
155 
156 
157  int tmp[2][4][64];
158  for(int i=0;i<2;i++)
159  for(int j=0;j<4;j++)
160  for(int k=0;k<64;k++)
161  tmp[i][j][k]=0;
162 
163  for(Muon::MdtPrepDataCollection::const_iterator mdtCollection=(*containerIt)->begin();
164  mdtCollection!= collection_it_end;
165  ++mdtCollection){
166 
167  Identifier mdt_id2 = (*mdtCollection)->identify();
168 
169  int mdtMultiLayer = int(m_idHelperSvc->mdtIdHelper().multilayer(mdt_id2));
170  int mdtTubeLayer = int(m_idHelperSvc->mdtIdHelper().tubeLayer(mdt_id2));
171  int mdtTube = int(m_idHelperSvc->mdtIdHelper().tube(mdt_id2));
172  int mdtTubeIdForEM = (std::abs(mdtStationEta)-1)*64 + mdtTube -1;
173 
174  ATH_MSG_DEBUG("mdtMultiLayer "<<mdtMultiLayer
175  <<" mdtTubeLayer "<<mdtTubeLayer
176  <<" mdtTube "<<mdtTube
177  <<" mdtTubeIdForEM "<<mdtTubeIdForEM );
178 
179  if(tmp[mdtMultiLayer-1][mdtTubeLayer-1][mdtTube-1]==1)continue;
180  tmp[mdtMultiLayer-1][mdtTubeLayer-1][mdtTube-1]=1;
181 
182  int adc = (*mdtCollection)->adc();
183  int tdc = (*mdtCollection)->tdc();
184 
185  if(adc < m_MdtAdcCut )continue;
186 
187  const MuonGM::MdtReadoutElement* pReadoutElementMDT = MuonDetMgr->getMdtReadoutElement(mdt_id2);
188  const Amg::Vector3D mdtgPos = pReadoutElementMDT->tubePos(mdt_id2); //global position of the wire
189  float mdtEta = std::abs(mdtgPos.eta());
190  float mdtPhi = mdtgPos.phi();
191  float mdtr = mdtgPos.perp();
192  float mdtz = mdtgPos.z();
193  if(mdtPhi<0)mdtPhi+=2*M_PI;
194 
195  ATH_MSG_DEBUG(" Name "<<mdtStationName
196  <<" Eta "<<mdtStationEta
197  <<" Phi "<<mdtStationPhi
198  <<" MultiLayer "<<mdtMultiLayer
199  <<" TubeLayer "<<mdtTubeLayer
200  <<" Tube "<<mdtTube
201  <<" TubeIdForEM "<<mdtTubeIdForEM
202  <<" Eta "<<mdtEta
203  <<" Phi "<<mdtPhi
204  <<" r "<<mdtr
205  <<" z "<<mdtz
206  <<" Sec "<<mdtSector
207  <<" SecPhi "<<mdtSectorPhi
208  <<" ADC "<<adc
209  <<" TDC "<<tdc );
210 
211  }//MDT collection
212  }//MDT container
213  }//TGC collection
214  }//TGC container
215 }

◆ declareGaudiProperty() [1/4]

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

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

Definition at line 170 of file AthCommonDataStore.h.

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

◆ declareGaudiProperty() [2/4]

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

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

Definition at line 156 of file AthCommonDataStore.h.

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

◆ declareGaudiProperty() [3/4]

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

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

Definition at line 184 of file AthCommonDataStore.h.

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

◆ declareGaudiProperty() [4/4]

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

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

Definition at line 199 of file AthCommonDataStore.h.

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

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

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

◆ deregGraph()

StatusCode ManagedMonitorToolBase::deregGraph ( TGraph *  g)
virtualinherited

De-registers a TGraph from the THistSvc, but does NOT delete the object.

Definition at line 1625 of file ManagedMonitorToolBase.cxx.

1627 {
1628  return m_THistSvc->deReg( g );
1629 }

◆ deregHist()

StatusCode ManagedMonitorToolBase::deregHist ( TH1 *  h)
virtualinherited

De-registers a TH1 from the THistSvc, but does NOT delete the object.

Definition at line 1617 of file ManagedMonitorToolBase.cxx.

1619 {
1620  return m_THistSvc->deReg( h );
1621 }

◆ deregObject() [1/2]

StatusCode ManagedMonitorToolBase::deregObject ( const std::string &  objName,
const MonGroup group 
)
virtualinherited

De-registers a TObject from the THistSvc, but does NOT delete the object.

(NB: LightWeight histograms are not even registered until readout).

Definition at line 1643 of file ManagedMonitorToolBase.cxx.

1645 {
1646  std::string streamName = streamNameFunction()->getStreamName( this, group, objName );
1647  return m_THistSvc->deReg( streamName );
1648 }

◆ deregObject() [2/2]

StatusCode ManagedMonitorToolBase::deregObject ( const std::string &  objName,
const std::string &  system,
Interval_t  interval 
)
virtualinherited

De-registers a TObject from the THistSvc, but does NOT delete the object.

(NB: LightWeight histograms are not even registered until readout).

Definition at line 1633 of file ManagedMonitorToolBase.cxx.

1636 {
1637  MonGroup group( this, system, interval );
1638  return deregObject( objName, group );
1639 }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::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; }

◆ DQCheckMDTSegments()

void MdtVsTgcRawDataValAlg::DQCheckMDTSegments ( std::vector< const Muon::MuonSegment * >(&)  sortedSegments[2][4],
std::vector< const Muon::MuonSegment * >(&)  disqualifiedSegments[2][4] 
)
private

Definition at line 34 of file MdtVsTgcRawData_SegmDQ.cxx.

35  {
36  // Define Cuts:
37  // Cut for miniumum number of measurements necessary to use Segments
38  const int nMeasCutMdt[4] = { 4, 2, 4, 5}; //[MDTStation]
39  const int nMeasCutTgcStrip[4] = { 0, 0, 1, 0}; //[MDTStation]
40  // Cut for differences between direction and position vectors
41  const float dPhiCutPosDir[4] = {0.05,0.05,0.08,0.1 };
42  const float dTheCutPosDir[4] = { 0.2, 0.4, 0.6,0.5 };
43 
44  // Loop over sides
45  for(int i=0;i<2;i++){// AC
46  bool skipSegm;int nDisqualifiedSegm; // used when checking the disqualified list for a segment
47  bool segmDisqual; // used to flag a segment which has been found DQ insufficient
48  //bool HasStationDQSegm[4] = {false, false, false, false};// flags for whether the there are segments in each MDT station with sufficienct DQ
49 
50  for(int jMDT=0;jMDT<4;jMDT++){// MDT Stations
51  // Get number of segments
52  int nSegm=sortedSegments[i][jMDT].size();
53 
54  // Loop over segments in this MDT Station
55  for(int n=0; n<nSegm;n++){
56  segmDisqual = false;// set disqualified flag to false
57  // Get segment
58  const Muon::MuonSegment *segm=sortedSegments[i][jMDT].at(n);
59  if(segm==nullptr)continue;// Cut empty entries
60 
61  // Check disqualifiedSegments for current segment
62  skipSegm=false;
63  nDisqualifiedSegm=disqualifiedSegments[i][jMDT].size();
64  for(int ndis=0;ndis<nDisqualifiedSegm;ndis++)if(segm==disqualifiedSegments[i][jMDT].at(ndis))skipSegm=true;
65  if(skipSegm)continue;
66 
68  // Apply nHits cuts to segments
70  int stationName=0;
71  int nMdtMeas = 0; // nMDTHits in this Segment
72  int nTgcMeas[2] = {0,0};// [WireStrip] nTGCHits in this Segment
73 
74  // Loop through contained ROTs and identify used stations
75  for(unsigned int iROT=0; iROT<segm->numberOfContainedROTs(); ++iROT) {
76  const Trk::RIO_OnTrack* rio = segm->rioOnTrack(iROT);
77  if(!rio){
78  ATH_MSG_DEBUG("no RIO");
79  continue;
80  }
81  Identifier id = rio->identify();
82  stationName = int(m_idHelperSvc->mdtIdHelper().stationName(id));
83  int isStrip = m_idHelperSvc->tgcIdHelper().isStrip(id);
84 
85  if((stationName==41)||(stationName==42))nTgcMeas[isStrip]++;// TGC
86  if((stationName==43)||(stationName==44))nTgcMeas[isStrip]++;// TGC
87  if((stationName==45)||(stationName==46))nTgcMeas[isStrip]++;// TGC
88  if((stationName==47)||(stationName==48))nTgcMeas[isStrip]++;// TGC
89 
90  if((stationName==13)||(stationName==49))nMdtMeas++;// MDT
91  if((stationName==14)||(stationName==15))nMdtMeas++;// MDT
92  if((stationName==17)||(stationName==18))nMdtMeas++;// MDT
93  if((stationName==20)||(stationName==21))nMdtMeas++;// MDT
94  }
95 
96  // Cut Segments with insufficient numbers of hits in the stations
97  if(nMdtMeas<nMeasCutMdt[jMDT]||nTgcMeas[1]<nMeasCutTgcStrip[jMDT]){
98  segmDisqual = true;
99  }
100 
102  // Apply Direction-Position cuts to segments
104  // Get Position and Direction Variables
105  // const Trk::GlobalPosition segmGlobalPos = segm->globalPosition();
106  const Amg::Vector3D segmGlobalPos = segm->globalPosition();
107 
108  float segmPosPhi = segmGlobalPos.phi();
109  float segmPosThe = segmGlobalPos.theta();
110  if(segmPosPhi<0) segmPosPhi+=2*M_PI;
111  if(segmPosThe>M_PI/2) segmPosThe=M_PI-segmPosThe;
112  //const Trk::GlobalDirection segmGlobalDir = segm->globalDirection();
113  const Amg::Vector3D segmGlobalDir = segm->globalDirection();
114 
115  float segmDirPhi = segmGlobalDir.phi();
116  float segmDirThe = segmGlobalDir.theta();
117  if(segmDirPhi<0) segmDirPhi+=2*M_PI;
118  if(segmDirThe>M_PI/2) segmDirThe=M_PI-segmDirThe;
119 
120  // Get Differences between Position and Direction vectors
121  float dPhi_Pos_Dir = segmPosPhi-segmDirPhi;
122  float dThe_Pos_Dir = segmPosThe-segmDirThe;
123  if(dPhi_Pos_Dir<-M_PI)dPhi_Pos_Dir+=2*M_PI;
124  if(dPhi_Pos_Dir> M_PI)dPhi_Pos_Dir-=2*M_PI;
125 
126  if(!segmDisqual){
127  if(m_mdt_segmposdirsag[i][jMDT][2]) m_mdt_segmposdirsag[i][jMDT][2]->Fill(dPhi_Pos_Dir);
128  if(m_mdt_segmposdirsag[i][jMDT][3]) m_mdt_segmposdirsag[i][jMDT][3]->Fill(dThe_Pos_Dir);
129  }
130 
131  // Cut Segments with too great a difference between position and direction vectors
132  if(std::abs(dPhi_Pos_Dir)>dPhiCutPosDir[jMDT]||std::abs(dThe_Pos_Dir)>dTheCutPosDir[jMDT]){
133  segmDisqual = true;
134  }
135 
137  // Add disqualified segments to the disqualified list
139  if(segmDisqual){
140  disqualifiedSegments[i][jMDT].push_back(segm);
141  }
142  else{
143  //HasStationDQSegm[jMDT]=true;// Flag event as having a DQ sufficient segment in the current station
144  }
145  }// Segments in station
146  }// MDT Stations
147  }// AC
148 
149  return;
150 }// End of function

◆ endOfEventsBlockFlag()

bool ManagedMonitorToolBase::endOfEventsBlockFlag ( ) const
inlineprotectedinherited

Definition at line 794 of file ManagedMonitorToolBase.h.

794 { return m_endOfEventsBlock; }

◆ endOfLowStatFlag()

bool ManagedMonitorToolBase::endOfLowStatFlag ( ) const
inlineprotectedinherited

Definition at line 795 of file ManagedMonitorToolBase.h.

795 { return m_endOfLowStat; }

◆ endOfLumiBlockFlag()

bool ManagedMonitorToolBase::endOfLumiBlockFlag ( ) const
inlineprotectedinherited

Definition at line 796 of file ManagedMonitorToolBase.h.

796 { return m_endOfLumiBlock; }

◆ endOfRunFlag()

bool ManagedMonitorToolBase::endOfRunFlag ( ) const
inlineprotectedinherited

Definition at line 797 of file ManagedMonitorToolBase.h.

797 { return m_endOfRun; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::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< AlgTool > >::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; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::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

◆ fillHistograms()

StatusCode MdtVsTgcRawDataValAlg::fillHistograms ( )
virtual

An inheriting class should either override this function or fillHists().

Reimplemented from ManagedMonitorToolBase.

Definition at line 155 of file MdtVsTgcRawDataValAlg.cxx.

155  {
156 /*----------------------------------------------------------------------------------*/
157  ATH_MSG_DEBUG( "MdtVsTgcRawDataValAlg::TGC RawData Monitoring Histograms being filled" );
158 
159  //TGC PRD
161 
162  //TGC Coincidence
164 
165  ATH_MSG_DEBUG( "size of tgc container is " << tgc_coin_container -> size() );
166 
167  //MDT PRD
169 
171  tgceffcalc(mdt_segment_collection.cptr(), tgc_prd_container.cptr());
172  maphists(mdt_segment_collection.cptr(), tgc_prd_container.cptr());
173 
174  //only analyze nSL==1
175  int nSL = numberOfSL(tgc_coin_container.cptr());
176 
177  if(nSL==1){
178  //fill MDT hit vs TGC RoI
179  correlation(mdt_prd_container.cptr(), tgc_coin_container.cptr());
180  }
181 
182 
183  return StatusCode::SUCCESS; // statuscode check
184 }

◆ fillHists()

StatusCode ManagedMonitorToolBase::fillHists ( )
virtualinherited

Calls fillHists( bool, bool, bool ); if an eventBlock,lumiBlock, or run has turned over, calls procHists( bool, bool, bool ) and bookHists( bool, bool, bool ).

Implements IMonitorToolBase.

Reimplemented in TileRawChannelMonTool, and TileDigitsMonTool.

Definition at line 740 of file ManagedMonitorToolBase.cxx.

742 {
743 
746  msg(MSG::WARNING) << "ManagedMonitorToolBase::initialize() never called from reimplementation!" << endmsg;
747  }
748 
749 
750  bool isNewEventsBlock = ( m_procNEventsProp > 0 && ((m_nEvents % m_procNEventsProp) == 1) && m_haveClearedLastEventBlock );
751  if (isNewEventsBlock) m_haveClearedLastEventBlock = false;
752 
753  m_newLowStat = false;
754  m_newLumiBlock = false;
755  m_newRun = false;
756  newLowStat = false;
757  newLumiBlock = false;
758  newRun = false;
759 
760  m_newLowStatInterval = false;
761  m_newMedStatInterval = false;
762  m_newHigStatInterval = false;
763  newLowStatInterval = false;
764  newMedStatInterval = false;
765  newHigStatInterval = false;
766 
767  m_useTrigger = ( (m_triggerChainProp != "" || m_triggerGroupProp != "") && (!m_trigDecTool.empty()) );
768 
769  if( m_manager != 0 ) {
772  newLumiBlock = m_newLumiBlock;
773  newRun = m_newRun;
774 
775  if(m_newRun) {
776  m_newLumiBlock = true;
777  newLumiBlock = m_newLumiBlock;
778  isNewEventsBlock = true;
779  }
780 
781  m_newEventsBlock = isNewEventsBlock;
782  newEventsBlock = m_newEventsBlock;
783 
784  if( m_newLumiBlock ) {
785  // check if a new LB interval has started
786  // lowest lumiBlockNumber() is 1
787  // m_lastLowStatInterval is -1 initially
788  int currentLB = m_manager->lumiBlockNumber();
789  int LBsLowStat = m_manager->getLBsLowStat();
790  int LBsMedStat = m_manager->getLBsMedStat();
791  int LBsHigStat = m_manager->getLBsHigStat();
792 
793  if( LBsLowStat*LBsMedStat*LBsHigStat == 0) {
794  msg(MSG::WARNING) << "zero LBs requested for interval" << endmsg;
795  }
796  else {
797  if( ((currentLB-1)/LBsLowStat) != m_lastLowStatInterval ) m_newLowStatInterval = true;
798  if( ((currentLB-1)/LBsMedStat) != m_lastMedStatInterval ) m_newMedStatInterval = true;
799  if( ((currentLB-1)/LBsHigStat) != m_lastHigStatInterval ) m_newHigStatInterval = true;
800  newLowStatInterval = m_newLowStatInterval;
801  newMedStatInterval = m_newHigStatInterval;
802  newHigStatInterval = m_newHigStatInterval;
803  }
804  }
805 
806  // Allow inheriting classes the option of using the lastLumiBloc/lastRun values
807  // before updating them
808  }
809 
810 
811  StatusCode sc0( StatusCode::SUCCESS );
812  StatusCode sc1( StatusCode::SUCCESS );
813  StatusCode sc2( StatusCode::SUCCESS );
814  StatusCode sc3( StatusCode::SUCCESS );
815 
816  // Set end of LowStat, LumiBlock and Run variables
817  // These are needed to be used in procHistograms().
822  endOfEventsBlock = m_newEventsBlock;
823  endOfLowStat = m_newLowStatInterval;
824  endOfLumiBlock = m_newLumiBlock;
825  endOfRun = m_newRun;
826 
827  // just duplicates m_newLowStatInterval
829  newLowStat = m_newLowStatInterval;
830 
832  ATH_MSG_DEBUG("Interval transition processing");
833  // Process histograms from the previous lumiBlock/run
834  if( m_nEvents != 1 ) {
836  sc0 = procHistograms();
838  }
839  // Re-book new histograms
841 
843  sc1 = bookHistograms();
845  } else {
846  std::vector<Interval_t> intervals_to_process;
847  if (m_newEventsBlock) intervals_to_process.push_back(eventsBlock);
848  if (m_newLumiBlock) intervals_to_process.push_back(lumiBlock);
849  if (m_newLowStatInterval) intervals_to_process.push_back(lowStat);
850  if (m_newRun) intervals_to_process.push_back(run);
851  for (const auto interval: intervals_to_process) {
855  }
856  }
857  for (const auto& interval: std::vector<Interval_t>{ eventsBlock, lumiBlock, lowStat, run }) {
858  for (const auto& it: m_templateHistograms[interval]) {
859  // is histogram too small in x axis for LB range?
860  if (it.m_group.histo_mgmt() == ATTRIB_X_VS_LB) {
861  //ATH_MSG_WARNING("We are rebinning for " << it.m_templateHist->GetName());
862  while ( it.m_templateHist->GetXaxis()->GetXmax() <= AthenaMonManager::lumiBlockNumber() ) {
863  it.m_templateHist->LabelsInflate("X");
864  }
865  }
866  }
867  for (auto& it: m_templateEfficiencies[interval]) {
868  if (it.m_group.histo_mgmt() == ATTRIB_X_VS_LB) {
869  // get the underlying passed and total TH1's from the TEfficiency
870  TH1* passedHist = it.m_templateHist->GetCopyPassedHisto();
871  TH1* totalHist = it.m_templateHist->GetCopyTotalHisto();
872  // inflate them until they exceed the lumi-block number
873  while (passedHist->GetXaxis()->GetXmax() <= AthenaMonManager::lumiBlockNumber() ) {
874  passedHist->LabelsInflate("X");
875  totalHist->LabelsInflate("X");
876  }
877  // Replace them in the TEfficiency. First one has force ("f") option, since the
878  // histograms will not be consistent. This is corrected in the next line, so we
879  // do check for consistency then.
880  it.m_templateHist->SetPassedHistogram(*passedHist, "f");
881  it.m_templateHist->SetTotalHistogram(*totalHist, " ");
882  delete passedHist; // not owned by THistSvc, so need to be deleted.
883  delete totalHist;
884  }
885  }
886  }
887 
888  if (auto streamname = dynamic_cast<OfflineStream*>(streamNameFunction())) {
889  streamname->updateRunLB();
890  }
891 
892  sc3 = bookHistogramsRecurrent( );
893 
895 
896  }//end if new RUN/LB/Block
897 
898  // check filters
899  bool filterresult(true);
900  if (! m_DQFilterTools.empty()) {
901  ToolHandleArray<IDQFilterTool>::const_iterator ifilter(m_DQFilterTools.begin()), filterend(m_DQFilterTools.end());
902  for (; filterresult && (ifilter != filterend);
903  ++ifilter) {
904  filterresult = (filterresult && (*ifilter)->accept());
905  }
906  }
907 
908 
909  // ...and fill as normal
910  if(filterresult &&
911  (!m_useTrigger
914  ATH_MSG_DEBUG("Passed trigger, presumably");
916  fillHistograms().ignore();
919  ++m_nEvents;
920  } else { ATH_MSG_DEBUG("Failed trigger, presumably"); }
921 
923  if( m_newLumiBlock && (m_nEventsIgnoreTrigger != 1) ) {
924  ++m_nLumiBlocks;
925  }
926  if( m_manager != 0 ) {
928  if( m_newLumiBlock ) {
930 
931  int LBsLowStat = m_manager->getLBsLowStat();
932  int LBsMedStat = m_manager->getLBsMedStat();
933  int LBsHigStat = m_manager->getLBsHigStat();
934  if( LBsLowStat*LBsMedStat*LBsHigStat > 0) {
938  }
939  }
940  }
941 
942  return StatusCode::SUCCESS;
943 }

◆ finalHists()

StatusCode ManagedMonitorToolBase::finalHists ( )
virtualinherited

Calls procHists( true, true, true ).

Implements IMonitorToolBase.

Reimplemented in TileRawChannelMonTool, TileDigitsMonTool, and TileCellNoiseMonTool.

Definition at line 1256 of file ManagedMonitorToolBase.cxx.

1258 {
1259 
1260  // This assumes that the end of a file will naturally end a run, which is not always true.
1261  // A merging application run afterwards should be able to put parts of a run together.
1262  if( m_nEvents != 1 ) {
1264 
1265  // Set end flags for the LowStat, LumiBlock and Run variables.
1266  // This is needed to be used in the procHistograms method below.
1267  m_endOfEventsBlock = true;
1268  m_endOfLowStat = true;
1269  m_endOfLumiBlock = true;
1270  m_endOfRun = true;
1271  endOfEventsBlock = true;
1272  endOfLowStat = true;
1273  endOfLumiBlock = true;
1274  endOfRun = true;
1275 
1277 
1279  return sc;
1280  }
1281  return StatusCode::SUCCESS;
1282 }

◆ get_nEvents()

unsigned int ManagedMonitorToolBase::get_nEvents ( ) const
inlineprotectedinherited

Definition at line 692 of file ManagedMonitorToolBase.h.

692  {
693  return m_nEvents;
694  }

◆ get_procNEventsProp()

long ManagedMonitorToolBase::get_procNEventsProp ( ) const
inlineprotectedinherited

Definition at line 696 of file ManagedMonitorToolBase.h.

696  {
697  return m_procNEventsProp;
698  }

◆ getHist() [1/4]

StatusCode ManagedMonitorToolBase::getHist ( TH1 *&  h,
const std::string &  hName,
const MonGroup group 
)
virtualinherited

Returns a TH1 via the pointer passed as the first argument.

The histogram name, without the leading path or stream name, must be given as the second argument.

Definition at line 1419 of file ManagedMonitorToolBase.cxx.

1421 {
1422  std::string streamName = streamNameFunction()->getStreamName( this, group, hName );
1423  return m_THistSvc->getHist( streamName, h );
1424 }

◆ getHist() [2/4]

StatusCode ManagedMonitorToolBase::getHist ( TH1 *&  h,
const std::string &  hName,
const std::string &  system,
Interval_t  interval 
)
virtualinherited

Returns a TH1 via the pointer passed as the first argument.

The histogram name, without the leading path or stream name, must be given as the second argument.

Definition at line 1409 of file ManagedMonitorToolBase.cxx.

1412 {
1413  MonGroup group( this, system, interval );
1414  return getHist( h, hName, group );
1415 }

◆ getHist() [3/4]

StatusCode ManagedMonitorToolBase::getHist ( TH2 *&  h,
const std::string &  hName,
const MonGroup group 
)
virtualinherited

Returns a TH2 via the pointer passed as the first argument.

The histogram name, without the leading path or stream name, must be given as the second argument.

Definition at line 1438 of file ManagedMonitorToolBase.cxx.

1440 {
1441  std::string streamName = streamNameFunction()->getStreamName( this, group, hName );
1442  return m_THistSvc->getHist( streamName, h );
1443 }

◆ getHist() [4/4]

StatusCode ManagedMonitorToolBase::getHist ( TH2 *&  h,
const std::string &  hName,
const std::string &  system,
Interval_t  interval 
)
virtualinherited

Returns a TH2 via the pointer passed as the first argument.

The histogram name, without the leading path or stream name, must be given as the second argument.

Definition at line 1428 of file ManagedMonitorToolBase.cxx.

1431 {
1432  MonGroup group( this, system, interval );
1433  return getHist( h, hName, group );
1434 }

◆ getNewStreamNameFcn()

ManagedMonitorToolBase::StreamNameFcn * ManagedMonitorToolBase::getNewStreamNameFcn ( ) const
protectedvirtualinherited

Definition at line 2157 of file ManagedMonitorToolBase.cxx.

2159 {
2160  StreamNameFcn* fcn(0);
2161 
2162  switch( m_environment ) {
2164  fcn = new NoOutputStream();
2165  break;
2167  fcn = new OnlineStream();
2168  break;
2170  fcn = new DefaultStream( m_fileKey );
2171  break;
2175  case AthenaMonManager::AOD:
2177  default:
2178  fcn = new OfflineStream( m_fileKey, m_dataType, m_environment );
2179  }
2180 
2181  return fcn;
2182 }

◆ getStationMapIndex()

int MdtVsTgcRawDataValAlg::getStationMapIndex ( int  x,
int  l,
int  stationFE,
int  stationEta,
int  stationPhi 
)
private

Definition at line 259 of file MdtVsTgcRawData_TGCEffCheck.cxx.

259  {
260  // Display error messages if invalid TRE variables are passed in
261  if((stationFE!=0)&&(stationFE!=1)) ATH_MSG_WARNING( "getStationMapIndex passed invalid stationFE=" << stationFE );
262  if((l<0)||(l>8)) ATH_MSG_WARNING( "getStationMapIndex passed invalid layer index l=" << l );
263  if(stationEta<1) ATH_MSG_WARNING( "getStationMapIndex passed invalid stationEta=" << stationEta );
264  if(stationPhi<1) ATH_MSG_WARNING( "getStationMapIndex passed invalid stationPhi=" << stationPhi );
265  int index=0;
266  switch(x){
267  case 1:// Getting Eta Index //use old eta bin
268  if(l==0||l==1||l==2){// T1
269  if(stationEta>4) ATH_MSG_WARNING( "getStationMapIndex(" << x << ") passed invalid l=" << l << " stationEta=" << stationEta );
270  if(stationFE==0)index=32+l;
271  else{
272  index=4-stationEta;
273  index=index*7+l;
274  }
275  }
276  else if(l==3||l==4){// T2
277  if(stationEta>5) ATH_MSG_WARNING( "getStationMapIndex(" << x << ") passed invalid l=" << l << " stationEta=" << stationEta );
278  if(stationFE==0)index=32+l;
279  else {
280  index=5-stationEta;
281  index=index*7+l;
282  if(stationEta==1)index=25+l;
283  }
284  }
285  else if(l==5||l==6){// T3
286  if(stationEta>5) ATH_MSG_WARNING( "getStationMapIndex(" << x << ") passed invalid l=" << l << " stationEta=" << stationEta );
287  if(stationFE==0)index=32+l;
288  else{
289  index=5-stationEta;
290  index=index*7+l;
291  if(stationEta==1)index=25+l;
292  }
293  }
294  else if(l==7||l==8){// T4
295  if(stationEta>1) ATH_MSG_WARNING( "getStationMapIndex(" << x << ") passed invalid l=" << l << " stationEta=" << stationEta );
296  if(stationFE==0){
297  if(l==7){index=41;}
298  else if(l==8){index=42;}
299  }else{
300  if(l==7){index=39;}
301  else if(l==8){index=40;}
302  }
303  }
304  break;
305  case 2:// Getting Phi Index
306  if(stationFE==0){// Forward
307  if((l==7)||(l==8)){// FI
308  if(stationPhi>24) ATH_MSG_WARNING( "getStationMapIndex(" << x << ") passed invalid l=" << l << " FE=" << stationFE << " stationPhi=" << stationPhi );
309  index=(stationPhi-1)*2;
310  }
311  else{// Forward Midstation
312  if(stationPhi>24) ATH_MSG_WARNING( "getStationMapIndex(" << x << ") passed invalid l=" << l << " FE=" << stationFE << " stationPhi=" << stationPhi );
313  index=(stationPhi-1)*2;
314  }
315  }
316  else{// Endcap
317  if((l==7)||(l==8)){// EI
318  if(stationPhi>21) ATH_MSG_WARNING( "getStationMapIndex(" << x << ") passed invalid l=" << l << " FE=" << stationFE << " stationPhi=" << stationPhi );
319  index=(stationPhi-1);
320  if(index>7)index++;
321  if(index>15)index++;
322  if(index>19)index++;
323  index*=2;
324  }
325  else{// Endcap Midstation
326  if(stationPhi>48) ATH_MSG_WARNING( "getStationMapIndex(" << x << ") passed invalid l=" << l << " FE=" << stationFE << " stationPhi=" << stationPhi );
327  index=stationPhi-1;
328  }
329  }
330  // Adjust to set A01phi0(stationPhi=47 for Midstation)at 0
331  index+=2;
332  if(index>47)index-=48;
333  break;
334  default:
335  ATH_MSG_WARNING( "getStationMapIndex(" << x << ") is invalid" );
336  break;
337  }
338  return index;
339 }// End of function

◆ initialize()

StatusCode MdtVsTgcRawDataValAlg::initialize ( )
virtual

Reimplemented from ManagedMonitorToolBase.

Definition at line 98 of file MdtVsTgcRawDataValAlg.cxx.

98  {
100  ATH_MSG_INFO( "in initializing MdtVsTgcRawDataValAlg" );
101  // MuonDetectorManager from the conditions store
103  ATH_CHECK(m_idHelperSvc.retrieve());
104 
105  //MDT z position
106  //Name MultiLayer TubeLayer z
107  //17 1 1 14142.5
108  //17 1 2 14168.5
109  //17 1 3 14194.5
110  //17 2 1 14394.6
111  //17 2 2 14420.6
112  //17 2 3 14446.6
113  //18 1 1 13726.5
114  //18 1 2 13752.5
115  //18 1 3 13778.5
116  //18 2 1 13978.6
117  //18 2 2 14004.6
118  //18 2 3 14030.6
119 
120  // Retrieve the MuonDetectorManager
121  const MuonGM::MuonDetectorManager* MuonDetMgrDS=nullptr;
122  ATH_CHECK( detStore()->retrieve(MuonDetMgrDS) );
123  ATH_MSG_DEBUG( " Found the MuonDetectorManager from detector store. " );
124  prepareTREarray(MuonDetMgrDS);
126  ATH_CHECK(m_tgc_CoinContainerName.initialize());
129  return StatusCode::SUCCESS;
130 }

◆ inputHandles()

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

◆ interfaceID()

static const InterfaceID& IMonitorToolBase::interfaceID ( )
inlinestaticinherited

Definition at line 29 of file IMonitorToolBase.h.

29 { return IID_IMonitorToolBase; }

◆ intervalEnumToString()

std::string ManagedMonitorToolBase::intervalEnumToString ( Interval_t  interval)
staticinherited

Converts a LevelOfDetail_t to a string of the same name.

Converts a string to the corresponding LevelOfDetail_t. Converts a Interval_t to a string of the same name.

Definition at line 536 of file ManagedMonitorToolBase.cxx.

538 {
539  std::string str("file");
540 
541  switch( interval ) {
542  case all:
543  str = "all";
544  break;
545  case fill:
546  str = "fill";
547  break;
548  case run:
549  str = "run";
550  break;
551  case lowStat:
552  str = "lowStat";
553  break;
554  case medStat:
555  str = "medStat";
556  break;
557  case higStat:
558  str = "higStat";
559  break;
560  case lumiBlock:
561  str = "lumiBlock";
562  break;
563  case eventsBlock:
564  str = "eventsBlock";
565  break;
566  case file:
567  str = "file";
568  break;
569  default:
570  str = "unknown";
571  }
572 
573  return str;
574 }

◆ intervalStringToEnum()

ManagedMonitorToolBase::Interval_t ManagedMonitorToolBase::intervalStringToEnum ( const std::string &  str)
staticinherited

Converts a string to the corresponding Interval_t.

Definition at line 578 of file ManagedMonitorToolBase.cxx.

580 {
581  std::string lcstr( strToLower(str) );
582 
583  if( lcstr == "all" )
584  return all;
585  else if( lcstr == "fill" )
586  return fill;
587  else if( lcstr == "run" )
588  return run;
589  else if( lcstr == "lowStat" )
590  return lowStat;
591  else if( lcstr == "medStat" )
592  return medStat;
593  else if( lcstr == "higStat" )
594  return higStat;
595  else if( lcstr == "lumiBlock" )
596  return lumiBlock;
597  else if( lcstr == "eventsBlock" )
598  return eventsBlock;
599  else if( lcstr == "file" )
600  return file;
601 
602  if( Imp::s_svcLocator ) {
603  SmartIF<IMessageSvc> ms{Imp::s_svcLocator.load()->service( "MessageSvc" )};
604  if( ms.isValid() ) {
605  MsgStream log( ms, "ManagedMonitorToolBase::intervalStringToEnum()" );
606  log << MSG::WARNING << "Unknown ManagedMonitorToolBase::Interval_t \""
607  << str << "\", returning \"file\"" << endmsg;
608  }
609  }
610 
611  return file;
612 }

◆ labelStationMap()

void MdtVsTgcRawDataValAlg::labelStationMap ( TH2 *  h2,
int  i = -1,
int  k = -1 
)
private

Definition at line 397 of file MdtVsTgcRawData_bookhistograms.cxx.

397  {
398  // Blank non-existent chambers
399  BlankStationMap(h2,ws);
400 
401  std::stringstream sst;
402  std::string AC[2]={"A","C"};
403  int nChambers[9]={5,5,5,6,6,6,6,2,2};
404  std::string chamber1[6]={"E1", "E2", "E3", "E4", "F"};
405  std::string chamber3[6]={"E1", "E2", "E3", "E4", "E5", "F"};
406  std::string chamberE[2]={"EI", "FI"};
407 
408  bool rebin=true;
409  // Name StationEtas/Layers
410  int ibin=1;
411  if(rebin){//use new bin
412  for(int l=0 ; l<9 ; l++ ){// Layer
413  //cppcheck-suppress negativeIndex
414  for( int c=0 ; c<nChambers[l] ; c++ ){// Chamber
415  sst << "L" << l+1 << "_";
416  if(nChambers[l]==5)sst<<chamber1[c];
417  else if(nChambers[l]==6)sst<<chamber3[c];
418  else if(nChambers[l]==2)sst<<chamberE[c];
419  if(l+1>0 && l+1<=3 && c+1<5)ibin=7*c+(l+1);
420  else if(l+1>3 && l+1<=7 && c+1<5)ibin=7*c+(l+1);
421  else if(l+1>3 && l+1<=7 && c+1==5)ibin=25+(l+1);
422  else if(l+1==1 && c+1==5)ibin=33;
423  else if(l+1==2 && c+1==5)ibin=34;
424  else if(l+1==3 && c+1==5)ibin=35;
425  else if(l+1==4 && c+1==6)ibin=36;
426  else if(l+1==5 && c+1==6)ibin=37;
427  else if(l+1==6 && c+1==6)ibin=38;
428  else if(l+1==7 && c+1==6)ibin=39;
429  else if(l+1==8 && c+1==1)ibin=40;
430  else if(l+1==8 && c+1==2)ibin=42;
431  else if(l+1==9 && c+1==1)ibin=41;
432  else if(l+1==9 && c+1==2)ibin=43;
433  h2->GetXaxis()->SetBinLabel(ibin, sst.str().c_str());
434  h2->GetXaxis()->SetBit(TAxis::kLabelsVert);
435  sst.str("");
436  }// Chamber
437  }// Layer
438  }else{//use old bin logically dead code, comment out
439 // for(int l=0 ; l<9 ; l++ ){// Layer
440 // for( int c=0 ; c<nChambers[l] ; c++ ){// Chamber
441 // sst << "L" << l+1 << "_";
442 // if(nChambers[l]==5)sst<<chamber1[c];
443 // else if(nChambers[l]==6)sst<<chamber3[c];
444 // else if(nChambers[l]==2)sst<<chamberE[c];
445 // h2->GetXaxis()->SetBinLabel(ibin, sst.str().c_str());
446 // sst.str(""); ibin++;
447 // }// Chamber
448 // }// Layer
449 // h2->GetXaxis()->LabelsOption("v");
450  }
451  // Name Phi Sectors
452  for(int isec=1;isec<=12;isec++){// Sector
453  for(int iphi=0;iphi<=3;iphi+=4){// Phi number
454  if(ac==0||ac==1)sst << AC[ac];
455  if(isec<10)sst << "0";
456  sst << isec << "phi" << iphi;
457  ibin=(isec-1)*4+iphi+1;
458  h2->GetYaxis()->SetBinLabel(ibin, sst.str().c_str());
459  sst.str("");
460  }// Phi number
461  }// Sector
462 }// End of function

◆ lbAverageInteractionsPerCrossing()

float ManagedMonitorToolBase::lbAverageInteractionsPerCrossing ( const EventContext &  ctx = Gaudi::Hive::currentContext()) const
virtualinherited

Average mu, i.e.

<mu>

Definition at line 1693 of file ManagedMonitorToolBase.cxx.

1695 {
1696  if (!m_lumiDataKey.empty()) {
1698  return lumi->lbAverageInteractionsPerCrossing();
1699  } else {
1700  //ATH_MSG_FATAL("! Luminosity tool has been disabled ! lbAverageInteractionsPerCrossing() can't work properly! ");
1701  ATH_MSG_DEBUG("Warning: lbAverageInteractionsPerCrossing() - luminosity tools are not retrieved or turned on (i.e. EnableLumi = False)");
1702  return -1.0;
1703  }
1704  // not reached
1705 }

◆ lbAverageLivefraction()

float ManagedMonitorToolBase::lbAverageLivefraction ( const EventContext &  ctx = Gaudi::Hive::currentContext()) const
virtualinherited

Average luminosity livefraction.

Definition at line 1762 of file ManagedMonitorToolBase.cxx.

1764 {
1766  return 1.0;
1767 
1770  return live->lbAverageLiveFraction();
1771  } else {
1772  //ATH_MSG_FATAL("! Luminosity tool has been disabled ! lbAverageLivefraction() can't work properly! ");
1773  ATH_MSG_DEBUG("Warning: lbAverageLivefraction() - luminosity not availble (i.e. EnableLumi = False)");
1774  return -1.0;
1775  }
1776  // not reached
1777 }

◆ lbAverageLuminosity()

float ManagedMonitorToolBase::lbAverageLuminosity ( const EventContext &  ctx = Gaudi::Hive::currentContext()) const
virtualinherited

Average luminosity (in ub-1 s-1 => 10^30 cm-2 s-1)

Definition at line 1729 of file ManagedMonitorToolBase.cxx.

1731 {
1732  if (!m_lumiDataKey.empty()) {
1734  return lumi->lbAverageLuminosity();
1735  } else {
1736  //ATH_MSG_FATAL("! Luminosity tool has been disabled ! lbAverageLuminosity() can't work properly! ");
1737  ATH_MSG_DEBUG("Warning: lbAverageLuminosity() - luminosity tools are not retrieved or turned on (i.e. EnableLumi = False)");
1738  return -1.0;
1739  }
1740  // not reached
1741 }

◆ lbDuration()

double ManagedMonitorToolBase::lbDuration ( const EventContext &  ctx = Gaudi::Hive::currentContext()) const
virtualinherited

Luminosity block time (in seconds)

Definition at line 1816 of file ManagedMonitorToolBase.cxx.

1818 {
1820  return m_defaultLBDuration;
1821  }
1822  if (!m_lbDurationDataKey.empty()) {
1824  return dur->lbDuration();
1825  } else {
1826  //ATH_MSG_FATAL("! Luminosity tool has been disabled ! lbDuration() can't work properly! ");
1827  ATH_MSG_DEBUG("Warning: lbDuration() - luminosity tools are not retrieved or turned on (i.e. EnableLumi = False)");
1828  return m_defaultLBDuration;
1829  }
1830  // not reached
1831 }

◆ lbInteractionsPerCrossing()

float ManagedMonitorToolBase::lbInteractionsPerCrossing ( const EventContext &  ctx = Gaudi::Hive::currentContext()) const
virtualinherited

Instantaneous number of interactions, i.e.

mu

Definition at line 1709 of file ManagedMonitorToolBase.cxx.

1711 {
1712  if (!m_lumiDataKey.empty()) {
1714  float muToLumi = lumi->muToLumi();
1715  if (muToLumi > 0) {
1716  return lumi->lbLuminosityPerBCIDVector().at (ctx.eventID().bunch_crossing_id()) / muToLumi;
1717  }
1718  return 0;
1719  } else {
1720  //ATH_MSG_FATAL("! Luminosity tool has been disabled ! lbInteractionsPerCrossing() can't work properly! ");
1721  ATH_MSG_DEBUG("Warning: lbInteractionsPerCrossing() - luminosity tools are not retrieved or turned on (i.e. EnableLumi = False)");
1722  return -1.0;
1723  }
1724  // not reached
1725 }

◆ lbLuminosityPerBCID()

float ManagedMonitorToolBase::lbLuminosityPerBCID ( const EventContext &  ctx = Gaudi::Hive::currentContext()) const
virtualinherited

Instantaneous luminosity.

Definition at line 1745 of file ManagedMonitorToolBase.cxx.

1747 {
1748  if (!m_lumiDataKey.empty()) {
1750  return lumi->lbLuminosityPerBCIDVector().at (ctx.eventID().bunch_crossing_id());
1751  } else {
1752  //ATH_MSG_FATAL("! Luminosity tool has been disabled ! lbLuminosityPerBCID() can't work properly! ");
1753  ATH_MSG_DEBUG("Warning: lbLuminosityPerBCID() - luminosity tools are not retrieved or turned on (i.e. EnableLumi = False)");
1754  return -1.0;
1755  }
1756  // not reached
1757 }

◆ lbLumiWeight()

double ManagedMonitorToolBase::lbLumiWeight ( const EventContext &  ctx = Gaudi::Hive::currentContext()) const
virtualinherited

Average Integrated Luminosity Live Fraction.

Definition at line 1800 of file ManagedMonitorToolBase.cxx.

1802 {
1803  if (!m_lumiDataKey.empty()) {
1804  return (lbAverageLuminosity(ctx)*lbDuration(ctx))*lbAverageLivefraction(ctx);
1805  } else{
1806  //ATH_MSG_FATAL("! Luminosity tool has been disabled ! lbLumiWeight() can't work properly! ");
1807  ATH_MSG_DEBUG("Warning: lbLumiWeight() - luminosity tools are not retrieved or turned on (i.e. EnableLumi = False)");
1808  return -1.0;
1809  }
1810  // not reached
1811 }

◆ livefractionPerBCID()

float ManagedMonitorToolBase::livefractionPerBCID ( const EventContext &  ctx = Gaudi::Hive::currentContext()) const
virtualinherited

Livefraction per bunch crossing ID.

Definition at line 1781 of file ManagedMonitorToolBase.cxx.

1783 {
1785  return 1.0;
1786 
1789  return live->l1LiveFractionVector().at (ctx.eventID().bunch_crossing_id());
1790  } else {
1791  //ATH_MSG_FATAL("! Luminosity tool has been disabled ! livefractionPerBCID() can't work properly! ");
1792  ATH_MSG_DEBUG("Warning: livefractionPerBCID() - luminosity retrieved available (i.e. EnableLumi = False)");
1793  return -1.0;
1794  }
1795  // not reached
1796 }

◆ maphists()

void MdtVsTgcRawDataValAlg::maphists ( const xAOD::MuonSegmentContainer m_newsegment,
const Muon::TgcPrepDataContainer tgc_prepcontainer 
)
private

Definition at line 38 of file MdtVsTgcRawData_maptgchits.cxx.

39  {//use new mdt segment
40  ATH_MSG_DEBUG("inside maptgchits" );
41 
43  // loop over MDT Segment Collection
44  xAOD::MuonSegmentContainer::const_iterator mdtseg_itr = newsegment->begin();
45  xAOD::MuonSegmentContainer::const_iterator mdtseg_end = newsegment->end();
46  for(; mdtseg_itr!=mdtseg_end; ++mdtseg_itr){
47  if(!(*mdtseg_itr)->muonSegment().isValid())continue;
48  // Get segm
49  const Muon::MuonSegment* segm = dynamic_cast<const Muon::MuonSegment*>(*(*mdtseg_itr)->muonSegment());
50  if (segm == nullptr) {
51  ATH_MSG_ERROR( "no pointer to segm!!!" );
52  break;
53  }
54  // Initialize variables
55  int stationName=0;
56  int nMdtMeas[4] = {0,0,0,0};
57  bool isMdt=false, isEndcap=false;
58 
59  // Loop through contained ROTs and count used MDT and TGC stations
60  for(unsigned int i=0;i<segm->numberOfContainedROTs();++i){
61  // Get station information
62  const Trk::RIO_OnTrack* rio = segm->rioOnTrack(i);
63  if(!rio) continue;
64  Identifier id = rio->identify();
65  stationName = int(m_idHelperSvc->mdtIdHelper().stationName(id));
66  // Flag Segments with ROTs in the MDT & Endcap
67  if(m_idHelperSvc->isMdt(id))isMdt=true;
68  if(m_idHelperSvc->isEndcap(id))isEndcap=true;
69  // If ROT is MDT
70  if((stationName==13)||(stationName==49)){nMdtMeas[0]++;}
71  if((stationName==14)||(stationName==15)){nMdtMeas[1]++;}
72  if((stationName==17)||(stationName==18)){nMdtMeas[2]++;}
73  if((stationName==20)||(stationName==21)){nMdtMeas[3]++;}
74  }
75  if(!isMdt)continue;
76  if(!isEndcap)continue;
77 
78  // Establish which MDT stations the Segment is in
79  int nStations = 0;
80  for(int jMDT=0;jMDT<4;jMDT++){
81  if(nMdtMeas[jMDT]){
82  nStations++;
83  }
84  }
85  // Check that the Segment only occupies one Station
86  if(nStations!=1)continue;
87 
88  // Get Position pointer and segmAC index
89  const Amg::Vector3D segmGlobalPos = segm->globalPosition();
90  int segmAC = (segmGlobalPos.z()<0);// a:0, c:1
91 
92  // Fill MDT data
93  for(int jMDT=0;jMDT<4;jMDT++){// jMDT
94  if(nMdtMeas[jMDT]){// If hits in this Station
95  // Get position variables
96  float segmGlobalEta = std::abs(segmGlobalPos.eta());
97  float segmGlobalPhi = segmGlobalPos.phi();
98  if(segmGlobalPhi<0) segmGlobalPhi+=2*M_PI;
99  // Fill position histogram
100  m_mdt_segmmap[segmAC][jMDT]->Fill(segmGlobalPhi, segmGlobalEta);
101  }// If hits in Station
102  }// jMDT
103  }// MDT Segment Collection
104 
106  //loop over TGC Prep Data container
107  Muon::TgcPrepDataContainer::const_iterator tgc_it_end=tgc_prepcontainer->end();
108  for( Muon::TgcPrepDataContainer::const_iterator tgc_it=tgc_prepcontainer->begin();
109  tgc_it!=tgc_it_end;
110  ++tgc_it){
111 
112  //loop over TGC Prep Data collection
113  Muon::TgcPrepDataCollection::const_iterator tgc_itc_end=(*tgc_it)->end();
114  for( Muon::TgcPrepDataCollection::const_iterator tgc_itc=(*tgc_it)->begin();
115  tgc_itc!= tgc_itc_end;
116  ++tgc_itc){
117  const Muon::TgcPrepData* tpd=*tgc_itc;
118 
119  // Get detector information
120  const MuonGM::TgcReadoutElement *tre = tpd->detectorElement();
121  const std::string tgcStationType = tre->getStationType();
122 
123  // Get detector variables
124  Identifier tgcid=(*tgc_itc)->identify();
125  int tgcStationName = m_idHelperSvc->tgcIdHelper().stationName(tgcid);
126 
127  // Get position variables
128  const Amg::Vector3D tgcGlobalPos = tpd->globalPosition();
129  float tgcGlobalPhi = tgcGlobalPos.phi();
130  if(tgcGlobalPhi<0)tgcGlobalPhi+=2*M_PI;
131 
132  // Cut non-TGC-Endcap
133  if(tgcStationName<41 || tgcStationName>48)continue;
134  }// TGC PRD Collection
135  }// TGC PRD Container
136 
137  return;
138 }// End of function

◆ maphistsfinalize()

void MdtVsTgcRawDataValAlg::maphistsfinalize ( )
private

Definition at line 141 of file MdtVsTgcRawData_maptgchits.cxx.

141  {
142 
143 }// End of function

◆ MatchMDTSegments()

void MdtVsTgcRawDataValAlg::MatchMDTSegments ( std::vector< const Muon::MuonSegment * >(&)  sortedSegments[2][4],
std::vector< const Muon::MuonSegment * >(&)  disqualifiedSegments[2][4],
std::vector< SegmTrack >(&)  matchedSegments[2] 
)
private

Definition at line 33 of file MdtVsTgcRawData_SegmMatching.cxx.

35  {// Define Cuts:
36  // Cut for matching Segments
37  const float dRhoCutSegmentMatching = 1000;
38  const float dPhiCutSegmentMatching = M_PI/8;
39  const float dPhiCutSegmentDirectionChecking[4][4]={{ 0,M_PI/8, 0.1, 0.01},
40  {M_PI/8, 0,M_PI/8,M_PI/8},
41  { 0.06,M_PI/8, 0, 0.01},
42  { 0.05,M_PI/8, 0.05, 0}};
43  const float dTheCutSegmentDirectionChecking[4][4]={{ 0,M_PI/8, 0.05, 0.06},
44  {M_PI/8, 0,M_PI/8,M_PI/8},
45  { 0.04,M_PI/8, 0, 0.005},
46  { 0.02,M_PI/8, 0.005, 0}};
47  // Loop over sides
48  for(int i=0;i<2;i++){// AC
49  bool skipSegm;int nDisqualifiedSegm; // used when checking the disqualified list for a segment
50  //bool HasStationMatchSegm[4] = {false, false, false, false};// flags for whether the there are segments in each MDT station which were included in tracks
51  //bool HasMatchedTrack = false;// flag for whether a track was found on current side
52 
53  for(int jMDT1=3;jMDT1>=0;jMDT1--){// MDT Stations in reverse]
54  // Get number of segments
55  int nSegm1=sortedSegments[i][jMDT1].size();
56 
57  // Loop over Segments in Station
58  for(int n1=0; n1<nSegm1;n1++){
59  // Get segment
60  const Muon::MuonSegment *segm1 = sortedSegments[i][jMDT1].at(n1);
61 
62  // Check disqualifiedSegments for current segment
63  skipSegm=false;
64  nDisqualifiedSegm=disqualifiedSegments[i][jMDT1].size();
65  for(int ndis=0;ndis<nDisqualifiedSegm;ndis++)if(segm1==disqualifiedSegments[i][jMDT1].at(ndis))skipSegm=true;
66  if(skipSegm)continue;
67 
68  // Get position variables
69  const Amg::Vector3D segm1Pos = segm1->globalPosition();
70 
71  float segm1PosPhi = segm1Pos.phi();
72  float segm1PosZ = segm1Pos.z();
73  if(segm1PosPhi<0)segm1PosPhi+=2*M_PI;
74  Amg::Vector3D segm1PosZunit(segm1Pos/std::abs(segm1PosZ));
75  Amg::Vector3D segm1Dir = segm1->globalDirection();
76 
77  float segm1DirThe = segm1Dir.theta();
78  float segm1DirPhi = segm1Dir.phi();
79  if(segm1DirThe>M_PI/2) segm1DirThe=M_PI-segm1DirThe;
80  if(segm1DirPhi<0) segm1DirPhi+=2*M_PI;
81 
82  // Initialise segment matching variables
83  bool stationMatchFound[4] = {false,false,false,false};
84  std::vector<const Muon::MuonSegment*> matchingSegments[4];
85  for(int jMDT2=0;jMDT2<4;jMDT2++)matchingSegments[jMDT2] = std::vector<const Muon::MuonSegment*>();
86  matchingSegments[jMDT1].push_back(segm1);
87  int nStationMatch=0;
88 
89  for(int jMDT2=3;jMDT2>=0;jMDT2--){// MDT Station in reverse
90  // Get number of segments
91  int nSegm2=sortedSegments[i][jMDT2].size();
92 
93  // Loop over Segments in Station
94  for(int n2=0; n2<nSegm2;n2++){
95  // Get segment
96  const Muon::MuonSegment *segm2 = sortedSegments[i][jMDT2].at(n2);
97  if(segm1==segm2)continue; //do not compare same segments
98 
99  // Check disqualifiedSegments for current segment
100  skipSegm = false;
101  nDisqualifiedSegm=disqualifiedSegments[i][jMDT2].size();
102  for(int ndis=0;ndis<nDisqualifiedSegm;ndis++)if(segm1==disqualifiedSegments[i][jMDT2].at(ndis))skipSegm=true;
103  if(skipSegm)continue;
104 
106  // Position Cut
107  // Fill position variables
108  const Amg::Vector3D segm2Pos = segm2->globalPosition();
109 
110  float segm2PosRho = std::abs(segm2Pos.perp());
111  float segm2PosPhi = segm2Pos.phi();
112  float segm2PosThe = segm2Pos.theta();
113  float segm2PosZ = segm2Pos.z();
114  if(segm2PosThe>M_PI/2) segm2PosThe=M_PI-segm2PosThe;
115  if(segm2PosPhi<0)segm2PosPhi+=2*M_PI;
116  Amg::Vector3D segm2PosZunit(segm2Pos/std::abs(segm2PosZ));
117 
118  // Apply preliminary phi cut between segm1 and segm2 positions
119  float dPhi_Segm1_Segm2 = segm1PosPhi-segm2PosPhi;
120  if(dPhi_Segm1_Segm2<-M_PI)dPhi_Segm1_Segm2+=2*M_PI;
121  if(dPhi_Segm1_Segm2> M_PI)dPhi_Segm1_Segm2-=2*M_PI;
122  if(std::abs(dPhi_Segm1_Segm2)>dPhiCutSegmentMatching)continue;
123 
124  // Extrapolate segm1 position to segm2's Z position
125  float dZ = std::abs(segm2PosZ)-std::abs(segm1PosZ);
126  Amg::Vector3D extrPos(segm1Pos+(segm1PosZunit*dZ));
127 
128  float extrPosRho = std::abs(extrPos.perp());
129  float extrPosThe = extrPos.theta();
130  float extrPosPhi = extrPos.phi();
131  if(extrPosThe>M_PI/2) extrPosThe=M_PI-extrPosThe;
132  if(extrPosPhi<0)extrPosPhi+=2*M_PI;
133 
134  // Get differences between extrapolated and segm2 positions
135  float dRho_Extr_Segm2 = extrPosRho-segm2PosRho;
136  float dPhi_Extr_Segm2 = extrPosPhi-segm2PosPhi;
137  float dThe_Extr_Segm2 = extrPosThe-segm2PosThe;
138  if(dPhi_Extr_Segm2<-M_PI)dPhi_Extr_Segm2+=2*M_PI;
139  if(dPhi_Extr_Segm2> M_PI)dPhi_Extr_Segm2-=2*M_PI;
140 
141  // Fill difference histograms
142  if(m_mdt_segmmatchsag[i][jMDT1][jMDT2][0]) m_mdt_segmmatchsag[i][jMDT1][jMDT2][0]->Fill(dRho_Extr_Segm2);
143  if(m_mdt_segmmatchsag[i][jMDT1][jMDT2][2]) m_mdt_segmmatchsag[i][jMDT1][jMDT2][2]->Fill(dPhi_Extr_Segm2);
144  if(m_mdt_segmmatchsag[i][jMDT1][jMDT2][3]) m_mdt_segmmatchsag[i][jMDT1][jMDT2][3]->Fill(dThe_Extr_Segm2);
145 
146  // Cut segments (segm2) which are outside difference cuts
147  if(std::abs(dPhi_Extr_Segm2)>dPhiCutSegmentMatching)continue;
148  if(std::abs(dRho_Extr_Segm2)>dRhoCutSegmentMatching)continue;
149 
151  // Direction Cut
152  // Fill direction variables
153  //const Trk::GlobalDirection segm2Dir = segm2->globalDirection();
154  const Amg::Vector3D segm2Dir = segm2->globalDirection();
155 
156  float segm2DirThe = segm2Dir.theta();
157  float segm2DirPhi = segm2Dir.phi();
158  if(segm2DirThe>M_PI/2) segm2DirThe=M_PI-segm2DirThe;
159  if(segm2DirPhi<0) segm2DirPhi+=2*M_PI;
160 
161  // Vector Method
162  // Make vector between segment positions
163  //Trk::GlobalDirection segmVector;
164  Amg::Vector3D segmVector;
165 
166  if(jMDT2>jMDT1)segmVector = segm2Pos-segm1Pos;
167  else segmVector = segm1Pos-segm2Pos;
168  float segmVecThe = segmVector.theta();
169  float segmVecPhi = segmVector.phi();
170  if(segmVecThe>M_PI/2) segmVecThe=M_PI-segmVecThe;
171  if(segmVecPhi<0) segmVecPhi+=2*M_PI;
172 
173  // Get difference between vector direction and segment directions
174  float dThe_Vec_Segm1 = segmVecThe-segm1DirThe;
175  float dPhi_Vec_Segm1 = segmVecPhi-segm1DirPhi;
176  if(dPhi_Vec_Segm1<-M_PI)dPhi_Vec_Segm1+=2*M_PI;
177  if(dPhi_Vec_Segm1> M_PI)dPhi_Vec_Segm1-=2*M_PI;
178  float dThe_Vec_Segm2 = segmVecThe-segm2DirThe;
179  float dPhi_Vec_Segm2 = segmVecPhi-segm2DirPhi;
180  if(dPhi_Vec_Segm2<-M_PI)dPhi_Vec_Segm2+=2*M_PI;
181  if(dPhi_Vec_Segm2> M_PI)dPhi_Vec_Segm2-=2*M_PI;
182 
183  // Fill histograms
184  if(jMDT1>jMDT2){
185  if(m_mdt_trackchecksag[i][jMDT2][jMDT1][2][0]) m_mdt_trackchecksag[i][jMDT2][jMDT1][2][0]->Fill(dPhi_Vec_Segm2);
186  if(m_mdt_trackchecksag[i][jMDT2][jMDT1][3][0]) m_mdt_trackchecksag[i][jMDT2][jMDT1][3][0]->Fill(dThe_Vec_Segm2);
187  if(m_mdt_trackchecksag[i][jMDT2][jMDT1][2][1]) m_mdt_trackchecksag[i][jMDT2][jMDT1][2][1]->Fill(dPhi_Vec_Segm1);
188  if(m_mdt_trackchecksag[i][jMDT2][jMDT1][3][1]) m_mdt_trackchecksag[i][jMDT2][jMDT1][3][1]->Fill(dThe_Vec_Segm1);
189  }
190  else if(jMDT1<jMDT2){
191  if(m_mdt_trackchecksag[i][jMDT1][jMDT2][2][0]) m_mdt_trackchecksag[i][jMDT1][jMDT2][2][0]->Fill(dPhi_Vec_Segm1);
192  if(m_mdt_trackchecksag[i][jMDT1][jMDT2][3][0]) m_mdt_trackchecksag[i][jMDT1][jMDT2][3][0]->Fill(dThe_Vec_Segm1);
193  if(m_mdt_trackchecksag[i][jMDT1][jMDT2][2][1]) m_mdt_trackchecksag[i][jMDT1][jMDT2][2][1]->Fill(dPhi_Vec_Segm2);
194  if(m_mdt_trackchecksag[i][jMDT1][jMDT2][3][1]) m_mdt_trackchecksag[i][jMDT1][jMDT2][3][1]->Fill(dThe_Vec_Segm2);
195  }
196 
197  // Direction Comparison Method
198  float dTheDir_Segm1_Segm2 = segm1DirThe-segm2DirThe;
199  float dPhiDir_Segm1_Segm2 = segm1PosPhi-segm2PosPhi;
200  if(dPhiDir_Segm1_Segm2<-M_PI)dPhiDir_Segm1_Segm2+=2*M_PI;
201  if(dPhiDir_Segm1_Segm2> M_PI)dPhiDir_Segm1_Segm2-=2*M_PI;
202  if(m_mdt_trackdirdirsag[i][jMDT1][jMDT2][2]) m_mdt_trackdirdirsag[i][jMDT1][jMDT2][2]->Fill(dTheDir_Segm1_Segm2);
203  if(m_mdt_trackdirdirsag[i][jMDT1][jMDT2][3]) m_mdt_trackdirdirsag[i][jMDT1][jMDT2][3]->Fill(dPhiDir_Segm1_Segm2);
204  // Cut using Vector Method
205  if(dPhi_Vec_Segm1>dPhiCutSegmentDirectionChecking[jMDT1][jMDT2] ||
206  dThe_Vec_Segm1>dTheCutSegmentDirectionChecking[jMDT1][jMDT2] ||
207  dPhi_Vec_Segm2>dPhiCutSegmentDirectionChecking[jMDT2][jMDT1] ||
208  dThe_Vec_Segm2>dTheCutSegmentDirectionChecking[jMDT2][jMDT1]) continue;
209 
210  // Match is found, increment counter and assign segm2 to match found array
211  matchingSegments[jMDT2].push_back(segm2);
212  }// nSegms2
213 
214  if(matchingSegments[jMDT2].size()==1){
215  stationMatchFound[jMDT2]=true;
216  nStationMatch++;
217  }
218  }// Reverse MDT Stations2
219 
220  // If matches found add to matchedSegments and disqualify all segments in array
221  if(nStationMatch>1){
222  //HasMatchedTrack=true;
223  const Muon::MuonSegment *segmArray[4] = {nullptr,nullptr,nullptr,nullptr};
224  for(int jMDT2=0;jMDT2<4;jMDT2++){
225  if(stationMatchFound[jMDT2]){
226  segmArray[jMDT2]=matchingSegments[jMDT2].at(0);
227  //HasStationMatchSegm[jMDT2]=true;
228  disqualifiedSegments[i][jMDT2].push_back(matchingSegments[jMDT2].at(0));
229  }
230  }
231  SegmTrack newTrack(segmArray);
232  matchedSegments[i].push_back(newTrack);
233  }// If Matched Track Found
234 
235  }// nSegms1
236  }// Reverse MDT Stations1
237 
238  }// AC
239 
240  return;
241 }// End of function

◆ MidstationOnlyCheck()

void MdtVsTgcRawDataValAlg::MidstationOnlyCheck ( std::vector< const Muon::MuonSegment * >(&)  sortedSegments[2][4],
std::vector< const Muon::MuonSegment * >(&)  disqualifiedSegments[2][4],
const Muon::TgcPrepDataContainer tgc_prepcontainer 
)
private

Definition at line 34 of file MdtVsTgcRawData_MidstationMatching.cxx.

36  {
37  // Define Cuts:
38  // Cut for matching Segments
39  const float dRhoCutSegmentMatching = 1000;
40  const float dPhiCutSegmentMatching = M_PI/8;
41 
42  // Cuts for number of Mdt Measurements required for Midstation only track
43  const int nMeasCutMdtMidstation = 5;
44  const int nMeasCutTGCMidPRD[2] = {2,2};
45 
46  // Loose cut for PRD and Extrapolated
47  const float dPhiCut_Loose = M_PI/8;
48  // Cut for Global Position Efficiencies
49  const float dPhiCutGlobal[2] = {static_cast<float>(M_PI/24),static_cast<float>(M_PI/12)};//[WireStrip]
50  const float dRhoCutGlobal[2] = { 0.08, 0.5};//[WireStrip]
51  // Cut for Sector Efficiencies
52  const float dPhiCutSector[2] = { 0.2, 0.1};//[WireStrip]
53  const float dRhoCutSector[2] = { 300, 3000};//[WireStrip]
54  // Cut for TgcPrepData comparison
55  const float dPhiCutTPD[2] = { 0.15, 0.02};//[WireStrip]
56  const float dRhoCutTPD[2] = { 150, 3000};//[WireStrip]
57 
58  // Loop over sides
59  for(int i=0;i<2;i++){// AC
60  // Number of Segments found which passed all cuts
61  int nValidatedSegm = 0;
62 
63  // Following "Fill" variables are only used if one segment passed all cuts
64  // Flags for whether different stations can be checked by the segment
65  //bool canCheckGlobalFill[4] = {0, 0, 0, 0};
66  bool canCheckSectorFill[4] = {0, 0, 0, 0};
67  // Segment Global Position variables
68  // float posThetaFill = 0;
69  // float posPhiFill = 0;
70  // Segment Sector Position
71  int TGCstation_StationFEFill[4] = {-1,-1,-1,-1};// [TGCStation]
72  int TGCstation_StationEtaFill[4] = { 0, 0, 0, 0};// [TGCStation]
73  int TGCstation_StationPhiFill[4] = { 0, 0, 0, 0};// [TGCStation]
74  // Hit registered arrays
75  // bool hitregisteredFill[9][2] = {{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}};
76  bool sectorhitregisteredFill[9][2] = {{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}};
77 
78  bool skipSegm;int nDisqualifiedSegm; // used when checking the disqualified list for a segment
79 
80  // Make copy of disqualifiedSegment vector array
81  std::vector<const Muon::MuonSegment*> copyDisqualifiedSegments;
82  nDisqualifiedSegm=disqualifiedSegments[i][2].size();
83  copyDisqualifiedSegments.reserve(nDisqualifiedSegm);
84 for(int ndis=0;ndis<nDisqualifiedSegm;ndis++)copyDisqualifiedSegments.push_back(disqualifiedSegments[i][2].at(ndis));
85 
87  // Apply preliminary nMdtMeas Cut
88  int nSegm = sortedSegments[i][2].size();
89  for(int n0=0; n0<nSegm;n0++){
90  // Get segment
91  const Muon::MuonSegment *segm0 = sortedSegments[i][2].at(n0);
92 
93  // Check copyDisqualifiedSegments for current segment
94  skipSegm=false;
95  nDisqualifiedSegm=copyDisqualifiedSegments.size();
96  for(int ndis=0;ndis<nDisqualifiedSegm;ndis++)if(segm0==copyDisqualifiedSegments.at(ndis))skipSegm=true;
97  if(skipSegm)continue;
98 
99  // Apply nMDTMeasurements Cut to Segment Collection
100  int stationName = 0;
101  int nMdtMeas = 0;
102  // Loop through contained ROTs and identify used stations
103  for(unsigned int iROT=0; iROT<segm0->numberOfContainedROTs(); ++iROT) {
104  const Trk::RIO_OnTrack* rio = segm0->rioOnTrack(iROT);
105  if(!rio) continue;
106  Identifier id = rio->identify();
107  stationName = int(m_idHelperSvc->mdtIdHelper().stationName(id));
108 
109  if((stationName==17)||(stationName==18))nMdtMeas++;// MDT
110  }
111  // Cut Segments with insufficient numbers of hits in the stations
112  if(nMdtMeas<nMeasCutMdtMidstation){
113  copyDisqualifiedSegments.push_back(segm0);
114  }
115  }
116 
117  // Loop over Segments in MidStation
118  for(int n1=0; n1<nSegm;n1++){
120  // Start operation on Segment
121  // Get segment
122  const Muon::MuonSegment *segm1 = sortedSegments[i][2].at(n1);
123 
124  // Check copyDisqualifiedSegments for current segment
125  skipSegm=false;
126  nDisqualifiedSegm=copyDisqualifiedSegments.size();
127  for(int ndis=0;ndis<nDisqualifiedSegm;ndis++)if(segm1==copyDisqualifiedSegments.at(ndis))skipSegm=true;
128  if(skipSegm)continue;
129 
130  // Flag for Grouping cut
131  bool failedGroupingCut = false;
132  // Flags for whether different stations can be checked by the segment
133  bool canCheckGlobal[4] = {true, true, true, false};
134  bool canCheckSector[4] = {true, true, true, false};
135 
136  // Get position variables
137  //const Trk::GlobalPosition segm1Pos = segm1->globalPosition();
138  const Amg::Vector3D segm1Pos = segm1->globalPosition();
139 
140  float segm1PosPhi = segm1Pos.phi();
141  float segm1PosThe = segm1Pos.theta();
142  float segm1PosZ = segm1Pos.z();
143  if(segm1PosPhi<0)segm1PosPhi+=2*M_PI;
144  if(segm1PosThe>M_PI/2) segm1PosThe=M_PI-segm1PosThe;
145  Amg::Vector3D segm1PosZunit(segm1Pos/std::abs(segm1PosZ));
146 
147 
149  // Apply nTGCStripMeasurements Cut to canCheck arrays
150  int stationName = 0;
151  int nTGCStrips[4] = { 0, 0, 0, 0};
152  // Loop through contained ROTs and identify used stations
153  for(unsigned int iROT=0; iROT<segm1->numberOfContainedROTs(); ++iROT){
154  const Trk::RIO_OnTrack* rio = segm1->rioOnTrack(iROT);
155  if(!rio) continue;
156  Identifier id = rio->identify();
157  stationName = int(m_idHelperSvc->mdtIdHelper().stationName(id));
158  bool isStrip = m_idHelperSvc->tgcIdHelper().isStrip(id);
159 
160  if(((stationName==41)||(stationName==42))&&isStrip)nTGCStrips[0]++;// TGC
161  if(((stationName==43)||(stationName==44))&&isStrip)nTGCStrips[1]++;// TGC
162  if(((stationName==45)||(stationName==46))&&isStrip)nTGCStrips[2]++;// TGC
163  if(((stationName==47)||(stationName==48))&&isStrip)nTGCStrips[3]++;// TGC
164  }
165 
166  // Don't check mid-stations when there are no strips in other mid-stations
167  if((nTGCStrips[1]==0)&&(nTGCStrips[2]==0)){canCheckSector[0]=false;canCheckGlobal[0]=false;}
168  if((nTGCStrips[0]==0)&&(nTGCStrips[2]==0)){canCheckSector[1]=false;canCheckGlobal[1]=false;}
169  if((nTGCStrips[0]==0)&&(nTGCStrips[1]==0)){canCheckSector[2]=false;canCheckGlobal[2]=false;}
170 
171 
173  // Do Grouping Cut
174  // Ignore any segments which are too close to any other segments not in the original disqualified list
175  for(int n2=0; n2<nSegm;n2++){
176  if(n1==n2)continue; // don't compare segment to itself
177  // Get segment
178  const Muon::MuonSegment *segm2 = sortedSegments[i][2].at(n2);
179 
180  // Check disqualifiedSegments for current segment
181  skipSegm=false;
182  nDisqualifiedSegm=disqualifiedSegments[i][2].size();
183  for(int ndis=0;ndis<nDisqualifiedSegm;ndis++)if(segm1==disqualifiedSegments[i][2].at(ndis))skipSegm=true;
184  if(skipSegm)continue;
185 
186  // Get position variables
187  const Amg::Vector3D segm2Pos = segm2->globalPosition();
188  float segm2PosRho = std::abs(segm2Pos.perp());
189  float segm2PosPhi = segm2Pos.phi();
190  float segm2PosZ = segm2Pos.z();
191  if(segm2PosPhi<0)segm2PosPhi+=2*M_PI;
192  Amg::Vector3D segm2PosZunit(segm2Pos/std::abs(segm2PosZ));
193 
194  // Apply preliminary phi cut between segm1 and segm2 positions
195  float dPhi_Segm1_Segm2 = segm1PosPhi-segm2PosPhi;
196  if(dPhi_Segm1_Segm2<-M_PI)dPhi_Segm1_Segm2+=2*M_PI;
197  if(dPhi_Segm1_Segm2> M_PI)dPhi_Segm1_Segm2-=2*M_PI;
198  if(std::abs(dPhi_Segm1_Segm2)<dPhiCutSegmentMatching){
199  failedGroupingCut=true;
200  break;
201  }
202 
203  // Extrapolate segm1 position to segm2's Z position
204  float dZ = std::abs(segm2PosZ)-std::abs(segm1PosZ);
205  Amg::Vector3D extrPos(segm1Pos+(segm1PosZunit*dZ));
206  float extrPosRho = std::abs(extrPos.perp());
207  float extrPosThe = extrPos.theta();
208  float extrPosPhi = extrPos.phi();
209  if(extrPosThe>M_PI/2) extrPosThe=M_PI-extrPosThe;
210  if(extrPosPhi<0)extrPosPhi+=2*M_PI;
211 
212  // Get differences between extrapolated and segm2 positions
213  float dRho_Extr_Segm2 = extrPosRho-segm2PosRho;
214  float dPhi_Extr_Segm2 = extrPosPhi-segm2PosPhi;
215  if(dPhi_Extr_Segm2<-M_PI)dPhi_Extr_Segm2+=2*M_PI;
216  if(dPhi_Extr_Segm2> M_PI)dPhi_Extr_Segm2-=2*M_PI;
217 
218  // Cut segments (segm1) which are inside difference cuts
219  if((std::abs(dPhi_Extr_Segm2)<dPhiCutSegmentMatching)||
220  (std::abs(dRho_Extr_Segm2)<dRhoCutSegmentMatching)){
221  failedGroupingCut=true;
222  break;
223  }
224  }// nSegm2
225  if(failedGroupingCut)continue;
226 
228  // Check track against TGC Sectors to find which it passes
229  // Initialize variables for TRE array search
230  int TGCStationNames[8] ={41, 42, 43, 44, 45, 46, 47, 48};
231  int TGCstation_StationFE[4] ={-1,-1,-1,-1};// [TGCStation]
232  int TGCstation_StationEta[4]={ 0, 0, 0, 0};// [TGCStation]
233  int TGCstation_StationPhi[4]={ 0, 0, 0, 0};// [TGCStation]
234  int nStationMatch[4] ={ 0, 0, 0, 0};// [TGCStation]
235 
236  // Loop through TRE array, finding sectors which match the track in each layer
237  for(int stationnameindex=0; stationnameindex<6; stationnameindex++){// Station {T1F,T1E,T2F,T2E,T3F,T3E}
238  // Skip stations which don't have sufficient Segments to run efficiency check
239  int stationName = TGCStationNames[stationnameindex];
240  int stationIndex= TGCstationname2stationindex(stationName);
241 
242  // Loop over StationEta&StationPhi
243  for(int stationeta=1; stationeta<=8; stationeta++){// AbsStationEta
244  for(int stationphi=1; stationphi<=48; stationphi++){// StationPhi
245  // Cut Station EtaPhi combinations with no TGC element
246  if(m_TREarray[stationnameindex][i][stationeta][stationphi]==nullptr)continue;
247  const MuonGM::TgcReadoutElement *tre=m_TREarray[stationnameindex][i][stationeta][stationphi];
248 
249  // Extrapolate position from nearest Station's Segment to Sector's Z
250  float sectorZ=tre->globalPosition().z();
251  float dZ_sector=std::abs(sectorZ)-std::abs(segm1PosZ);
252  //Trk::GlobalPosition sectorExtrapolatedPos = segm1Pos+(segm1PosZunit*dZ_sector);
253  Amg::Vector3D sectorExtrapolatedPos = segm1Pos+(segm1PosZunit*dZ_sector);
254 
255  // Convert extrapolated position to local position on the Sector
256  Identifier sector_id=tre->identify();
257  //const HepGeom::Point3D<double> sectorLocalPos3D=tre->globalToLocalCoords(sectorExtrapolatedPos, sector_id);
258  const Amg::Vector3D sectorLocalPos3D=tre->globalToLocalTransf(sector_id) * sectorExtrapolatedPos;
259  //Trk::LocalPosition sectorLocalPos2D(sectorLocalPos3D.y(),sectorLocalPos3D.z());
260  Amg::Vector2D sectorLocalPos2D(sectorLocalPos3D.y(),sectorLocalPos3D.z());
261 
262  double avWidth = (tre->getLongSsize()+tre->getSsize())/2;
263  //double dWidth = (tre->longWidth()-tre->shortWidth());
264  double length = tre->length();
265 
266  // Cut sectors which the track does not go through the central 80% of (avoids double counts)
267  double tol1=-0.1*(avWidth/2);
268  double tol2=-0.1*(length/2);
269 
270  bool insideSectorBounds=tre->bounds().inside(sectorLocalPos2D,tol1,tol2);
271  if(!insideSectorBounds)continue;
272  // Assign values to matching station variables
273  if(stationIndex<0) continue;
274  TGCstation_StationFE[stationIndex]= (tre->isForward()==false);
275  TGCstation_StationEta[stationIndex]=stationeta;
276  TGCstation_StationPhi[stationIndex]=stationphi;
277  nStationMatch[stationIndex]++;
278  }// StationPhi
279  }// StationEta
280  }// StationName
281 
282  // Don't check stations that don't have exactly 1 match for this track
283  for(int jTGC=0;jTGC<4;jTGC++){// TGC Station
284  if(nStationMatch[jTGC]==0){
285  canCheckSector[jTGC]=false;
286  }
287  else if(nStationMatch[jTGC]>1){
288  canCheckSector[jTGC]=false;
289  // Should be impossible, but happens due a problem with the bounds().inside function
290  // commenting out until this bug is resolved
291  //m_log << MSG::WARNING << "MidstationOnly: Number of matches for TGC" << jTGC+1 << " is " << nStationMatch[jTGC] << endl;
292  }
293  }// TGC Station
294 
295  // Cut Segment if no stations can be checked
296  if((!canCheckGlobal[0])&&(!canCheckGlobal[1])&&(!canCheckGlobal[2])&&(!canCheckGlobal[3]))continue;
298  // Check which PRD matches Segm1
299  // Initialise hit registered arrays
300  bool sectorhitregistered[9][2] = {{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}};
301  std::vector<const Muon::TgcPrepData*> tpdVector[2];
302 
303  // Loop over TGC Prep Data container
304  Muon::TgcPrepDataContainer::const_iterator prepit_end=tgc_prepcontainer->end();
305  for( Muon::TgcPrepDataContainer::const_iterator prepit=tgc_prepcontainer->begin();
306  prepit!=prepit_end;
307  ++prepit){
308 
309  //loop over TGC Prep Data collection
310  Muon::TgcPrepDataCollection::const_iterator prepitc_end=(*prepit)->end();
311  for( Muon::TgcPrepDataCollection::const_iterator prepitc=(*prepit)->begin();
312  prepitc!= prepitc_end;
313  ++prepitc){
314  // Get PRD and variables
315  const Muon::TgcPrepData* tpd=*prepitc;
316  const MuonGM::TgcReadoutElement *tre = tpd->detectorElement();
317  const std::string stationType = tre->getStationType();
318 
319  // Get id values
320  Identifier tgcid=(*prepitc)->identify();
321  int tgcAC=(tre->sideA()==false);//isNotAside a:0, c:1
322  int tgcFE=(tre->isForward()==false);//isNotForward f:0, e:1
323  int tgcWS=(m_idHelperSvc->tgcIdHelper().isStrip(tgcid));//isStrip w=0, s=1
324  int stationName = m_idHelperSvc->tgcIdHelper().stationName(tgcid);
325  int stationEta = std::abs(tre->getStationEta());
326  int stationPhi = tre->getStationPhi();
327  int gasGap = m_idHelperSvc->tgcIdHelper().gasGap(tgcid);
328 
329  // Cut hits except those from same side Midstation
330  if(tgcAC!=i) continue;
331  if(stationName>46 || stationName<41) continue;
332 
333  // Get layer number and stationIndex
335  int stationIndex = TGCstationname2stationindex(stationName);
336  if(stationIndex==3)continue;
337 
338  // Get position variables
339  const Amg::Vector3D prdPos = tpd->globalPosition();
340  float tgcRho = std::abs(prdPos.perp());
341  float tgcPhi = prdPos.phi();
342  float tgcZ = prdPos.z();
343  if(tgcPhi<0)tgcPhi+=2*M_PI;
344 
345  // Extrapolate Segm1 to PRD Z position
346  float dZ = std::abs(tgcZ) - std::abs(segm1PosZ);
347  Amg::Vector3D tgcExtrapolatedPos = ((segm1Pos)+((segm1PosZunit)*dZ));
348 
349  // Get extrapolated variables
350  float tgcExtrRho = std::abs(tgcExtrapolatedPos.perp());
351  float tgcExtrPhi = tgcExtrapolatedPos.phi();
352  if(tgcExtrPhi<0)tgcExtrPhi+=2*M_PI;
353 
354  // Get differences between extrapolated and segm2 positions
355  float dRho = tgcRho-tgcExtrRho;
356  float dPhi = tgcPhi-tgcExtrPhi;
357  if(dPhi<-M_PI)dPhi+=2*M_PI;
358  if(dPhi> M_PI)dPhi-=2*M_PI;
359 
360  // Pass through loose phi cut to eliminate some noise
361  if(std::abs(dPhi)<dPhiCut_Loose){
362  // Fill PRD sagitta histograms
363  if(m_mvt_extrprdsag2[i][stationIndex][tgcFE][tgcWS][0]) m_mvt_extrprdsag2[i][stationIndex][tgcFE][tgcWS][0]->Fill(dRho);
364  if(m_mvt_extrprdsag2[i][stationIndex][tgcFE][tgcWS][2]) m_mvt_extrprdsag2[i][stationIndex][tgcFE][tgcWS][2]->Fill(dPhi);
365 
366  // Do Global check
367  if(canCheckGlobal[stationIndex]){
368  float dRhoCut = dRhoCutGlobal[tgcWS]*tgcExtrRho;
369  if(std::abs(dPhi)<dPhiCutGlobal[tgcWS] && std::abs(dRho)<dRhoCut){
370  }
371  }// global
372 
373  // Add PRD which matches Segm1 position to vector for further analysis
374  if(std::abs(dPhi)<dPhiCutSector[tgcWS] && std::abs(dRho)<dRhoCutSector[tgcWS]){
375  tpdVector[tgcWS].push_back(tpd);
376  }
377  // Do Sector Efficiency Check
378  if(canCheckSector[stationIndex]){
379  // Do check against PRD from matching Sectors
380  if((stationEta==TGCstation_StationEta[stationIndex])&&
381  (stationPhi==TGCstation_StationPhi[stationIndex])&&
382  (tgcFE==TGCstation_StationFE[stationIndex])){
383  // Do check
384  if(std::abs(dPhi)<dPhiCutSector[tgcWS] && std::abs(dRho)<dRhoCutSector[tgcWS]){
385  if(layer>=0)sectorhitregistered[layer][tgcWS]=true;// Sector hit
386  }
387  }
388  }// sector
389 
390  }// dPhi Loose Cut
391  }// TGC PRD Collection
392  }// TGC PRD Container
393 
394  // Cut Segment if no stations can be checked
395  if((!canCheckGlobal[0])&&(!canCheckGlobal[1])&&(!canCheckGlobal[2])&&(!canCheckGlobal[3]))continue;
397  // Do PRD checks
398  // Find vector of PRD which forms a coherent line in the vicinity of Segm1
399 
400  // Variables to hold best PRD matching results
401  std::vector<const Muon::TgcPrepData*> *bestTPDmatches[2];
402  bestTPDmatches[0] = nullptr;
403  bestTPDmatches[1] = nullptr;
404  if(bestTPDmatches[0]->size()>0) bestTPDmatches[0]->clear();
405  if(bestTPDmatches[1]->size()>0) bestTPDmatches[1]->clear();
406  int bestTPDlayerMatches[2][9] = {{0,0,0,0,0,0,0,0,0},
407  {0,0,0,0,0,0,0,0,0}};
408 
409  for(int k=0;k<2;k++){// WireStrip
410  // Variables to record quality of best match found
411  int nPRDMax = 0;
412  int nlayerMax = 0;
413 
414  // Loop over PRD vector
415  int nTPD = tpdVector[k].size();
416  for(int iTPD1=0;iTPD1<nTPD;iTPD1++){
417  // Variables to hold matches found for this PRD
418  std::vector<const Muon::TgcPrepData*> thisTPDmatches;
419  int thisTPDlayerMatches[9] = {0,0,0,0,0,0,0,0,0};
420 
421  // Get position variables
422  const Amg::Vector3D prdPos1 = tpdVector[k].at(iTPD1)->globalPosition();
423 
424  float prd1Phi = prdPos1.phi();
425  float prd1Z = prdPos1.z();
426  if(prd1Phi<0)prd1Phi+=2*M_PI;
427  Amg::Vector3D prd1PosZunit(prdPos1/std::abs(prd1Z));
428 
429  // Get id values
430  Identifier tgcid1=(tpdVector[k].at(iTPD1))->identify();
431  int stationName1 = m_idHelperSvc->tgcIdHelper().stationName(tgcid1);
432  int gasGap1 = m_idHelperSvc->tgcIdHelper().gasGap(tgcid1);
433  int layer1 = TGCgetlayer(stationName1,gasGap1);
434  if(layer1>=0)thisTPDlayerMatches[layer1]++;
435 
436  // Loop over PRD
437  for(int iTPD2=0;iTPD2<nTPD;iTPD2++){
438  if(iTPD2==iTPD1)continue;// do not check PRD against itself
439 
440  // Get position variables
441  const Amg::Vector3D prdPos2 = tpdVector[k].at(iTPD2)->globalPosition();
442  float prd2Rho = std::abs(prdPos2.perp());
443  float prd2Phi = prdPos2.phi();
444  float prd2Z = prdPos2.z();
445  if(prd2Phi<0)prd2Phi+=2*M_PI;
446 
447  // Extrapolate PRD1 to PRD2 Z position
448  float dZ = std::abs(prd2Z)- std::abs(prd1Z);
449  Amg::Vector3D prdExtrPos = ((prdPos1)+((prd1PosZunit)*dZ));
450 
451  // Get extrapolated variables
452  float prdExtrRho = std::abs(prdExtrPos.perp());
453  float prdExtrPhi = prdExtrPos.phi();
454  if(prdExtrPhi<0)prdExtrPhi+=2*M_PI;
455 
456  // Get differences between extrapolated and PRD2 positions
457  float dRho = prd2Rho-prdExtrRho;
458  float dPhi = prd2Phi-prdExtrPhi;
459  if(dPhi<-M_PI)dPhi+=2*M_PI;
460  if(dPhi> M_PI)dPhi-=2*M_PI;
461 
462  // Fill PRD comparison sagitta histograms
463  if(m_tgc_prdcompsag[i][k][0]) m_tgc_prdcompsag[i][k][0]->Fill(dRho);
464  if(m_tgc_prdcompsag[i][k][2]) m_tgc_prdcompsag[i][k][2]->Fill(dPhi);
465 
466  // Do check
467  if(std::abs(dPhi)<dPhiCutTPD[k] && std::abs(dRho)<dRhoCutTPD[k]){
468  // Get id values
469  Identifier tgcid2=(tpdVector[k].at(iTPD2))->identify();
470  int stationName2 = m_idHelperSvc->tgcIdHelper().stationName(tgcid2);
471  int gasGap2 = m_idHelperSvc->tgcIdHelper().gasGap(tgcid2);
472  int layer2 = TGCgetlayer(stationName2,gasGap2);
473 
474  // Add PRD2 to matches for PRD1
475  if(layer2>=0)thisTPDlayerMatches[layer2]++;
476  thisTPDmatches.push_back(tpdVector[k].at(iTPD2));
477  }
478  }// nTPD2
479 
480  // Get quality of matching array produced
481  int nPRDCurrent = 0;
482  int nlayerCurrent = 0;
483  for(int l=0;l<9;l++){
484  if(thisTPDlayerMatches[l]>0)nlayerCurrent++;
485  nPRDCurrent+=thisTPDlayerMatches[l];
486  }
487 
488  // Check quality variables against maximum found
489  if(nlayerMax <= nlayerCurrent){
490  if(nPRDMax < nPRDCurrent){
491  // Set maximum values to current segment's values
492  nlayerMax = nlayerCurrent;
493  nPRDMax = nPRDCurrent;
494  bestTPDmatches[k] = &thisTPDmatches;
495  for(int l=0;l<9;l++){
496  bestTPDlayerMatches[k][l] = thisTPDlayerMatches[l];
497  }
498  }
499  }
500  }// nTPD1
501 
502  // If matching array was somehow empty (should be impossible)
503  if(nlayerMax==0)continue;
504  if(bestTPDmatches[k]->size()==0){
505  ATH_MSG_WARNING( "MidstationOnly: empty bestTPDmatches["<<k<<"] passed" );
506  continue;
507  }
508 
509  // Set canCheck variables based on contents of matched PRD array
510  for(int jTGC1=0;jTGC1<3;jTGC1++){// TGC Stations
511  // Number of matched PRD found in other Stations
512  int nMatchOther = 0;
513  for(int l=0;l<9;l++){
514  int jTGC2 = TGClayer2stationindex(l);
515  if(jTGC1==jTGC2)continue;
516  nMatchOther+=bestTPDlayerMatches[k][l];
517  }
518 
519  // Check against cut
520  if(nMatchOther<nMeasCutTGCMidPRD[k]){
521  canCheckGlobal[jTGC1]=false;
522  canCheckSector[jTGC1]=false;
523  }
524  }// TGC Stations
525  }// WireStrip
526 
527  // Cut Segment if no stations can be checked
528  if((!canCheckGlobal[0])&&(!canCheckGlobal[1])&&(!canCheckGlobal[2])&&(!canCheckGlobal[3]))continue;
530  // Segment has passed all global cuts, fill histogram variables
531  // If no segments have already passed all cuts
532  if(nValidatedSegm==0){
533  for(int jTGC=0;jTGC<4;jTGC++){// TGC Stations
534  // Assign values of variables to fill histograms
535  // posThetaFill = segm1PosThe;
536  // posPhiFill = segm1PosPhi;
537 
538  //canCheckGlobalFill[jTGC] = canCheckGlobal[jTGC];
539  canCheckSectorFill[jTGC] = canCheckSector[jTGC];
540 
541  TGCstation_StationFEFill[jTGC] = TGCstation_StationFE[jTGC];
542  TGCstation_StationEtaFill[jTGC] = TGCstation_StationEta[jTGC];
543  TGCstation_StationPhiFill[jTGC] = TGCstation_StationPhi[jTGC];
544  }
545  for(int l=0;l<9;l++){
546  for(int k=0;k<2;k++){
547  sectorhitregisteredFill[l][k] = sectorhitregistered[l][k];
548  // hitregisteredFill[l][k] = hitregistered[l][k];
549  }
550  }
551  }// TGC Stations
552  nValidatedSegm++;
553  }// nSegm1
554 
555  // If only one Segment was validated on this side
556  if(nValidatedSegm==1){
557  for(int l=0;l<9;l++){//Layer
558  int stationIndex = TGClayer2stationindex(l);
559  for(int k=0;k<2;k++){// WireStrip
560  // If this station can be checked
561  if(canCheckSectorFill[stationIndex]){
562  if((TGCstation_StationFEFill[stationIndex]<0)||(TGCstation_StationEtaFill[stationIndex]==0)||(TGCstation_StationPhiFill[stationIndex]==0)){
563  ATH_MSG_WARNING( "MidstationOnly: canCheckSector passed for jTGC=" << stationIndex
564  << " but, FE="<<TGCstation_StationFEFill[stationIndex]
565  << " Eta="<<TGCstation_StationEtaFill[stationIndex]
566  << " Phi=" << TGCstation_StationPhiFill[stationIndex] );
567  continue;
568  }
569  // Get Sector histogram indexes
570  int stationMap_EtaIndex=getStationMapIndex(1, l, TGCstation_StationFEFill[stationIndex], TGCstation_StationEtaFill[stationIndex], TGCstation_StationPhiFill[stationIndex]);
571  int stationMap_PhiIndex=getStationMapIndex(2, l, TGCstation_StationFEFill[stationIndex], TGCstation_StationEtaFill[stationIndex], TGCstation_StationPhiFill[stationIndex]);
572 
573  // Fill Sector efficiency histograms
574  if(sectorhitregisteredFill[l][k]){// Hit in Sector matches extrapolated track
575  m_eff_stationmapmid[i][k][1]->Fill(stationMap_EtaIndex, stationMap_PhiIndex);
576  }
577  m_eff_stationmapmid[i][k][2]->Fill(stationMap_EtaIndex, stationMap_PhiIndex);
578  }
579  }// WireStrip
580  }// layer
581  }
582 
583  }// AC
584 
585 }// End of Function

◆ MMTB_DEPRECATED() [1/11]

ManagedMonitorToolBase::MMTB_DEPRECATED ( endOfEventsBlock  )
inherited

◆ MMTB_DEPRECATED() [2/11]

ManagedMonitorToolBase::MMTB_DEPRECATED ( endOfLowStat  )
inherited

◆ MMTB_DEPRECATED() [3/11]

ManagedMonitorToolBase::MMTB_DEPRECATED ( endOfLumiBlock  )
inherited

◆ MMTB_DEPRECATED() [4/11]

ManagedMonitorToolBase::MMTB_DEPRECATED ( endOfRun  )
inherited

◆ MMTB_DEPRECATED() [5/11]

ManagedMonitorToolBase::MMTB_DEPRECATED ( newEventsBlock  )
inherited

◆ MMTB_DEPRECATED() [6/11]

ManagedMonitorToolBase::MMTB_DEPRECATED ( newHigStatInterval  )
inherited

◆ MMTB_DEPRECATED() [7/11]

ManagedMonitorToolBase::MMTB_DEPRECATED ( newLowStat  )
inherited

◆ MMTB_DEPRECATED() [8/11]

ManagedMonitorToolBase::MMTB_DEPRECATED ( newLowStatInterval  )
inherited

◆ MMTB_DEPRECATED() [9/11]

ManagedMonitorToolBase::MMTB_DEPRECATED ( newLumiBlock  )
inherited

◆ MMTB_DEPRECATED() [10/11]

ManagedMonitorToolBase::MMTB_DEPRECATED ( newMedStatInterval  )
inherited

◆ MMTB_DEPRECATED() [11/11]

ManagedMonitorToolBase::MMTB_DEPRECATED ( newRun  )
inherited

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::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< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

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

◆ newEventsBlockFlag()

bool ManagedMonitorToolBase::newEventsBlockFlag ( ) const
inlineprotectedinherited

Definition at line 793 of file ManagedMonitorToolBase.h.

793 { return m_newEventsBlock; }

◆ newHigStatIntervalFlag()

bool ManagedMonitorToolBase::newHigStatIntervalFlag ( ) const
inlineprotectedinherited

Definition at line 789 of file ManagedMonitorToolBase.h.

789 { return m_newHigStatInterval; }

◆ newLowStatFlag()

bool ManagedMonitorToolBase::newLowStatFlag ( ) const
inlineprotectedinherited

Definition at line 790 of file ManagedMonitorToolBase.h.

790 { return m_newLowStat; }

◆ newLowStatIntervalFlag()

bool ManagedMonitorToolBase::newLowStatIntervalFlag ( ) const
inlineprotectedinherited

Flag functions allowing clients to determine when to book new and process old histograms; values are updated by fillHists() based on counting lumiBlocks, and are correctly set when fillHistograms(), bookHistograms() and procHistograms() are called.

Definition at line 787 of file ManagedMonitorToolBase.h.

787 { return m_newLowStatInterval; }

◆ newLumiBlockFlag()

bool ManagedMonitorToolBase::newLumiBlockFlag ( ) const
inlineprotectedinherited

Definition at line 791 of file ManagedMonitorToolBase.h.

791 { return m_newLumiBlock; }

◆ newMedStatIntervalFlag()

bool ManagedMonitorToolBase::newMedStatIntervalFlag ( ) const
inlineprotectedinherited

Definition at line 788 of file ManagedMonitorToolBase.h.

788 { return m_newMedStatInterval; }

◆ newRunFlag()

bool ManagedMonitorToolBase::newRunFlag ( ) const
inlineprotectedinherited

Definition at line 792 of file ManagedMonitorToolBase.h.

792 { return m_newRun; }

◆ numberOfSL()

int MdtVsTgcRawDataValAlg::numberOfSL ( const Muon::TgcCoinDataContainer tgctrgcontainer)
private

Definition at line 83 of file MdtVsTgcRawData_functions.cxx.

83  {
84 
85  int nSL=0;
86 
87  //loop over TGC RoI container
88  Muon::TgcCoinDataContainer::const_iterator it_end=tgctrgcontainer->end();
89  for( Muon::TgcCoinDataContainer::const_iterator it=tgctrgcontainer->begin();
90  it!=it_end;
91  ++it){
92 
93 
94  ATH_MSG_DEBUG( "size of tgc collection is " << (*it) -> size() );
95 
96  //loop over TGC RoI collection
98  for( Muon::TgcCoinDataCollection::const_iterator itc=(*it)->begin();
99  itc!= itc_end;
100  ++itc){
101 
102  const Muon::TgcCoinData* tcd=*itc;
103 
104  if( tcd->type() != Muon::TgcCoinData::TYPE_SL )continue;
105  ATH_MSG_DEBUG("pt"<<tcd->pt() );
106  nSL++;
107  }
108  }
109 
110  return nSL;
111 }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::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 ManagedMonitorToolBase::parseList ( const std::string &  line,
std::vector< std::string > &  result 
)
protectedinherited

Definition at line 2113 of file ManagedMonitorToolBase.cxx.

2114  {
2115  std::string item;
2116  std::stringstream ss(line);
2117 
2118  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "ManagedMonitorToolBase::parseList:";
2119 
2120  while ( std::getline(ss, item, ',') ) {
2121  std::stringstream iss(item); // remove
2122  iss >> item; // whitespace
2123  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << " " << item;
2124  result.push_back(item);
2125  }
2126 
2127  msg(MSG::DEBUG) << endmsg;
2128  return StatusCode::SUCCESS;
2129 }

◆ phi2sector()

int MdtVsTgcRawDataValAlg::phi2sector ( int  phi,
int  ef 
)
private

Definition at line 57 of file MdtVsTgcRawData_functions.cxx.

57  {
58  int sector=-1;
59  if(ef==0){//forward
60  sector=phi/2+1;//(phi,sector)= (1,1), (2,2), (3,2), (4,3)
61  }else{//endcap
62  sector=(phi+1)/4+1;//(phi,sector)= (1,1), (2,1), (3,2), (4,2)
63  }
64  if(sector>12)sector=1;
65 
66  return sector;
67 }

◆ prepareTREarray()

void MdtVsTgcRawDataValAlg::prepareTREarray ( const MuonGM::MuonDetectorManager MuonDetMgrDS)
private

Definition at line 86 of file MdtVsTgcRawData_TGCEffCheck.cxx.

86  {
87  int TGCStationNames[8]={41, 42, 43, 44, 45, 46, 47, 48};
88 
89  // Make array of TGC Readout Element pointers
90  for(int stationNameIndex=0; stationNameIndex<8; stationNameIndex++){// Station Name
91  int stationName = TGCStationNames[stationNameIndex];
92  for(int stationEta=-8; stationEta<=8; stationEta++){// Station Eta
93  int tgcAC(stationEta<0);
94  int absStationEta = std::abs(stationEta);
95  for(int stationPhi=0; stationPhi<=48; stationPhi++){// Station Phi
96  // Exclude non-existent "zero" sectors included in the array for ease of use
97  if(stationEta==0){
98  m_TREarray[stationNameIndex][0][absStationEta][stationPhi]=nullptr;
99  m_TREarray[stationNameIndex][1][absStationEta][stationPhi]=nullptr;
100  continue;
101  }
102  m_TREarray[stationNameIndex][tgcAC][absStationEta][stationPhi]=nullptr;
103  if(stationPhi==0)continue;
104 
105  // Exclude sectors known not to exist
106  if(stationNameIndex==6){ // Inner Forward
107  if(std::abs(stationEta)>1)continue;
108  if(stationPhi>24)continue;
109  }
110  else if(stationNameIndex==7){ // Inner Endcap
111  if(std::abs(stationEta)>1)continue;
112  if(stationPhi>21)continue;
113  }
114  else if((stationNameIndex==0)|| // Midstation Forward
115  (stationNameIndex==2)||
116  (stationNameIndex==4)){
117  if(std::abs(stationEta)>1)continue;
118  if(stationPhi>24)continue;
119  }
120  else{ // Midstation Endcap
121  if(std::abs(stationEta)>5)continue;
122  if((stationNameIndex==1)&&
123  (std::abs(stationEta)>4))continue;
124  }
125 
126  // Get identifier of TRE at this set of indexes
127  bool isValid{false};
128  Identifier tgc_testId = m_idHelperSvc->tgcIdHelper().elementID(stationName, stationEta, stationPhi, isValid);
129  if(!isValid){continue;}
130 
131  // Get TRE and put into to array
132  m_TREarray[stationNameIndex][tgcAC][absStationEta][stationPhi] = MuonDetMgrDS->getTgcReadoutElement(tgc_testId);
133  if(m_TREarray[stationNameIndex][tgcAC][absStationEta][stationPhi]==nullptr){
134  ATH_MSG_WARNING( "prepareTREarray: TgcReadoutElement==0 passed checks" );
135  continue;
136  }
137  }// Station Phi
138  }// Station Eta
139  }// Station Name
140  return;
141 }// End of function

◆ preSelector()

bool ManagedMonitorToolBase::preSelector ( )
virtualinherited

Implements IMonitorToolBase.

Definition at line 1681 of file ManagedMonitorToolBase.cxx.

1683 {
1684  if( m_preScaleProp > 1 ) {
1685  return ( (m_nEvents % m_preScaleProp) == 1 );
1686  }
1687  return true;
1688 }

◆ procHistograms()

StatusCode MdtVsTgcRawDataValAlg::procHistograms ( )
virtual

An inheriting class should either override this function or finalHists().

Reimplemented from ManagedMonitorToolBase.

Definition at line 186 of file MdtVsTgcRawDataValAlg.cxx.

186  {
187 /*----------------------------------------------------------------------------------*/
188 
189  ATH_MSG_DEBUG( "MdtVsTgcRawDataValAlg finalize()" );
190  if(endOfRunFlag()){
193  }
194  return StatusCode::SUCCESS;
195 }

◆ putBox()

void MdtVsTgcRawDataValAlg::putBox ( TH2 *  h2,
float  x1,
float  y1,
float  x2,
float  y2 
)
private

Definition at line 129 of file MdtVsTgcRawData_functions.cxx.

129  {
130  TBox* box = new TBox(x1, y1, x2, y2);
131 // box->SetFillColor(kGray+1);
132 // box->SetLineColor(kGray+1);
133 // box->SetFillStyle(3013);
134 // box->SetFillStyle(3004);
135 
136  box->SetFillColor(kGray);
137  box->SetLineColor(kGray);
138 
139 // box->SetLineStyle(3);
140 
141  (h->GetListOfFunctions())->Add(box);
142 }

◆ regEfficiency()

StatusCode ManagedMonitorToolBase::regEfficiency ( TEfficiency *  e,
const MonGroup group 
)
virtualinherited

Registers a TEfficiency to be included in the output stream using logical parameters that describe the plot.

Definition at line 1446 of file ManagedMonitorToolBase.cxx.

1446  {
1447  if (!e)
1448  return StatusCode::FAILURE;
1449 
1450  TGraph* g = reinterpret_cast<TGraph*>(e);
1451  std::string name = e->GetName();
1452 
1453  // MANAGED
1454  if ( group.histo_mgmt() != ATTRIB_UNMANAGED ) {
1455  // warn about not using merge algorithms
1456  if (group.histo_mgmt() == ATTRIB_X_VS_LB && group.merge().empty()) {
1457  ATH_MSG_WARNING("HEY! Attempting to register "<<name<<" as a per-LB histogram, but not setting the merge algorithm! Use \"merge\", at least.");
1458  }
1459  // add the efficiency to rebooking vector
1460  if (m_supportedIntervalsForRebooking.count(group.interval())) {
1461  m_templateEfficiencies[group.interval()].push_back( MgmtParams<TEfficiency>(e, group) );
1462  } else {
1463  ATH_MSG_ERROR("Attempt to book managed graph " << name << " with invalid interval type " << intervalEnumToString(group.interval()));
1464  return StatusCode::FAILURE;
1465  }
1466 
1467  MonGroup group_unmanaged( this, group.system(), group.interval(), ATTRIB_UNMANAGED, group.chain(), group.merge());
1468  std::string streamName = streamNameFunction()->getStreamName( this, group_unmanaged, name, false );
1469  registerMetadata(streamName, name, group).ignore();
1470  return m_THistSvc->regGraph( streamName, g );
1471  } else {
1472  // UNMANAGED
1473  if( m_manager != 0 ) {
1474  std::string genericName = NoOutputStream().getStreamName( this, group, name );
1475  m_manager->writeAndDelete( genericName );
1476  m_manager->passOwnership( e, genericName );
1477  }
1478 
1479  std::string streamName = streamNameFunction()->getStreamName( this, group, name, false );
1481  if (smd != StatusCode::SUCCESS)
1482  return StatusCode::FAILURE;
1483 
1484  return m_THistSvc->regGraph( streamName, g );
1485  }
1486 }

◆ regGraph() [1/2]

StatusCode ManagedMonitorToolBase::regGraph ( TGraph *  g,
const MonGroup group 
)
virtualinherited

Registers a TGraph to be included in the output stream using logical parameters that describe the graph.

Definition at line 1500 of file ManagedMonitorToolBase.cxx.

1502 {
1503  if (!g)
1504  return StatusCode::FAILURE;
1505 
1506  // This part of the code deals with MANAGED type
1507  if ( group.histo_mgmt() != ATTRIB_UNMANAGED ) {
1508  // Create an unmanaged group based on the original MonGroup instance passed
1509  // This is needed because managed graph is presented as a number of unmanaged
1510  // graphs (one per each interval)
1511  MonGroup group_unmanaged( this, group.system(), group.interval(), ATTRIB_UNMANAGED, group.chain(), group.merge());
1512 
1513  if (m_supportedIntervalsForRebooking.count(group.interval())) {
1514  m_templateGraphs[group.interval()].push_back( MgmtParams<TGraph>(g, group_unmanaged) );
1515  } else {
1516  ATH_MSG_ERROR("Attempt to book managed graph " << g->GetName() << " with invalid interval type " << intervalEnumToString(group.interval()));
1517  return StatusCode::FAILURE;
1518  }
1519 
1520  std::string name = g->GetName();
1521  std::string streamName = streamNameFunction()->getStreamName( this, group_unmanaged, name, false );
1522  registerMetadata(streamName, name, group).ignore();
1523  return m_THistSvc->regGraph( streamName, g );
1524  //return m_THistSvc->regGraph( streamName );
1525  }
1526 
1527  // This part of the code deals with UNMANAGED type
1528  std::string gName = g->GetName();
1529 
1530  if( m_manager != 0 ) {
1531  std::string genericName = NoOutputStream().getStreamName( this, group, gName );
1532  m_manager->writeAndDelete( genericName );
1533  m_manager->passOwnership( g, genericName );
1534  }
1535 
1536  std::string streamName = streamNameFunction()->getStreamName( this, group, gName, false );
1537 
1539  if (smd != StatusCode::SUCCESS) return StatusCode::FAILURE;
1540 
1541  return m_THistSvc->regGraph( streamName, g );
1542 }

◆ regGraph() [2/2]

StatusCode ManagedMonitorToolBase::regGraph ( TGraph *  g,
const std::string &  system,
Interval_t  interval,
MgmtAttr_t  histo_mgmt = ATTRIB_MANAGED,
const std::string &  chain = "",
const std::string &  merge = "" 
)
virtualinherited

Registers a TGraph to be included in the output stream using logical parameters that describe the graph.

Definition at line 1490 of file ManagedMonitorToolBase.cxx.

1493 {
1494  MonGroup group( this, system, interval, histo_mgmt, chain, merge );
1495  return regGraph( g, group );
1496 }

◆ regHist() [1/2]

StatusCode ManagedMonitorToolBase::regHist ( TH1 *  h,
const MonGroup group 
)
virtualinherited

Registers a TH1 (including TH2, TH3, and TProfile) to be included in the output stream using logical parameters that describe the histogram.

A histogram is passed via reference to a pointer.

Definition at line 1354 of file ManagedMonitorToolBase.cxx.

1356 {
1357 // ManagedMonitorToolBase_addHistStatistics(this,h);
1358 
1359  if (!h)
1360  return StatusCode::FAILURE;
1361 
1362  // This part of the code deals with MANAGED type
1363  if ( group.histo_mgmt() != ATTRIB_UNMANAGED ) {
1364  /*
1365  Create an unmanaged group based on the original MonGroup instance passed
1366  It is needed because managed histogram is presented as a number of unmanaged
1367  histograms (one per each interval)
1368  Update (PUEO) - I don't think it actually matters, and need to keep
1369  track of "proper" attribute for X_VS_LB
1370  */
1371 
1372  if (group.histo_mgmt() == ATTRIB_X_VS_LB && group.merge().empty()) {
1373  ATH_MSG_WARNING("HEY! You're attempting to register " << h->GetName() << " as a per-LB histogram, but you're not setting the merge algorithm! This is a SUPER-BAD idea! Use \"merge\", at least.");
1374  }
1375 
1376  if (m_supportedIntervalsForRebooking.count(group.interval())) {
1377  m_templateHistograms[group.interval()].push_back( MgmtParams<TH1>(h, group) );
1378  } else {
1379  ATH_MSG_ERROR("Attempt to book managed histogram " << h->GetName() << " with invalid interval type " << intervalEnumToString(group.interval()));
1380  return StatusCode::FAILURE;
1381  }
1382 
1383  std::string hName = h->GetName();
1384  MonGroup group_unmanaged( this, group.system(), group.interval(), ATTRIB_UNMANAGED, group.chain(), group.merge());
1385  std::string streamName = streamNameFunction()->getStreamName( this, group_unmanaged, hName, false );
1386  registerMetadata(streamName, hName, group).ignore();
1387  return m_THistSvc->regHist( streamName, h );
1388  }
1389 
1390  // This part of the code deals with UNMANAGED type
1391  std::string hName = h->GetName();
1392 
1393  if( m_manager != 0 ) {
1394  std::string genericName = NoOutputStream().getStreamName( this, group, hName );
1395  m_manager->writeAndDelete( genericName );
1396  m_manager->passOwnership( h, genericName );
1397  }
1398 
1399  std::string streamName = streamNameFunction()->getStreamName( this, group, hName, false );
1400 
1402  if (smd != StatusCode::SUCCESS) return StatusCode::FAILURE;
1403 
1404  return m_THistSvc->regHist( streamName, h );
1405 }

◆ regHist() [2/2]

StatusCode ManagedMonitorToolBase::regHist ( TH1 *  h,
const std::string &  system,
Interval_t  interval,
MgmtAttr_t  histo_mgmt = ATTRIB_MANAGED,
const std::string &  chain = "",
const std::string &  merge = "" 
)
virtualinherited

Registers a TH1 (including TH2, TH3, and TProfile) to be included in the output stream using logical parameters that describe the histogram.

Definition at line 1345 of file ManagedMonitorToolBase.cxx.

1348 {
1349  MonGroup group( this, system, interval, histo_mgmt, chain, merge );
1350  return regHist( h, group );
1351 }

◆ registerMetadata()

StatusCode ManagedMonitorToolBase::registerMetadata ( const std::string &  streamName,
const std::string &  hName,
const MonGroup group 
)
protectedinherited

Definition at line 946 of file ManagedMonitorToolBase.cxx.

948  {
950  TTree* metadata(0);
951  std::string mdStreamName( streamName );
952  size_t found=mdStreamName.rfind('/');
953 
954  if ( found != std::string::npos )
955  mdStreamName.replace( found, mdStreamName.length(), "/metadata" );
956 
957  MDMap_t::iterator i = m_metadataMap.find( mdStreamName );
958  if( i == m_metadataMap.end() ) {
959  metadata = new TTree( "metadata", "Monitoring Metadata" );
960  if (! metadata) return StatusCode::FAILURE;
961  StatusCode scmd = m_THistSvc->regTree( mdStreamName, metadata );
962  if (scmd == StatusCode::FAILURE) return StatusCode::FAILURE;
963  MDMap_t::value_type valToInsert( mdStreamName, new OutputMetadata(metadata) );
964  i = m_metadataMap.insert( valToInsert ).first;
965  }
966 
967  i->second->fill( hName, group.interval(), group.chain(), group.merge() );
968  }
969  return StatusCode::SUCCESS;
970 }

◆ regManagedEfficiencies()

StatusCode ManagedMonitorToolBase::regManagedEfficiencies ( std::vector< MgmtParams< TEfficiency > > &  templateEfficiencies)
protectedinherited

Definition at line 1141 of file ManagedMonitorToolBase.cxx.

1141  {
1142  bool allIsOk = true;
1143  for( auto& it : templateEfficiencies ) {
1144  // get components of MgmtParams and copy efficiency
1145  MonGroup group = it.m_group;
1146  TEfficiency* theEfficiency = it.m_templateHist;
1147  TEfficiency* e = static_cast<TEfficiency*>(theEfficiency->Clone());
1148  int nbins = theEfficiency->GetTotalHistogram()->GetNbinsX();
1149  int xlow = theEfficiency->GetTotalHistogram()->GetXaxis()->GetXmin();
1150  int xhigh = theEfficiency->GetTotalHistogram()->GetXaxis()->GetXmax();
1151  e->SetBins(nbins,xlow,xhigh); // reset histogram
1152  std::string name = e->GetName();
1153 
1154  // make TGraph casts of TEfficiencies
1155  TGraph* theGraph = reinterpret_cast<TGraph*>(theEfficiency);
1156  TGraph* g = reinterpret_cast<TGraph*>(e);
1157 
1158  // Get the streamName for the previous interval
1159  std::string streamName = streamNameFunction()->getStreamName( this, group, name, true );
1160 
1161  // RE-REGISTER
1162  // 1) De-register the original graph with the THistSvc
1163  StatusCode sc1 = m_THistSvc->deReg( theGraph );
1164  if (sc1 == StatusCode::FAILURE) allIsOk = false;
1165  // 2) Fix THistSvc->deReg for TGraphs
1166  bool doneCleaning = false;
1167  std::string directoryName = streamNameFunction()->getDirectoryName( this, group, name, true );
1168  TSeqCollection *filelist=gROOT->GetListOfFiles();
1169  for (int i=0; i<filelist->GetEntries(); i++) {
1170  ATH_MSG_DEBUG( "List of files: " << filelist->At(i)->GetName());
1171  TFile* file = static_cast<TFile*>(filelist->At(i));
1172  StatusCode sc2 = THistSvc_deReg_fixTGraph(file, theGraph, directoryName);
1173  if (sc2 == StatusCode::SUCCESS) doneCleaning = true;
1174  }
1175  // 3) Check if TGraph fix has been applied successfully
1176  if (!doneCleaning) {
1177  ATH_MSG_ERROR("THistSvc_deReg_fixTGraph: failed to apply TGraph fix for the THist Svc!");
1178  allIsOk = false;
1179  }
1180  // 4) Register cloned histogram under previous interval streamName
1181  StatusCode sc3 = m_THistSvc->regGraph( streamName, g );
1182  if (sc3 == StatusCode::FAILURE)
1183  allIsOk = false;
1184 
1185  // get streamname for interval
1186  streamName = streamNameFunction()->getStreamName( this, group, name, false );
1187  // store metadata
1189  if (smd != StatusCode::SUCCESS) allIsOk = false;
1190  // Re-register the original graph
1191  StatusCode sc4 = m_THistSvc->regGraph( streamName, theGraph );
1192  if (sc4 == StatusCode::FAILURE) allIsOk = false;
1193  }
1194 
1195  if (!allIsOk) return StatusCode::FAILURE;
1196  return StatusCode::SUCCESS;
1197 }

◆ regManagedGraphs()

StatusCode ManagedMonitorToolBase::regManagedGraphs ( std::vector< MgmtParams< TGraph > > &  templateGraphs)
protectedinherited

Definition at line 1070 of file ManagedMonitorToolBase.cxx.

1072 {
1073  // See the description for the regManagedHistograms method
1074  bool allIsOk = true;
1075 
1076  for( std::vector< MgmtParams<TGraph> >::iterator it = templateGraphs.begin(); it != templateGraphs.end(); ++it ) {
1077  MonGroup group = (*it).m_group;
1078 
1079  // Get a handle to the graph
1080  TGraph* theGraph = (*it).m_templateHist;
1081 
1082  // Clone the graph
1083  TGraph* g = static_cast<TGraph*>(theGraph->Clone());
1084  theGraph->Set(0); // equivalent to Reset() for TH1
1085 
1086  // Get name
1087  std::string gName = g->GetName();
1088 
1089  // Get the streamName for the previous interval
1090  std::string streamName = streamNameFunction()->getStreamName( this, group, gName, true );
1091 
1092  // De-register the original graph with the THistSvc
1093  StatusCode sc1 = m_THistSvc->deReg( theGraph );
1094  if (sc1 == StatusCode::FAILURE)
1095  allIsOk = false;
1096 
1097  // *** begin ***
1098  // Fix THistSvc->deReg for TGraphs
1099  bool doneCleaning = false;
1100  std::string directoryName = streamNameFunction()->getDirectoryName( this, group, gName, true );
1101  TSeqCollection *filelist=gROOT->GetListOfFiles();
1102  for (int i=0; i<filelist->GetEntries(); i++) {
1103  ATH_MSG_DEBUG( "List of files: " << filelist->At(i)->GetName());
1104  TFile* file = static_cast<TFile*>(filelist->At(i));
1105  StatusCode sc2 = THistSvc_deReg_fixTGraph(file, theGraph, directoryName);
1106  if (sc2 == StatusCode::SUCCESS)
1107  doneCleaning = true;
1108  }
1109 
1110  // Check if TGraph fix has been applied successfully
1111  if (!doneCleaning) {
1112  ATH_MSG_ERROR("THistSvc_deReg_fixTGraph: failed to apply TGraph fix for the THist Svc!");
1113  allIsOk = false;
1114  }
1115  // *** end ***
1116 
1117  // Register clonned histogram under previous interval streamName
1118  StatusCode sc3 = m_THistSvc->regGraph( streamName, g );
1119  if (sc3 == StatusCode::FAILURE)
1120  allIsOk = false;
1121 
1122  // Get streamName for the current interval
1123  streamName = streamNameFunction()->getStreamName( this, group, gName, false );
1124  // Register metadata information with the current interval streamname
1126  if (smd != StatusCode::SUCCESS)
1127  allIsOk = false;
1128 
1129  // Re-register the original graph with the current interval streamName
1130  StatusCode sc4 = m_THistSvc->regGraph( streamName, theGraph );
1131  if (sc4 == StatusCode::FAILURE)
1132  allIsOk = false;
1133 
1134  }
1135 
1136  if (!allIsOk) return StatusCode::FAILURE;
1137 
1138  return StatusCode::SUCCESS;
1139 }

◆ regManagedHistograms()

StatusCode ManagedMonitorToolBase::regManagedHistograms ( std::vector< MgmtParams< TH1 > > &  templateHistograms)
protectedinherited

Definition at line 973 of file ManagedMonitorToolBase.cxx.

975 {
976  // The method registers histograms with the THistSvc and saves them to file.
977 
978  // The funky business with registering and deregistering the histogram is needed
979  // to get the correct directory when saving histograms. THistSvc deals with ROOT
980  // to set up proper TDirectory, so we rely on it.
981  // E.g.
982  // m_THistSvc->regHist( streamName, h ): sets the correct TDirectory with streamName
983  // m_THistSvc->deReg( h ) - deregister from THistSvc otherwise THistSvc will try to save it
984  // at the end of execution
985  // use passownership of the histogram and save it to file
986  // m_manager->passOwnership( h, genericName );
987  // m_manager->writeAndDelete( genericName );
988  bool allIsOk = true;
989 
990  for( std::vector< MgmtParams<TH1> >::iterator it = templateHistograms.begin(); it != templateHistograms.end(); ++it ) {
991  MonGroup& group = (*it).m_group;
992 
993  // Get a handle to the histogram
994  TH1* theHist = (*it).m_templateHist;
995 
996  // Clone the histogram
997  TH1* h = static_cast<TH1*>(theHist->Clone());
998  theHist->Reset();
999 
1000  // Get name
1001  std::string hName = h->GetName();
1002 
1003  // Get the streamName for the previous interval
1004  std::string streamName = streamNameFunction()->getStreamName( this, group, hName, true );
1005 
1006  // Register the histogram with the THistSvc
1007  StatusCode sc1 = m_THistSvc->deReg( theHist );
1008  if (sc1 == StatusCode::FAILURE) allIsOk = false;
1009 
1010  // Register clonned histogram under previous interval streamName
1011  StatusCode sc2 = m_THistSvc->regHist( streamName, h );
1012  if (sc2 == StatusCode::FAILURE) allIsOk = false;
1013 
1014  if( m_manager != 0 ) {
1015  std::string genericName = NoOutputStream().getStreamName( this, group, hName );
1016  m_manager->passOwnership( h, genericName );
1017  m_manager->writeAndDelete( genericName );
1018  }
1019 
1020  // Get streamName for the current interval
1021  streamName = streamNameFunction()->getStreamName( this, group, hName, false );
1022  // Register metadata information with the current interval streamname
1024  if (smd != StatusCode::SUCCESS) allIsOk = false;
1025 
1026  // Re-register the original histogram with the current interval streamName
1027  StatusCode sc3 = m_THistSvc->regHist( streamName, theHist );
1028  if (sc3 == StatusCode::FAILURE) allIsOk = false;
1029 
1030  }
1031 
1032  if (!allIsOk) return StatusCode::FAILURE;
1033 
1034  return StatusCode::SUCCESS;
1035 }

◆ regManagedTrees()

StatusCode ManagedMonitorToolBase::regManagedTrees ( std::vector< MgmtParams< TTree > > &  templateTrees)
protectedinherited

Definition at line 1201 of file ManagedMonitorToolBase.cxx.

1203 {
1204  // See the description for the regManagedHistograms method
1205  bool allIsOk = true;
1206 
1207  for( std::vector< MgmtParams<TTree> >::iterator it = templateTrees.begin(); it != templateTrees.end(); ++it ) {
1208  MonGroup group = (*it).m_group;
1209 
1210  // Get a handle to the original tree
1211  TTree* theTree = (*it).m_templateHist;
1212 
1213  // Clone the tree
1214  TTree* t = static_cast<TTree*>(theTree->Clone());
1215  theTree->Reset();
1216 
1217  // Dumping the tree
1218  std::string name = t->GetName();
1219 
1220  // Get the streamName for the previous interval
1221  std::string streamName = streamNameFunction()->getStreamName( this, group, name, true );
1222 
1223  // De-register original tree with the THistSvc
1224  StatusCode sc1 = m_THistSvc->deReg( theTree );
1225  if (sc1 == StatusCode::FAILURE) allIsOk = false;
1226 
1227  // Register clonned tree under previous interval streamName
1228  StatusCode sc2 = m_THistSvc->regTree( streamName, t );
1229  if (sc2 == StatusCode::FAILURE) allIsOk = false;
1230 
1231  if( m_manager != 0 ) {
1232  std::string genericName = NoOutputStream().getStreamName( this, group, name );
1233  m_manager->passOwnership( t, genericName );
1234  m_manager->writeAndDelete( genericName );
1235  }
1236 
1237  // Get streamName for the current interval
1238  streamName = streamNameFunction()->getStreamName( this, group, name, false );
1239  // Register metadata information with the current interval streamname
1241  if (smd != StatusCode::SUCCESS) allIsOk = false;
1242 
1243  // Re-register the original graph with the current interval streamName
1244  StatusCode sc3 = m_THistSvc->regTree( streamName, theTree );
1245  if (sc3 == StatusCode::FAILURE) allIsOk = false;
1246 
1247  }
1248 
1249  if (!allIsOk) return StatusCode::FAILURE;
1250 
1251  return StatusCode::SUCCESS;
1252 }

◆ regTree() [1/2]

StatusCode ManagedMonitorToolBase::regTree ( TTree *  t,
const MonGroup group 
)
virtualinherited

Registers a TTree to be included in the output stream using logical parameters that describe it.

Definition at line 1556 of file ManagedMonitorToolBase.cxx.

1558 {
1559 
1560  // This part of the code deals with MANAGED type
1561  if ( group.histo_mgmt() != ATTRIB_UNMANAGED ) {
1562  // Create an unmanaged group based on the original MonGroup instance passed
1563  // This is needed because managed tree is presented as a number of unmanaged
1564  // trees (one per each interval)
1565  MonGroup group_unmanaged( this, group.system(), group.interval(), ATTRIB_UNMANAGED, group.chain(), group.merge());
1566 
1567  if (m_supportedIntervalsForRebooking.count(group.interval())) {
1568  m_templateTrees[group.interval()].push_back( MgmtParams<TTree>(t, group_unmanaged) );
1569  } else {
1570  ATH_MSG_ERROR("Attempt to book managed tree " << t->GetName() << " with invalid interval type " << intervalEnumToString(group.interval()));
1571  return StatusCode::FAILURE;
1572  }
1573 
1574  std::string name = t->GetName();
1575  std::string genericName = NoOutputStream().getStreamName( this, group_unmanaged, name );
1576  std::string streamName = streamNameFunction()->getStreamName( this, group_unmanaged, name, false );
1577  registerMetadata(streamName, name, group).ignore();
1578  return m_THistSvc->regTree( streamName, t );
1579  }
1580 
1581 
1582  // This part of the code deals with UNMANAGED type
1583  std::string tName = t->GetName();
1584 
1585  if( m_manager != 0 ) {
1586  std::string genericName = NoOutputStream().getStreamName( this, group, tName );
1587  m_manager->writeAndDelete( genericName );
1588  m_manager->passOwnership( t, genericName );
1589  }
1590 
1591  std::string streamName = streamNameFunction()->getStreamName( this, group, tName, false );
1592 
1594  if (smd != StatusCode::SUCCESS) return StatusCode::FAILURE;
1595 
1596  return m_THistSvc->regTree( streamName, t );
1597 }

◆ regTree() [2/2]

StatusCode ManagedMonitorToolBase::regTree ( TTree *  t,
const std::string &  system,
Interval_t  interval,
MgmtAttr_t  histo_mgmt = ATTRIB_MANAGED,
const std::string &  chain = "",
const std::string &  merge = "" 
)
virtualinherited

Registers a TTree to be included in the output stream using logical parameters that describe it.

Definition at line 1546 of file ManagedMonitorToolBase.cxx.

1549 {
1550  MonGroup group( this, system, interval, histo_mgmt, chain, merge );
1551  return regTree( t, group );
1552 }

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

◆ roi2etaphi()

void MdtVsTgcRawDataValAlg::roi2etaphi ( const Muon::TgcCoinData cd,
int &  eta,
int &  phi 
)
private

Definition at line 28 of file MdtVsTgcRawData_functions.cxx.

28  {
29 
30  int roiphi=cd.phi();//phi in 1/48(24) sector for endcap(forward)
31  int roi=cd.roi();//0-147(0-63)
32 
33  //int localeta=roi/4;
34 
35  if(cd.isForward()){//forward
36 
37  int localphi=roi%4;
38 
39  //eta=roi/4;
40  eta=roi/4+36;
41  phi=(localphi+roiphi*4)*2;
42 
43  }else{//endcap
44 
45  int sector=phi2sector(roiphi,1);
46 
47  phi=roiphi*4 + ( sector%2==0 ? roi%4 : 3-(roi%4) );
48  eta=roi/4;
49  }
50 
51  //eta=52-eta;
52  return;
53 
54 }

◆ roiphi2mdtSector()

int MdtVsTgcRawDataValAlg::roiphi2mdtSector ( int  roiphi,
int  ef 
)
private

Definition at line 70 of file MdtVsTgcRawData_functions.cxx.

70  {
71  int mdtSector=-1;
72  if(ef==0){//forward phi1-24
73  mdtSector=roiphi/2+1;//(phi,sector)= (1,1), (2,2), (3,2), (4,3)
74  }else{//endcap
75  mdtSector=(roiphi+1)/4+1;//(phi,sector)= (1,1), (2,1), (3,2), (4,2)
76  }
77  if(mdtSector>8)mdtSector=1;
78 
79  return mdtSector;
80 }

◆ roitotalphi2sectorphi()

int MdtVsTgcRawDataValAlg::roitotalphi2sectorphi ( int  phi)
private

◆ runStat()

StatusCode ManagedMonitorToolBase::runStat ( )
virtualinherited

This implementation does nothing; equivalent functionality may be provided by procHists( true, true, true ).

Implements IMonitorToolBase.

Definition at line 1663 of file ManagedMonitorToolBase.cxx.

1665 {
1666  return StatusCode::SUCCESS;
1667 }

◆ setMonManager()

void ManagedMonitorToolBase::setMonManager ( AthenaMonManager manager)
virtualinherited

Takes a pointer to a managing object to get information from it when needed.

Definition at line 1327 of file ManagedMonitorToolBase.cxx.

1329 {
1330  ATH_MSG_DEBUG( "ManagedMonitorToolBase::setMonManager():");
1331  m_manager = manager;
1332  if( m_manager != 0 ) {
1333  ATH_MSG_DEBUG( " --> Setting manager");
1334  m_managerNameProp = m_manager->name();
1338  delete m_streamNameFcn;
1340  }
1341  ATH_MSG_DEBUG( " --> Exiting successfully");
1342 }

◆ setupOutputStreams()

StatusCode ManagedMonitorToolBase::setupOutputStreams ( std::vector< std::string >  Mapping = std::vector<std::string>())
virtualinherited

This implementation does nothing—streams in this class should be managed by the AthenaMonManager.

Consider using MonitorToolBase for user-managed streams.

Implements IMonitorToolBase.

Definition at line 1652 of file ManagedMonitorToolBase.cxx.

1654 {
1655  // All instances should write to the stream(s) defined by the
1656  // AthenaMonManager.
1657 
1658  return StatusCode::SUCCESS;
1659 }

◆ SortMDTSegments()

void MdtVsTgcRawDataValAlg::SortMDTSegments ( const xAOD::MuonSegmentContainer m_newsegment,
std::vector< const Muon::MuonSegment * >(&)  sortedSegments[2][4] 
)
private

Definition at line 29 of file MdtVsTgcRawData_SegmSorting.cxx.

30  {
31 
32  // Loop over all segments in event
33  xAOD::MuonSegmentContainer::const_iterator mdtseg_itr = newsegment->begin();
34  xAOD::MuonSegmentContainer::const_iterator mdtseg_end = newsegment->end();
35  for(; mdtseg_itr!=mdtseg_end; ++mdtseg_itr){
36  if(!(*mdtseg_itr)->muonSegment().isValid())continue;
37  // Get segm
38  const Muon::MuonSegment* segm = dynamic_cast<const Muon::MuonSegment*>(*(*mdtseg_itr)->muonSegment());
39  if (segm == nullptr) {
40  ATH_MSG_ERROR( "no pointer to segm!!!" );
41  break;
42  }
43 
44  bool isMdt=false, isEndcap=false; // Flags for whether the Segment has hits from the MDT/Endcap
45  int nMdtMeas[4]={0,0,0,0}; // int array to count number of MDT hits in different stations
46 
47  // Loop through contained ROTs and identify used stations
48  for(unsigned int iROT=0; iROT<segm->numberOfContainedROTs(); ++iROT){
49  const Trk::RIO_OnTrack* rio = segm->rioOnTrack(iROT);
50  if(!rio){
51  ATH_MSG_DEBUG("No RIO");
52  continue;
53  }
54  Identifier id = rio->identify();
55 
56  // Identify MDT Endcap Segments
57  if(m_idHelperSvc->isMdt(id))isMdt=true;
58  if(m_idHelperSvc->isEndcap(id))isEndcap=true;
59 
60  int stationName = int(m_idHelperSvc->mdtIdHelper().stationName(id));
61  // Large (L) = odd, greater r, Small (S) = even, lower r
62  // 13=EIL 49=EIS 14=EEL 15=EES 17=EML 18=EMS 20=EOL 21=EOS
63  if((stationName==13)||(stationName==49))nMdtMeas[0]++;// MDT
64  if((stationName==14)||(stationName==15))nMdtMeas[1]++;// MDT
65  if((stationName==17)||(stationName==18))nMdtMeas[2]++;// MDT
66  if((stationName==20)||(stationName==21))nMdtMeas[3]++;// MDT
67  }
68 
69  // If not Endcap and does not contain MDT hits
70  if(!isMdt||!isEndcap)continue;
71 
72  // Get Side
73  int segmAC = (segm->globalPosition().eta()<0);// a:0, c:1
74 
75  // Check MDT Stations included in this Segment
76  int nMDTStations=0; int MDTStationj=-1;
77  for(int jMDT=0;jMDT<4;jMDT++){
78  if(nMdtMeas[jMDT]!=0){
79  nMDTStations++;
80  MDTStationj=jMDT;
81  }
82  }
83 
84  // MC data has an odd channel set always triggering segments, this cuts them
85  if((segmAC==0)&&(MDTStationj==0)&&
86  (segm->globalPosition().eta()>1.815)&&(segm->globalPosition().eta()<1.82)&&
87  (segm->globalPosition().phi()>2.857)&&(segm->globalPosition().phi()<2.862))continue;
88 
89  // If there is only one station pass the segment data on to the variables
90  if(nMDTStations==1){
91  //HasStationSegm[segmAC][MDTStationj]=true;
92  sortedSegments[segmAC][MDTStationj].push_back(segm);
93  }
94  }// Loop over segments
95 }// End of function

◆ stationGasGap2layer()

int MdtVsTgcRawDataValAlg::stationGasGap2layer ( int  station,
int  GasGap 
)
private

Definition at line 114 of file MdtVsTgcRawData_functions.cxx.

114  {
115  int layer=0;
116  if(station==41||station==42){
117  layer += GasGap;
118  }else if(station==43||station==44){
119  layer = 3+GasGap;
120  }else if(station==45||station==46){
121  layer = 5+GasGap;
122  }
123  return layer;
124 }

◆ streamNameFunction()

ManagedMonitorToolBase::StreamNameFcn * ManagedMonitorToolBase::streamNameFunction ( )
virtualinherited

Returns the function object that converts logical paramters into a physical stream name.

Definition at line 451 of file ManagedMonitorToolBase.cxx.

453 {
454  if( m_streamNameFcn == 0 ) {
455  msg(MSG::ERROR) << "!! streamNameFunction() has not been initialized !!" << endmsg;
456  msg(MSG::ERROR) << " --> neither ManagedMonitorToolBase::initialize() nor" << endmsg;
457  msg(MSG::ERROR) << " --> ManagedMonitorToolBase::setMonManager() has been called." << endmsg;
458  msg(MSG::ERROR) << " --> Correct configuration cannot be guaranteed from this point." << endmsg;
460  }
461  return m_streamNameFcn;
462 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::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.

◆ tgceffcalc()

void MdtVsTgcRawDataValAlg::tgceffcalc ( const xAOD::MuonSegmentContainer m_newsegment,
const Muon::TgcPrepDataContainer tgc_prepcontainer 
)
private

Definition at line 36 of file MdtVsTgcRawData_TGCEffCheck.cxx.

37  {
38  ATH_MSG_DEBUG("inside tgcEIFIeffcalc" );
40  // Declare vector arrays to hold segment pointers
41 
42  // Holds Segments sorted into MDT Stations on each side
43  std::vector<const Muon::MuonSegment*> sortedSegments[2][4]; //[AC][MDTStation]
44 
45  // Holds Segments which have been disqualified, any segments in this array are ignored when looping through sortedSegments
46  std::vector<const Muon::MuonSegment*> DQdisqualifiedSegments[2][4]; //[AC][MDTStation] // Segments which have been disqualified by DQ
47  std::vector<const Muon::MuonSegment*> MATCHdisqualifiedSegments[2][4];//[AC][MDTStation] // Segments which have been disqualified by DQ or already been included in a track
48 
49  // Holds Segments which have been matched into a track
50  std::vector<SegmTrack> matchedSegments[2]; //[AC]
51 
52 
54  // Sort and filter Segments
55 
56  // Sort Segments from segmcollection into correct bin in sortedSegments array
57  SortMDTSegments(newmdtsegment, sortedSegments);
58  // Disqualify Segments with bad DQ
59  DQCheckMDTSegments(sortedSegments, DQdisqualifiedSegments);
60  for(int i=0;i<2;i++){
61  for(int jMDT=0;jMDT<4;jMDT++){
62  MATCHdisqualifiedSegments[i][jMDT] = DQdisqualifiedSegments[i][jMDT];
63  }
64  }
65 
66 
68  // Segment Track Method
69  // Match up Segments into tracks
70  MatchMDTSegments(sortedSegments, MATCHdisqualifiedSegments, matchedSegments);
71  // Use tracks to look for TGC hits
72  CheckTGConTrack(matchedSegments, tgc_prepcontainer);
73 
74 
76  // Midstation-only Method
77 
78  // Use segments to check Midstation again
79  MidstationOnlyCheck(sortedSegments, DQdisqualifiedSegments, tgc_prepcontainer);
80 
81  return;
82 }// End of function

◆ tgceffcalcfinalize()

void MdtVsTgcRawDataValAlg::tgceffcalcfinalize ( )
private

Definition at line 145 of file MdtVsTgcRawData_TGCEffCheck.cxx.

145  {
146  int beff, bdenom, berror;
147  float feff, fdenom;
148  for(int i=0;i<2;i++){// AC
149  // Station Coordinate Efficiency Histograms
150  for(int k=0;k<2;k++){// WireStrip
151  // Loop Numerator and Denominator, total up histograms
152  for(int e=1;e<3;e++){
153  TList histlist;
154  histlist.Add(m_eff_stationmapbase[i][k][e]);
155  histlist.Add(m_eff_stationmapmid[i][k][e]);
156  m_eff_stationmap[i][k][e]->Merge(&histlist);
157  }
158 
159  const int nhtypes = 3;
160  // Make array of pointers to different efficiency histogram types
161  TH2 *histarray[nhtypes][4] = {{ m_eff_stationmapbase[i][k][0], m_eff_stationmapbase[i][k][1], m_eff_stationmapbase[i][k][2], m_eff_stationmapbase[i][k][3]},
164  for(int h=0;h<nhtypes;h++){
165  // Calculate Efficiency
166  histarray[h][0]->Divide(histarray[h][1], histarray[h][2]);
167 
168  // Calculate Error
169  int nX=histarray[h][3]->GetNbinsX();
170  int nY=histarray[h][3]->GetNbinsY();
171  for(int x=1;x<=nX;x++){
172  for(int y=1;y<=nY;y++){
173  beff =histarray[h][0]->GetBin(x,y);
174  bdenom=histarray[h][2]->GetBin(x,y);
175  berror=histarray[h][3]->GetBin(x,y);
176 
177  feff =histarray[h][0]->GetBinContent(beff);
178  fdenom=histarray[h][2]->GetBinContent(bdenom);
179 
180  float result = 0;
181  if(fdenom>0){
182  result=sqrt(feff*(1-feff)/fdenom);
183  }
184  histarray[h][3]->SetBinContent(berror,result);
185  }// nY Bins
186  }// nX Bins
187  }
188  }// WireStrip
189  }// AC
190 
191  return;
192 }// End of function

◆ TGCgetlayer()

int MdtVsTgcRawDataValAlg::TGCgetlayer ( int  stationName,
int  g 
)
private

Definition at line 196 of file MdtVsTgcRawData_TGCEffCheck.cxx.

196  {
197  if(g<1){
198  ATH_MSG_WARNING( "TGCgetlayer passed invalid gasgap g=" << g );
199  return -1;
200  }
201  int l = g-1;
202  if(stationName==41||stationName==42){
203  if(g>3){
204  ATH_MSG_WARNING( "TGCgetlayer passed invalid gasgap and stationName combination n=" << stationName << " g=" << g );
205  return -1;
206  }
207  }else if(stationName==43||stationName==44){
208  if(g>2){
209  ATH_MSG_WARNING( "TGCgetlayer passed invalid gasgap and stationName combination n=" << stationName << " g=" << g );
210  return -1;
211  }
212  l+=3;
213  }else if(stationName==45||stationName==46){
214  if(g>2){
215  ATH_MSG_WARNING( "TGCgetlayer passed invalid gasgap and stationName combination n=" << stationName << " g=" << g );
216  return -1;
217  }
218  l+=5;
219  }else if(stationName==47||stationName==48){
220  if(g>2){
221  ATH_MSG_WARNING( "TGCgetlayer passed invalid gasgap and stationName combination n=" << stationName << " g=" << g );
222  return -1;
223  }
224  l+=7;
225  }else{
226  ATH_MSG_WARNING( "TGCgetlayer passed invalid stationName n=" << stationName );
227  return -1;
228  }
229  return l;
230 }// End of function

◆ TGClayer2stationindex()

int MdtVsTgcRawDataValAlg::TGClayer2stationindex ( int  l)
private

Definition at line 234 of file MdtVsTgcRawData_TGCEffCheck.cxx.

234  {
235  if(l==0||l==1||l==2)return 0;
236  else if(l==3||l==4)return 1;
237  else if(l==5||l==6)return 2;
238  else if(l==7||l==8)return 3;
239  else{
240  ATH_MSG_WARNING( "TGClayer2Station passed invalid layer number:" << l );
241  return -1;
242  }
243 }// End of function

◆ TGCstationname2stationindex()

int MdtVsTgcRawDataValAlg::TGCstationname2stationindex ( int  stationName)
private

Definition at line 246 of file MdtVsTgcRawData_TGCEffCheck.cxx.

246  {
247  if(stationName==41||stationName==42)return 0;
248  else if(stationName==43||stationName==44)return 1;
249  else if(stationName==45||stationName==46)return 2;
250  else if(stationName==47||stationName==48)return 3;
251  else{
252  ATH_MSG_WARNING( "TGCstationname2stationindex passed invalid stationName n=" << stationName );
253  return -1;
254  }
255 }// End of function

◆ THistSvc_deReg_fixTGraph()

StatusCode ManagedMonitorToolBase::THistSvc_deReg_fixTGraph ( TFile *  file,
TGraph *  theGraph,
std::string &  directoryName 
)
protectedinherited

Fixes THistSvc->deReg(obj) when obj is TGraph instance.

Read more in source file about this bug.

Definition at line 1038 of file ManagedMonitorToolBase.cxx.

1040 {
1041  // THistSvc employs TDirectory Append method when registering TGraph.
1042  // When deReg is used to de-register TGraph object, THistSvc only removes the object
1043  // from its internal management but forgets to delete from TDirectory.
1044  // The current method fixes this problem by removing the TGraph object manually
1045  // after THistSvc->deReg(TGraph* obj) is called.
1046 
1047  // Saves and restores gFile and gDirectory
1048  GlobalDirectoryRestore restore;
1049 
1050  // This check is true when TGraph object is removed successfully
1051  bool graphRemoved = false;
1052 
1053  file->cd("/");
1054  TDirectory* dir = file->GetDirectory(directoryName.c_str());
1055  if (dir != 0) {
1056  dir->cd();
1057  TObject* obj = dir->Remove(theGraph);
1058  if (obj != 0)
1059  graphRemoved = true;
1060  }
1061 
1062  if (!graphRemoved) {
1063  return StatusCode::FAILURE;
1064  }
1065 
1066  return StatusCode::SUCCESS;
1067 }

◆ trigChainsArePassed()

bool ManagedMonitorToolBase::trigChainsArePassed ( std::vector< std::string > &  vTrigNames)
protectedvirtualinherited

Definition at line 2094 of file ManagedMonitorToolBase.cxx.

2096 {
2097  ATH_MSG_DEBUG( "ManagedMonitorToolBase::trigChainsArePassed:");
2098 
2099  for(unsigned int i=0; i<vTrigNames.size(); i++) {
2100  if( m_trigDecTool->isPassed(vTrigNames[i]) ) {
2101  ATH_MSG_DEBUG( " + \"" << vTrigNames[i] << "\" passed, returning \'true\'");
2102  return true;
2103  }
2104  else {
2105  ATH_MSG_DEBUG( " - \"" << vTrigNames[i] << "\" did not pass");
2106  }
2107  }
2108 
2109  return false;
2110 }

◆ updateTriggersForGroups()

void ManagedMonitorToolBase::updateTriggersForGroups ( std::vector< std::string > &  vTrigChainNames)
protectedinherited

Definition at line 2132 of file ManagedMonitorToolBase.cxx.

2133  {
2134  for (size_t i = 0; i < vTrigChainNames.size(); ++i) {
2135  std::string& thisName = vTrigChainNames[i];
2136  if (thisName.compare(0, 9, "CATEGORY_") ==0) {
2137  ATH_MSG_DEBUG("Found a trigger category: " << thisName << ". We will unpack it.");
2138  std::vector<std::string> triggers = m_trigTranslator->translate(thisName.substr(9,std::string::npos));
2139  std::ostringstream oss;
2140  oss << "(";
2141  for (size_t itrig = 0; itrig < triggers.size(); ++itrig) {
2142  if (itrig != 0) {
2143  oss << "|";
2144  }
2145  oss << triggers[itrig];
2146  }
2147  oss << ")";
2148  // replace with new value
2149  std::string newval = oss.str();
2150  ATH_MSG_DEBUG("Replaced with " << newval);
2151  vTrigChainNames[i] = newval;
2152  }
2153  }
2154 }

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::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  }

◆ writeAndDelete()

StatusCode ManagedMonitorToolBase::writeAndDelete ( TH1 *  h,
const MonGroup group 
)
virtualinherited

Write out histogram and delete it.

Definition at line 1601 of file ManagedMonitorToolBase.cxx.

1602  {
1603  if (!h)
1604  return StatusCode::FAILURE;
1605 
1606  std::string hName = h->GetName();
1607 
1608  if( m_manager != 0 ) {
1609  std::string genericName = NoOutputStream().getStreamName( this, group, hName );
1610  m_manager->writeAndDelete( genericName );
1611  }
1612  return StatusCode::SUCCESS;
1613 }

Member Data Documentation

◆ m_bookHistogramsInitial

bool ManagedMonitorToolBase::m_bookHistogramsInitial
privateinherited

Definition at line 893 of file ManagedMonitorToolBase.h.

◆ m_chamberName

std::string MdtVsTgcRawDataValAlg::m_chamberName
private

Definition at line 75 of file MdtVsTgcRawDataValAlg.h.

◆ m_checkCabling

bool MdtVsTgcRawDataValAlg::m_checkCabling
private

Definition at line 72 of file MdtVsTgcRawDataValAlg.h.

◆ m_cosmicStation

int MdtVsTgcRawDataValAlg::m_cosmicStation
private

Definition at line 80 of file MdtVsTgcRawDataValAlg.h.

◆ m_d

Imp* ManagedMonitorToolBase::m_d
privateinherited

Definition at line 900 of file ManagedMonitorToolBase.h.

◆ m_dataType

AthenaMonManager::DataType_t ManagedMonitorToolBase::m_dataType
protectedinherited

Definition at line 838 of file ManagedMonitorToolBase.h.

◆ m_dataTypeStr

std::string ManagedMonitorToolBase::m_dataTypeStr
protectedinherited

Definition at line 834 of file ManagedMonitorToolBase.h.

◆ m_defaultLBDuration

float ManagedMonitorToolBase::m_defaultLBDuration
privateinherited

Definition at line 895 of file ManagedMonitorToolBase.h.

◆ m_detailLevel

unsigned int ManagedMonitorToolBase::m_detailLevel
protectedinherited

Definition at line 836 of file ManagedMonitorToolBase.h.

◆ m_DetectorManagerKey

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

Definition at line 66 of file MdtVsTgcRawDataValAlg.h.

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_DQFilterTools

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

Definition at line 849 of file ManagedMonitorToolBase.h.

◆ m_eff_stationmap

TH2* MdtVsTgcRawDataValAlg::m_eff_stationmap[2][2][4] {}
private

Definition at line 145 of file MdtVsTgcRawDataValAlg.h.

◆ m_eff_stationmapbase

TH2* MdtVsTgcRawDataValAlg::m_eff_stationmapbase[2][2][4] {}
private

Definition at line 143 of file MdtVsTgcRawDataValAlg.h.

◆ m_eff_stationmapmid

TH2* MdtVsTgcRawDataValAlg::m_eff_stationmapmid[2][2][4] {}
private

Definition at line 144 of file MdtVsTgcRawDataValAlg.h.

◆ m_endOfEventsBlock

bool ManagedMonitorToolBase::m_endOfEventsBlock
privateinherited

Definition at line 823 of file ManagedMonitorToolBase.h.

◆ m_endOfLowStat

bool ManagedMonitorToolBase::m_endOfLowStat
privateinherited

Definition at line 823 of file ManagedMonitorToolBase.h.

◆ m_endOfLumiBlock

bool ManagedMonitorToolBase::m_endOfLumiBlock
privateinherited

Definition at line 823 of file ManagedMonitorToolBase.h.

◆ m_endOfRun

bool ManagedMonitorToolBase::m_endOfRun
privateinherited

Definition at line 823 of file ManagedMonitorToolBase.h.

◆ m_environment

AthenaMonManager::Environment_t ManagedMonitorToolBase::m_environment
protectedinherited

Definition at line 839 of file ManagedMonitorToolBase.h.

◆ m_environmentStr

std::string ManagedMonitorToolBase::m_environmentStr
protectedinherited

Definition at line 835 of file ManagedMonitorToolBase.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_fileKey

std::string ManagedMonitorToolBase::m_fileKey
protectedinherited

Definition at line 833 of file ManagedMonitorToolBase.h.

◆ m_haveClearedLastEventBlock

bool ManagedMonitorToolBase::m_haveClearedLastEventBlock
protectedinherited

Definition at line 866 of file ManagedMonitorToolBase.h.

◆ m_idHelperSvc

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

Definition at line 69 of file MdtVsTgcRawDataValAlg.h.

◆ m_lastEvent

int MdtVsTgcRawDataValAlg::m_lastEvent
private

Definition at line 79 of file MdtVsTgcRawDataValAlg.h.

◆ m_lastHigStatInterval

int ManagedMonitorToolBase::m_lastHigStatInterval
protectedinherited

Definition at line 861 of file ManagedMonitorToolBase.h.

◆ m_lastLowStatInterval

int ManagedMonitorToolBase::m_lastLowStatInterval
protectedinherited

Definition at line 861 of file ManagedMonitorToolBase.h.

◆ m_lastLumiBlock

unsigned int ManagedMonitorToolBase::m_lastLumiBlock
protectedinherited

Definition at line 859 of file ManagedMonitorToolBase.h.

◆ m_lastMedStatInterval

int ManagedMonitorToolBase::m_lastMedStatInterval
protectedinherited

Definition at line 861 of file ManagedMonitorToolBase.h.

◆ m_lastRun

unsigned int ManagedMonitorToolBase::m_lastRun
protectedinherited

Definition at line 860 of file ManagedMonitorToolBase.h.

◆ m_lbDurationDataKey

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

Definition at line 888 of file ManagedMonitorToolBase.h.

◆ m_lumiDataKey

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

Definition at line 886 of file ManagedMonitorToolBase.h.

◆ m_manager

AthenaMonManager* ManagedMonitorToolBase::m_manager
protectedinherited

Definition at line 829 of file ManagedMonitorToolBase.h.

◆ m_managerNameProp

std::string ManagedMonitorToolBase::m_managerNameProp
protectedinherited

Definition at line 831 of file ManagedMonitorToolBase.h.

◆ m_mdt_PrepDataContainerName

SG::ReadHandleKey<Muon::MdtPrepDataContainer> MdtVsTgcRawDataValAlg::m_mdt_PrepDataContainerName {this,"MdtPrepDataContainer","MDT_DriftCircles","MDT PRDs"}
private

Definition at line 83 of file MdtVsTgcRawDataValAlg.h.

◆ m_mdt_SegmentCollectionName

SG::ReadHandleKey<xAOD::MuonSegmentContainer> MdtVsTgcRawDataValAlg::m_mdt_SegmentCollectionName {this,"MdtSegmentCollection","MuonSegments","muon segments"}
private

Definition at line 84 of file MdtVsTgcRawDataValAlg.h.

◆ m_mdt_segmmap

TH2* MdtVsTgcRawDataValAlg::m_mdt_segmmap[2][4] {}
private

Definition at line 111 of file MdtVsTgcRawDataValAlg.h.

◆ m_mdt_segmmatchsag

TH1* MdtVsTgcRawDataValAlg::m_mdt_segmmatchsag[2][4][4][4] {}
private

Definition at line 150 of file MdtVsTgcRawDataValAlg.h.

◆ m_mdt_segmposdirsag

TH1* MdtVsTgcRawDataValAlg::m_mdt_segmposdirsag[2][4][4] {}
private

Definition at line 151 of file MdtVsTgcRawDataValAlg.h.

◆ m_mdt_trackchecksag

TH1* MdtVsTgcRawDataValAlg::m_mdt_trackchecksag[2][4][4][4][2] {}
private

Definition at line 153 of file MdtVsTgcRawDataValAlg.h.

◆ m_mdt_trackdirdirsag

TH1* MdtVsTgcRawDataValAlg::m_mdt_trackdirdirsag[2][4][4][4] {}
private

Definition at line 152 of file MdtVsTgcRawDataValAlg.h.

◆ m_MdtAdcCut

int MdtVsTgcRawDataValAlg::m_MdtAdcCut
private

Definition at line 86 of file MdtVsTgcRawDataValAlg.h.

◆ m_MdtTdcCut

int MdtVsTgcRawDataValAlg::m_MdtTdcCut
private

Definition at line 87 of file MdtVsTgcRawDataValAlg.h.

◆ m_metadataMap

MDMap_t ManagedMonitorToolBase::m_metadataMap
protectedinherited

Definition at line 827 of file ManagedMonitorToolBase.h.

◆ m_mvt_cutspassed

TH1* MdtVsTgcRawDataValAlg::m_mvt_cutspassed[2] {}
private

Definition at line 109 of file MdtVsTgcRawDataValAlg.h.

◆ m_mvt_extrprdsag

TH1* MdtVsTgcRawDataValAlg::m_mvt_extrprdsag[2][4][2][2][4] {}
private

Definition at line 147 of file MdtVsTgcRawDataValAlg.h.

◆ m_mvt_extrprdsag2

TH1* MdtVsTgcRawDataValAlg::m_mvt_extrprdsag2[2][4][2][2][4] {}
private

Definition at line 148 of file MdtVsTgcRawDataValAlg.h.

◆ m_nEvents

unsigned int ManagedMonitorToolBase::m_nEvents
protectedinherited

Definition at line 863 of file ManagedMonitorToolBase.h.

◆ m_nEventsIgnoreTrigger

unsigned int ManagedMonitorToolBase::m_nEventsIgnoreTrigger
protectedinherited

Definition at line 864 of file ManagedMonitorToolBase.h.

◆ m_newEventsBlock

bool ManagedMonitorToolBase::m_newEventsBlock
privateinherited

Definition at line 822 of file ManagedMonitorToolBase.h.

◆ m_newHigStatInterval

bool ManagedMonitorToolBase::m_newHigStatInterval
privateinherited

Definition at line 820 of file ManagedMonitorToolBase.h.

◆ m_newLowStat

bool ManagedMonitorToolBase::m_newLowStat
privateinherited

Definition at line 821 of file ManagedMonitorToolBase.h.

◆ m_newLowStatInterval

bool ManagedMonitorToolBase::m_newLowStatInterval
privateinherited

Definition at line 820 of file ManagedMonitorToolBase.h.

◆ m_newLumiBlock

bool ManagedMonitorToolBase::m_newLumiBlock
privateinherited

Definition at line 821 of file ManagedMonitorToolBase.h.

◆ m_newMedStatInterval

bool ManagedMonitorToolBase::m_newMedStatInterval
privateinherited

Definition at line 820 of file ManagedMonitorToolBase.h.

◆ m_newRun

bool ManagedMonitorToolBase::m_newRun
privateinherited

Definition at line 821 of file ManagedMonitorToolBase.h.

◆ m_nLumiBlocks

unsigned int ManagedMonitorToolBase::m_nLumiBlocks
protectedinherited

Definition at line 865 of file ManagedMonitorToolBase.h.

◆ m_path

std::string ManagedMonitorToolBase::m_path
protectedinherited

Definition at line 852 of file ManagedMonitorToolBase.h.

◆ m_preScaleProp

long ManagedMonitorToolBase::m_preScaleProp
protectedinherited

Definition at line 853 of file ManagedMonitorToolBase.h.

◆ m_procNEventsProp

long ManagedMonitorToolBase::m_procNEventsProp
protectedinherited

Definition at line 851 of file ManagedMonitorToolBase.h.

◆ m_sector

int MdtVsTgcRawDataValAlg::m_sector
private

Definition at line 77 of file MdtVsTgcRawDataValAlg.h.

◆ m_side

int MdtVsTgcRawDataValAlg::m_side
private

Definition at line 78 of file MdtVsTgcRawDataValAlg.h.

◆ m_stationHists

MuonDQAHistMap MdtVsTgcRawDataValAlg::m_stationHists
private

Definition at line 63 of file MdtVsTgcRawDataValAlg.h.

◆ m_StationSize

std::string MdtVsTgcRawDataValAlg::m_StationSize
private

Definition at line 76 of file MdtVsTgcRawDataValAlg.h.

◆ m_streamNameFcn

StreamNameFcn* ManagedMonitorToolBase::m_streamNameFcn
protectedinherited

Definition at line 841 of file ManagedMonitorToolBase.h.

◆ m_supportedIntervalsForRebooking

std::set<Interval_t> ManagedMonitorToolBase::m_supportedIntervalsForRebooking
privateinherited

Definition at line 896 of file ManagedMonitorToolBase.h.

◆ m_templateEfficiencies

std::map< Interval_t, std::vector< MgmtParams<TEfficiency> > > ManagedMonitorToolBase::m_templateEfficiencies
protectedinherited

Definition at line 676 of file ManagedMonitorToolBase.h.

◆ m_templateGraphs

std::map< Interval_t, std::vector< MgmtParams<TGraph> > > ManagedMonitorToolBase::m_templateGraphs
protectedinherited

Definition at line 668 of file ManagedMonitorToolBase.h.

◆ m_templateHistograms

std::map< Interval_t, std::vector< MgmtParams<TH1> > > ManagedMonitorToolBase::m_templateHistograms
protectedinherited

Definition at line 664 of file ManagedMonitorToolBase.h.

◆ m_templateTrees

std::map< Interval_t, std::vector< MgmtParams<TTree> > > ManagedMonitorToolBase::m_templateTrees
protectedinherited

Definition at line 672 of file ManagedMonitorToolBase.h.

◆ m_tgc_CoinContainerName

SG::ReadHandleKey<Muon::TgcCoinDataContainer> MdtVsTgcRawDataValAlg::m_tgc_CoinContainerName {this,"OutputCoinCollection","TrigT1CoinDataCollection","TGC coincidences"}
private

Definition at line 82 of file MdtVsTgcRawDataValAlg.h.

◆ m_tgc_prdcompsag

TH1* MdtVsTgcRawDataValAlg::m_tgc_prdcompsag[2][2][4] {}
private

Definition at line 149 of file MdtVsTgcRawDataValAlg.h.

◆ m_tgc_PrepDataContainerName

SG::ReadHandleKey<Muon::TgcPrepDataContainer> MdtVsTgcRawDataValAlg::m_tgc_PrepDataContainerName {this,"TgcPrepDataContainer","TGC_Measurements","TGC PRDs"}
private

Definition at line 81 of file MdtVsTgcRawDataValAlg.h.

◆ m_tgclv1file

bool MdtVsTgcRawDataValAlg::m_tgclv1file
private

Definition at line 73 of file MdtVsTgcRawDataValAlg.h.

◆ m_THistSvc

ServiceHandle<ITHistSvc> ManagedMonitorToolBase::m_THistSvc
protectedinherited

Definition at line 843 of file ManagedMonitorToolBase.h.

◆ m_TREarray

const MuonGM::TgcReadoutElement* MdtVsTgcRawDataValAlg::m_TREarray[8][2][9][49] {}
private

Definition at line 94 of file MdtVsTgcRawDataValAlg.h.

◆ m_trigDecTool

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

Definition at line 845 of file ManagedMonitorToolBase.h.

◆ m_triggerChainProp

std::string ManagedMonitorToolBase::m_triggerChainProp
protectedinherited

Definition at line 854 of file ManagedMonitorToolBase.h.

◆ m_triggerGroupProp

std::string ManagedMonitorToolBase::m_triggerGroupProp
protectedinherited

Definition at line 855 of file ManagedMonitorToolBase.h.

◆ m_trigLiveFractionDataKey

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

Definition at line 890 of file ManagedMonitorToolBase.h.

◆ m_trigTranslator

PublicToolHandle<ITriggerTranslatorTool> ManagedMonitorToolBase::m_trigTranslator {this,"TriggerTranslatorTool",""}
protectedinherited

Definition at line 847 of file ManagedMonitorToolBase.h.

◆ m_useLumi

bool ManagedMonitorToolBase::m_useLumi
privateinherited

Definition at line 894 of file ManagedMonitorToolBase.h.

◆ m_useTrigger

bool ManagedMonitorToolBase::m_useTrigger
protectedinherited

Definition at line 857 of file ManagedMonitorToolBase.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_vTrigChainNames

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

Definition at line 680 of file ManagedMonitorToolBase.h.

◆ m_vTrigGroupNames

std::vector<std::string> ManagedMonitorToolBase::m_vTrigGroupNames
protectedinherited

Definition at line 680 of file ManagedMonitorToolBase.h.


The documentation for this class was generated from the following files:
ManagedMonitorToolBase::m_nEvents
unsigned int m_nEvents
Definition: ManagedMonitorToolBase.h:863
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
createDCubeDigitHistograms.mdtTubeLayer
mdtTubeLayer
Definition: createDCubeDigitHistograms.py:111
MdtVsTgcRawDataValAlg::m_mdt_trackdirdirsag
TH1 * m_mdt_trackdirdirsag[2][4][4][4]
Definition: MdtVsTgcRawDataValAlg.h:152
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
ManagedMonitorToolBase::THistSvc_deReg_fixTGraph
StatusCode THistSvc_deReg_fixTGraph(TFile *file, TGraph *theGraph, std::string &directoryName)
Fixes THistSvc->deReg(obj) when obj is TGraph instance.
Definition: ManagedMonitorToolBase.cxx:1039
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
ManagedMonitorToolBase::m_templateEfficiencies
std::map< Interval_t, std::vector< MgmtParams< TEfficiency > > > m_templateEfficiencies
Definition: ManagedMonitorToolBase.h:676
ManagedMonitorToolBase::streamNameFunction
virtual StreamNameFcn * streamNameFunction()
Returns the function object that converts logical paramters into a physical stream name.
Definition: ManagedMonitorToolBase.cxx:452
ManagedMonitorToolBase::m_newRun
bool m_newRun
Definition: ManagedMonitorToolBase.h:821
Muon::nsw::STGTPSegments::moduleIDBits::stationPhi
constexpr uint8_t stationPhi
station Phi 1 to 8
Definition: NSWSTGTPDecodeBitmaps.h:161
ManagedMonitorToolBase::m_supportedIntervalsForRebooking
std::set< Interval_t > m_supportedIntervalsForRebooking
Definition: ManagedMonitorToolBase.h:896
defineDB.smd
string smd
Definition: JetTagCalibration/share/defineDB.py:44
xAOD::identify
const Identifier & identify(const UncalibratedMeasurement *meas)
Returns the associated identifier from the muon measurement.
Definition: MuonSpectrometer/MuonPhaseII/Event/xAOD/xAODMuonPrepData/Root/UtilFunctions.cxx:61
MdtVsTgcRawDataValAlg::m_mdt_segmposdirsag
TH1 * m_mdt_segmposdirsag[2][4][4]
Definition: MdtVsTgcRawDataValAlg.h:151
dumpTgcDigiDeadChambers.gasGap
list gasGap
Definition: dumpTgcDigiDeadChambers.py:33
ManagedMonitorToolBase::bookHistograms
virtual StatusCode bookHistograms()
An inheriting class should either override this function or bookHists().
Definition: ManagedMonitorToolBase.cxx:1299
ManagedMonitorToolBase::m_DQFilterTools
ToolHandleArray< IDQFilterTool > m_DQFilterTools
Definition: ManagedMonitorToolBase.h:849
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
checkFileSG.line
line
Definition: checkFileSG.py:75
ManagedMonitorToolBase::getHist
virtual StatusCode getHist(TH1 *&h, const std::string &hName, const std::string &system, Interval_t interval)
Returns a TH1 via the pointer passed as the first argument.
Definition: ManagedMonitorToolBase.cxx:1410
ManagedMonitorToolBase::m_newEventsBlock
bool m_newEventsBlock
Definition: ManagedMonitorToolBase.h:822
Trk::SurfaceBounds::inside
virtual bool inside(const Amg::Vector2D &locpo, double tol1=0., double tol2=0.) const =0
Each Bounds has a method inside, which checks if a LocalPosition is inside the bounds.
ManagedMonitorToolBase::Imp::benchPreProcHistograms
void benchPreProcHistograms()
Definition: ManagedMonitorToolBase.cxx:119
get_generator_info.result
result
Definition: get_generator_info.py:21
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
runLayerRecalibration.chain
chain
Definition: runLayerRecalibration.py:175
MdtVsTgcRawDataValAlg::numberOfSL
int numberOfSL(const Muon::TgcCoinDataContainer *tgctrgcontainer)
Definition: MdtVsTgcRawData_functions.cxx:83
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
MdtVsTgcRawDataValAlg::m_eff_stationmapbase
TH2 * m_eff_stationmapbase[2][2][4]
Definition: MdtVsTgcRawDataValAlg.h:143
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
MdtVsTgcRawDataValAlg::maphists
void maphists(const xAOD::MuonSegmentContainer *m_newsegment, const Muon::TgcPrepDataContainer *tgc_prepcontainer)
Definition: MdtVsTgcRawData_maptgchits.cxx:38
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
ManagedMonitorToolBase::higStat
@ higStat
Definition: ManagedMonitorToolBase.h:114
MdtVsTgcRawDataValAlg::m_sector
int m_sector
Definition: MdtVsTgcRawDataValAlg.h:77
MdtVsTgcRawDataValAlg::m_chamberName
std::string m_chamberName
Definition: MdtVsTgcRawDataValAlg.h:75
MdtVsTgcRawDataValAlg::tgceffcalcfinalize
void tgceffcalcfinalize()
Definition: MdtVsTgcRawData_TGCEffCheck.cxx:145
ManagedMonitorToolBase::lumiBlock
@ lumiBlock
Definition: ManagedMonitorToolBase.h:113
MdtVsTgcRawDataValAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MdtVsTgcRawDataValAlg.h:69
ManagedMonitorToolBase::m_endOfLumiBlock
bool m_endOfLumiBlock
Definition: ManagedMonitorToolBase.h:823
dumpTgcDigiDeadChambers.stationName
dictionary stationName
Definition: dumpTgcDigiDeadChambers.py:30
MuonGM::TgcReadoutElement::isForward
bool isForward() const
Returns true if the chamber is mounted on the most inner ring, i.e. a TxF chamber.
MdtVsTgcRawDataValAlg::prepareTREarray
void prepareTREarray(const MuonGM::MuonDetectorManager *MuonDetMgrDS)
Definition: MdtVsTgcRawData_TGCEffCheck.cxx:86
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
index
Definition: index.py:1
ManagedMonitorToolBase::m_THistSvc
ServiceHandle< ITHistSvc > m_THistSvc
Definition: ManagedMonitorToolBase.h:843
ManagedMonitorToolBase::m_procNEventsProp
long m_procNEventsProp
Definition: ManagedMonitorToolBase.h:851
MdtVsTgcRawDataValAlg::putBox
void putBox(TH2 *h2, float x1, float y1, float x2, float y2)
Definition: MdtVsTgcRawData_functions.cxx:129
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
ManagedMonitorToolBase::regTree
virtual StatusCode regTree(TTree *t, const std::string &system, Interval_t interval, MgmtAttr_t histo_mgmt=ATTRIB_MANAGED, const std::string &chain="", const std::string &merge="")
Registers a TTree to be included in the output stream using logical parameters that describe it.
Definition: ManagedMonitorToolBase.cxx:1547
Muon::TgcCoinData::isAside
bool isAside() const
Aside or Cside.
Definition: TgcCoinData.h:348
Muon::TgcCoinData::type
CoinDataType type() const
return the coincidence type (HIPT, LPT, SL)
Definition: TgcCoinData.h:346
AthenaMonManager::runNumber
static unsigned int runNumber()
Definition: AthenaMonManager.cxx:341
Muon::MuonSegment::rioOnTrack
const Trk::RIO_OnTrack * rioOnTrack(unsigned int) const
returns the RIO_OnTrack (also known as ROT) objects depending on the integer
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment/MuonSegment/MuonSegment.h:187
AthenaMonManager::fileKey
virtual std::string fileKey() const
Definition: AthenaMonManager.cxx:648
plotBeamSpotCompare.x2
x2
Definition: plotBeamSpotCompare.py:218
ManagedMonitorToolBase::Imp::benchPreFillHistograms
void benchPreFillHistograms()
Definition: ManagedMonitorToolBase.cxx:94
AthenaMonManager::AOD
@ AOD
Definition: AthenaMonManager.h:49
ManagedMonitorToolBase::regManagedGraphs
StatusCode regManagedGraphs(std::vector< MgmtParams< TGraph > > &templateGraphs)
Definition: ManagedMonitorToolBase.cxx:1071
AthenaMonManager::passOwnership
virtual void passOwnership(TObject *h, const std::string &key)
Pass ownership of a TObject to this manager so that it will be deleted appropriately.
Definition: AthenaMonManager.cxx:656
ManagedMonitorToolBase::Imp::benchPostFillHistograms
void benchPostFillHistograms()
Definition: ManagedMonitorToolBase.cxx:103
ManagedMonitorToolBase::regManagedHistograms
StatusCode regManagedHistograms(std::vector< MgmtParams< TH1 > > &templateHistograms)
Definition: ManagedMonitorToolBase.cxx:974
ManagedMonitorToolBase::lbDuration
virtual double lbDuration(const EventContext &ctx=Gaudi::Hive::currentContext()) const
Luminosity block time (in seconds)
Definition: ManagedMonitorToolBase.cxx:1817
ManagedMonitorToolBase::m_trigDecTool
PublicToolHandle< Trig::ITrigDecisionTool > m_trigDecTool
Definition: ManagedMonitorToolBase.h:845
skel.it
it
Definition: skel.GENtoEVGEN.py:396
M_PI
#define M_PI
Definition: ActiveFraction.h:11
MdtVsTgcRawDataValAlg::m_mdt_SegmentCollectionName
SG::ReadHandleKey< xAOD::MuonSegmentContainer > m_mdt_SegmentCollectionName
Definition: MdtVsTgcRawDataValAlg.h:84
TRT_PAI_gasdata::AC
const float AC
Definition: TRT_PAI_gasdata.h:27
MdtVsTgcRawDataValAlg::m_mdt_PrepDataContainerName
SG::ReadHandleKey< Muon::MdtPrepDataContainer > m_mdt_PrepDataContainerName
Definition: MdtVsTgcRawDataValAlg.h:83
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
ManagedMonitorToolBase::m_d
Imp * m_d
Definition: ManagedMonitorToolBase.h:899
ManagedMonitorToolBase::m_lastLowStatInterval
int m_lastLowStatInterval
Definition: ManagedMonitorToolBase.h:861
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
ManagedMonitorToolBase::m_triggerGroupProp
std::string m_triggerGroupProp
Definition: ManagedMonitorToolBase.h:855
MdtVsTgcRawDataValAlg::BlankPhi24
void BlankPhi24(TH2 *h2, int binx)
Definition: MdtVsTgcRawData_functions.cxx:144
ManagedMonitorToolBase::Imp::benchPostProcHistograms
void benchPostProcHistograms()
Definition: ManagedMonitorToolBase.cxx:127
ManagedMonitorToolBase::m_dataType
AthenaMonManager::DataType_t m_dataType
Definition: ManagedMonitorToolBase.h:838
Muon::TgcPrepData::detectorElement
virtual const MuonGM::TgcReadoutElement * detectorElement() const override final
Returns the detector element corresponding to this PRD The pointer will be zero if the det el is not ...
Definition: TgcPrepData.h:120
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
Trk::RIO_OnTrack
Definition: RIO_OnTrack.h:70
ManagedMonitorToolBase::regGraph
virtual StatusCode regGraph(TGraph *g, const std::string &system, Interval_t interval, MgmtAttr_t histo_mgmt=ATTRIB_MANAGED, const std::string &chain="", const std::string &merge="")
Registers a TGraph to be included in the output stream using logical parameters that describe the gra...
Definition: ManagedMonitorToolBase.cxx:1491
ManagedMonitorToolBase::m_newLowStatInterval
bool m_newLowStatInterval
Definition: ManagedMonitorToolBase.h:820
ManagedMonitorToolBase::fill
@ fill
Definition: ManagedMonitorToolBase.h:115
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
python.TrigTLAMonitorAlgorithm.triggers
triggers
Definition: TrigTLAMonitorAlgorithm.py:196
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
Muon::CompetingMuonClustersOnTrack
Definition: CompetingMuonClustersOnTrack.h:54
isValid
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
Definition: AtlasPID.h:620
ManagedMonitorToolBase::procHistograms
virtual StatusCode procHistograms()
An inheriting class should either override this function or finalHists().
Definition: ManagedMonitorToolBase.cxx:1315
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
MuonGM::MuonReadoutElement::getLongSsize
double getLongSsize() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:199
MdtVsTgcRawDataValAlg::m_cosmicStation
int m_cosmicStation
Definition: MdtVsTgcRawDataValAlg.h:80
MdtVsTgcRawDataValAlg::m_tgc_prdcompsag
TH1 * m_tgc_prdcompsag[2][2][4]
Definition: MdtVsTgcRawDataValAlg.h:149
python.TrigEgammaMonitorHelper.TH2F
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:45
x
#define x
python.SystemOfUnits.ms
int ms
Definition: SystemOfUnits.py:132
Muon::MuonSegment::numberOfContainedROTs
unsigned int numberOfContainedROTs() const
number of RIO_OnTracks
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment/MuonSegment/MuonSegment.h:199
ManagedMonitorToolBase::regManagedTrees
StatusCode regManagedTrees(std::vector< MgmtParams< TTree > > &templateTrees)
Definition: ManagedMonitorToolBase.cxx:1202
ManagedMonitorToolBase::registerMetadata
StatusCode registerMetadata(const std::string &streamName, const std::string &hName, const MonGroup &group)
Definition: ManagedMonitorToolBase.cxx:947
AthenaMonManager::getLBsLowStat
static unsigned int getLBsLowStat()
Definition: AthenaMonManager.cxx:303
Muon::TgcCoinData
Definition: TgcCoinData.h:37
MdtVsTgcRawDataValAlg::TGClayer2stationindex
int TGClayer2stationindex(int l)
Definition: MdtVsTgcRawData_TGCEffCheck.cxx:234
ManagedMonitorToolBase::m_newHigStatInterval
bool m_newHigStatInterval
Definition: ManagedMonitorToolBase.h:820
makeTRTBarrelCans.y1
tuple y1
Definition: makeTRTBarrelCans.py:15
MdtVsTgcRawDataValAlg::m_mvt_cutspassed
TH1 * m_mvt_cutspassed[2]
Definition: MdtVsTgcRawDataValAlg.h:109
ManagedMonitorToolBase::m_newMedStatInterval
bool m_newMedStatInterval
Definition: ManagedMonitorToolBase.h:820
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
MuonGM::TgcReadoutElement::channelPos
Amg::Vector3D channelPos(const Identifier &id) const
Returns the position of the active channel (wireGang or strip)
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
MdtVsTgcRawDataValAlg::m_DetectorManagerKey
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
Definition: MdtVsTgcRawDataValAlg.h:66
AthenaMonManager::environment
static Environment_t environment()
Returns the running environment of the monitoring application to help ManagedMonitorToolBase objects ...
Definition: AthenaMonManager.cxx:298
MdtVsTgcRawDataValAlg::BlankStationMap
void BlankStationMap(TH2 *h2, int ws)
Definition: MdtVsTgcRawData_functions.cxx:155
MdtVsTgcRawDataValAlg::m_tgc_PrepDataContainerName
SG::ReadHandleKey< Muon::TgcPrepDataContainer > m_tgc_PrepDataContainerName
Definition: MdtVsTgcRawDataValAlg.h:81
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
python.checkMetadata.metadata
metadata
Definition: checkMetadata.py:175
MuonGM::MuonDetectorManager::getTgcReadoutElement
const TgcReadoutElement * getTgcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx:247
MuonGM::MuonReadoutElement::getSsize
double getSsize() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:196
AthenaMonManager::getLBsMedStat
static unsigned int getLBsMedStat()
Definition: AthenaMonManager.cxx:306
ManagedMonitorToolBase::m_bookHistogramsInitial
bool m_bookHistogramsInitial
Definition: ManagedMonitorToolBase.h:893
ManagedMonitorToolBase::Imp::m_warnAboutMissingInitialize
bool m_warnAboutMissingInitialize
Definition: ManagedMonitorToolBase.cxx:48
MdtVsTgcRawDataValAlg::m_mdt_trackchecksag
TH1 * m_mdt_trackchecksag[2][4][4][4][2]
Definition: MdtVsTgcRawDataValAlg.h:153
MdtVsTgcRawDataValAlg::m_TREarray
const MuonGM::TgcReadoutElement * m_TREarray[8][2][9][49]
Definition: MdtVsTgcRawDataValAlg.h:94
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
PyPoolBrowser.item
item
Definition: PyPoolBrowser.py:129
ManagedMonitorToolBase::getNewStreamNameFcn
virtual StreamNameFcn * getNewStreamNameFcn() const
Definition: ManagedMonitorToolBase.cxx:2158
ManagedMonitorToolBase::m_preScaleProp
long m_preScaleProp
Definition: ManagedMonitorToolBase.h:853
ManagedMonitorToolBase::trigChainsArePassed
virtual bool trigChainsArePassed(std::vector< std::string > &)
Definition: ManagedMonitorToolBase.cxx:2095
ManagedMonitorToolBase::m_fileKey
std::string m_fileKey
Definition: ManagedMonitorToolBase.h:833
ManagedMonitorToolBase::m_lastLumiBlock
unsigned int m_lastLumiBlock
Definition: ManagedMonitorToolBase.h:859
ManagedMonitorToolBase::m_vTrigGroupNames
std::vector< std::string > m_vTrigGroupNames
Definition: ManagedMonitorToolBase.h:680
AthenaMonManager::tier0ESD
@ tier0ESD
Definition: AthenaMonManager.h:49
ManagedMonitorToolBase::lbAverageLivefraction
virtual float lbAverageLivefraction(const EventContext &ctx=Gaudi::Hive::currentContext()) const
Average luminosity livefraction.
Definition: ManagedMonitorToolBase.cxx:1763
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
ManagedMonitorToolBase::m_templateGraphs
std::map< Interval_t, std::vector< MgmtParams< TGraph > > > m_templateGraphs
Definition: ManagedMonitorToolBase.h:668
MdtVsTgcRawDataValAlg::phi2sector
int phi2sector(int phi, int ef)
Definition: MdtVsTgcRawData_functions.cxx:57
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthenaMonManager::dataType
static DataType_t dataType()
Returns the data type that the monitoring application is running over to help ManagedMonitorToolBase ...
Definition: AthenaMonManager.cxx:315
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
MuonGM::MuonDetectorManager::getMdtReadoutElement
const MdtReadoutElement * getMdtReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx:204
ManagedMonitorToolBase::m_manager
AthenaMonManager * m_manager
Definition: ManagedMonitorToolBase.h:829
MdtVsTgcRawDataValAlg::m_MdtAdcCut
int m_MdtAdcCut
Definition: MdtVsTgcRawDataValAlg.h:86
ManagedMonitorToolBase::initialize
virtual StatusCode initialize()
Definition: ManagedMonitorToolBase.cxx:617
ManagedMonitorToolBase::m_lumiDataKey
SG::ReadCondHandleKey< LuminosityCondData > m_lumiDataKey
Definition: ManagedMonitorToolBase.h:887
ManagedMonitorToolBase::m_streamNameFcn
StreamNameFcn * m_streamNameFcn
Definition: ManagedMonitorToolBase.h:841
MuonGM::MdtReadoutElement
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:51
lumiFormat.i
int i
Definition: lumiFormat.py:85
AthenaMonManager::tier0
@ tier0
Definition: AthenaMonManager.h:49
MdtVsTgcRawDataValAlg::SortMDTSegments
void SortMDTSegments(const xAOD::MuonSegmentContainer *m_newsegment, std::vector< const Muon::MuonSegment * >(&sortedSegments)[2][4])
Definition: MdtVsTgcRawData_SegmSorting.cxx:29
beamspotman.n
n
Definition: beamspotman.py:731
python.CaloCondTools.g
g
Definition: CaloCondTools.py:15
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
extractSporadic.h
list h
Definition: extractSporadic.py:97
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AthenaMonManager::online
@ online
Definition: AthenaMonManager.h:49
ManagedMonitorToolBase::file
@ file
Definition: ManagedMonitorToolBase.h:113
MdtVsTgcRawDataValAlg::m_mvt_extrprdsag
TH1 * m_mvt_extrprdsag[2][4][2][2][4]
Definition: MdtVsTgcRawDataValAlg.h:147
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
makeTRTBarrelCans.y2
tuple y2
Definition: makeTRTBarrelCans.py:18
TauGNNUtils::Variables::Track::dPhi
bool dPhi(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
Definition: TauGNNUtils.cxx:538
MdtVsTgcRawDataValAlg::MatchMDTSegments
void MatchMDTSegments(std::vector< const Muon::MuonSegment * >(&sortedSegments)[2][4], std::vector< const Muon::MuonSegment * >(&disqualifiedSegments)[2][4], std::vector< SegmTrack >(&matchedSegments)[2])
Definition: MdtVsTgcRawData_SegmMatching.cxx:33
MdtVsTgcRawDataValAlg::m_tgc_CoinContainerName
SG::ReadHandleKey< Muon::TgcCoinDataContainer > m_tgc_CoinContainerName
Definition: MdtVsTgcRawDataValAlg.h:82
AthenaMonManager::writeAndDelete
virtual void writeAndDelete(const std::string &key)
If the TObject is owned by this manager, its Write() method is called and it is deleted.
Definition: AthenaMonManager.cxx:665
MdtVsTgcRawDataValAlg::m_mvt_extrprdsag2
TH1 * m_mvt_extrprdsag2[2][4][2][2][4]
Definition: MdtVsTgcRawDataValAlg.h:148
Trk::Segment::containedMeasurements
const std::vector< const Trk::MeasurementBase * > & containedMeasurements() const
returns the vector of Trk::MeasurementBase objects
Definition: Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:166
getLatestRuns.interval
interval
Definition: getLatestRuns.py:24
MuonGM::TgcReadoutElement
A TgcReadoutElement corresponds to a single TGC chamber; therefore typically a TGC station contains s...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/TgcReadoutElement.h:42
ManagedMonitorToolBase::ATTRIB_UNMANAGED
@ ATTRIB_UNMANAGED
Definition: ManagedMonitorToolBase.h:130
ManagedMonitorToolBase::Imp::benchPostBookHistograms
void benchPostBookHistograms()
Definition: ManagedMonitorToolBase.cxx:84
test_pyathena.parent
parent
Definition: test_pyathena.py:15
AthenaMonManager::tier0Raw
@ tier0Raw
Definition: AthenaMonManager.h:49
ManagedMonitorToolBase::m_triggerChainProp
std::string m_triggerChainProp
Definition: ManagedMonitorToolBase.h:854
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
IdentifiableContainerMT::end
const_iterator end() const
return const_iterator for end of container
Definition: IdentifiableContainerMT.h:239
AthenaMonManager::user
@ user
Definition: AthenaMonManager.h:49
hist_file_dump.f
f
Definition: hist_file_dump.py:135
run
Definition: run.py:1
ManagedMonitorToolBase::ATTRIB_MANAGED
@ ATTRIB_MANAGED
Definition: ManagedMonitorToolBase.h:130
ManagedMonitorToolBase::StreamNameFcn::getStreamName
virtual std::string getStreamName(const ManagedMonitorToolBase *tool, const MonGroup &group, const std::string &objName, bool usePreviousInterval=false)=0
A function that converts a MonGroup of logical parameters into a physical output stream name.
IdentifiableContainerMT::const_iterator
Definition: IdentifiableContainerMT.h:79
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
IdentifiableContainerMT::begin
const_iterator begin() const
return const_iterator for first entry
Definition: IdentifiableContainerMT.h:233
ManagedMonitorToolBase::ManagedMonitorToolBase
ManagedMonitorToolBase(const std::string &type, const std::string &name, const IInterface *parent)
Definition: ManagedMonitorToolBase.cxx:339
ManagedMonitorToolBase::medStat
@ medStat
Definition: ManagedMonitorToolBase.h:114
MuonGM::MuonReadoutElement::globalPosition
const Amg::Vector3D globalPosition() const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:47
ManagedMonitorToolBase::m_templateTrees
std::map< Interval_t, std::vector< MgmtParams< TTree > > > m_templateTrees
Definition: ManagedMonitorToolBase.h:672
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
ManagedMonitorToolBase::m_metadataMap
MDMap_t m_metadataMap
Definition: ManagedMonitorToolBase.h:827
ManagedMonitorToolBase::m_endOfEventsBlock
bool m_endOfEventsBlock
Definition: ManagedMonitorToolBase.h:823
ManagedMonitorToolBase::m_trigLiveFractionDataKey
SG::ReadCondHandleKey< TrigLiveFractionCondData > m_trigLiveFractionDataKey
Definition: ManagedMonitorToolBase.h:891
createDCubeDigitHistograms.mdtStationEta
mdtStationEta
Definition: createDCubeDigitHistograms.py:104
ManagedMonitorToolBase::m_environment
AthenaMonManager::Environment_t m_environment
Definition: ManagedMonitorToolBase.h:839
beamspotman.dir
string dir
Definition: beamspotman.py:623
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
MdtVsTgcRawDataValAlg::MidstationOnlyCheck
void MidstationOnlyCheck(std::vector< const Muon::MuonSegment * >(&sortedSegments)[2][4], std::vector< const Muon::MuonSegment * >(&disqualifiedSegments)[2][4], const Muon::TgcPrepDataContainer *tgc_prepcontainer)
Definition: MdtVsTgcRawData_MidstationMatching.cxx:34
Trk::MeasurementBase
Definition: MeasurementBase.h:58
ManagedMonitorToolBase::m_lastRun
unsigned int m_lastRun
Definition: ManagedMonitorToolBase.h:860
MdtVsTgcRawDataValAlg::CheckTGConTrack
void CheckTGConTrack(std::vector< SegmTrack >(&matchedSegments)[2], const Muon::TgcPrepDataContainer *tgc_prepcontainer)
Definition: MdtVsTgcRawData_PRDonTrack.cxx:36
ManagedMonitorToolBase::m_newLumiBlock
bool m_newLumiBlock
Definition: ManagedMonitorToolBase.h:821
ManagedMonitorToolBase::m_endOfLowStat
bool m_endOfLowStat
Definition: ManagedMonitorToolBase.h:823
dumpTgcDigiThreshold.isStrip
list isStrip
Definition: dumpTgcDigiThreshold.py:33
MdtVsTgcRawDataValAlg::roi2etaphi
void roi2etaphi(const Muon::TgcCoinData &cd, int &eta, int &phi)
Definition: MdtVsTgcRawData_functions.cxx:28
ManagedMonitorToolBase::m_lbDurationDataKey
SG::ReadCondHandleKey< LBDurationCondData > m_lbDurationDataKey
Definition: ManagedMonitorToolBase.h:889
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
ManagedMonitorToolBase::bookHistogramsRecurrent
virtual StatusCode bookHistogramsRecurrent()
An inheriting class should either override this function, bookHists() or bookHistograms().
Definition: ManagedMonitorToolBase.cxx:1287
makeegammaturnon.rebin
def rebin(binning, data)
Definition: makeegammaturnon.py:17
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
MdtVsTgcRawDataValAlg::bookeffhists
StatusCode bookeffhists(MonGroup &mdtvstgclv1_expert_a, MonGroup &mdtvstgclv1_expert_c)
Definition: MdtVsTgcRawData_bookhistograms.cxx:100
AthenaMonManager::getLBsHigStat
static unsigned int getLBsHigStat()
Definition: AthenaMonManager.cxx:309
SegmTrack
Definition: SegmTrack.h:22
MdtVsTgcRawDataValAlg::m_MdtTdcCut
int m_MdtTdcCut
Definition: MdtVsTgcRawDataValAlg.h:87
MdtVsTgcRawDataValAlg::m_checkCabling
bool m_checkCabling
Definition: MdtVsTgcRawDataValAlg.h:72
ExtractEBRunDetails.endOfRun
endOfRun
Definition: ExtractEBRunDetails.py:245
MdtVsTgcRawDataValAlg::DQCheckMDTSegments
void DQCheckMDTSegments(std::vector< const Muon::MuonSegment * >(&sortedSegments)[2][4], std::vector< const Muon::MuonSegment * >(&disqualifiedSegments)[2][4])
Definition: MdtVsTgcRawData_SegmDQ.cxx:34
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
Muon::TgcCoinData::roi
int roi() const
return ROI number
Definition: TgcCoinData.h:378
MdtVsTgcRawDataValAlg::getStationMapIndex
int getStationMapIndex(int x, int l, int stationFE, int stationEta, int stationPhi)
Definition: MdtVsTgcRawData_TGCEffCheck.cxx:259
item
Definition: ItemListSvc.h:43
Muon::CompetingMuonClustersOnTrack::containedROTs
const std::vector< const MuonClusterOnTrack * > & containedROTs() const
returns the vector of SCT_ClusterOnTrack objects .
Definition: CompetingMuonClustersOnTrack.h:184
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
ManagedMonitorToolBase::lowStat
@ lowStat
Definition: ManagedMonitorToolBase.h:114
SCT_CalibAlgs::nbins
@ nbins
Definition: SCT_CalibNumbers.h:10
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
Muon::TgcCoinData::isForward
bool isForward() const
Forward region or Endcap region.
Definition: TgcCoinData.h:354
MdtVsTgcRawDataValAlg::correlation
void correlation(const Muon::MdtPrepDataContainer *mdt_hit_container, const Muon::TgcCoinDataContainer *tgc_trigger_container)
Definition: MdtVsTgcRawData_correlation.cxx:27
MdtVsTgcRawDataValAlg::m_StationSize
std::string m_StationSize
Definition: MdtVsTgcRawDataValAlg.h:76
MdtVsTgcRawDataValAlg::m_mdt_segmmap
TH2 * m_mdt_segmmap[2][4]
Definition: MdtVsTgcRawDataValAlg.h:111
MdtVsTgcRawDataValAlg::bookmaphists
StatusCode bookmaphists(MonGroup &mdtvstgclv1_expert_a, MonGroup &mdtvstgclv1_expert_c)
Definition: MdtVsTgcRawData_bookhistograms.cxx:27
ManagedMonitorToolBase::m_managerNameProp
std::string m_managerNameProp
Definition: ManagedMonitorToolBase.h:831
Rtt_histogram.n1
n1
Definition: Rtt_histogram.py:21
MdtVsTgcRawDataValAlg::TGCstationname2stationindex
int TGCstationname2stationindex(int stationName)
Definition: MdtVsTgcRawData_TGCEffCheck.cxx:246
python.PyAthena.v
v
Definition: PyAthena.py:154
ManagedMonitorToolBase::m_nEventsIgnoreTrigger
unsigned int m_nEventsIgnoreTrigger
Definition: ManagedMonitorToolBase.h:864
ManagedMonitorToolBase::run
@ run
Definition: ManagedMonitorToolBase.h:115
ManagedMonitorToolBase::m_endOfRun
bool m_endOfRun
Definition: ManagedMonitorToolBase.h:823
ManagedMonitorToolBase::m_newLowStat
bool m_newLowStat
Definition: ManagedMonitorToolBase.h:821
DeMoScan.index
string index
Definition: DeMoScan.py:364
AthenaPoolExample_Copy.streamName
string streamName
Definition: AthenaPoolExample_Copy.py:39
MdtVsTgcRawDataValAlg::maphistsfinalize
void maphistsfinalize()
Definition: MdtVsTgcRawData_maptgchits.cxx:141
lumiFormat.lumi
lumi
Definition: lumiFormat.py:106
MuonGM::MdtReadoutElement::tubePos
Amg::Vector3D tubePos(const Identifier &id) const
Returns the global position of the given tube.
a
TList * a
Definition: liststreamerinfos.cxx:10
CaloLCW_tf.group
group
Definition: CaloLCW_tf.py:28
y
#define y
h
Muon::TgcCoinData::pt
int pt() const
return pt threshold value
Definition: TgcCoinData.h:380
AthenaMonManager::forkedProcess
bool forkedProcess()
Definition: AthenaMonManager.cxx:322
CondAlgsOpts.found
int found
Definition: CondAlgsOpts.py:101
ManagedMonitorToolBase::m_lastHigStatInterval
int m_lastHigStatInterval
Definition: ManagedMonitorToolBase.h:861
python.CaloScaleNoiseConfig.str
str
Definition: CaloScaleNoiseConfig.py:78
ReadFloatFromCool.adc
adc
Definition: ReadFloatFromCool.py:48
MuonGM::MuonDetectorManager
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:50
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Muon::TgcCoinData::TYPE_SL
@ TYPE_SL
Definition: TgcCoinData.h:52
ManagedMonitorToolBase::Imp::benchPreBookHistograms
void benchPreBookHistograms()
Definition: ManagedMonitorToolBase.cxx:75
ManagedMonitorToolBase::endOfRunFlag
bool endOfRunFlag() const
Definition: ManagedMonitorToolBase.h:797
ManagedMonitorToolBase::m_nLumiBlocks
unsigned int m_nLumiBlocks
Definition: ManagedMonitorToolBase.h:865
AthenaMonManager::altprod
@ altprod
Definition: AthenaMonManager.h:49
ManagedMonitorToolBase::eventsBlock
@ eventsBlock
Definition: ManagedMonitorToolBase.h:113
python.envutil.filelist
filelist
print ("Checking files %s..." % fullfile)
Definition: envutil.py:133
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
MdtVsTgcRawDataValAlg::TGCgetlayer
int TGCgetlayer(int stationName, int g)
Definition: MdtVsTgcRawData_TGCEffCheck.cxx:196
MuonGM::MuonReadoutElement::getStationType
std::string getStationType() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:189
Trk::RIO_OnTrack::identify
Identifier identify() const
return the identifier -extends MeasurementBase
Definition: RIO_OnTrack.h:152
DEBUG
#define DEBUG
Definition: page_access.h:11
MdtVsTgcRawDataValAlg::m_mdt_segmmatchsag
TH1 * m_mdt_segmmatchsag[2][4][4][4]
Definition: MdtVsTgcRawDataValAlg.h:150
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
MuonGM::MuonReadoutElement::identify
Identifier identify() const override final
Returns the ATLAS Identifier of the MuonReadOutElement.
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:184
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
Muon::TgcPrepData
Class to represent TGC measurements.
Definition: TgcPrepData.h:32
MuonGM::TgcReadoutElement::length
double length() const
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:53
ManagedMonitorToolBase::all
@ all
Definition: ManagedMonitorToolBase.h:115
ManagedMonitorToolBase::deregObject
virtual StatusCode deregObject(const std::string &objName, const std::string &system, Interval_t interval)
De-registers a TObject from the THistSvc, but does NOT delete the object.
Definition: ManagedMonitorToolBase.cxx:1634
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
MdtVsTgcRawDataValAlg::labelStationMap
void labelStationMap(TH2 *h2, int i=-1, int k=-1)
Definition: MdtVsTgcRawData_bookhistograms.cxx:397
ManagedMonitorToolBase::StreamNameFcn::getDirectoryName
virtual std::string getDirectoryName(const ManagedMonitorToolBase *tool, const MonGroup &group, const std::string &objName, const bool usePreviousInterval)=0
A function that returns TDirectory path in a file that corresponds to a given MonGroup and object nam...
calibdata.cd
cd
Definition: calibdata.py:51
ManagedMonitorToolBase::fillHistograms
virtual StatusCode fillHistograms()
An inheriting class should either override this function or fillHists().
Definition: ManagedMonitorToolBase.cxx:1307
MdtVsTgcRawDataValAlg::m_eff_stationmap
TH2 * m_eff_stationmap[2][2][4]
Definition: MdtVsTgcRawDataValAlg.h:145
ManagedMonitorToolBase::lbAverageLuminosity
virtual float lbAverageLuminosity(const EventContext &ctx=Gaudi::Hive::currentContext()) const
Average luminosity (in ub-1 s-1 => 10^30 cm-2 s-1)
Definition: ManagedMonitorToolBase.cxx:1730
Muon::TgcPrepData::globalPosition
virtual const Amg::Vector3D & globalPosition() const override final
Returns the global position.
Definition: TgcPrepData.h:125
str
Definition: BTagTrackIpAccessor.cxx:11
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
python.Logging.manager
manager
Definition: PhysicsAnalysis/D3PDTools/AnaAlgorithm/python/Logging.py:92
Muon::MuonSegment::globalPosition
virtual const Amg::Vector3D & globalPosition() const override final
global position
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment/MuonSegment/MuonSegment.h:157
ManagedMonitorToolBase::m_useTrigger
bool m_useTrigger
Definition: ManagedMonitorToolBase.h:857
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
ManagedMonitorToolBase::m_haveClearedLastEventBlock
bool m_haveClearedLastEventBlock
Definition: ManagedMonitorToolBase.h:866
AthenaMonManager::lumiBlockNumber
static unsigned int lumiBlockNumber()
Definition: AthenaMonManager.cxx:329
MuonGM::MuonReadoutElement::sideA
bool sideA() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:207
Muon::MuonSegment
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment/MuonSegment/MuonSegment.h:45
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
Muon::nsw::STGTPSegments::moduleIDBits::stationEta
constexpr uint8_t stationEta
1 to 3
Definition: NSWSTGTPDecodeBitmaps.h:159
ManagedMonitorToolBase::m_templateHistograms
std::map< Interval_t, std::vector< MgmtParams< TH1 > > > m_templateHistograms
Definition: ManagedMonitorToolBase.h:664
MdtVsTgcRawDataValAlg::m_tgclv1file
bool m_tgclv1file
Definition: MdtVsTgcRawDataValAlg.h:73
ManagedMonitorToolBase::ATTRIB_X_VS_LB
@ ATTRIB_X_VS_LB
Definition: ManagedMonitorToolBase.h:130
ManagedMonitorToolBase::Imp::s_svcLocator
static std::atomic< ISvcLocator * > s_svcLocator
Definition: ManagedMonitorToolBase.cxx:38
python.PyAthena.obj
obj
Definition: PyAthena.py:132
MuonGM::MuonClusterReadoutElement::bounds
virtual const Trk::SurfaceBounds & bounds() const override
Return the boundaries of the element.
Definition: MuonClusterReadoutElement.h:127
ManagedMonitorToolBase::m_trigTranslator
PublicToolHandle< ITriggerTranslatorTool > m_trigTranslator
Definition: ManagedMonitorToolBase.h:847
ManagedMonitorToolBase::m_lastMedStatInterval
int m_lastMedStatInterval
Definition: ManagedMonitorToolBase.h:861
ManagedMonitorToolBase::m_vTrigChainNames
std::vector< std::string > m_vTrigChainNames
Definition: ManagedMonitorToolBase.h:680
MuonGM::TgcReadoutElement::globalToLocalTransf
Amg::Transform3D globalToLocalTransf(const Identifier &id) const
Returns the global -> local transformation.
python.compressB64.c
def c
Definition: compressB64.py:93
length
double length(const pvec &v)
Definition: FPGATrackSimLLPDoubletHoughTransformTool.cxx:26
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
MdtVsTgcRawDataValAlg::m_side
int m_side
Definition: MdtVsTgcRawDataValAlg.h:78
MdtVsTgcRawDataValAlg::m_lastEvent
int m_lastEvent
Definition: MdtVsTgcRawDataValAlg.h:79
ManagedMonitorToolBase::regHist
virtual StatusCode regHist(TH1 *h, const std::string &system, Interval_t interval, MgmtAttr_t histo_mgmt=ATTRIB_MANAGED, const std::string &chain="", const std::string &merge="")
Registers a TH1 (including TH2, TH3, and TProfile) to be included in the output stream using logical ...
Definition: ManagedMonitorToolBase.cxx:1346
MdtVsTgcRawDataValAlg::m_eff_stationmapmid
TH2 * m_eff_stationmapmid[2][2][4]
Definition: MdtVsTgcRawDataValAlg.h:144
LheEventFiller_Common.ef
ef
Definition: SFGen_i/share/common/LheEventFiller_Common.py:7
MuonGM::MuonReadoutElement::getStationPhi
int getStationPhi() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:194
merge
Definition: merge.py:1
AthenaMonManager::noOutput
@ noOutput
Definition: AthenaMonManager.h:49
MdtVsTgcRawDataValAlg::tgceffcalc
void tgceffcalc(const xAOD::MuonSegmentContainer *m_newsegment, const Muon::TgcPrepDataContainer *tgc_prepcontainer)
Definition: MdtVsTgcRawData_TGCEffCheck.cxx:36
createDCubeDigitHistograms.mdtTube
mdtTube
Definition: createDCubeDigitHistograms.py:110
MuonGM::MuonReadoutElement::getStationEta
int getStationEta() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:193
ManagedMonitorToolBase::intervalEnumToString
static std::string intervalEnumToString(Interval_t interval)
Converts a LevelOfDetail_t to a string of the same name.
Definition: ManagedMonitorToolBase.cxx:537
Muon::MuonClusterOnTrack
Base class for Muon cluster RIO_OnTracks.
Definition: MuonClusterOnTrack.h:34
fitman.k
k
Definition: fitman.py:528
Muon::MuonSegment::globalDirection
const Amg::Vector3D & globalDirection() const
global direction
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment/MuonSegment/MuonSegment.h:163
createDCubeDigitHistograms.mdtStationPhi
mdtStationPhi
Definition: createDCubeDigitHistograms.py:105
ManagedMonitorToolBase::m_defaultLBDuration
float m_defaultLBDuration
Definition: ManagedMonitorToolBase.h:895
ManagedMonitorToolBase::newRunFlag
bool newRunFlag() const
Definition: ManagedMonitorToolBase.h:792
Muon::TgcCoinData::phi
int phi() const
return phi number of trigger sector
Definition: TgcCoinData.h:350
Identifier
Definition: IdentifierFieldParser.cxx:14