ATLAS Offline Software
Loading...
Searching...
No Matches
ParabolaCscClusterFitter Class Reference

#include <ParabolaCscClusterFitter.h>

Inheritance diagram for ParabolaCscClusterFitter:
Collaboration diagram for ParabolaCscClusterFitter:

Public Types

typedef std::vector< Muon::CscStripPrepData * > StripList
typedef ICscStripFitter::Result StripFit
typedef std::vector< StripFitStripFitList
typedef std::vector< double > ChargeList
typedef std::vector< std::string > DataNames
typedef std::map< std::string, double > DataMap
typedef std::vector< ResultResults

Public Member Functions

 ParabolaCscClusterFitter (const std::string &type, const std::string &aname, const IInterface *parent)
 Constructor.
 ~ParabolaCscClusterFitter ()=default
StatusCode initialize ()
const DataNamesdataNames () const
 data names for ntuple output in csc_cluster tree
Results fit (const StripFitList &sfits) const
Results fit (const StripFitList &sfits, double dposdz) const
 Main fit method.
double getCorrectedError (const Muon::CscPrepData *pclu, double slope) const
 Correct the positon error for track angle.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Static Public Member Functions

static double ParabolaCorrection (CscPlane &plane, double &raw)
 Correction of raw parabola positions.
static const InterfaceID & interfaceID ()

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

std::vector< unsigned int > m_max_width
 Max.
double m_error_tantheta
 error contribution in mm for the tan(theta) track angle correction
double m_xtan_css_eta_offset
 constant to Calculate the angle of incidence.
double m_xtan_css_eta_slope
 constant to Calculate the angle of incidence.
double m_xtan_csl_eta_offset
 constant to Calculate the angle of incidence.
double m_xtan_csl_eta_slope
 constant to Calculate the angle of incidence.
double m_multi
 threshold multiplier for cluster peak finding
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
SG::ReadCondHandleKey< MuonGM::MuonDetectorManagerm_DetectorManagerKey
 retrieve MuonDetectorManager from the conditions store
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 28 of file ParabolaCscClusterFitter.h.

Member Typedef Documentation

◆ ChargeList

typedef std::vector<double> ICscClusterFitter::ChargeList
inherited

Definition at line 43 of file ICscClusterFitter.h.

◆ DataMap

typedef std::map<std::string, double> ICscClusterFitter::DataMap
inherited

Definition at line 47 of file ICscClusterFitter.h.

◆ DataNames

typedef std::vector<std::string> ICscClusterFitter::DataNames
inherited

Definition at line 46 of file ICscClusterFitter.h.

◆ Results

typedef std::vector<Result> ICscClusterFitter::Results
inherited

Definition at line 101 of file ICscClusterFitter.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

◆ StripFit

Definition at line 39 of file ICscClusterFitter.h.

◆ StripFitList

typedef std::vector<StripFit> ICscClusterFitter::StripFitList
inherited

Definition at line 40 of file ICscClusterFitter.h.

◆ StripList

typedef std::vector<Muon::CscStripPrepData*> ICscClusterFitter::StripList
inherited

Definition at line 36 of file ICscClusterFitter.h.

Constructor & Destructor Documentation

◆ ParabolaCscClusterFitter()

ParabolaCscClusterFitter::ParabolaCscClusterFitter ( const std::string & type,
const std::string & aname,
const IInterface * parent )

Constructor.

This class is derived from AthAlgTool(type, aname, parent). The 3 args are used to initialize the base class. declareProperty(...) is used to declare job options.

Definition at line 102 of file ParabolaCscClusterFitter.cxx.

102 :
103 AthAlgTool(type, aname, parent) {
104 declareInterface<ICscClusterFitter>(this);
105 m_max_width.push_back(5); // CSS eta
106 m_max_width.push_back(5); // CSL eta
107 m_max_width.push_back(3); // CSS phi
108 m_max_width.push_back(3); // CSL phi
109 declareProperty("max_width", m_max_width); // Maximum width (strips) for unspoiled clusters
110 declareProperty("error_tantheta", m_error_tantheta = 0.57); // in mm
111 declareProperty("xtan_css_eta_offset", m_xtan_css_eta_offset = 0.0015); // in mm
112 declareProperty("xtan_css_eta_slope", m_xtan_css_eta_slope = 0.000137); // in mm
113 declareProperty("xtan_csl_eta_offset", m_xtan_csl_eta_offset = -.0045); // in mm
114 declareProperty("xtan_csl_eta_slope", m_xtan_csl_eta_slope = 0.000131); // in mm
115 declareProperty("multi", m_multi = 3.1); // threshold multiplier for cluster peak finding
116}
AthAlgTool()
Default constructor:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
double m_multi
threshold multiplier for cluster peak finding
double m_xtan_css_eta_slope
constant to Calculate the angle of incidence.
double m_xtan_csl_eta_offset
constant to Calculate the angle of incidence.
double m_xtan_csl_eta_slope
constant to Calculate the angle of incidence.
std::vector< unsigned int > m_max_width
Max.
double m_error_tantheta
error contribution in mm for the tan(theta) track angle correction
double m_xtan_css_eta_offset
constant to Calculate the angle of incidence.

