ATLAS Offline Software
Loading...
Searching...
No Matches
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 the interval over which a particular monitoring object is filled (i.e., interval over which the method Fill(...) is called). 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().
virtual StatusCode fillHistograms (const EventContext &ctx)
 An inheriting class should either override this function or fillHists().
virtual StatusCode procHistograms ()
 An inheriting class should either override this function or finalHists().
virtual StreamNameFcn * streamNameFunction ()
 Returns the function object that converts logical paramters into a physical stream name.
virtual StatusCode bookHists ()
 Calls bookHists( true, true, true ) and initializes lumiBlock and run numbers.
virtual StatusCode fillHists (const EventContext &ctx)
 Calls fillHists( bool, bool, bool ); if an eventBlock,lumiBlock, or run has turned over, calls procHists( bool, bool, bool ) and bookHists( bool, bool, bool ).
virtual StatusCode finalHists ()
 Calls procHists( true, true, true ).
virtual StatusCode bookHistograms ()
 An inheriting class should either override this function or bookHists().
virtual void setMonManager (AthenaMonManager *manager)
 Takes a pointer to a managing object to get information from it when needed.
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.
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.
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.
virtual StatusCode getHist (TH1 *&h, const std::string &hName, const MonGroup &group)
 Returns a TH1 via the pointer passed as the first argument.
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.
virtual StatusCode getHist (TH2 *&h, const std::string &hName, const MonGroup &group)
 Returns a TH2 via the pointer passed as the first argument.
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.
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.
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.
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.
virtual StatusCode regTree (TTree *t, const MonGroup &group)
 Registers a TTree to be included in the output stream using logical parameters that describe it.
virtual StatusCode writeAndDelete (TH1 *h, const MonGroup &group)
 Write out histogram and delete it.
virtual StatusCode deregHist (TH1 *h)
 De-registers a TH1 from the THistSvc, but does NOT delete the object.
virtual StatusCode deregGraph (TGraph *g)
 De-registers a TGraph from the THistSvc, but does NOT delete the object.
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.
virtual StatusCode deregObject (const std::string &objName, const MonGroup &group)
 De-registers a TObject from the THistSvc, but does NOT delete the object.
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.
virtual StatusCode runStat ()
 This implementation does nothing; equivalent functionality may be provided by procHists( true, true, true ).
virtual StatusCode checkHists (bool calledFromFinalize)
 This implementation does nothing; equivalent functionality may be provided by procHists(...) with appropriate arguments.
virtual bool preSelector ()
virtual float lbAverageInteractionsPerCrossing (const EventContext &ctx) const
 Average mu, i.e.
virtual float lbInteractionsPerCrossing (const EventContext &ctx) const
 Instantaneous number of interactions, i.e.
virtual float lbAverageLuminosity (const EventContext &ctx) const
 Average luminosity (in ub-1 s-1 => 10^30 cm-2 s-1).
virtual float lbLuminosityPerBCID (const EventContext &ctx) const
 Instantaneous luminosity.
virtual double lbDuration (const EventContext &ctx) const
 Luminosity block time (in seconds).
virtual float lbAverageLivefraction (const EventContext &ctx) const
 Average luminosity livefraction.
virtual float livefractionPerBCID (const EventContext &ctx) const
 Livefraction per bunch crossing ID.
virtual double lbLumiWeight (const EventContext &ctx) const
 Average Integrated Luminosity Live Fraction.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Static Public Member Functions

static std::string intervalEnumToString (Interval_t interval)
 Converts a Interval_t to a string of the same name.
static Interval_t intervalStringToEnum (const std::string &str)
 Converts a string to the corresponding Interval_t.
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.
unsigned int get_nEvents () const
long get_procNEventsProp () const
virtual bool trigChainsArePassed (std::vector< std::string > &)
virtual StreamNameFcn * getNewStreamNameFcn () 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.
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
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.

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
AthenaMonManager * m_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
StreamNameFcn * m_streamNameFcn
ServiceHandle< ITHistSvc > m_THistSvc
PublicToolHandle< Trig::ITrigDecisionTool > m_trigDecTool {this, "TrigDecisionTool",""}
PublicToolHandle< ITriggerTranslatorTool > m_trigTranslator {this,"TriggerTranslatorTool",""}
ToolHandleArray< IDQFilterTool > m_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< StoreGateSvc > StoreGateSvc_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, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

MuonDQAHistMap m_stationHists
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
ServiceHandle< Muon::IMuonIdHelperSvc > m_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::TgcPrepDataContainer > m_tgc_PrepDataContainerName {this,"TgcPrepDataContainer","TGC_Measurements","TGC PRDs"}
SG::ReadHandleKey< Muon::TgcCoinDataContainer > m_tgc_CoinContainerName {this,"OutputCoinCollection","TrigT1CoinDataCollection","TGC coincidences"}
SG::ReadHandleKey< Muon::MdtPrepDataContainer > m_mdt_PrepDataContainerName {this,"MdtPrepDataContainer","MDT_DriftCircles","MDT PRDs"}
SG::ReadHandleKey< xAOD::MuonSegmentContainer > m_mdt_SegmentCollectionName {this,"MdtSegmentCollection","MuonSegments","muon segments"}
int m_MdtAdcCut
int m_MdtTdcCut
const MuonGM::TgcReadoutElement * m_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< LuminosityCondData > m_lumiDataKey {this,"LuminosityCondDataKey","LuminosityCondData","SG Key of LuminosityCondData object"}
SG::ReadCondHandleKey< LBDurationCondData > m_lbDurationDataKey {this,"LBDurationCondDataKey","LBDurationCondData","SG Key of LBDurationCondData object"}
SG::ReadCondHandleKey< TrigLiveFractionCondData > m_trigLiveFractionDataKey {this,"TrigLiveFractionCondDataKey","TrigLiveFractionCondData","SG Key of TrigLiveFractionCondData object"}
bool m_bookHistogramsInitial
bool m_useLumi
float m_defaultLBDuration
std::set< Interval_t > m_supportedIntervalsForRebooking
Imp * m_d
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 38 of file MdtVsTgcRawDataValAlg.h.

Member Typedef Documentation

◆ MDMap_t

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

Definition at line 733 of file ManagedMonitorToolBase.h.

◆ StoreGateSvc_t

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

Definition at line 376 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ Interval_t

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 61 of file ManagedMonitorToolBase.h.

◆ 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 75 of file ManagedMonitorToolBase.h.

Constructor & Destructor Documentation

◆ MdtVsTgcRawDataValAlg()

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

Definition at line 33 of file MdtVsTgcRawDataValAlg.cxx.

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

◆ ~MdtVsTgcRawDataValAlg()

MdtVsTgcRawDataValAlg::~MdtVsTgcRawDataValAlg ( )
virtual

Definition at line 90 of file MdtVsTgcRawDataValAlg.cxx.

90 {
91 ATH_MSG_INFO( " deleting MdtVsTgcRawDataValAlg " );
92}
#define ATH_MSG_INFO(x,...)

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}
void putBox(TH2 *h2, float x1, float y1, float x2, float y2)

◆ 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}
void BlankPhi24(TH2 *h2, int binx)
rebin(binning, data)

◆ 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
169 labelStationMap(m_eff_stationmap[i][k][e], i,k);
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}
#define M_PI
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x,...)
void labelStationMap(TH2 *h2, int i=-1, int k=-1)
TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)

◆ bookHistograms()

◆ bookHistogramsRecurrent()

StatusCode MdtVsTgcRawDataValAlg::bookHistogramsRecurrent ( )
virtual

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

Reimplemented from ManagedMonitorToolBase.

Definition at line 133 of file MdtVsTgcRawDataValAlg.cxx.

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

◆ bookHists()

StatusCode ManagedMonitorToolBase::bookHists ( )
virtualinherited

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

Implements IMonitorToolBase.

Definition at line 646 of file ManagedMonitorToolBase.cxx.

648{
649 // The Run/LumiBlock numbers are not set when beginRun() is called. Therefore,
650 // book histograms on the first call to fillHists(), which is called from execute().
651 return StatusCode::SUCCESS;
652}

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

Definition at line 1561 of file ManagedMonitorToolBase.cxx.

1563{
1564 // Histograms will be checked using the data-quality monitoring framework (DQMF)
1565
1566 return StatusCode::SUCCESS;
1567}

◆ CheckTGConTrack()

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

Definition at line 35 of file MdtVsTgcRawData_PRDonTrack.cxx.

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

◆ correlation()

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

<<"mmdtStationName "<<mdtStationName

Definition at line 24 of file MdtVsTgcRawData_correlation.cxx.

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

◆ declareGaudiProperty()

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

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

Definition at line 156 of file AthCommonDataStore.h.

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

◆ declareProperty()

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

Definition at line 145 of file AthCommonDataStore.h.

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

◆ deregGraph()

StatusCode ManagedMonitorToolBase::deregGraph ( TGraph * g)
virtualinherited

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

Definition at line 1515 of file ManagedMonitorToolBase.cxx.

1517{
1518 return m_THistSvc->deReg( g );
1519}
ServiceHandle< ITHistSvc > m_THistSvc

◆ deregHist()

StatusCode ManagedMonitorToolBase::deregHist ( TH1 * h)
virtualinherited

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

Definition at line 1507 of file ManagedMonitorToolBase.cxx.

1509{
1510 return m_THistSvc->deReg( h );
1511}

◆ 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 1533 of file ManagedMonitorToolBase.cxx.

1535{
1536 std::string streamName = streamNameFunction()->getStreamName( this, group, objName );
1537 return m_THistSvc->deReg( streamName );
1538}
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.
virtual StreamNameFcn * streamNameFunction()
Returns the function object that converts logical paramters into a physical stream name.

◆ 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 1523 of file ManagedMonitorToolBase.cxx.

