ATLAS Offline Software
CSCSegmValMonAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef CSCSegmValMonAlg_H
6 #define CSCSegmValMonAlg_H
7 
10 
11 #include "GaudiKernel/ServiceHandle.h"
12 #include "GaudiKernel/ToolHandle.h"
13 
16 #include "TrkTrack/Track.h"
17 
22 
23 #include <vector>
24 #include <string>
25 
26 namespace Trk {
27  class MeasurementBase;
28 }
29 
31 
32  public:
34  CSCSegmValMonAlg( const std::string& name, ISvcLocator* pSvcLocator );
36  virtual ~CSCSegmValMonAlg()=default;
37  virtual StatusCode initialize() override;
38  virtual StatusCode fillHistograms( const EventContext& ctx ) const override;
39 
40  private:
41 
42  typedef std::vector<TH1 *> SegmHistType;
43  typedef std::vector<TH1 *>::const_iterator SegmHistIter;
44 
45  typedef std::vector<const Trk::MeasurementBase*> TrkSegmType;
46  typedef std::vector<const Trk::MeasurementBase*>::const_iterator TrkSegmIter;
47 
48  typedef enum EndCaps { ECA = 0, ECC } EndCapType;
49 
50  bool isCscSegment( const Muon::MuonSegment* seg ) const;
51  unsigned int cscHits( const Muon::MuonSegment* seg ) const;
52  bool segmSlopeCut(const float csc_x, const float csc_ax, const float cut ) const;
53  //Trigger aware monitoring
54  bool evtSelTriggersPassed() const;
55 
57  "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc",
58  "Handle to the service providing the IMuonEDMHelperSvc interface" };
59  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
60  SG::ReadHandleKeyArray<Trk::SegmentCollection> m_segmKey{this,"SegmentKey",{"TrkMuonSegments", "UnAssocMuonTrkSegments"},"muon segments"};
61 
62  Gaudi::Property<std::vector<std::string>> m_sampSelTriggers{this,"EventSelTriggers",{}};
63  Gaudi::Property<bool> m_doEvtSel{this,"DoEventSelection",false};
64  Gaudi::Property<double> m_segmSlope{this,"SegmentSlopeCut",0};
65 
66 };
67 
68 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
CSCSegmValMonAlg::~CSCSegmValMonAlg
virtual ~CSCSegmValMonAlg()=default
Destructor.
CSCSegmValMonAlg::ECA
@ ECA
Definition: CSCSegmValMonAlg.h:48
CSCSegmValMonAlg::ECC
@ ECC
Definition: CSCSegmValMonAlg.h:48
CSCSegmValMonAlg::SegmHistType
std::vector< TH1 * > SegmHistType
Definition: CSCSegmValMonAlg.h:42
CSCSegmValMonAlg::TrkSegmType
std::vector< const Trk::MeasurementBase * > TrkSegmType
Definition: CSCSegmValMonAlg.h:45
CSCSegmValMonAlg::TrkSegmIter
std::vector< const Trk::MeasurementBase * >::const_iterator TrkSegmIter
Definition: CSCSegmValMonAlg.h:46
CSCSegmValMonAlg::EndCaps
EndCaps
Definition: CSCSegmValMonAlg.h:48
CSCSegmValMonAlg::isCscSegment
bool isCscSegment(const Muon::MuonSegment *seg) const
Definition: CSCSegmValMonAlg.cxx:486
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
TrigDecisionTool.h
CSCSegmValMonAlg::CSCSegmValMonAlg
CSCSegmValMonAlg(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition: CSCSegmValMonAlg.cxx:26
CSCSegmValMonAlg
Definition: CSCSegmValMonAlg.h:30
CSCSegmValMonAlg::SegmHistIter
std::vector< TH1 * >::const_iterator SegmHistIter
Definition: CSCSegmValMonAlg.h:43
CSCSegmValMonAlg::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
Definition: CSCSegmValMonAlg.cxx:53
Track.h
AthMonitorAlgorithm
Base class for Athena Monitoring Algorithms.
Definition: AthMonitorAlgorithm.h:36
CSCSegmValMonAlg::m_edmHelperSvc
ServiceHandle< Muon::IMuonEDMHelperSvc > m_edmHelperSvc
Definition: CSCSegmValMonAlg.h:56
CSCSegmValMonAlg::cscHits
unsigned int cscHits(const Muon::MuonSegment *seg) const
Definition: CSCSegmValMonAlg.cxx:508
CSCSegmValMonAlg::m_doEvtSel
Gaudi::Property< bool > m_doEvtSel
Definition: CSCSegmValMonAlg.h:63
CSCSegmValMonAlg::initialize
virtual StatusCode initialize() override
initialize
Definition: CSCSegmValMonAlg.cxx:32
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthMonitorAlgorithm.h
BindingsTest.cut
cut
This script demonstrates how to call a C++ class from Python Also how to use PyROOT is shown.
Definition: BindingsTest.py:13
CSCSegmValMonAlg::m_segmKey
SG::ReadHandleKeyArray< Trk::SegmentCollection > m_segmKey
Definition: CSCSegmValMonAlg.h:60
Monitored.h
Header file to be included by clients of the Monitored infrastructure.
CSCSegmValMonAlg::m_sampSelTriggers
Gaudi::Property< std::vector< std::string > > m_sampSelTriggers
Definition: CSCSegmValMonAlg.h:62
IMuonEDMHelperSvc.h
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
CSCSegmValMonAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: CSCSegmValMonAlg.h:59
CSCSegmValMonAlg::evtSelTriggersPassed
bool evtSelTriggersPassed() const
Definition: CSCSegmValMonAlg.cxx:472
CSCSegmValMonAlg::EndCapType
enum CSCSegmValMonAlg::EndCaps EndCapType
CSCSegmValMonAlg::segmSlopeCut
bool segmSlopeCut(const float csc_x, const float csc_ax, const float cut) const
Definition: CSCSegmValMonAlg.cxx:529
MuonSegment.h
CSCSegmValMonAlg::m_segmSlope
Gaudi::Property< double > m_segmSlope
Definition: CSCSegmValMonAlg.h:64
Muon::MuonSegment
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment/MuonSegment/MuonSegment.h:45
IMuonIdHelperSvc.h
SegmentCollection.h
ServiceHandle< Muon::IMuonEDMHelperSvc >