◆ ~ParabolaCscClusterFitter()

ParabolaCscClusterFitter::~ParabolaCscClusterFitter ( )
default

Member Function Documentation

◆ dataNames()

const DataNames & ParabolaCscClusterFitter::dataNames ( ) const
virtual

data names for ntuple output in csc_cluster tree

Reimplemented from ICscClusterFitter.

Definition at line 137 of file ParabolaCscClusterFitter.cxx.

137 {
138 static const DataNames dnames ={"qA","qB","qC"};
139 return dnames;
140}
std::vector< std::string > DataNames

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ fit() [1/2]

Results ParabolaCscClusterFitter::fit ( const StripFitList & sfits) const
virtual

Implements ICscClusterFitter.

Definition at line 398 of file ParabolaCscClusterFitter.cxx.

398 {
399 Results results = fit(sfits, 0.0);
400 Results new_results;
401 for (unsigned int iresult = 0; iresult < results.size(); ++iresult) {
402 Result res = results[iresult];
403 if (res.fitStatus) {
404 new_results.push_back(res);
405 continue;
406 }
407 // Fetch the chamber type.
408 const CscStripPrepData* pstrip = sfits[0].strip;
409 Identifier idStrip0 = pstrip->identify();
410 int station = m_idHelperSvc->cscIdHelper().stationName(idStrip0) - 49; // 1=CSS, 2=CSL
411 // Calculate the angle of incidence.
412 double tantht = 0.0;
413 double pos = res.position;
414 if (station == 1) {
416 } else {
418 }
419 // Correct the error using this angle.
420 double dpostht = m_error_tantheta * std::abs(tantht);
421 double dpos = res.dposition;
422 res.dposition = std::sqrt(dpos * dpos + dpostht * dpostht);
423
424 // Return the updated result.
425 new_results.push_back(res);
426 }
427
428 return new_results;
429}
std::pair< std::vector< unsigned int >, bool > res
std::vector< Result > Results
Results fit(const StripFitList &sfits) const
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Identifier identify() const
return the identifier

◆ fit() [2/2]

Results ParabolaCscClusterFitter::fit ( const StripFitList & sfits,
double tantheta ) const
virtual

Main fit method.

The fit is really an interpolation, which uses a parabola through the 3 points given by (-1, qA), (0, qB), and (1, qC). This raw estimate is corrected to account for non-linearites and provides a position in the range of -0.5, 0.5. Finally, the pitch is used to convert the position in mm relative to the center of the chamber.

Parameters
sfitsThe list of amplitudes in the StripFitList.
tanthetaThe theta angle of the track, used for error estimate. @Note How do you get the track angle before this hit reconstruction?
Returns
The Results vector, usually containing only one result, that of the largest hit.
Todo
Remove this useless test.
Todo
check segment finding efficiency with Y pos = strip number.
Todo
Base errors on error propagation in parabola.
Todo
Todo
Check errors against residuals.
Todo
Todo
Check for saturation and increase errors.
Todo
Todo
Check for large amps and increase errors.
Todo
Todo
Check for small amps and increase errors.
Todo
Todo
Check cluster profile for overlapping hits.

Implements ICscClusterFitter.

Definition at line 155 of file ParabolaCscClusterFitter.cxx.