1526{
1527 MonGroup group( this, system, interval );
1528 return deregObject( objName, group );
1529}
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.

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

◆ DQCheckMDTSegments()

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

Definition at line 33 of file MdtVsTgcRawData_SegmDQ.cxx.

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

◆ endOfEventsBlockFlag()

bool ManagedMonitorToolBase::endOfEventsBlockFlag ( ) const
inlineprotectedinherited

Definition at line 721 of file ManagedMonitorToolBase.h.

◆ endOfLowStatFlag()

bool ManagedMonitorToolBase::endOfLowStatFlag ( ) const
inlineprotectedinherited

Definition at line 722 of file ManagedMonitorToolBase.h.

◆ endOfLumiBlockFlag()

bool ManagedMonitorToolBase::endOfLumiBlockFlag ( ) const
inlineprotectedinherited

Definition at line 723 of file ManagedMonitorToolBase.h.

◆ endOfRunFlag()

bool ManagedMonitorToolBase::endOfRunFlag ( ) const
inlineprotectedinherited

Definition at line 724 of file ManagedMonitorToolBase.h.

◆ evtStore()

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.

◆ 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 ( const EventContext & ctx)
virtual

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

Reimplemented from ManagedMonitorToolBase.

Definition at line 154 of file MdtVsTgcRawDataValAlg.cxx.

154 {
155/*----------------------------------------------------------------------------------*/
156 ATH_MSG_DEBUG( "MdtVsTgcRawDataValAlg::TGC RawData Monitoring Histograms being filled" );
157
158 //TGC PRD
159 SG::ReadHandle<Muon::TgcPrepDataContainer> tgc_prd_container(m_tgc_PrepDataContainerName, ctx);
160
161 //TGC Coincidence
162 SG::ReadHandle<Muon::TgcCoinDataContainer> tgc_coin_container(m_tgc_CoinContainerName, ctx);
163
164 ATH_MSG_DEBUG( "size of tgc container is " << tgc_coin_container -> size() );
165
166 //MDT PRD
167 SG::ReadHandle<Muon::MdtPrepDataContainer> mdt_prd_container(m_mdt_PrepDataContainerName, ctx);
168
169 SG::ReadHandle<xAOD::MuonSegmentContainer> mdt_segment_collection(m_mdt_SegmentCollectionName, ctx) ;
170 tgceffcalc(mdt_segment_collection.cptr(), tgc_prd_container.cptr());
171 maphists(mdt_segment_collection.cptr(), tgc_prd_container.cptr());
172
173 //only analyze nSL==1
174 int nSL = numberOfSL(tgc_coin_container.cptr());
175
176 if(nSL==1){
177 //fill MDT hit vs TGC RoI
178 correlation(mdt_prd_container.cptr(), tgc_coin_container.cptr());
179 }
180
181
182 return StatusCode::SUCCESS; // statuscode check
183}
SG::ReadHandleKey< Muon::TgcPrepDataContainer > m_tgc_PrepDataContainerName
void correlation(const Muon::MdtPrepDataContainer *mdt_hit_container, const Muon::TgcCoinDataContainer *tgc_trigger_container)
SG::ReadHandleKey< xAOD::MuonSegmentContainer > m_mdt_SegmentCollectionName
SG::ReadHandleKey< Muon::TgcCoinDataContainer > m_tgc_CoinContainerName
void tgceffcalc(const xAOD::MuonSegmentContainer *m_newsegment, const Muon::TgcPrepDataContainer *tgc_prepcontainer)
void maphists(const xAOD::MuonSegmentContainer *m_newsegment, const Muon::TgcPrepDataContainer *tgc_prepcontainer)
int numberOfSL(const Muon::TgcCoinDataContainer *tgctrgcontainer)
SG::ReadHandleKey< Muon::MdtPrepDataContainer > m_mdt_PrepDataContainerName

◆ fillHists()

StatusCode ManagedMonitorToolBase::fillHists ( const EventContext & ctx)
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.

Definition at line 656 of file ManagedMonitorToolBase.cxx.

658{
659
660 if (m_d->m_warnAboutMissingInitialize) {
661 m_d->m_warnAboutMissingInitialize = false;
662 msg(MSG::WARNING) << "ManagedMonitorToolBase::initialize() never called from reimplementation!" << endmsg;
663 }
664
665
666 bool isNewEventsBlock = ( m_procNEventsProp > 0 && ((m_nEvents % m_procNEventsProp) == 1) && m_haveClearedLastEventBlock );
667 if (isNewEventsBlock) m_haveClearedLastEventBlock = false;
668
669 m_newLowStat = false;
670 m_newLumiBlock = false;
671 m_newRun = false;
672
673 m_newLowStatInterval = false;
674 m_newMedStatInterval = false;
675 m_newHigStatInterval = false;
676
677 m_useTrigger = ( (m_triggerChainProp != "" || m_triggerGroupProp != "") && (!m_trigDecTool.empty()) );
678
679 if( m_manager != 0 ) {
680 m_newLumiBlock = ( (m_lastLumiBlock != m_manager->lumiBlockNumber()) || m_manager->forkedProcess());
681 m_newRun = ( m_lastRun != m_manager->runNumber() );
682
683 if(m_newRun) {
684 m_newLumiBlock = true;
685 isNewEventsBlock = true;
686 }
687
688 m_newEventsBlock = isNewEventsBlock;
689
690 if( m_newLumiBlock ) {
691 // check if a new LB interval has started
692 // lowest lumiBlockNumber() is 1
693 // m_lastLowStatInterval is -1 initially
694 int currentLB = m_manager->lumiBlockNumber();
695 int LBsLowStat = m_manager->getLBsLowStat();
696 int LBsMedStat = m_manager->getLBsMedStat();
697 int LBsHigStat = m_manager->getLBsHigStat();
698
699 if( LBsLowStat*LBsMedStat*LBsHigStat == 0) {
700 msg(MSG::WARNING) << "zero LBs requested for interval" << endmsg;
701 }
702 else {
703 if( ((currentLB-1)/LBsLowStat) != m_lastLowStatInterval ) m_newLowStatInterval = true;
704 if( ((currentLB-1)/LBsMedStat) != m_lastMedStatInterval ) m_newMedStatInterval = true;
705 if( ((currentLB-1)/LBsHigStat) != m_lastHigStatInterval ) m_newHigStatInterval = true;
706 }
707 }
708
709 // Allow inheriting classes the option of using the lastLumiBloc/lastRun values
710 // before updating them
711 }
712
713
714 StatusCode sc0( StatusCode::SUCCESS );
715 StatusCode sc1( StatusCode::SUCCESS );
716 StatusCode sc2( StatusCode::SUCCESS );
717 StatusCode sc3( StatusCode::SUCCESS );
718
719 // Set end of LowStat, LumiBlock and Run variables
720 // These are needed to be used in procHistograms().
725
726 // just duplicates m_newLowStatInterval
728
730 ATH_MSG_DEBUG("Interval transition processing");
731 // Process histograms from the previous lumiBlock/run
732 if( m_nEvents != 1 ) {
733 m_d->benchPreProcHistograms();
734 sc0 = procHistograms();
735 m_d->benchPostProcHistograms();
736 }
737 // Re-book new histograms
738 m_d->benchPreBookHistograms();
739
741 sc1 = bookHistograms();
743 } else {
744 std::vector<Interval_t> intervals_to_process;
745 if (m_newEventsBlock) intervals_to_process.push_back(eventsBlock);
746 if (m_newLumiBlock) intervals_to_process.push_back(lumiBlock);
747 if (m_newLowStatInterval) intervals_to_process.push_back(lowStat);
748 if (m_newRun) intervals_to_process.push_back(run);
749 for (const auto interval: intervals_to_process) {
751 sc1 = regManagedGraphs(m_templateGraphs[interval]);
752 sc1 = regManagedTrees(m_templateTrees[interval]);
753 }
754 }
755 for (const auto& interval: std::vector<Interval_t>{ eventsBlock, lumiBlock, lowStat, run }) {
756 for (const auto& it: m_templateHistograms[interval]) {
757 // is histogram too small in x axis for LB range?
758 if (it.m_group.histo_mgmt() == ATTRIB_X_VS_LB) {
759 //ATH_MSG_WARNING("We are rebinning for " << it.m_templateHist->GetName());
760 while ( it.m_templateHist->GetXaxis()->GetXmax() <= AthenaMonManager::lumiBlockNumber() ) {
761 it.m_templateHist->LabelsInflate("X");
762 }
763 }
764 }
765 for (auto& it: m_templateEfficiencies[interval]) {
766 if (it.m_group.histo_mgmt() == ATTRIB_X_VS_LB) {
767 // get the underlying passed and total TH1's from the TEfficiency
768 TH1* passedHist = it.m_templateHist->GetCopyPassedHisto();
769 TH1* totalHist = it.m_templateHist->GetCopyTotalHisto();
770 // inflate them until they exceed the lumi-block number
771 while (passedHist->GetXaxis()->GetXmax() <= AthenaMonManager::lumiBlockNumber() ) {
772 passedHist->LabelsInflate("X");
773 totalHist->LabelsInflate("X");
774 }
775 // Replace them in the TEfficiency. First one has force ("f") option, since the
776 // histograms will not be consistent. This is corrected in the next line, so we
777 // do check for consistency then.
778 it.m_templateHist->SetPassedHistogram(*passedHist, "f");
779 it.m_templateHist->SetTotalHistogram(*totalHist, " ");
780 delete passedHist; // not owned by THistSvc, so need to be deleted.
781 delete totalHist;
782 }
783 }
784 }
785
786 if (auto streamname = dynamic_cast<OfflineStream*>(streamNameFunction())) {
787 streamname->updateRunLB();
788 }
789
791
792 m_d->benchPostBookHistograms();
793
794 }//end if new RUN/LB/Block
795
796 // check filters
797 bool filterresult(true);
798 if (! m_DQFilterTools.empty()) {
799 ToolHandleArray<IDQFilterTool>::const_iterator ifilter(m_DQFilterTools.begin()), filterend(m_DQFilterTools.end());
800 for (; filterresult && (ifilter != filterend);
801 ++ifilter) {
802 filterresult = (filterresult && (*ifilter)->accept(ctx));
803 }
804 }
805
806
807 // ...and fill as normal
808 if(filterresult &&
812 ATH_MSG_DEBUG("Passed trigger, presumably");
813 m_d->benchPreFillHistograms();
814 fillHistograms(ctx).ignore();
816 m_d->benchPostFillHistograms();
817 ++m_nEvents;
818 } else { ATH_MSG_DEBUG("Failed trigger, presumably"); }
819
821 if( m_newLumiBlock && (m_nEventsIgnoreTrigger != 1) ) {
823 }
824 if( m_manager != 0 ) {
825 m_lastRun = m_manager->runNumber();
826 if( m_newLumiBlock ) {
827 m_lastLumiBlock = m_manager->lumiBlockNumber();
828
829 int LBsLowStat = m_manager->getLBsLowStat();
830 int LBsMedStat = m_manager->getLBsMedStat();
831 int LBsHigStat = m_manager->getLBsHigStat();
832 if( LBsLowStat*LBsMedStat*LBsHigStat > 0) {
836 }
837 }
838 }
839
840 return StatusCode::SUCCESS;
841}
#define endmsg
MsgStream & msg() const
static unsigned int lumiBlockNumber()
StatusCode regManagedTrees(std::vector< MgmtParams< TTree > > &templateTrees)
ToolHandleArray< IDQFilterTool > m_DQFilterTools
virtual StatusCode fillHistograms(const EventContext &ctx)
An inheriting class should either override this function or fillHists().
virtual StatusCode bookHistogramsRecurrent()
An inheriting class should either override this function, bookHists() or bookHistograms().
std::vector< std::string > m_vTrigGroupNames
std::map< Interval_t, std::vector< MgmtParams< TH1 > > > m_templateHistograms
PublicToolHandle< Trig::ITrigDecisionTool > m_trigDecTool
StatusCode regManagedGraphs(std::vector< MgmtParams< TGraph > > &templateGraphs)
std::map< Interval_t, std::vector< MgmtParams< TGraph > > > m_templateGraphs
virtual StatusCode bookHistograms()
An inheriting class should either override this function or bookHists().
std::vector< std::string > m_vTrigChainNames
std::map< Interval_t, std::vector< MgmtParams< TTree > > > m_templateTrees
std::map< Interval_t, std::vector< MgmtParams< TEfficiency > > > m_templateEfficiencies
virtual StatusCode procHistograms()
An inheriting class should either override this function or finalHists().
StatusCode regManagedHistograms(std::vector< MgmtParams< TH1 > > &templateHistograms)
virtual bool trigChainsArePassed(std::vector< std::string > &)
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ finalHists()

