ATLAS Offline Software
Loading...
Searching...
No Matches
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
64class ICscCalibTool;
65class ICscStripFitter;
67
68namespace Muon {
69 class CscPrepData;
70 class CscStripPrepData;
71} // namespace Muon
73class CscDigit;
74
76public: // 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.
90 StatusCode initialize();
91
92 // Event processing.
93 StatusCode getClusters(std::vector<IdentifierHash>& idVect, std::vector<IdentifierHash>& selectedIdVect,
95
96 // Finalization.
97 StatusCode finalize();
98
99private: // 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
109private: // data
110 // Properties.
111 double m_threshold; // Charge threshold to include strip in cluster
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::CscPrepData MyCscDigit
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
StatusCode getClusters(std::vector< IdentifierHash > &idVect, std::vector< IdentifierHash > &selectedIdVect, Muon::CscPrepDataContainer *object)
ToolHandle< ICscClusterFitter > m_pfitter_def
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
retrieve MuonDetectorManager from the conditions store
StatusCode getClusters(IdentifierHash idVect, std::vector< IdentifierHash > &selectedIdVect)
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
StatusCode initialize()
AlgTool InterfaceID.
int make_clusters(bool measphi, const std::vector< const Muon::CscStripPrepData * > &strips, Muon::CscPrepDataCollection *&collection)
ToolHandle< ICscClusterFitter > m_pfitter_prec
ToolHandle< ICscClusterFitter > m_pfitter_split
CscThresholdClusterBuilderTool(const std::string &type, const std::string &aname, const IInterface *)
SG::ReadHandleKey< Muon::CscStripPrepDataContainer > m_digit_key
ToolHandle< ICscStripFitter > m_pstrip_fitter
This is a "hash" representation of an Identifier.
Class representing clusters from the CSC.
Definition CscPrepData.h:39
Class representing the raw data of one CSC strip (for clusters look at Muon::CscPrepData).
Property holding a SG store/key/clid from which a ReadHandle is made.
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
MuonPrepDataCollection< CscPrepData > CscPrepDataCollection
MuonPrepDataContainerT< CscPrepData > CscPrepDataContainer