155 {
156 ATH_MSG_VERBOSE("Parabola fit with tool " << name());
157
158 Results results; // Vector of fit results
159
160 // Check that the input has at least three strips.
161 unsigned int nstrip = sfits.size(); // number of strips in this cluster
162 if (nstrip < 3) {
163 ATH_MSG_VERBOSE(" CscStatusNarrow: Input has fewer than three strips.");
164 results.emplace_back(1, Muon::CscStatusNarrow);
165 return results;
166 }
167
168 // Check the input array for NULL pointers.
169 for (unsigned int istrip = 0; istrip < nstrip; istrip++) {
170 if (sfits[istrip].strip == nullptr) {
171 ATH_MSG_WARNING("Strip pointer is null.");
172 results.emplace_back(2);
173 return results;
174 }
175 }
176
177 // Use the first strip to extract the layer parameters.
178 const CscStripPrepData* pstrip = sfits[0].strip;
179 Identifier idStrip0 = pstrip->identify();
180
181 // retrieve MuonDetectorManager from the conditions store
182 SG::ReadCondHandle<MuonGM::MuonDetectorManager> DetectorManagerHandle{m_DetectorManagerKey};
183 const MuonGM::MuonDetectorManager* MuonDetMgr = DetectorManagerHandle.cptr();
184 if (MuonDetMgr == nullptr) {
185 ATH_MSG_ERROR("Null pointer to the MuonDetectorManager conditions object");
186 return results;
187 }
188 const CscReadoutElement* pro = MuonDetMgr->getCscReadoutElement(idStrip0);
189
190 // const CscReadoutElement* pro = pstrip->detectorElement(); fixed by Woochun
191 bool measphi = m_idHelperSvc->cscIdHelper().CscIdHelper::measuresPhi(idStrip0);
192 double pitch = pro->cathodeReadoutPitch(0, measphi);
193 unsigned int maxstrip = pro->maxNumberOfStrips(measphi);
194 unsigned int strip0 = m_idHelperSvc->cscIdHelper().strip(idStrip0) - 1;
195 int station = m_idHelperSvc->cscIdHelper().stationName(idStrip0) - 49; // 1=CSS, 2=CSL
196 CscPlane plane = findPlane(station, measphi);
197 if (plane == UNKNOWN_PLANE) {
198 ATH_MSG_WARNING("Invalid CSC plane: station=" << station << "; measphi=" << measphi);
199 results.emplace_back(3);
200 return results;
201 }
202
203 // Count strips above threshold:
204 ATH_MSG_VERBOSE("Parabola fitter input has " << nstrip << " strips:");
205 //unsigned int nstrip_threshold = 0;
206 for (unsigned int istrip = 0; istrip < nstrip; ++istrip) {
207 Identifier id = sfits[istrip].strip->identify();
208 //if (sfits[istrip].charge >= 20000) ++nstrip_threshold;
209 ATH_MSG_VERBOSE(" index: " << istrip << " chn:" << m_idHelperSvc->cscIdHelper().strip(id)
210 << " amp:" << (int)(sfits[istrip].charge / 1000) << " ke.");
211 }
212
213 // Find the highest peak and count all peaks above threshold.
214 // Peaks have to be above threshold to avoid counting noise fluctuations
215 unsigned int istrip_peak = 0;
216 int numPeaks = 0; // count peaks above threshold
217 float qpeak = -1; // charge of the peak strip
218 // Loop over strips excluding the first and last strip
219 double charge_clu = sfits[0].charge + sfits[nstrip - 1].charge; // cluster sum
220 for (unsigned int istrip = 1; istrip < nstrip - 1; ++istrip) {
221 float qthis = sfits[istrip].charge;
222 float qlast = sfits[istrip - 1].charge;
223 float qnext = sfits[istrip + 1].charge;
224 double thr = m_multi * sfits[istrip].dcharge / 10; // correct noise*10
225 Identifier id = sfits[istrip].strip->identify();
226 ATH_MSG_VERBOSE(" index: " << istrip << " chn:" << m_idHelperSvc->cscIdHelper().strip(id)
227 << " amp:" << (int)(sfits[istrip].charge / 1000) << " ke, thr: " << (int)(thr / 1000) << " ke "
228 << ((qthis > thr) ? "signal" : "noise") << sfits[istrip].dcharge / 1000);
229 charge_clu += qthis;
230
231 // Peak if the adjacent strips have less charge.
232 if ((qthis >= qlast) && (qthis >= qnext)) { // There is a peak.
233 if (qthis > qpeak) { // larger peak then before
234 istrip_peak = istrip; // record new peak location
235 qpeak = qthis;
236 }
237 if (qthis > thr) numPeaks++; // Only count peaks above a threshold
238 }
239 } // next istrip
240
241 ATH_MSG_VERBOSE(" Peak is at index " << istrip_peak << " amp = " << qpeak / 1000);
242 if (numPeaks > 1) { // Error if more than one peak above threshold was found.
243 results.emplace_back(6, Muon::CscStatusMultiPeak);
244 ATH_MSG_VERBOSE(" CscStatusMultiPeak: multiple peaks are found: " << numPeaks);
245 return results;
246 }
247
248 if (istrip_peak == 0) { // no peak (even below threshold) was found.
249 results.emplace_back(11);
250 ATH_MSG_VERBOSE(" No peak was found.");
251 return results;
252 }
253
254 // Check that the peak is not on the chamber edge.
255 // This cannot happen due to the prev. loop
257 if (strip0 + istrip_peak <= 0 || strip0 + istrip_peak >= maxstrip - 1) {
258 results.emplace_back(4, Muon::CscStatusEdge);
259 ATH_MSG_VERBOSE(" CscStatusEdge: strip0+istrip_peak = " << strip0 + istrip_peak);
260 return results;
261 }
262
263 // Cluster width cut, should not be done...
264 /*****************************************************
265 if ( nstrip_threshold > m_max_width[plane] ) {
266 results.push_back(Result(5, Muon::CscStatusWide));
267 ATH_MSG_VERBOSE(" CscStatusWide: nstrip_threshold = "
268 << nstrip_threshold);
269 return results;
270 }
271 ********************************************************/
272
273 // Cluster is spoiled if peak is not at the center.
274 // should not be done
275 /*******************************************************
276 bool is_even = 2*(nstrip/2) == nstrip;
277 bool atcenter = istrip_peak == nstrip/2 ||
278 (is_even && istrip_peak+1 == nstrip/2);
279 if ( ! atcenter ) {
280 results.push_back(Result(7, Muon::CscStatusSkewed));
281 ATH_MSG_VERBOSE(" CscStatusSkewed: peak is not at the center.");
282 return results;
283 }
284 *********************************************************/
285
286 // reconstructed position in strip number units:
287 double savg;
288
289 // Charge amplitude per strip:
290 double qA = sfits[istrip_peak - 1].charge;
291 double qB = sfits[istrip_peak].charge;
292 double qC = sfits[istrip_peak + 1].charge;
293
294 // charge errors
295 double dqA = sfits[istrip_peak - 1].dcharge;
296 double dqB = sfits[istrip_peak].dcharge;
297 double dqC = sfits[istrip_peak + 1].dcharge;
298
299 double raw; // uncorrected parabola peak position
300 double denominator = 2 * qB - qA - qC; // denominator for parabola
301 if (denominator <= 0) { // not a peak, should not happen
302 ATH_MSG_WARNING(" Bad parabola denominator: " << denominator);
303 results.emplace_back(9);
304 return results;
305 } else {
306 raw = 0.5 * (qC - qA) / denominator; // peak of parabola through (qA, qB, qC)
307 }
308
309 double pos = ParabolaCorrection(plane, raw);
311 double cog = 1.2 * (qC - qA) / (qA + qB + qC); // for comparism
312 // pos = cog;
313
314 // error calculation: S/N = charge sum / ave charge error.
315 double dpos = (dqA + dqB + dqC) / 3 / (qA + qB + qC) * pitch * std::sqrt(2.0); // pos error
316 dpos = 0.08; // 80 micron error
317 if (measphi) dpos = 2.5; // worse phi resolution of ~2.5 mm
318 // dpos = 200;//*= 2; /** todo Tune this to correct chi 2 of segments */
325
326 // Calculate strip position.
327 savg = pos + strip0 + istrip_peak; // in strip numbers
328 // savg = 0.1 + strip0 + istrip_peak; // in strip numbers
329 ATH_MSG_VERBOSE(" Parabola correction: plane = '" << splane(plane) << "' qA=" << qA << " qB=" << qB << " qC=" << qC << " raw=" << raw
330 << " pos=" << pos << ", cog=" << cog);
331
332 // Position error contribution from incident angle:
333 double dpostht = m_error_tantheta * std::abs(tantheta);
334
335 DataMap dmap;
336 dmap["qA"] = qA;
337 dmap["qB"] = qB;
338 dmap["qC"] = qC;
339
340 // Set return values.
341 Result res(0, Muon::CscStatusUnspoiled); // status 0???
342 res.position = pitch * (savg + 0.5 - 0.5 * maxstrip);
343 res.dposition = std::sqrt(dpos * dpos + dpostht * dpostht); // pos. error estimate
344 res.strip = istrip_peak; // strip number in this cluster
345 res.fstrip = 0;
346 res.lstrip = nstrip - 1; // cluster width
347 res.charge = charge_clu; // total cluster charge over all strips
348 res.time = sfits[res.strip].time; // peaking time at center strip
349 res.qleft = qA; // left charge
350 res.qpeak = qB; // center charge
351 res.qright = qC; // right charge
352 res.dataMap = dmap;
353
354 ATH_MSG_VERBOSE(" Position: pos=" << res.position << " dpos:dtht=" << dpos << ":" << dpostht << " ==>" << res.dposition
355 << " at tanth = " << tantheta);
356
357 results.push_back(res);
358 return results;
359}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
std::map< std::string, double > DataMap
double cathodeReadoutPitch(int chLayer, int measuresPhi) const
int maxNumberOfStrips(int measuresPhi) const
const CscReadoutElement * getCscReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
retrieve MuonDetectorManager from the conditions store
static double ParabolaCorrection(CscPlane &plane, double &raw)
Correction of raw parabola positions.
const_pointer_type cptr()
@ CscStatusUnspoiled
Clean cluster with precision fit.
@ CscStatusEdge
Cluster reaches the edge of plane.
@ CscStatusMultiPeak
More than one peak in cluster.
@ CscStatusNarrow
Too narrow.