StatusCode ManagedMonitorToolBase::finalHists ( )
virtualinherited

Calls procHists( true, true, true ).

Implements IMonitorToolBase.

Definition at line 1153 of file ManagedMonitorToolBase.cxx.

1155{
1156
1157 // This assumes that the end of a file will naturally end a run, which is not always true.
1158 // A merging application run afterwards should be able to put parts of a run together.
1159 if( m_nEvents != 1 ) {
1160 m_d->benchPreProcHistograms();
1161
1162 // Set end flags for the LowStat, LumiBlock and Run variables.
1163 // This is needed to be used in the procHistograms method below.
1164 m_endOfEventsBlock = true;
1165 m_endOfLowStat = true;
1166 m_endOfLumiBlock = true;
1167 m_endOfRun = true;
1168
1170
1171 m_d->benchPostProcHistograms();
1172 return sc;
1173 }
1174 return StatusCode::SUCCESS;
1175}
static Double_t sc

◆ get_nEvents()

unsigned int ManagedMonitorToolBase::get_nEvents ( ) const
inlineprotectedinherited

Definition at line 620 of file ManagedMonitorToolBase.h.

620 {
621 return m_nEvents;
622 }

◆ get_procNEventsProp()

long ManagedMonitorToolBase::get_procNEventsProp ( ) const
inlineprotectedinherited

Definition at line 624 of file ManagedMonitorToolBase.h.

624 {
625 return m_procNEventsProp;
626 }

◆ 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 1310 of file ManagedMonitorToolBase.cxx.

1312{
1313 std::string streamName = streamNameFunction()->getStreamName( this, group, hName );
1314 return m_THistSvc->getHist( streamName, h );
1315}

◆ 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 1300 of file ManagedMonitorToolBase.cxx.

1303{
1304 MonGroup group( this, system, interval );
1305 return getHist( h, hName, group );
1306}
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.

◆ 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 1329 of file ManagedMonitorToolBase.cxx.

1331{
1332 std::string streamName = streamNameFunction()->getStreamName( this, group, hName );
1333 return m_THistSvc->getHist( streamName, h );
1334}

◆ 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 1319 of file ManagedMonitorToolBase.cxx.

1322{
1323 MonGroup group( this, system, interval );
1324 return getHist( h, hName, group );
1325}

◆ getNewStreamNameFcn()

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

Definition at line 2029 of file ManagedMonitorToolBase.cxx.

2031{
2032 StreamNameFcn* fcn(0);
2033
2034 switch( m_environment ) {
2036 fcn = new NoOutputStream();
2037 break;
2039 fcn = new OnlineStream();
2040 break;
2042 fcn = new DefaultStream( m_fileKey );
2043 break;
2049 default:
2051 }
2052
2053 return fcn;
2054}
A function-object base class allowing the specific implementation of getStreamName to be decided at r...
AthenaMonManager::Environment_t m_environment
AthenaMonManager::DataType_t m_dataType

◆ getStationMapIndex()

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

Definition at line 258 of file MdtVsTgcRawData_TGCEffCheck.cxx.

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

◆ initialize()

StatusCode MdtVsTgcRawDataValAlg::initialize ( )
virtual

Reimplemented from ManagedMonitorToolBase.

Definition at line 97 of file MdtVsTgcRawDataValAlg.cxx.

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

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

const InterfaceID & IMonitorToolBase::interfaceID ( )
inlinestaticinherited

Definition at line 30 of file IMonitorToolBase.h.

30{ return IID_IMonitorToolBase; }
static const InterfaceID IID_IMonitorToolBase("IMonitorToolBase", 1, 0)

◆ intervalEnumToString()

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

Converts a Interval_t to a string of the same name.

Definition at line 452 of file ManagedMonitorToolBase.cxx.

454{
455 std::string str("file");
456
457 switch( interval ) {
458 case all:
459 str = "all";
460 break;
461 case fill:
462 str = "fill";
463 break;
464 case run:
465 str = "run";
466 break;
467 case lowStat:
468 str = "lowStat";
469 break;
470 case medStat:
471 str = "medStat";
472 break;
473 case higStat:
474 str = "higStat";
475 break;
476 case lumiBlock:
477 str = "lumiBlock";
478 break;
479 case eventsBlock:
480 str = "eventsBlock";
481 break;
482 case file:
483 str = "file";
484 break;
485 default:
486 str = "unknown";
487 }
488
489 return str;
490}

◆ intervalStringToEnum()

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

Converts a string to the corresponding Interval_t.

Definition at line 494 of file ManagedMonitorToolBase.cxx.

496{
497 std::string lcstr( strToLower(str) );
498
499 if( lcstr == "all" )
500 return all;
501 else if( lcstr == "fill" )
502 return fill;
503 else if( lcstr == "run" )
504 return run;
505 else if( lcstr == "lowStat" )
506 return lowStat;
507 else if( lcstr == "medStat" )
508 return medStat;
509 else if( lcstr == "higStat" )
510 return higStat;
511 else if( lcstr == "lumiBlock" )
512 return lumiBlock;
513 else if( lcstr == "eventsBlock" )
514 return eventsBlock;
515 else if( lcstr == "file" )
516 return file;
517
518 if( Imp::s_svcLocator ) {
519 SmartIF<IMessageSvc> ms{Imp::s_svcLocator.load()->service( "MessageSvc" )};
520 if( ms.isValid() ) {
521 MsgStream log( ms, "ManagedMonitorToolBase::intervalStringToEnum()" );
522 log << MSG::WARNING << "Unknown ManagedMonitorToolBase::Interval_t \""
523 << str << "\", returning \"file\"" << endmsg;
524 }
525 }
526
527 return file;
528}
static std::atomic< ISvcLocator * > s_svcLocator

◆ 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
void BlankStationMap(TH2 *h2, int ws)

◆ lbAverageInteractionsPerCrossing()

float ManagedMonitorToolBase::lbAverageInteractionsPerCrossing ( const EventContext & ctx) const
virtualinherited

Average mu, i.e.

<mu>

Definition at line 1583 of file ManagedMonitorToolBase.cxx.

1585{
1586 if (!m_lumiDataKey.empty()) {
1587 SG::ReadCondHandle<LuminosityCondData> lumi (m_lumiDataKey, ctx);
1588 return lumi->lbAverageInteractionsPerCrossing();
1589 } else {
1590 ATH_MSG_DEBUG("Warning: lbAverageInteractionsPerCrossing() - luminosity tools are not retrieved or turned on (i.e. EnableLumi = False)");
1591 return -1.0;
1592 }
1593 // not reached
1594}
SG::ReadCondHandleKey< LuminosityCondData > m_lumiDataKey

◆ lbAverageLivefraction()

float ManagedMonitorToolBase::lbAverageLivefraction ( const EventContext & ctx) const
virtualinherited

Average luminosity livefraction.

Definition at line 1648 of file ManagedMonitorToolBase.cxx.

