ATLAS Offline Software
SCTTracksMonAlg.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*
4  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef SCTTRACKSMONALG_H
8 #define SCTTRACKSMONALG_H
9 
11 
13 
20 
21 #include "GaudiKernel/ToolHandle.h"
22 
23 //Standard C++
24 #include <bitset>
25 #include <string>
26 #include <vector>
27 
28 class SCT_ID;
29 
31  public:
32  SCTTracksMonAlg(const std::string& name, ISvcLocator* pSvcLocator);
33  virtual ~SCTTracksMonAlg() = default;
34  virtual StatusCode initialize() override final;
35  virtual StatusCode fillHistograms(const EventContext& ctx) const override final;
36 
37 private:
40 
41  const std::string m_regionNames[3]{"EndCapC", "Barrel", "EndCapA"}; //3 Regions: This can be improved
42 
43 
45  static const std::string s_triggerNames[N_TRIGGER_TYPES];
46 
47  // Data members, which are not changed after initialization
48  std::string m_stream{"/stat"};
49  std::string m_path{""};
50 
51  // Data members, which are changed during event processing
52  // These have to be converted to local variables or be protected by std::atomic or std::mutex
53  // before or when this tool is migrated to the new AthenaMT compatible DQ framework.
54  mutable std::atomic_int m_numberOfEvents{0}; // This should be conveted to std::atomic_int in AthenaMT.
55 
56 
58  IntegerProperty m_trackHitCut{this, "trackHitCut", 3};
60  IntegerProperty m_checkrate{this, "CheckRate", 1000};
62  IntegerProperty m_evtsbins{this, "EvtsBins", 5000};
63 
64  BooleanProperty m_useIDGlobal{this, "useIDGlobal", false};
65  BooleanProperty m_doTrigger{this, "doTrigger", false};
66  BooleanProperty m_doPositiveEndcap{this, "doPositiveEndcap", true};
67  BooleanProperty m_doNegativeEndcap{this, "doNegativeEndcap", true};
68  BooleanProperty m_doUnbiasedCalc{this, "doUnbiasedCalc", true};
69 
71  SG::ReadHandleKey<TrackCollection> m_tracksName{this, "tracksName", "CombinedInDetTracks"};
72 
73 
74  //@name Tool and service members
76  ToolHandle<Trk::ITrackSummaryTool> m_trackSummaryTool{this, "TrackSummaryTool", "InDetTrackSummaryTool"};
77 
79  ToolHandle<Trk::IResidualPullCalculator> m_residualPullCalculator{this, "ResPullCalc", "Trk::ResidualPullCalculator/ResidualPullCalculator"};
80  ToolHandle<Trk::IUpdator> m_updator{this, "KalmanUpdator", "Trk::KalmanUpdator/TrkKalmanUpdator", ""};
81 
83  const SCT_ID* m_pSCTHelper{nullptr};
84 
86  //@name Trigger related methods
87  //{
89  StatusCode checkTriggers(std::bitset<N_TRIGGER_TYPES>& firedTriggers) const;
91  bool hasTriggerFired(const unsigned int trigger, const std::bitset<N_TRIGGER_TYPES>& firedTriggers) const;
93 
94  //@name Service methods
96  float calculatePull(const float, const float, const float) const;
98 
100 
101 };
102 
103 #endif // SCTTRACKSMONALG_H
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
SCTTracksMonAlg::calculatePull
float calculatePull(const float, const float, const float) const
Calculate Pull value for MeasuredAtPlane TrackStates.
Definition: SCTTracksMonAlg.cxx:249
SCTTracksMonAlg::BPTX
@ BPTX
Definition: SCTTracksMonAlg.h:39
SCTTracksMonAlg::m_doTrigger
BooleanProperty m_doTrigger
Definition: SCTTracksMonAlg.h:65
ITrackSummaryTool.h
SCTTracksMonAlg::m_useIDGlobal
BooleanProperty m_useIDGlobal
Definition: SCTTracksMonAlg.h:64
SCTTracksMonAlg::N_TRIGGER_TYPES
@ N_TRIGGER_TYPES
Definition: SCTTracksMonAlg.h:39
SCTTracksMonAlg::checkTriggers
StatusCode checkTriggers(std::bitset< N_TRIGGER_TYPES > &firedTriggers) const
Fill the m_firedTriggers bitset according to event information.
Definition: SCTTracksMonAlg.cxx:261
SCTTracksMonAlg::m_stream
std::string m_stream
Definition: SCTTracksMonAlg.h:48
SCTTracksMonAlg::m_regionNames
const std::string m_regionNames[3]
Definition: SCTTracksMonAlg.h:41
SCTTracksMonAlg
Definition: SCTTracksMonAlg.py:1
SCTTracksMonAlg::MBTS
@ MBTS
Definition: SCTTracksMonAlg.h:39
SCTTracksMonAlg::m_checkrate
IntegerProperty m_checkrate
CheckHists() frequency.
Definition: SCTTracksMonAlg.h:60
SCTTracksMonAlg::m_evtsbins
IntegerProperty m_evtsbins
Tracks vs evt.
Definition: SCTTracksMonAlg.h:62
SCTTracksMonAlg::TGC
@ TGC
Definition: SCTTracksMonAlg.h:39
SCTTracksMonAlg::hasTriggerFired
bool hasTriggerFired(const unsigned int trigger, const std::bitset< N_TRIGGER_TYPES > &firedTriggers) const
Get the status of a particular trigger bit (trigger bit 0-7)
Definition: SCTTracksMonAlg.cxx:274
SCTTracksMonAlg::m_trackHitCut
IntegerProperty m_trackHitCut
Cut on number of SCT hits on track.
Definition: SCTTracksMonAlg.h:58
SCTTracksMonAlg::initialize
virtual StatusCode initialize() override final
initialize
Definition: SCTTracksMonAlg.cxx:53
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
SCTTracksMonAlg::m_doUnbiasedCalc
BooleanProperty m_doUnbiasedCalc
Definition: SCTTracksMonAlg.h:68
IUpdator.h
AthMonitorAlgorithm
Base class for Athena Monitoring Algorithms.
Definition: AthMonitorAlgorithm.h:36
SCTTracksMonAlg::m_numberOfEvents
std::atomic_int m_numberOfEvents
Definition: SCTTracksMonAlg.h:54
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthMonitorAlgorithm.h
SCTTracksMonAlg::TriggerTypes
TriggerTypes
enumerated constant for the types of level 1 triggers, corresponds to the string m_triggerNames
Definition: SCTTracksMonAlg.h:39
TrackCollection.h
SCTTracksMonAlg::~SCTTracksMonAlg
virtual ~SCTTracksMonAlg()=default
SCTTracksMonAlg::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) const override final
adds event to the monitoring histograms
Definition: SCTTracksMonAlg.cxx:68
SCTTracksMonAlg::CALIB
@ CALIB
Definition: SCTTracksMonAlg.h:39
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
SCTTracksMonAlg::RNDM
@ RNDM
Definition: SCTTracksMonAlg.h:39
SCTTracksMonAlg::m_updator
ToolHandle< Trk::IUpdator > m_updator
Definition: SCTTracksMonAlg.h:80
SCT_MonitoringNumbers.h
EventInfo.h
IResidualPullCalculator.h
SCTTracksMonAlg::m_path
std::string m_path
Definition: SCTTracksMonAlg.h:49
SCTTracksMonAlg::RPC
@ RPC
Definition: SCTTracksMonAlg.h:39
SCT_ID
Definition: SCT_ID.h:68
SCTTracksMonAlg::SCTTracksMonAlg
SCTTracksMonAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: SCTTracksMonAlg.cxx:49
SCTTracksMonAlg::L1CAL
@ L1CAL
Definition: SCTTracksMonAlg.h:39
SCTTracksMonAlg::m_doNegativeEndcap
BooleanProperty m_doNegativeEndcap
Definition: SCTTracksMonAlg.h:67
SCTTracksMonAlg::m_trackSummaryTool
ToolHandle< Trk::ITrackSummaryTool > m_trackSummaryTool
Definition: SCTTracksMonAlg.h:76
SCTTracksMonAlg::m_tracksName
SG::ReadHandleKey< TrackCollection > m_tracksName
Name of the Track collection to use.
Definition: SCTTracksMonAlg.h:71
SCTTracksMonAlg::COSM
@ COSM
Definition: SCTTracksMonAlg.h:39
SCTTracksMonAlg::s_triggerNames
static const std::string s_triggerNames[N_TRIGGER_TYPES]
Abbreviations for level 1 trigger types.
Definition: SCTTracksMonAlg.h:45
SCTTracksMonAlg::m_doPositiveEndcap
BooleanProperty m_doPositiveEndcap
Definition: SCTTracksMonAlg.h:66
SCTTracksMonAlg::m_residualPullCalculator
ToolHandle< Trk::IResidualPullCalculator > m_residualPullCalculator
Kalman Updator for SCT Unbiased states in Residual calculation.
Definition: SCTTracksMonAlg.h:79
SCTTracksMonAlg::m_pSCTHelper
const SCT_ID * m_pSCTHelper
SCT Helper class.
Definition: SCTTracksMonAlg.h:83