◆ getCorrectedError()

double ParabolaCscClusterFitter::getCorrectedError ( const Muon::CscPrepData * pclu,
double slope ) const
virtual

Correct the positon error for track angle.

Note
This should be done in the segment, not here.
Todo
Read, understand, and verify correctness. @pclu The CSC Prep Data for the cluster @slope The track angle
Returns
The new error estimate.

Implements ICscClusterFitter.

Definition at line 368 of file ParabolaCscClusterFitter.cxx.

368 {
369 // Cluster position.
372 double pos = pclu->localPosition()[icor];
373 double dpos = Amg::error(pclu->localCovariance(), ierr);
374
375 Identifier idStrip0 = pclu->identify();
376 int station = m_idHelperSvc->cscIdHelper().stationName(idStrip0) - 49; // 1=CSS, 2=CSL
377 // Calculate the angle of incidence.
378 double tantht = 0.0;
379 if (station == 1) {
381 } else {
383 }
384 // Correct the error using this angle.
385 double old_dpostht = m_error_tantheta * std::abs(tantht);
386
387 double new_dpostht = m_error_tantheta * std::abs(slope);
388
389 double newError = std::sqrt(dpos * dpos - old_dpostht * old_dpostht + new_dpostht * new_dpostht);
390
391 ATH_MSG_VERBOSE(" Position :: pos=" << pos << " dpos:newdpos=" << dpos << " : " << newError << " " << old_dpostht << " "
392 << new_dpostht);
393
394 return newError;
395}
const Amg::Vector2D & localPosition() const
return the local position reference
const Amg::MatrixX & localCovariance() const
return const ref to the error matrix
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
ParamDefs
This file defines the parameter enums in the Trk namespace.
Definition ParamDefs.h:32
@ loc1
Definition ParamDefs.h:34