1650{
1652 return 1.0;
1653
1654 if (!m_trigLiveFractionDataKey.empty()) {
1655 SG::ReadCondHandle<TrigLiveFractionCondData> live (m_trigLiveFractionDataKey, ctx);
1656 return live->lbAverageLiveFraction();
1657 } else {
1658 ATH_MSG_DEBUG("Warning: lbAverageLivefraction() - luminosity not availble (i.e. EnableLumi = False)");
1659 return -1.0;
1660 }
1661 // not reached
1662}
SG::ReadCondHandleKey< TrigLiveFractionCondData > m_trigLiveFractionDataKey

◆ lbAverageLuminosity()

float ManagedMonitorToolBase::lbAverageLuminosity ( const EventContext & ctx) const
virtualinherited

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

Definition at line 1617 of file ManagedMonitorToolBase.cxx.

1619{
1620 if (!m_lumiDataKey.empty()) {
1621 SG::ReadCondHandle<LuminosityCondData> lumi (m_lumiDataKey, ctx);
1622 return lumi->lbAverageLuminosity();
1623 } else {
1624 ATH_MSG_DEBUG("Warning: lbAverageLuminosity() - luminosity tools are not retrieved or turned on (i.e. EnableLumi = False)");
1625 return -1.0;
1626 }
1627 // not reached
1628}

◆ lbDuration()

double ManagedMonitorToolBase::lbDuration ( const EventContext & ctx) const
virtualinherited

Luminosity block time (in seconds).

Definition at line 1699 of file ManagedMonitorToolBase.cxx.

1701{
1703 return m_defaultLBDuration;
1704 }
1705 if (!m_lbDurationDataKey.empty()) {
1706 SG::ReadCondHandle<LBDurationCondData> dur (m_lbDurationDataKey, ctx);
1707 return dur->lbDuration();
1708 } else {
1709 ATH_MSG_DEBUG("Warning: lbDuration() - luminosity tools are not retrieved or turned on (i.e. EnableLumi = False)");
1710 return m_defaultLBDuration;
1711 }
1712 // not reached
1713}
SG::ReadCondHandleKey< LBDurationCondData > m_lbDurationDataKey

◆ lbInteractionsPerCrossing()

float ManagedMonitorToolBase::lbInteractionsPerCrossing ( const EventContext & ctx) const
virtualinherited

Instantaneous number of interactions, i.e.

mu

Definition at line 1598 of file ManagedMonitorToolBase.cxx.

1600{
1601 if (!m_lumiDataKey.empty()) {
1602 SG::ReadCondHandle<LuminosityCondData> lumi (m_lumiDataKey, ctx);
1603 float muToLumi = lumi->muToLumi();
1604 if (muToLumi > 0) {
1605 return lumi->lbLuminosityPerBCIDVector().at (ctx.eventID().bunch_crossing_id()) / muToLumi;
1606 }
1607 return 0;
1608 } else {
1609 ATH_MSG_DEBUG("Warning: lbInteractionsPerCrossing() - luminosity tools are not retrieved or turned on (i.e. EnableLumi = False)");
1610 return -1.0;
1611 }
1612 // not reached
1613}

◆ lbLuminosityPerBCID()

float ManagedMonitorToolBase::lbLuminosityPerBCID ( const EventContext & ctx) const
virtualinherited

Instantaneous luminosity.

Definition at line 1632 of file ManagedMonitorToolBase.cxx.

1634{
1635 if (!m_lumiDataKey.empty()) {
1636 SG::ReadCondHandle<LuminosityCondData> lumi (m_lumiDataKey, ctx);
1637 return lumi->lbLuminosityPerBCIDVector().at (ctx.eventID().bunch_crossing_id());
1638 } else {
1639 ATH_MSG_DEBUG("Warning: lbLuminosityPerBCID() - luminosity tools are not retrieved or turned on (i.e. EnableLumi = False)");
1640 return -1.0;
1641 }
1642 // not reached
1643}

◆ lbLumiWeight()

double ManagedMonitorToolBase::lbLumiWeight ( const EventContext & ctx) const
virtualinherited

Average Integrated Luminosity Live Fraction.

Definition at line 1684 of file ManagedMonitorToolBase.cxx.

1686{
1687 if (!m_lumiDataKey.empty()) {
1689 } else{
1690 ATH_MSG_DEBUG("Warning: lbLumiWeight() - luminosity tools are not retrieved or turned on (i.e. EnableLumi = False)");
1691 return -1.0;
1692 }
1693 // not reached
1694}
virtual double lbDuration(const EventContext &ctx) const
Luminosity block time (in seconds).
virtual float lbAverageLivefraction(const EventContext &ctx) const
Average luminosity livefraction.
virtual float lbAverageLuminosity(const EventContext &ctx) const
Average luminosity (in ub-1 s-1 => 10^30 cm-2 s-1).

◆ livefractionPerBCID()

float ManagedMonitorToolBase::livefractionPerBCID ( const EventContext & ctx) const
virtualinherited

Livefraction per bunch crossing ID.

Definition at line 1666 of file ManagedMonitorToolBase.cxx.

1668{
1670 return 1.0;
1671
1672 if (!m_trigLiveFractionDataKey.empty()) {
1673 SG::ReadCondHandle<TrigLiveFractionCondData> live (m_trigLiveFractionDataKey, ctx);
1674 return live->l1LiveFractionVector().at (ctx.eventID().bunch_crossing_id());
1675 } else {
1676 ATH_MSG_DEBUG("Warning: livefractionPerBCID() - luminosity retrieved available (i.e. EnableLumi = False)");
1677 return -1.0;
1678 }
1679 // not reached
1680}

◆ maphists()

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

Definition at line 36 of file MdtVsTgcRawData_maptgchits.cxx.

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

◆ maphistsfinalize()

void MdtVsTgcRawDataValAlg::maphistsfinalize ( )
private

Definition at line 139 of file MdtVsTgcRawData_maptgchits.cxx.

139 {
140
141}// 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 32 of file MdtVsTgcRawData_SegmMatching.cxx.

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

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

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ 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 720 of file ManagedMonitorToolBase.h.

720{ return m_newEventsBlock; }

◆ newHigStatIntervalFlag()

bool ManagedMonitorToolBase::newHigStatIntervalFlag ( ) const
inlineprotectedinherited

Definition at line 716 of file ManagedMonitorToolBase.h.

716{ return m_newHigStatInterval; }

◆ newLowStatFlag()

bool ManagedMonitorToolBase::newLowStatFlag ( ) const
inlineprotectedinherited

Definition at line 717 of file ManagedMonitorToolBase.h.

717{ 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 714 of file ManagedMonitorToolBase.h.

714{ return m_newLowStatInterval; }

◆ newLumiBlockFlag()

bool ManagedMonitorToolBase::newLumiBlockFlag ( ) const
inlineprotectedinherited

Definition at line 718 of file ManagedMonitorToolBase.h.

718{ return m_newLumiBlock; }

◆ newMedStatIntervalFlag()

bool ManagedMonitorToolBase::newMedStatIntervalFlag ( ) const
inlineprotectedinherited

Definition at line 715 of file ManagedMonitorToolBase.h.

715{ return m_newMedStatInterval; }

◆ newRunFlag()

bool ManagedMonitorToolBase::newRunFlag ( ) const
inlineprotectedinherited

Definition at line 719 of file ManagedMonitorToolBase.h.

719{ 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}
int pt() const
return pt threshold value

◆ 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 1985 of file ManagedMonitorToolBase.cxx.

1986 {
1987 std::string item;
1988 std::stringstream ss(line);
1989
1990 if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "ManagedMonitorToolBase::parseList:";
1991
1992 while ( std::getline(ss, item, ',') ) {
1993 std::stringstream iss(item); // remove
1994 iss >> item; // whitespace
1995 if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << " " << item;
1996 result.push_back(item);
1997 }
1998
1999 msg(MSG::DEBUG) << endmsg;
2000 return StatusCode::SUCCESS;
2001}
static Double_t ss
bool msgLvl(const MSG::Level lvl) const

◆ 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}
Scalar phi() const
phi method

◆ prepareTREarray()

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

Definition at line 85 of file MdtVsTgcRawData_TGCEffCheck.cxx.

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

◆ preSelector()

bool ManagedMonitorToolBase::preSelector ( )
virtualinherited

Implements IMonitorToolBase.

Definition at line 1571 of file ManagedMonitorToolBase.cxx.

1573{
1574 if( m_preScaleProp > 1 ) {
1575 return ( (m_nEvents % m_preScaleProp) == 1 );
1576 }
1577 return true;
1578}

◆ procHistograms()

StatusCode MdtVsTgcRawDataValAlg::procHistograms ( )
virtual

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

Reimplemented from ManagedMonitorToolBase.

Definition at line 185 of file MdtVsTgcRawDataValAlg.cxx.

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

◆ 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 1337 of file ManagedMonitorToolBase.cxx.

