ATLAS Offline Software
SCTLorentzMonTool.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*
4  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
5 */
6 
20 #ifndef SCTLORENTZMONTOOL_H
21 #define SCTLORENTZMONTOOL_H
22 
24 
26 
32 
33 #include "GaudiKernel/ToolHandle.h"
34 
35 #include <string>
36 
37 // Forward declarations
38 class TProfile;
39 class SCT_ID;
40 
42  public:
43  SCTLorentzMonTool(const std::string& type, const std::string& name, const IInterface* parent);
44  virtual ~SCTLorentzMonTool() = default;
45  //initialize
46  virtual StatusCode initialize() override final;
49  virtual StatusCode bookHistograms() override final;
51  virtual StatusCode bookHistogramsRecurrent() override final;
53  virtual StatusCode fillHistograms() override final;
55  virtual StatusCode procHistograms() override final;
57  virtual StatusCode checkHists(bool fromFinalize) override final;
59 
60  private:
62  enum Sides { side0, side1, nSides };
63 
64  // Data member, which is not changed after initialization
65  std::string m_gpath{""};
66 
67  //@name Histograms related members
69 
72 
74  SG::ReadHandleKey<TrackCollection> m_tracksName{this, "tracksName", "CombinedInDetTracks"};
76  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
77 
78  //@name Tool members
80  ToolHandle<Trk::IPRD_AssociationTool> m_assoTool{this, "AssociationTool", "InDet::InDetPRD_AssociationToolGangedPixels"};
83 
84  //@name Service members
86  const SCT_ID* m_pSCTHelper{nullptr};
89 
90  //@name Flags
92  // Reject shared hits
93  BooleanProperty m_rejectSharedHits{this, "RejectSharedHits", false};
95 
96  //@name Histograms related methods
98  // Book Histograms
101 
102  //@name Service methods
104  // Calculate the local angle of incidence
105  int findAnglesToWaferSurface ( const float (&vec)[3], const float& sinAlpha, const Identifier& id, const InDetDD::SiDetectorElementCollection* elements, float& theta, float& phi ) const;
106 
108  TProfile* pFactory(const std::string& name, const std::string& title, int nbinsx, float xlow, float xhigh, MonGroup& registry, int& iflag) const;
110 };
111 
112 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
python.Dso.registry
registry
Definition: Control/AthenaServices/python/Dso.py:159
SCTLorentzMonTool::m_pSCTHelper
const SCT_ID * m_pSCTHelper
SCT Helper class.
Definition: SCTLorentzMonTool.h:87
SCTLorentzMonTool::bookHistogramsRecurrent
virtual StatusCode bookHistogramsRecurrent() override final
An inheriting class should either override this function, bookHists() or bookHistograms().
Definition: SCTLorentzMonTool.cxx:66
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
InDetDD::SiDetectorElementCollection
Definition: SiDetectorElementCollection.h:30
SCTLorentzMonTool::bookLorentzHistos
StatusCode bookLorentzHistos()
Definition: SCTLorentzMonTool.cxx:273
ManagedMonitorToolBase
Provides functionality for users to implement and save histograms, ntuples, and summary data,...
Definition: ManagedMonitorToolBase.h:74
SCTLorentzMonTool::checkHists
virtual StatusCode checkHists(bool fromFinalize) override final
helper function used in procHistograms
Definition: SCTLorentzMonTool.cxx:265
SCTLorentzMonTool::side1
@ side1
Definition: SCTLorentzMonTool.h:62
theta
Scalar theta() const
theta method
Definition: AmgMatrixBasePlugin.h:71
SCTLorentzMonTool::nSurfaces
@ nSurfaces
Definition: SCTLorentzMonTool.h:61
SCTLorentzMonTool::SiliconSurface
SiliconSurface
Definition: SCTLorentzMonTool.h:61
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
SCTLorentzMonTool::m_assoTool
ToolHandle< Trk::IPRD_AssociationTool > m_assoTool
Association tool.
Definition: SCTLorentzMonTool.h:81
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
SCTLorentzMonTool::pFactory
TProfile * pFactory(const std::string &name, const std::string &title, int nbinsx, float xlow, float xhigh, MonGroup &registry, int &iflag) const
Factory + register for the 2D profiles, returns whether successfully registered.
Definition: SCTLorentzMonTool.cxx:312
SCTLorentzMonTool::side0
@ side0
Definition: SCTLorentzMonTool.h:62
SCTLorentzMonTool::SCTLorentzMonTool
SCTLorentzMonTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor, calls base class constructor with parameters.
Definition: SCTLorentzMonTool.cxx:41
SCTLorentzMonTool::nSides
@ nSides
Definition: SCTLorentzMonTool.h:62
ManagedMonitorToolBase.h
SCT_Monitoring::N_BARRELS
@ N_BARRELS
Definition: SCT_MonitoringNumbers.h:43
SCTLorentzMonTool::m_SCTDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_SCTDetEleCollKey
Definition: SCTLorentzMonTool.h:76
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
SCTLorentzMonTool::surface100
@ surface100
Definition: SCTLorentzMonTool.h:61
covarianceTool.title
title
Definition: covarianceTool.py:542
SCTLorentzMonTool::findAnglesToWaferSurface
int findAnglesToWaferSurface(const float(&vec)[3], const float &sinAlpha, const Identifier &id, const InDetDD::SiDetectorElementCollection *elements, float &theta, float &phi) const
Definition: SCTLorentzMonTool.cxx:328
TrackCollection.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
IPRD_AssociationTool.h
ReadCondHandleKey.h
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
SCTLorentzMonTool::Sides
Sides
Definition: SCTLorentzMonTool.h:62
TProfile
Definition: rootspy.cxx:515
SiDetectorElementCollection.h
SCTLorentzMonTool::m_rejectSharedHits
BooleanProperty m_rejectSharedHits
Definition: SCTLorentzMonTool.h:93
SCT_MonitoringNumbers.h
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection >
SCTLorentzMonTool::m_phiVsNstrips
TProfile * m_phiVsNstrips[SCT_Monitoring::N_BARRELS][nSides][nSurfaces]
Vector of pointers to profile histogram of local inc angle (phi) vs nStrips.
Definition: SCTLorentzMonTool.h:71
SCTLorentzMonTool::~SCTLorentzMonTool
virtual ~SCTLorentzMonTool()=default
SCT_ID
Definition: SCT_ID.h:68
SCTLorentzMonTool::surface111
@ surface111
Definition: SCTLorentzMonTool.h:61
SCTLorentzMonTool::m_gpath
std::string m_gpath
Definition: SCTLorentzMonTool.h:65
SCTLorentzMonTool::m_tracksName
SG::ReadHandleKey< TrackCollection > m_tracksName
Name of the Track collection to use.
Definition: SCTLorentzMonTool.h:75
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
SCTLorentzMonTool::fillHistograms
virtual StatusCode fillHistograms() override final
Fill histograms in each loop.
Definition: SCTLorentzMonTool.cxx:95
SCTLorentzMonTool
Definition: SCTLorentzMonTool.h:41
SCTLorentzMonTool::bookHistograms
virtual StatusCode bookHistograms() override final
Book histograms in initialization.
Definition: SCTLorentzMonTool.cxx:80
SCTLorentzMonTool::initialize
virtual StatusCode initialize() override final
Definition: SCTLorentzMonTool.cxx:47
SCTLorentzMonTool::procHistograms
virtual StatusCode procHistograms() override final
process histograms at the end (we only use 'isEndOfRun')
Definition: SCTLorentzMonTool.cxx:252