◆ initialize()

StatusCode ParabolaCscClusterFitter::initialize ( )

Definition at line 119 of file ParabolaCscClusterFitter.cxx.

119 {
120 ATH_MSG_VERBOSE("Initalizing " << name());
121
122 ATH_CHECK(m_idHelperSvc.retrieve());
123
124 ATH_MSG_DEBUG("Properties for " << name() << ":");
125 ATH_MSG_DEBUG(" tan(theta) error coeff: " << m_error_tantheta);
126 ATH_MSG_DEBUG(" CSS eta pos-slope offset: " << m_xtan_css_eta_offset);
127 ATH_MSG_DEBUG(" CSS eta pos-slope slope: " << m_xtan_css_eta_slope);
128 ATH_MSG_DEBUG(" CSL eta pos-slope offset: " << m_xtan_csl_eta_offset);
129 ATH_MSG_DEBUG(" CSL eta pos-slope slope: " << m_xtan_csl_eta_slope);
130 // retrieve MuonDetectorManager from the conditions store
131 ATH_CHECK(m_DetectorManagerKey.initialize());
132
133 return StatusCode::SUCCESS;
134}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & ICscClusterFitter::interfaceID ( )
inlinestaticinherited

Must declare this, with name of interface

Definition at line 89 of file ICscClusterFitter.h.