1337 {
1338 if (!e)
1339 return StatusCode::FAILURE;
1340
1341 TGraph* g = reinterpret_cast<TGraph*>(e);
1342 std::string name = e->GetName();
1343
1344 // MANAGED
1345 if ( group.histo_mgmt() != ATTRIB_UNMANAGED ) {
1346 // warn about not using merge algorithms
1347 if (group.histo_mgmt() == ATTRIB_X_VS_LB && group.merge().empty()) {
1348 ATH_MSG_WARNING("HEY! Attempting to register "<<name<<" as a per-LB histogram, but not setting the merge algorithm! Use \"merge\", at least.");
1349 }
1350 // add the efficiency to rebooking vector
1351 if (m_supportedIntervalsForRebooking.count(group.interval())) {
1352 m_templateEfficiencies[group.interval()].push_back( MgmtParams<TEfficiency>(e, group) );
1353 } else {
1354 ATH_MSG_ERROR("Attempt to book managed graph " << name << " with invalid interval type " << intervalEnumToString(group.interval()));
1355 return StatusCode::FAILURE;
1356 }
1357
1358 MonGroup group_unmanaged( this, group.system(), group.interval(), ATTRIB_UNMANAGED, group.chain(), group.merge());
1359 std::string streamName = streamNameFunction()->getStreamName( this, group_unmanaged, name, false );
1360 registerMetadata(streamName, name, group).ignore();
1361 return m_THistSvc->regGraph( streamName, g );
1362 } else {
1363 // UNMANAGED
1364 if( m_manager != 0 ) {
1365 std::string genericName = NoOutputStream().getStreamName( this, group, name );
1366 m_manager->writeAndDelete( genericName );
1367 m_manager->passOwnership( e, genericName );
1368 }
1369
1370 std::string streamName = streamNameFunction()->getStreamName( this, group, name, false );
1371 StatusCode smd = registerMetadata(streamName, name, group);
1372 if (smd != StatusCode::SUCCESS)
1373 return StatusCode::FAILURE;
1374
1375 return m_THistSvc->regGraph( streamName, g );
1376 }
1377}
virtual std::string getStreamName(const ManagedMonitorToolBase *tool, const MonGroup &group, const std::string &objName, bool usePreviousInterval=false)
A function that converts a MonGroup of logical parameters into a physical output stream name.
std::set< Interval_t > m_supportedIntervalsForRebooking
StatusCode registerMetadata(const std::string &streamName, const std::string &hName, const MonGroup &group)
static std::string intervalEnumToString(Interval_t interval)
Converts a Interval_t to a string of the same name.

◆ 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 1391 of file ManagedMonitorToolBase.cxx.

1393{
1394 if (!g)
1395 return StatusCode::FAILURE;
1396
1397 // This part of the code deals with MANAGED type
1398 if ( group.histo_mgmt() != ATTRIB_UNMANAGED ) {
1399 // Create an unmanaged group based on the original MonGroup instance passed
1400 // This is needed because managed graph is presented as a number of unmanaged
1401 // graphs (one per each interval)
1402 MonGroup group_unmanaged( this, group.system(), group.interval(), ATTRIB_UNMANAGED, group.chain(), group.merge());
1403
1404 if (m_supportedIntervalsForRebooking.count(group.interval())) {
1405 m_templateGraphs[group.interval()].push_back( MgmtParams<TGraph>(g, group_unmanaged) );
1406 } else {
1407 ATH_MSG_ERROR("Attempt to book managed graph " << g->GetName() << " with invalid interval type " << intervalEnumToString(group.interval()));
1408 return StatusCode::FAILURE;
1409 }
1410
1411 std::string name = g->GetName();
1412 std::string streamName = streamNameFunction()->getStreamName( this, group_unmanaged, name, false );
1413 registerMetadata(streamName, name, group).ignore();
1414 return m_THistSvc->regGraph( streamName, g );
1415 }
1416
1417 // This part of the code deals with UNMANAGED type
1418 std::string gName = g->GetName();
1419
1420 if( m_manager != 0 ) {
1421 std::string genericName = NoOutputStream().getStreamName( this, group, gName );
1422 m_manager->writeAndDelete( genericName );
1423 m_manager->passOwnership( g, genericName );
1424 }
1425
1426 std::string streamName = streamNameFunction()->getStreamName( this, group, gName, false );
1427
1428 StatusCode smd = registerMetadata(streamName, gName, group);
1429 if (smd != StatusCode::SUCCESS) return StatusCode::FAILURE;
1430
1431 return m_THistSvc->regGraph( streamName, g );
1432}

◆ 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 1381 of file ManagedMonitorToolBase.cxx.

1384{
1385 MonGroup group( this, system, interval, histo_mgmt, chain, merge );
1386 return regGraph( g, group );
1387}
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...

◆ 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 1247 of file ManagedMonitorToolBase.cxx.

1249{
1250 if (!h)
1251 return StatusCode::FAILURE;
1252
1253 // This part of the code deals with MANAGED type
1254 if ( group.histo_mgmt() != ATTRIB_UNMANAGED ) {
1255 /*
1256 Create an unmanaged group based on the original MonGroup instance passed
1257 It is needed because managed histogram is presented as a number of unmanaged
1258 histograms (one per each interval)
1259 Update (PUEO) - I don't think it actually matters, and need to keep
1260 track of "proper" attribute for X_VS_LB
1261 */
1262
1263 if (group.histo_mgmt() == ATTRIB_X_VS_LB && group.merge().empty()) {
1264 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.");
1265 }
1266
1267 if (m_supportedIntervalsForRebooking.count(group.interval())) {
1268 m_templateHistograms[group.interval()].push_back( MgmtParams<TH1>(h, group) );
1269 } else {
1270 ATH_MSG_ERROR("Attempt to book managed histogram " << h->GetName() << " with invalid interval type " << intervalEnumToString(group.interval()));
1271 return StatusCode::FAILURE;
1272 }
1273
1274 std::string hName = h->GetName();
1275 MonGroup group_unmanaged( this, group.system(), group.interval(), ATTRIB_UNMANAGED, group.chain(), group.merge());
1276 std::string streamName = streamNameFunction()->getStreamName( this, group_unmanaged, hName, false );
1277 registerMetadata(streamName, hName, group).ignore();
1278 return m_THistSvc->regHist( streamName, h );
1279 }
1280
1281 // This part of the code deals with UNMANAGED type
1282 std::string hName = h->GetName();
1283
1284 if( m_manager != 0 ) {
1285 std::string genericName = NoOutputStream().getStreamName( this, group, hName );
1286 m_manager->writeAndDelete( genericName );
1287 m_manager->passOwnership( h, genericName );
1288 }
1289
1290 std::string streamName = streamNameFunction()->getStreamName( this, group, hName, false );
1291
1292 StatusCode smd = registerMetadata(streamName, hName, group);
1293 if (smd != StatusCode::SUCCESS) return StatusCode::FAILURE;
1294
1295 return m_THistSvc->regHist( streamName, h );
1296}

◆ 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 1238 of file ManagedMonitorToolBase.cxx.

1241{
1242 MonGroup group( this, system, interval, histo_mgmt, chain, merge );
1243 return regHist( h, group );
1244}
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 ...

◆ registerMetadata()

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

Definition at line 844 of file ManagedMonitorToolBase.cxx.

846 {
848 TTree* metadata(0);
849 std::string mdStreamName( streamName );
850 size_t found=mdStreamName.rfind('/');
851
852 if ( found != std::string::npos )
853 mdStreamName.replace( found, mdStreamName.length(), "/metadata" );
854
855 MDMap_t::iterator i = m_metadataMap.find( mdStreamName );
856 if( i == m_metadataMap.end() ) {
857 metadata = new TTree( "metadata", "Monitoring Metadata" );
858 if (! metadata) return StatusCode::FAILURE;
859 StatusCode scmd = m_THistSvc->regTree( mdStreamName, metadata );
860 if (scmd == StatusCode::FAILURE) return StatusCode::FAILURE;
861 i = m_metadataMap.emplace( mdStreamName, new OutputMetadata(metadata) ).first;
862 }
863
864 i->second->fill( hName, group.interval(), group.chain(), group.merge() );
865 }
866 return StatusCode::SUCCESS;
867}

◆ regManagedEfficiencies()

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

Definition at line 1038 of file ManagedMonitorToolBase.cxx.

1038 {
1039 bool allIsOk = true;
1040 for( auto& it : templateEfficiencies ) {
1041 // get components of MgmtParams and copy efficiency
1042 MonGroup group = it.m_group;
1043 TEfficiency* theEfficiency = it.m_templateHist;
1044 TEfficiency* e = static_cast<TEfficiency*>(theEfficiency->Clone());
1045 int nbins = theEfficiency->GetTotalHistogram()->GetNbinsX();
1046 int xlow = theEfficiency->GetTotalHistogram()->GetXaxis()->GetXmin();
1047 int xhigh = theEfficiency->GetTotalHistogram()->GetXaxis()->GetXmax();
1048 e->SetBins(nbins,xlow,xhigh); // reset histogram
1049 std::string name = e->GetName();
1050
1051 // make TGraph casts of TEfficiencies
1052 TGraph* theGraph = reinterpret_cast<TGraph*>(theEfficiency);
1053 TGraph* g = reinterpret_cast<TGraph*>(e);
1054
1055 // Get the streamName for the previous interval
1056 std::string streamName = streamNameFunction()->getStreamName( this, group, name, true );
1057
1058 // RE-REGISTER
1059 // 1) De-register the original graph with the THistSvc
1060 StatusCode sc1 = m_THistSvc->deReg( theGraph );
1061 if (sc1 == StatusCode::FAILURE) allIsOk = false;
1062 // 2) Fix THistSvc->deReg for TGraphs
1063 bool doneCleaning = false;
1064 std::string directoryName = streamNameFunction()->getDirectoryName( this, group, name, true );
1065 TSeqCollection *filelist=gROOT->GetListOfFiles();
1066 for (int i=0; i<filelist->GetEntries(); i++) {
1067 ATH_MSG_DEBUG( "List of files: " << filelist->At(i)->GetName());
1068 TFile* file = static_cast<TFile*>(filelist->At(i));
1069 StatusCode sc2 = THistSvc_deReg_fixTGraph(file, theGraph, directoryName);
1070 if (sc2 == StatusCode::SUCCESS) doneCleaning = true;
1071 }
1072 // 3) Check if TGraph fix has been applied successfully
1073 if (!doneCleaning) {
1074 ATH_MSG_ERROR("THistSvc_deReg_fixTGraph: failed to apply TGraph fix for the THist Svc!");
1075 allIsOk = false;
1076 }
1077 // 4) Register cloned histogram under previous interval streamName
1078 StatusCode sc3 = m_THistSvc->regGraph( streamName, g );
1079 if (sc3 == StatusCode::FAILURE)
1080 allIsOk = false;
1081
1082 // get streamname for interval
1083 streamName = streamNameFunction()->getStreamName( this, group, name, false );
1084 // store metadata
1085 StatusCode smd = registerMetadata(streamName, name, group);
1086 if (smd != StatusCode::SUCCESS) allIsOk = false;
1087 // Re-register the original graph
1088 StatusCode sc4 = m_THistSvc->regGraph( streamName, theGraph );
1089 if (sc4 == StatusCode::FAILURE) allIsOk = false;
1090 }
1091
1092 if (!allIsOk) return StatusCode::FAILURE;
1093 return StatusCode::SUCCESS;
1094}
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...
StatusCode THistSvc_deReg_fixTGraph(TFile *file, TGraph *theGraph, std::string &directoryName)
Fixes THistSvc->deReg(obj) when obj is TGraph instance.
filelist
print ("Checking files %s..." % fullfile)
Definition envutil.py:133

