ATLAS Offline Software
CscThresholdClusterBuilderTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef CscThresholdClusterBuilderTool_H
6 #define CscThresholdClusterBuilderTool_H
7 
8 // David Adams
9 // June 2006
10 //
11 // ATLAS algorithm to build CSC clusters from CSC digits.
12 // A simple threshold cluster algorithm is applied: any adjacent
13 // channels with charge above a user-specified threshold are
14 // merged into a cluster.
15 //
16 // Clusters are tagged as spoiled if any of the following apply:
17 // 1. Too narrow: only one strip.
18 // 2. Too wide: pitch*(nstrip-1) above a user-specified cutoff.
19 // 3. Multiple peaks.
20 // 4. Skewed: peak not in in the central channel for an odd cluster
21 // (odd # strips) or central two for an even cluster.
22 // 5. Edge: cluster includes the first or last strip in the plane.
23 // 6. RMS: charge centroid RMS is too large
24 // The different algorithms used to evaluate the unspoiled position
25 // may transfer clusters into the spoiled state. E.g. the adjacent
26 // charge ratios method requires left and right to be consistent.
27 //
28 // Spoiled clusters are assigned position at the center of the cluster
29 // and a large error: width/sqrt(12) with possible correction for the
30 // intrinsic signal width.
31 //
32 // The positions for unspoiled clusters may evaluated in a number of
33 // ways selected through job options.
34 //
35 // The corrected charge centroid method starts with the charge
36 // centroid and then applies a strip position correction
37 // which is a function of the plane type (CSS or CSL, r or phi), the
38 // number of strips in the cluster, and the deviation of the charge
39 // centroid from the center of the cluster. Thes corrections are 4th
40 // order odd polynomials in that deviation, i.e.
41 // A d + B d**3 + C D**5 + D d**7
42 // and the coefficients were determined by comparison with Monte Carlo
43 // track positions. For now these coefficients are hardwired into the
44 // code.
45 //
46 // The adjacent charge ratios method uses the ratios of the left and
47 // right charges to that of the central strip to estimate the position
48 // again using a polynomial calibration.
49 //
50 // Unspoiled clusters are assigned a position error of
51 // m_unspoiled_error.
52 
53 // Algorithm to construct CSC clusters from digits.
54 
57 #include "GaudiKernel/ToolHandle.h"
63 
64 class ICscCalibTool;
65 class ICscStripFitter;
66 class ICscClusterFitter;
67 
68 namespace Muon {
69  class CscPrepData;
70  class CscStripPrepData;
71 } // namespace Muon
73 class CscDigit;
74 
76 public: // methods
77  enum NoiseOption { rms = 0, sigma, f001 };
78 
79  // Constructor.
80  CscThresholdClusterBuilderTool(const std::string& type, const std::string& aname, const IInterface*);
81 
82  // Destructor.
84 
87  // static const InterfaceID& interfaceID( ) ;
88 
89  // Initialization.
91 
92  // Event processing.
93  StatusCode getClusters(std::vector<IdentifierHash>& idVect, std::vector<IdentifierHash>& selectedIdVect,
95 
96  // Finalization.
98 
99 private: // Private methods.
100  // Cluster a cathode plane.
101  // int make_clusters(bool dump, int maxstrip, double pitch,
102  // const std::vector<MyCscDigit*>& idstrip, const std::vector<double>& qstrip);
103  // int make_clusters(bool dump, int maxstrip, double pitch, const std::vector<Muon::CscStripPrepData*>& strips);
104  int make_clusters(bool measphi, const std::vector<const Muon::CscStripPrepData*>& strips, Muon::CscPrepDataCollection*& collection);
105  StatusCode getClusters(IdentifierHash idVect, std::vector<IdentifierHash>& selectedIdVect);
106  StatusCode getClusters(IdentifierHash idVect, std::vector<IdentifierHash>& selectedIdVect, Muon::CscPrepDataContainer* pclusters);
107  StatusCode getClusters(std::vector<IdentifierHash>& selectedIdVect, Muon::CscPrepDataContainer* pclusters);
108 
109 private: // data
110  // Properties.
111  double m_threshold; // Charge threshold to include strip in cluster
112  float m_kFactor;
113  std::string m_noiseOptionStr;
116 
117  // Calibration tool.
118  ToolHandle<ICscCalibTool> m_cscCalibTool{
119  this,
120  "cscCalibTool",
121  "CscCalibTool/CscCalibTool",
122  };
123 
124  // Strip fitter.
125  ToolHandle<ICscStripFitter> m_pstrip_fitter{
126  this,
127  "strip_fitter",
128  "CalibCscStripFitter/CalibCscStripFitter",
129  };
130 
131  // Cluster fitters.
132  ToolHandle<ICscClusterFitter> m_pfitter_def{
133  this,
134  "default_fitter",
135  "SimpleCscClusterFitter/SimpleCscClusterFitter",
136  };
137  ToolHandle<ICscClusterFitter> m_pfitter_prec{
138  this,
139  "precision_fitter",
140  "QratCscClusterFitter/QratCscClusterFitter",
141  };
142  ToolHandle<ICscClusterFitter> m_pfitter_split{
143  this,
144  "split_fitter",
145  "CscSplitClusterFitter/CscSplitClusterFitter",
146  };
147 
149  this,
150  "MuonIdHelperSvc",
151  "Muon::MuonIdHelperSvc/MuonIdHelperSvc",
152  };
153 
156  this,
157  "DetectorManagerKey",
158  "MuonDetectorManager",
159  "Key of input MuonDetectorManager condition data",
160  };
161 
163 };
164 
165 #endif
Muon::MuonPrepDataContainer
Template for Muon PRD containers (which are basically collections of MuonPrepDataCollections).
Definition: MuonPrepDataContainer.h:42
CscStripPrepDataContainer.h
CscThresholdClusterBuilderTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: CscThresholdClusterBuilderTool.h:148
ICscClusterBuilder.h
Trk::PrepRawDataType::CscStripPrepData
@ CscStripPrepData
CscThresholdClusterBuilderTool::m_digit_key
SG::ReadHandleKey< Muon::CscStripPrepDataContainer > m_digit_key
Definition: CscThresholdClusterBuilderTool.h:115
CscThresholdClusterBuilderTool::m_noiseOptionStr
std::string m_noiseOptionStr
Definition: CscThresholdClusterBuilderTool.h:113
CscThresholdClusterBuilderTool::m_pstrip_fitter
ToolHandle< ICscStripFitter > m_pstrip_fitter
Definition: CscThresholdClusterBuilderTool.h:125
CscThresholdClusterBuilderTool::m_DetectorManagerKey
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
retrieve MuonDetectorManager from the conditions store
Definition: CscThresholdClusterBuilderTool.h:155
CscThresholdClusterBuilderTool::m_pfitter_prec
ToolHandle< ICscClusterFitter > m_pfitter_prec
Definition: CscThresholdClusterBuilderTool.h:137
CscThresholdClusterBuilderTool
Definition: CscThresholdClusterBuilderTool.h:75
ICscClusterBuilder
Definition: ICscClusterBuilder.h:27
CscThresholdClusterBuilderTool::finalize
StatusCode finalize()
Definition: CscThresholdClusterBuilderTool.cxx:347
CscThresholdClusterBuilderTool::rms
@ rms
Definition: CscThresholdClusterBuilderTool.h:77
MuonPrepDataContainer.h
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
CscThresholdClusterBuilderTool::getClusters
StatusCode getClusters(std::vector< IdentifierHash > &idVect, std::vector< IdentifierHash > &selectedIdVect, Muon::CscPrepDataContainer *object)
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:49
python.Dumpers.aname
string aname
Definition: Dumpers.py:5541
Trk::PrepRawDataType::CscPrepData
@ CscPrepData
ICscClusterFitter
Definition: ICscClusterFitter.h:33
CscThresholdClusterBuilderTool::CscThresholdClusterBuilderTool
CscThresholdClusterBuilderTool(const std::string &type, const std::string &aname, const IInterface *)
Definition: CscThresholdClusterBuilderTool.cxx:69
Muon::CscPrepData
Class representing clusters from the CSC.
Definition: CscPrepData.h:39
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ICscStripFitter
Definition: ICscStripFitter.h:19
CscDigit
Definition: CscDigit.h:17
AthAlgTool.h
CscThresholdClusterBuilderTool::make_clusters
int make_clusters(bool measphi, const std::vector< const Muon::CscStripPrepData * > &strips, Muon::CscPrepDataCollection *&collection)
Definition: CscThresholdClusterBuilderTool.cxx:364
CscThresholdClusterBuilderTool::m_pfitter_split
ToolHandle< ICscClusterFitter > m_pfitter_split
Definition: CscThresholdClusterBuilderTool.h:142
ICscCalibTool
Definition: ICscCalibTool.h:24
CscThresholdClusterBuilderTool::initialize
StatusCode initialize()
AlgTool InterfaceID.
Definition: CscThresholdClusterBuilderTool.cxx:89
CscThresholdClusterBuilderTool::m_kFactor
float m_kFactor
Definition: CscThresholdClusterBuilderTool.h:112
Muon::MuonPrepDataCollection
Template to hold collections of MuonPrepRawData objects.
Definition: MuonPrepDataCollection.h:46
CscThresholdClusterBuilderTool::m_makeNarrowClusterThreeStrips
bool m_makeNarrowClusterThreeStrips
Definition: CscThresholdClusterBuilderTool.h:162
CscThresholdClusterBuilderTool::NoiseOption
NoiseOption
Definition: CscThresholdClusterBuilderTool.h:77
CscThresholdClusterBuilderTool::f001
@ f001
Definition: CscThresholdClusterBuilderTool.h:77
CscPrepDataContainer.h
MyCscDigit
Muon::CscPrepData MyCscDigit
Definition: CscThresholdClusterBuilderTool.h:72
CscThresholdClusterBuilderTool::m_pfitter_def
ToolHandle< ICscClusterFitter > m_pfitter_def
Definition: CscThresholdClusterBuilderTool.h:132
CscThresholdClusterBuilderTool::getClusters
StatusCode getClusters(IdentifierHash idVect, std::vector< IdentifierHash > &selectedIdVect)
MuonDetectorManager.h
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager >
CscThresholdClusterBuilderTool::m_noiseOption
NoiseOption m_noiseOption
Definition: CscThresholdClusterBuilderTool.h:114
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
CscThresholdClusterBuilderTool::m_threshold
double m_threshold
Definition: CscThresholdClusterBuilderTool.h:111
CscThresholdClusterBuilderTool::m_cscCalibTool
ToolHandle< ICscCalibTool > m_cscCalibTool
Definition: CscThresholdClusterBuilderTool.h:118
CscThresholdClusterBuilderTool::~CscThresholdClusterBuilderTool
~CscThresholdClusterBuilderTool()
AthAlgTool
Definition: AthAlgTool.h:26
IdentifierHash
Definition: IdentifierHash.h:38
CscThresholdClusterBuilderTool::sigma
@ sigma
Definition: CscThresholdClusterBuilderTool.h:77
IMuonIdHelperSvc.h
ServiceHandle< Muon::IMuonIdHelperSvc >