89 {
90 static const InterfaceID IID_ICscClusterFitter("ICscClusterFitter", 1, 0);
91 return IID_ICscClusterFitter;
92 }

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ ParabolaCorrection()

double ParabolaCscClusterFitter::ParabolaCorrection ( CscPlane & plane,
double & raw )
static

Correction of raw parabola positions.

Correct the raw parabola interpolation, based on CSCPlane.

Parameters
planeThe csc plane enum for small or large chamber, X or Y plane
rawThe raw value of the parabola peak positon
Returns
The corrected value

The correction function takes the output of the parabola method, the peak position, and returns a position that is closer to the predicted position. The correction depends on the strip pitch and was found experimentally during various beam tests and cosmics tests.

Parameters
planeThe plane of the detector: Large or Small, X or Y.
rawThe uncorrected value
Returns
The corrected value, often in range from -0.5 to 0.5.

Definition at line 65 of file ParabolaCscClusterFitter.cxx.

65 {
66 double a, b, c; // correction values
67 switch (plane) {
68 case CSS_ETA: { // small Chamber, X strips
69 a = 2.97043e-01; // from segment186049.root
70 b = 8.73895e+00;
71 c = 2.08465e-01;
72 break;
73 }
74 case CSS_PHI: { // small chamber, Y strips
75 a = 0.2662; // 2rt test with small chambers, longy.root
76 b = 62.19;
77 c = 0.2191;
78 break;
79 }
80 case CSL_ETA: { // large chamber, X strips
81 a = 2.99744e-01; // from segment186049.root
82 b = 8.30484e+00;
83 c = 2.07538e-01;
84 break;
85 }
86 case CSL_PHI: { // large chamber, Y strips
87 a = 0.2766; // Run 1782 in bat 184
88 b = 50.08;
89 c = 0.0301;
90 break;
91 }
92 default: { // invalid plane, should not happen, check beforehand.
93 return -1.0;
94 }
95 } // end switch
96
97 return a * std::atan(b * raw) + c * raw;
98}
static Double_t a

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_DetectorManagerKey

SG::ReadCondHandleKey<MuonGM::MuonDetectorManager> ParabolaCscClusterFitter::m_DetectorManagerKey
private
Initial value:
{this, "DetectorManagerKey", "MuonDetectorManager",
"Key of input MuonDetectorManager condition data"}

retrieve MuonDetectorManager from the conditions store

Definition at line 77 of file ParabolaCscClusterFitter.h.

77 {this, "DetectorManagerKey", "MuonDetectorManager",
78 "Key of input MuonDetectorManager condition data"};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_error_tantheta

double ParabolaCscClusterFitter::m_error_tantheta
private

error contribution in mm for the tan(theta) track angle correction

Definition at line 61 of file ParabolaCscClusterFitter.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> ParabolaCscClusterFitter::m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
private

Definition at line 74 of file ParabolaCscClusterFitter.h.

74{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};

◆ m_max_width

std::vector<unsigned int> ParabolaCscClusterFitter::m_max_width
private

Max.

width of a cluster to be unspoiled. Layer type in array[4]

Definition at line 58 of file ParabolaCscClusterFitter.h.

◆ m_multi

double ParabolaCscClusterFitter::m_multi
private

threshold multiplier for cluster peak finding

Definition at line 72 of file ParabolaCscClusterFitter.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_xtan_csl_eta_offset

double ParabolaCscClusterFitter::m_xtan_csl_eta_offset
private

constant to Calculate the angle of incidence.

Definition at line 67 of file ParabolaCscClusterFitter.h.

◆ m_xtan_csl_eta_slope

double ParabolaCscClusterFitter::m_xtan_csl_eta_slope
private

constant to Calculate the angle of incidence.

Definition at line 69 of file ParabolaCscClusterFitter.h.

◆ m_xtan_css_eta_offset

double ParabolaCscClusterFitter::m_xtan_css_eta_offset
private

constant to Calculate the angle of incidence.

Definition at line 63 of file ParabolaCscClusterFitter.h.

◆ m_xtan_css_eta_slope

double ParabolaCscClusterFitter::m_xtan_css_eta_slope
private

constant to Calculate the angle of incidence.

Definition at line 65 of file ParabolaCscClusterFitter.h.


The documentation for this class was generated from the following files: