ATLAS Offline Software
Loading...
Searching...
No Matches
SCTHitEffMonAlg.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 SCTHITEFFMONALG_H
8#define SCTHITEFFMONALG_H
9
11
13
25
26//Gaudi
27#include "GaudiKernel/ToolHandle.h"
28
29//STL
30#include <string>
31
32class Identifier;
34class PixelID;
35class SCT_ID;
36class TRT_ID;
37
39 public:
40 SCTHitEffMonAlg(const std::string& name, ISvcLocator* pSvcLocator);
41 virtual ~SCTHitEffMonAlg() = default;
42 virtual StatusCode initialize() override final;
43 virtual StatusCode fillHistograms(const EventContext& ctx) const override final;
44
45 private:
46 // Method to cut on track or hit variables and automatize DEBUG statements
47 StatusCode failCut(bool value, const std::string & name) const;
48
49 // Method to compute incident angle of track to wafer
51 const InDetDD::SiDetectorElementCollection* elements,
52 double& theta, double& phi) const;
53
54 // Method to find the chip just before a given hit
55 int previousChip(double xl, int side, bool swap) const;
56
57 // Computes residual of a hit to a track
58 double getResidual(const Identifier& surfaceID,
59 const Trk::TrackParameters* trkParam,
60 const InDet::SCT_ClusterContainer* p_sctclcontainer) const;
61
62 //Convert a layer/disk number (0-21) to a bec index (0,1,2) according to position of that layer
63 // Numbering is counter-intuitive, would expect C then B then A; in fact the original ordering was A, C, B
64 // I have re-ordered this!!!! so now its C,B,A
65
69 int becIdxLayer2Index(const int becIdx, const int layer) const;
70 int getWaferIndex(const int barrel_bc, const int layer_disk, const int side) const;
71
72 std::string m_path;
73
74 SG::ReadHandleKey<InDet::SCT_ClusterContainer> m_sctContainerName{this, "SCT_ClusterContainer", "SCT_Clusters"};
75 SG::ReadHandleKey<TrackCollection> m_TrackName{this, "TrackName", "CombinedInDetTracks"};
76 SG::ReadHandleKey<ComTime> m_comTimeName{this, "ComTimeKey", "TRT_Phase"};
77 SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
78 SG::ReadCondHandleKey<BunchCrossingCondData> m_bunchCrossingKey{this, "BunchCrossingKey", "BunchCrossingData", "Key BunchCrossing CDO" };
79 SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCondObjInputKey{this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"};
80
81 ToolHandle<Trk::IResidualPullCalculator> m_residualPullCalculator{this, "ResPullCalc", "Trk::ResidualPullCalculator/ResidualPullCalculator"};
82 ToolHandle<Trk::IRIO_OnTrackCreator> m_rotcreator{this, "ROTCreator", "InDet::SCT_ClusterOnTrackTool/SCT_ClusterOnTrackTool"};
83 ToolHandle<Trk::ITrackHoleSearchTool> m_holeSearchTool{this, "HoleSearch", "InDet::InDetTrackHoleSearchTool"}; //HERE
84 ToolHandle<ISCT_ConfigurationConditionsTool> m_configConditions{this, "ConfigConditions",
85 "SCT_ConfigurationConditionsTool/InDetSCT_ConfigurationConditionsTool", "Tool to retrieve SCT Configuration Tool"};
86
87 const PixelID* m_pixelId{nullptr};
88 const SCT_ID* m_sctId{nullptr};
89 const TRT_ID* m_trtId{nullptr};
90
91 // If all 3 of these -1, defaults depend on cosmic/not
92 IntegerProperty m_minSCTHits{this, "MinSCTHits", -1};
93 IntegerProperty m_minTRTHits{this, "MinTRTHits", -1};
94 IntegerProperty m_minOtherHits{this, "MinOtherHits", 6};
95
96 IntegerProperty m_minPixelHits{this, "MinPixelHits", -1};
97
98 FloatProperty m_maxPhiAngle{this, "MaxPhiAngle", 40., "Degrees, 100 implies no cut."};
99 FloatProperty m_maxChi2{this, "MaxChi2", 3.};
100 FloatProperty m_maxD0{this, "Maxd0", 10., "mm of D0"};
101 FloatProperty m_minPt{this, "MinPt", 1000., "minimu pt in MeV/c"};
102 FloatProperty m_effdistcut{this, "effDistanceCut", 0.2, "mm"};
103 FloatProperty m_maxZ0sinTheta{this, "MaxZ0sinTheta", 0.};
104 UnsignedIntegerProperty m_maxTracks{this, "MaxTracks", 500};
105 UnsignedIntegerProperty m_minSiHits{this, "MinimumNumberOfSiHits", 8, "Threshold for number of Si hits. Count Si hits excluding hits in the wafer under investigation to reduce track selection bias"};
106 UnsignedIntegerProperty m_maxSiHoles{this, "MaximumNumberOfSiHoles", 1, "Threshold for number of Si holes. Count Si holes excluding holes in the wafer under investigation to reduce track selection bias"};
107
108 BooleanProperty m_insideOutOnly{this, "InsideOutOnly", false};
109 BooleanProperty m_isCosmic{this, "IsCosmic", false};
110 BooleanProperty m_useTRTPhase{this, "UseTRTPhase", false};
111 BooleanProperty m_useSCTorTRT{this, "UseSCTorTRT", false};
112 BooleanProperty m_requireEnclosingHits{this, "RequireEnclosingHits", false};
113 BooleanProperty m_requireOtherFace{this, "RequireOtherFace", false};
114 BooleanProperty m_requireGuardRing{this, "RequireGuardRing", false, "should be returned to true"};
115 BooleanProperty m_vetoBadChips{this, "VetoBadChips", true};
116 BooleanProperty m_useIDGlobal{this, "useIDGlobal", false};
117
118};
119
120#endif // SCTHITEFFMONALG_H
Scalar phi() const
phi method
Scalar theta() const
theta method
Replaces the BunchCrossing AlgTool used in run1/2.
void swap(DataVector< T > &a, DataVector< T > &b)
See DataVector<T, BASE>::swap().
Property holding a SG store/key/clid from which a ReadHandle is made.
Eigen::Matrix< double, 3, 1 > Vector3D
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
This is an Identifier helper class for the Pixel subdetector.
Definition PixelID.h:67
FloatProperty m_maxPhiAngle
IntegerProperty m_minTRTHits
FloatProperty m_maxChi2
SG::ReadHandleKey< TrackCollection > m_TrackName
BooleanProperty m_vetoBadChips
const SCT_ID * m_sctId
int becIdxLayer2Index(const int becIdx, const int layer) const
ToolHandle< Trk::ITrackHoleSearchTool > m_holeSearchTool
UnsignedIntegerProperty m_maxSiHoles
BooleanProperty m_useIDGlobal
int getWaferIndex(const int barrel_bc, const int layer_disk, const int side) const
const TRT_ID * m_trtId
SG::ReadCondHandleKey< BunchCrossingCondData > m_bunchCrossingKey
FloatProperty m_effdistcut
virtual ~SCTHitEffMonAlg()=default
BooleanProperty m_insideOutOnly
IntegerProperty m_minOtherHits
const PixelID * m_pixelId
virtual StatusCode fillHistograms(const EventContext &ctx) const override final
adds event to the monitoring histograms
std::string m_path
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCondObjInputKey
FloatProperty m_maxD0
UnsignedIntegerProperty m_maxTracks
int layerIndex2layer(const int index) const
Convert a layer/disk number (0-21) to a layer number (0-8 for endcaps, 0-3 for barrel)
SG::ReadHandleKey< ComTime > m_comTimeName
BooleanProperty m_requireOtherFace
BooleanProperty m_requireGuardRing
int previousChip(double xl, int side, bool swap) const
SG::ReadHandleKey< InDet::SCT_ClusterContainer > m_sctContainerName
IntegerProperty m_minPixelHits
ToolHandle< Trk::IResidualPullCalculator > m_residualPullCalculator
SCT_Monitoring::BecIndex layerIndex2becIndex(const int index) const
ToolHandle< ISCT_ConfigurationConditionsTool > m_configConditions
ToolHandle< Trk::IRIO_OnTrackCreator > m_rotcreator
IntegerProperty m_minSCTHits
double getResidual(const Identifier &surfaceID, const Trk::TrackParameters *trkParam, const InDet::SCT_ClusterContainer *p_sctclcontainer) const
StatusCode findAnglesToWaferSurface(const Amg::Vector3D &mom, const Identifier id, const InDetDD::SiDetectorElementCollection *elements, double &theta, double &phi) const
BooleanProperty m_useSCTorTRT
BooleanProperty m_requireEnclosingHits
UnsignedIntegerProperty m_minSiHits
BooleanProperty m_useTRTPhase
FloatProperty m_minPt
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_SCTDetEleCollKey
FloatProperty m_maxZ0sinTheta
BooleanProperty m_isCosmic
StatusCode failCut(bool value, const std::string &name) const
This is an Identifier helper class for the SCT subdetector.
Definition SCT_ID.h:68
Property holding a SG store/key/clid from which a ReadHandle is made.
This is an Identifier helper class for the TRT subdetector.
Definition TRT_ID.h:82
Definition of ATLAS Math & Geometry primitives (Amg)
Message Stream Member.
Primary Vertex Finder.
Forward declaration.
Ensure that the ATLAS eigen extensions are properly loaded.
Definition index.py:1
STL namespace.
void initialize()
#define private