◆ regManagedGraphs()

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

Definition at line 967 of file ManagedMonitorToolBase.cxx.

969{
970 // See the description for the regManagedHistograms method
971 bool allIsOk = true;
972
973 for( std::vector< MgmtParams<TGraph> >::iterator it = templateGraphs.begin(); it != templateGraphs.end(); ++it ) {
974 MonGroup group = (*it).m_group;
975
976 // Get a handle to the graph
977 TGraph* theGraph = (*it).m_templateHist;
978
979 // Clone the graph
980 TGraph* g = static_cast<TGraph*>(theGraph->Clone());
981 theGraph->Set(0); // equivalent to Reset() for TH1
982
983 // Get name
984 std::string gName = g->GetName();
985
986 // Get the streamName for the previous interval
987 std::string streamName = streamNameFunction()->getStreamName( this, group, gName, true );
988
989 // De-register the original graph with the THistSvc
990 StatusCode sc1 = m_THistSvc->deReg( theGraph );
991 if (sc1 == StatusCode::FAILURE)
992 allIsOk = false;
993
994 // *** begin ***
995 // Fix THistSvc->deReg for TGraphs
996 bool doneCleaning = false;
997 std::string directoryName = streamNameFunction()->getDirectoryName( this, group, gName, true );
998 TSeqCollection *filelist=gROOT->GetListOfFiles();
999 for (int i=0; i<filelist->GetEntries(); i++) {
1000 ATH_MSG_DEBUG( "List of files: " << filelist->At(i)->GetName());
1001 TFile* file = static_cast<TFile*>(filelist->At(i));
1002 StatusCode sc2 = THistSvc_deReg_fixTGraph(file, theGraph, directoryName);
1003 if (sc2 == StatusCode::SUCCESS)
1004 doneCleaning = true;
1005 }
1006
1007 // Check if TGraph fix has been applied successfully
1008 if (!doneCleaning) {
1009 ATH_MSG_ERROR("THistSvc_deReg_fixTGraph: failed to apply TGraph fix for the THist Svc!");
1010 allIsOk = false;
1011 }
1012 // *** end ***
1013
1014 // Register clonned histogram under previous interval streamName
1015 StatusCode sc3 = m_THistSvc->regGraph( streamName, g );
1016 if (sc3 == StatusCode::FAILURE)
1017 allIsOk = false;
1018
1019 // Get streamName for the current interval
1020 streamName = streamNameFunction()->getStreamName( this, group, gName, false );
1021 // Register metadata information with the current interval streamname
1022 StatusCode smd = registerMetadata(streamName, gName, group);
1023 if (smd != StatusCode::SUCCESS)
1024 allIsOk = false;
1025
1026 // Re-register the original graph with the current interval streamName
1027 StatusCode sc4 = m_THistSvc->regGraph( streamName, theGraph );
1028 if (sc4 == StatusCode::FAILURE)
1029 allIsOk = false;
1030
1031 }
1032
1033 if (!allIsOk) return StatusCode::FAILURE;
1034
1035 return StatusCode::SUCCESS;
1036}

◆ regManagedHistograms()

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

Definition at line 870 of file ManagedMonitorToolBase.cxx.

872{
873 // The method registers histograms with the THistSvc and saves them to file.
874
875 // The funky business with registering and deregistering the histogram is needed
876 // to get the correct directory when saving histograms. THistSvc deals with ROOT
877 // to set up proper TDirectory, so we rely on it.
878 // E.g.
879 // m_THistSvc->regHist( streamName, h ): sets the correct TDirectory with streamName
880 // m_THistSvc->deReg( h ) - deregister from THistSvc otherwise THistSvc will try to save it
881 // at the end of execution
882 // use passownership of the histogram and save it to file
883 // m_manager->passOwnership( h, genericName );
884 // m_manager->writeAndDelete( genericName );
885 bool allIsOk = true;
886
887 for( std::vector< MgmtParams<TH1> >::iterator it = templateHistograms.begin(); it != templateHistograms.end(); ++it ) {
888 MonGroup& group = (*it).m_group;
889
890 // Get a handle to the histogram
891 TH1* theHist = (*it).m_templateHist;
892
893 // Clone the histogram
894 TH1* h = static_cast<TH1*>(theHist->Clone());
895 theHist->Reset();
896
897 // Get name
898 std::string hName = h->GetName();
899
900 // Get the streamName for the previous interval
901 std::string streamName = streamNameFunction()->getStreamName( this, group, hName, true );
902
903 // Register the histogram with the THistSvc
904 StatusCode sc1 = m_THistSvc->deReg( theHist );
905 if (sc1 == StatusCode::FAILURE) allIsOk = false;
906
907 // Register clonned histogram under previous interval streamName
908 StatusCode sc2 = m_THistSvc->regHist( streamName, h );
909 if (sc2 == StatusCode::FAILURE) allIsOk = false;
910
911 if( m_manager != 0 ) {
912 std::string genericName = NoOutputStream().getStreamName( this, group, hName );
913 m_manager->passOwnership( h, genericName );
914 m_manager->writeAndDelete( genericName );
915 }
916
917 // Get streamName for the current interval
918 streamName = streamNameFunction()->getStreamName( this, group, hName, false );
919 // Register metadata information with the current interval streamname
920 StatusCode smd = registerMetadata(streamName, hName, group);
921 if (smd != StatusCode::SUCCESS) allIsOk = false;
922
923 // Re-register the original histogram with the current interval streamName
924 StatusCode sc3 = m_THistSvc->regHist( streamName, theHist );
925 if (sc3 == StatusCode::FAILURE) allIsOk = false;
926
927 }
928
929 if (!allIsOk) return StatusCode::FAILURE;
930
931 return StatusCode::SUCCESS;
932}

◆ regManagedTrees()

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

Definition at line 1098 of file ManagedMonitorToolBase.cxx.

1100{
1101 // See the description for the regManagedHistograms method
1102 bool allIsOk = true;
1103
1104 for( std::vector< MgmtParams<TTree> >::iterator it = templateTrees.begin(); it != templateTrees.end(); ++it ) {
1105 MonGroup group = (*it).m_group;
1106
1107 // Get a handle to the original tree
1108 TTree* theTree = (*it).m_templateHist;
1109
1110 // Clone the tree
1111 TTree* t = static_cast<TTree*>(theTree->Clone());
1112 theTree->Reset();
1113
1114 // Dumping the tree
1115 std::string name = t->GetName();
1116
1117 // Get the streamName for the previous interval
1118 std::string streamName = streamNameFunction()->getStreamName( this, group, name, true );
1119
1120 // De-register original tree with the THistSvc
1121 StatusCode sc1 = m_THistSvc->deReg( theTree );
1122 if (sc1 == StatusCode::FAILURE) allIsOk = false;
1123
1124 // Register clonned tree under previous interval streamName
1125 StatusCode sc2 = m_THistSvc->regTree( streamName, t );
1126 if (sc2 == StatusCode::FAILURE) allIsOk = false;
1127
1128 if( m_manager != 0 ) {
1129 std::string genericName = NoOutputStream().getStreamName( this, group, name );
1130 m_manager->passOwnership( t, genericName );
1131 m_manager->writeAndDelete( genericName );
1132 }
1133
1134 // Get streamName for the current interval
1135 streamName = streamNameFunction()->getStreamName( this, group, name, false );
1136 // Register metadata information with the current interval streamname
1137 StatusCode smd = registerMetadata(streamName, name, group);
1138 if (smd != StatusCode::SUCCESS) allIsOk = false;
1139
1140 // Re-register the original graph with the current interval streamName
1141 StatusCode sc3 = m_THistSvc->regTree( streamName, theTree );
1142 if (sc3 == StatusCode::FAILURE) allIsOk = false;
1143
1144 }
1145
1146 if (!allIsOk) return StatusCode::FAILURE;
1147
1148 return StatusCode::SUCCESS;
1149}

◆ 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 1446 of file ManagedMonitorToolBase.cxx.

1448{
1449
1450 // This part of the code deals with MANAGED type
1451 if ( group.histo_mgmt() != ATTRIB_UNMANAGED ) {
1452 // Create an unmanaged group based on the original MonGroup instance passed
1453 // This is needed because managed tree is presented as a number of unmanaged
1454 // trees (one per each interval)
1455 MonGroup group_unmanaged( this, group.system(), group.interval(), ATTRIB_UNMANAGED, group.chain(), group.merge());
1456
1457 if (m_supportedIntervalsForRebooking.count(group.interval())) {
1458 m_templateTrees[group.interval()].push_back( MgmtParams<TTree>(t, group_unmanaged) );
1459 } else {
1460 ATH_MSG_ERROR("Attempt to book managed tree " << t->GetName() << " with invalid interval type " << intervalEnumToString(group.interval()));
1461 return StatusCode::FAILURE;
1462 }
1463
1464 std::string name = t->GetName();
1465 std::string genericName = NoOutputStream().getStreamName( this, group_unmanaged, name );
1466 std::string streamName = streamNameFunction()->getStreamName( this, group_unmanaged, name, false );
1467 registerMetadata(streamName, name, group).ignore();
1468 return m_THistSvc->regTree( streamName, t );
1469 }
1470
1471
1472 // This part of the code deals with UNMANAGED type
1473 std::string tName = t->GetName();
1474
1475 if( m_manager != 0 ) {
1476 std::string genericName = NoOutputStream().getStreamName( this, group, tName );
1477 m_manager->writeAndDelete( genericName );
1478 m_manager->passOwnership( t, genericName );
1479 }
1480
1481 std::string streamName = streamNameFunction()->getStreamName( this, group, tName, false );
1482
1483 StatusCode smd = registerMetadata(streamName, tName, group);
1484 if (smd != StatusCode::SUCCESS) return StatusCode::FAILURE;
1485
1486 return m_THistSvc->regTree( streamName, t );
1487}

◆ 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 1436 of file ManagedMonitorToolBase.cxx.

1439{
1440 MonGroup group( this, system, interval, histo_mgmt, chain, merge );
1441 return regTree( t, group );
1442}
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.

◆ 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 368 of file AthCommonDataStore.h.

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

◆ renounceArray()

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

remove all handles from I/O resolution

Definition at line 352 of file AthCommonDataStore.h.

352 {
354 }

◆ 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}
Scalar eta() const
pseudorapidity method

◆ 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 1553 of file ManagedMonitorToolBase.cxx.

1555{
1556 return StatusCode::SUCCESS;
1557}

◆ setMonManager()

void ManagedMonitorToolBase::setMonManager ( AthenaMonManager * manager)
virtualinherited

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

Definition at line 1220 of file ManagedMonitorToolBase.cxx.

1222{
1223 ATH_MSG_DEBUG( "ManagedMonitorToolBase::setMonManager():");
1225 if( m_manager != 0 ) {
1226 ATH_MSG_DEBUG( " --> Setting manager");
1227 m_managerNameProp = m_manager->name();
1228 m_fileKey = m_manager->fileKey();
1229 m_dataType = m_manager->dataType();
1230 m_environment = m_manager->environment();
1231 delete m_streamNameFcn;
1233 }
1234 ATH_MSG_DEBUG( " --> Exiting successfully");
1235}
virtual StreamNameFcn * getNewStreamNameFcn() const

◆ 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 1542 of file ManagedMonitorToolBase.cxx.

1544{
1545 // All instances should write to the stream(s) defined by the
1546 // AthenaMonManager.
1547
1548 return StatusCode::SUCCESS;
1549}

◆ SortMDTSegments()

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

Definition at line 28 of file MdtVsTgcRawData_SegmSorting.cxx.

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

439{
440 if( m_streamNameFcn == 0 ) {
441 msg(MSG::ERROR) << "!! streamNameFunction() has not been initialized !!" << endmsg;
442 msg(MSG::ERROR) << " --> neither ManagedMonitorToolBase::initialize() nor" << endmsg;
443 msg(MSG::ERROR) << " --> ManagedMonitorToolBase::setMonManager() has been called." << endmsg;
444 msg(MSG::ERROR) << " --> Correct configuration cannot be guaranteed from this point." << endmsg;
446 }
447 return m_streamNameFcn;
448}

◆ 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 asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, and AthCheckedComponent<::AthAlgTool >.

◆ 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 35 of file MdtVsTgcRawData_TGCEffCheck.cxx.

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

◆ tgceffcalcfinalize()

void MdtVsTgcRawDataValAlg::tgceffcalcfinalize ( )
private

Definition at line 144 of file MdtVsTgcRawData_TGCEffCheck.cxx.

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

◆ TGCgetlayer()

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

Definition at line 195 of file MdtVsTgcRawData_TGCEffCheck.cxx.

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

◆ TGClayer2stationindex()

int MdtVsTgcRawDataValAlg::TGClayer2stationindex ( int l)
private

Definition at line 233 of file MdtVsTgcRawData_TGCEffCheck.cxx.

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

◆ TGCstationname2stationindex()

int MdtVsTgcRawDataValAlg::TGCstationname2stationindex ( int stationName)
private

Definition at line 245 of file MdtVsTgcRawData_TGCEffCheck.cxx.

245 {
246 if(stationName==41||stationName==42)return 0;
247 else if(stationName==43||stationName==44)return 1;
248 else if(stationName==45||stationName==46)return 2;
249 else if(stationName==47||stationName==48)return 3;
250 else{
251 ATH_MSG_WARNING( "TGCstationname2stationindex passed invalid stationName n=" << stationName );
252 return -1;
253 }
254}// 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 935 of file ManagedMonitorToolBase.cxx.

937{
938 // THistSvc employs TDirectory Append method when registering TGraph.
939 // When deReg is used to de-register TGraph object, THistSvc only removes the object
940 // from its internal management but forgets to delete from TDirectory.
941 // The current method fixes this problem by removing the TGraph object manually
942 // after THistSvc->deReg(TGraph* obj) is called.
943
944 // Saves and restores gFile and gDirectory
946
947 // This check is true when TGraph object is removed successfully
948 bool graphRemoved = false;
949
950 file->cd("/");
951 TDirectory* dir = file->GetDirectory(directoryName.c_str());
952 if (dir != 0) {
953 dir->cd();
954 TObject* obj = dir->Remove(theGraph);
955 if (obj != 0)
956 graphRemoved = true;
957 }
958
959 if (!graphRemoved) {
960 return StatusCode::FAILURE;
961 }
962
963 return StatusCode::SUCCESS;
964}

◆ trigChainsArePassed()

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

Definition at line 1966 of file ManagedMonitorToolBase.cxx.

1968{
1969 ATH_MSG_DEBUG( "ManagedMonitorToolBase::trigChainsArePassed:");
1970
1971 for(unsigned int i=0; i<vTrigNames.size(); i++) {
1972 if( m_trigDecTool->isPassed(vTrigNames[i]) ) {
1973 ATH_MSG_DEBUG( " + \"" << vTrigNames[i] << "\" passed, returning \'true\'");
1974 return true;
1975 }
1976 else {
1977 ATH_MSG_DEBUG( " - \"" << vTrigNames[i] << "\" did not pass");
1978 }
1979 }
1980
1981 return false;
1982}

◆ updateTriggersForGroups()

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

Definition at line 2004 of file ManagedMonitorToolBase.cxx.

2005 {
2006 for (size_t i = 0; i < vTrigChainNames.size(); ++i) {
2007 std::string& thisName = vTrigChainNames[i];
2008 if (thisName.compare(0, 9, "CATEGORY_") ==0) {
2009 ATH_MSG_DEBUG("Found a trigger category: " << thisName << ". We will unpack it.");
2010 std::vector<std::string> triggers = m_trigTranslator->translate(thisName.substr(9,std::string::npos));
2011 std::ostringstream oss;
2012 oss << "(";
2013 for (size_t itrig = 0; itrig < triggers.size(); ++itrig) {
2014 if (itrig != 0) {
2015 oss << "|";
2016 }
2017 oss << triggers[itrig];
2018 }
2019 oss << ")";
2020 // replace with new value
2021 std::string newval = oss.str();
2022 ATH_MSG_DEBUG("Replaced with " << newval);
2023 vTrigChainNames[i] = std::move(newval);
2024 }
2025 }
2026}
PublicToolHandle< ITriggerTranslatorTool > m_trigTranslator

◆ updateVHKA()

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

Definition at line 298 of file AthCommonDataStore.h.

298 {
299 for (auto &a : m_vhka) {
301 for (auto k : keys) {
302 k->setOwner(this);
303 }
304 }
305 }
std::vector< SG::VarHandleKeyArray * > m_vhka

◆ writeAndDelete()

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

Write out histogram and delete it.

Definition at line 1491 of file ManagedMonitorToolBase.cxx.

1492 {
1493 if (!h)
1494 return StatusCode::FAILURE;
1495
1496 std::string hName = h->GetName();
1497
1498 if( m_manager != 0 ) {
1499 std::string genericName = NoOutputStream().getStreamName( this, group, hName );
1500 m_manager->writeAndDelete( genericName );
1501 }
1502 return StatusCode::SUCCESS;
1503}

Member Data Documentation

◆ m_bookHistogramsInitial

bool ManagedMonitorToolBase::m_bookHistogramsInitial
privateinherited

Definition at line 800 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 807 of file ManagedMonitorToolBase.h.

◆ m_dataType

AthenaMonManager::DataType_t ManagedMonitorToolBase::m_dataType
protectedinherited

Definition at line 745 of file ManagedMonitorToolBase.h.

◆ m_dataTypeStr

std::string ManagedMonitorToolBase::m_dataTypeStr
protectedinherited

Definition at line 741 of file ManagedMonitorToolBase.h.

◆ m_defaultLBDuration

float ManagedMonitorToolBase::m_defaultLBDuration
privateinherited

Definition at line 802 of file ManagedMonitorToolBase.h.

◆ m_detailLevel

unsigned int ManagedMonitorToolBase::m_detailLevel
protectedinherited

Definition at line 743 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.

66 {this, "DetectorManagerKey",
67 "MuonDetectorManager",
68 "Key of input MuonDetectorManager condition data"};

◆ m_detStore

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

Pointer to StoreGate (detector store by default).

Definition at line 381 of file AthCommonDataStore.h.

◆ m_DQFilterTools

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

Definition at line 756 of file ManagedMonitorToolBase.h.

756{this,"FilterTools",{}};

◆ m_eff_stationmap

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

Definition at line 145 of file MdtVsTgcRawDataValAlg.h.

145{}; // [AC][WireStrip][EffNumDenomError] //Filled in postprocessor

◆ m_eff_stationmapbase

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

Definition at line 143 of file MdtVsTgcRawDataValAlg.h.

143{}; // [AC][WireStrip][EffNumDenomError]

◆ m_eff_stationmapmid

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

Definition at line 144 of file MdtVsTgcRawDataValAlg.h.

144{}; // [AC][WireStrip][EffNumDenomError]

◆ m_endOfEventsBlock

bool ManagedMonitorToolBase::m_endOfEventsBlock
privateinherited

Definition at line 730 of file ManagedMonitorToolBase.h.

◆ m_endOfLowStat

bool ManagedMonitorToolBase::m_endOfLowStat
privateinherited

Definition at line 730 of file ManagedMonitorToolBase.h.

◆ m_endOfLumiBlock

bool ManagedMonitorToolBase::m_endOfLumiBlock
privateinherited

Definition at line 730 of file ManagedMonitorToolBase.h.

◆ m_endOfRun

bool ManagedMonitorToolBase::m_endOfRun
privateinherited

Definition at line 730 of file ManagedMonitorToolBase.h.

◆ m_environment

AthenaMonManager::Environment_t ManagedMonitorToolBase::m_environment
protectedinherited

Definition at line 746 of file ManagedMonitorToolBase.h.

◆ m_environmentStr

std::string ManagedMonitorToolBase::m_environmentStr
protectedinherited

Definition at line 742 of file ManagedMonitorToolBase.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default).

Definition at line 378 of file AthCommonDataStore.h.

◆ m_fileKey

std::string ManagedMonitorToolBase::m_fileKey
protectedinherited

Definition at line 740 of file ManagedMonitorToolBase.h.

◆ m_haveClearedLastEventBlock

bool ManagedMonitorToolBase::m_haveClearedLastEventBlock
protectedinherited

Definition at line 773 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.

69{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};

◆ 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 768 of file ManagedMonitorToolBase.h.

◆ m_lastLowStatInterval

int ManagedMonitorToolBase::m_lastLowStatInterval
protectedinherited

Definition at line 768 of file ManagedMonitorToolBase.h.

◆ m_lastLumiBlock

unsigned int ManagedMonitorToolBase::m_lastLumiBlock
protectedinherited

Definition at line 766 of file ManagedMonitorToolBase.h.

◆ m_lastMedStatInterval

int ManagedMonitorToolBase::m_lastMedStatInterval
protectedinherited

Definition at line 768 of file ManagedMonitorToolBase.h.

◆ m_lastRun

unsigned int ManagedMonitorToolBase::m_lastRun
protectedinherited

Definition at line 767 of file ManagedMonitorToolBase.h.

◆ m_lbDurationDataKey

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

Definition at line 795 of file ManagedMonitorToolBase.h.

796{this,"LBDurationCondDataKey","LBDurationCondData","SG Key of LBDurationCondData object"};

◆ m_lumiDataKey

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

Definition at line 793 of file ManagedMonitorToolBase.h.

794{this,"LuminosityCondDataKey","LuminosityCondData","SG Key of LuminosityCondData object"};

◆ m_manager

AthenaMonManager* ManagedMonitorToolBase::m_manager
protectedinherited

Definition at line 736 of file ManagedMonitorToolBase.h.

◆ m_managerNameProp

std::string ManagedMonitorToolBase::m_managerNameProp
protectedinherited

Definition at line 738 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.

83{this,"MdtPrepDataContainer","MDT_DriftCircles","MDT PRDs"};

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

84{this,"MdtSegmentCollection","MuonSegments","muon segments"};

◆ m_mdt_segmmap

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

Definition at line 111 of file MdtVsTgcRawDataValAlg.h.

111{}; // [AC][StationIndex]

◆ m_mdt_segmmatchsag

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

Definition at line 150 of file MdtVsTgcRawDataValAlg.h.

150{}; // [AC][MDTStation][MDTStation][RhoEtaPhiThe]

◆ m_mdt_segmposdirsag

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

Definition at line 151 of file MdtVsTgcRawDataValAlg.h.

151{}; // [AC][MDTStation][RhoEtaPhiThe]

◆ m_mdt_trackchecksag

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

Definition at line 153 of file MdtVsTgcRawDataValAlg.h.

153{};// [AC][MDTStation][MDTStation][RhoEtaPhiThe]

◆ m_mdt_trackdirdirsag

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

Definition at line 152 of file MdtVsTgcRawDataValAlg.h.

152{}; // [AC][MDTStation][MDTStation][RhoEtaPhiThe]

◆ 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 734 of file ManagedMonitorToolBase.h.

◆ m_mvt_cutspassed

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

Definition at line 109 of file MdtVsTgcRawDataValAlg.h.

109{}; // [AC]

◆ m_mvt_extrprdsag

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

Definition at line 147 of file MdtVsTgcRawDataValAlg.h.

147{}; // [AC][TGCStation][FE][WireStrip][RhoEtaPhi]

◆ m_mvt_extrprdsag2

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

Definition at line 148 of file MdtVsTgcRawDataValAlg.h.

148{}; // [AC][TGCStation][FE][WireStrip][RhoEtaPhi]

◆ m_nEvents

unsigned int ManagedMonitorToolBase::m_nEvents
protectedinherited

Definition at line 770 of file ManagedMonitorToolBase.h.

◆ m_nEventsIgnoreTrigger

unsigned int ManagedMonitorToolBase::m_nEventsIgnoreTrigger
protectedinherited

Definition at line 771 of file ManagedMonitorToolBase.h.

◆ m_newEventsBlock

bool ManagedMonitorToolBase::m_newEventsBlock
privateinherited

Definition at line 729 of file ManagedMonitorToolBase.h.

◆ m_newHigStatInterval

bool ManagedMonitorToolBase::m_newHigStatInterval
privateinherited

Definition at line 727 of file ManagedMonitorToolBase.h.

◆ m_newLowStat

bool ManagedMonitorToolBase::m_newLowStat
privateinherited

Definition at line 728 of file ManagedMonitorToolBase.h.

◆ m_newLowStatInterval

bool ManagedMonitorToolBase::m_newLowStatInterval
privateinherited

Definition at line 727 of file ManagedMonitorToolBase.h.

◆ m_newLumiBlock

bool ManagedMonitorToolBase::m_newLumiBlock
privateinherited

Definition at line 728 of file ManagedMonitorToolBase.h.

◆ m_newMedStatInterval

bool ManagedMonitorToolBase::m_newMedStatInterval
privateinherited

Definition at line 727 of file ManagedMonitorToolBase.h.

◆ m_newRun

bool ManagedMonitorToolBase::m_newRun
privateinherited

Definition at line 728 of file ManagedMonitorToolBase.h.

◆ m_nLumiBlocks

unsigned int ManagedMonitorToolBase::m_nLumiBlocks
protectedinherited

Definition at line 772 of file ManagedMonitorToolBase.h.

◆ m_path

std::string ManagedMonitorToolBase::m_path
protectedinherited

Definition at line 759 of file ManagedMonitorToolBase.h.

◆ m_preScaleProp

long ManagedMonitorToolBase::m_preScaleProp
protectedinherited

Definition at line 760 of file ManagedMonitorToolBase.h.

◆ m_procNEventsProp

long ManagedMonitorToolBase::m_procNEventsProp
protectedinherited

Definition at line 758 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 748 of file ManagedMonitorToolBase.h.

◆ m_supportedIntervalsForRebooking

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

Definition at line 803 of file ManagedMonitorToolBase.h.

◆ m_templateEfficiencies

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

Definition at line 604 of file ManagedMonitorToolBase.h.

◆ m_templateGraphs

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

Definition at line 596 of file ManagedMonitorToolBase.h.

◆ m_templateHistograms

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

Definition at line 592 of file ManagedMonitorToolBase.h.

◆ m_templateTrees

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

Definition at line 600 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.

82{this,"OutputCoinCollection","TrigT1CoinDataCollection","TGC coincidences"};

◆ m_tgc_prdcompsag

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

Definition at line 149 of file MdtVsTgcRawDataValAlg.h.

149{}; // [AC][TGCStation][RhoEtaPhiZ]

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

81{this,"TgcPrepDataContainer","TGC_Measurements","TGC PRDs"};

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

94{}; // [StationName][AC][StationEta][StationPhi]

◆ m_trigDecTool

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

Definition at line 752 of file ManagedMonitorToolBase.h.

752{this, "TrigDecisionTool",""};

◆ m_triggerChainProp

std::string ManagedMonitorToolBase::m_triggerChainProp
protectedinherited

Definition at line 761 of file ManagedMonitorToolBase.h.

◆ m_triggerGroupProp

std::string ManagedMonitorToolBase::m_triggerGroupProp
protectedinherited

Definition at line 762 of file ManagedMonitorToolBase.h.

◆ m_trigLiveFractionDataKey

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

Definition at line 797 of file ManagedMonitorToolBase.h.

798{this,"TrigLiveFractionCondDataKey","TrigLiveFractionCondData","SG Key of TrigLiveFractionCondData object"};

◆ m_trigTranslator

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

Definition at line 754 of file ManagedMonitorToolBase.h.

754{this,"TriggerTranslatorTool",""};

◆ m_useLumi

bool ManagedMonitorToolBase::m_useLumi
privateinherited

Definition at line 801 of file ManagedMonitorToolBase.h.

◆ m_useTrigger

bool ManagedMonitorToolBase::m_useTrigger
protectedinherited

Definition at line 764 of file ManagedMonitorToolBase.h.

◆ m_varHandleArraysDeclared

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

Definition at line 387 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 386 of file AthCommonDataStore.h.

◆ m_vTrigChainNames

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

Definition at line 608 of file ManagedMonitorToolBase.h.

◆ m_vTrigGroupNames

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

Definition at line 608 of file ManagedMonitorToolBase.h.


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