ATLAS Offline Software
Loading...
Searching...
No Matches
CscPeakThresholdClusterBuilderTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7#include <sstream>
8
12#include "Gaudi/Property.h"
18#include "TrkSurfaces/Surface.h"
19
28using std::ostringstream;
29using std::setw;
30using std::vector;
31
32//******************************************************************************
33// Local definitions.
34namespace {
35 //******************************************************************************
36
37 // Convert chamber identifier to string.
38 std::string chamber(int istation, int zsec, int phi) {
39 ostringstream ssout;
40 if (istation == 1)
41 ssout << "CSS";
42 else if (istation == 2)
43 ssout << "CSL";
44 else
45 ssout << "???";
46 if (zsec == -1)
47 ssout << "-";
48 else if (zsec == 1)
49 ssout << "+";
50 else
51 ssout << "?";
52 ssout << phi;
53 return ssout.str();
54 }
55
56 // Convert measphi to string.
57 std::string setaphi(bool measphi) {
58 if (measphi) return "phi";
59 return "eta";
60 }
61
62 //******************************************************************************
63} // end unnamed namespace
64//******************************************************************************
65
67 const IInterface* parent) :
68 AthAlgTool(type, aname, parent), m_digit_key("CSC_Measurements") {
69 declareInterface<ICscClusterBuilder>(this);
70
71 declareProperty("qpeak_threshold_eta", m_qpeak_threshold_eta = 21000.0);
72 declareProperty("qpeak_threshold_phi", m_qpeak_threshold_phi = 33000.0);
73 declareProperty("q3sum_threshold_eta", m_q3sum_threshold_eta = 38000.0);
74 declareProperty("q3sum_threshold_phi", m_q3sum_threshold_phi = 33000.0);
75 declareProperty("digit_key", m_digit_key);
76}
77
78//******************************************************************************
79
80// Destructor.
81
83
84//******************************************************************************
85
87 ATH_MSG_DEBUG("Initializing " << name());
88 ATH_CHECK(m_digit_key.initialize());
89 // Display algorithm properties.
90 ATH_MSG_DEBUG("Properties for " << name() << ":");
91 ATH_MSG_DEBUG(" Cluster qpeak threshold is eta/phi " << m_qpeak_threshold_eta << "/" << m_qpeak_threshold_phi);
92 ATH_MSG_DEBUG(" Cluster q3sum threshold is eta/phi " << m_q3sum_threshold_eta << "/" << m_q3sum_threshold_phi);
93 ATH_MSG_DEBUG(" Strip fitter is " << m_pstrip_fitter.typeAndName());
94 ATH_MSG_DEBUG(" Default cluster fitter is " << m_pfitter_def.typeAndName());
95 ATH_MSG_DEBUG(" Precision cluster fitter is " << m_pfitter_prec.typeAndName());
96 ATH_MSG_DEBUG(" Split cluster fitter is " << m_pfitter_split.typeAndName());
97 ATH_MSG_DEBUG(" Input digit key is " << m_digit_key.key());
98
99 // Retrieve the strip fitting tool.
100 ATH_CHECK(m_pstrip_fitter.retrieve());
101 ATH_MSG_DEBUG("Retrieved strip fitting tool " << m_pstrip_fitter);
102
103 // Retrieve the default cluster fitting tool.
104 ATH_CHECK(m_pfitter_def.retrieve());
105 ATH_MSG_DEBUG("Retrieved CSC default cluster fitting tool");
106
107 // Retrieve the precision cluster fitting tool.
108 ATH_CHECK(m_pfitter_prec.retrieve());
109 ATH_MSG_DEBUG("Retrieved CSC precision cluster fitting tool");
110
111 // Retrieve the split cluster fitting tool.
112 ATH_CHECK(m_pfitter_split.retrieve());
113 ATH_MSG_DEBUG("Retrieved CSC split cluster fitting tool");
114
115 // retrieve MuonDetectorManager from the conditions store
116 ATH_CHECK(m_DetectorManagerKey.initialize());
117 ATH_CHECK(m_idHelperSvc.retrieve());
118
119 return StatusCode::SUCCESS;
120}
121
122//******************************************************************************
123
124StatusCode CscPeakThresholdClusterBuilderTool::getClusters(std::vector<IdentifierHash>& givenIDs, std::vector<IdentifierHash>& decodedIds,
126 // clear output vector of selected data collections containing data
127 decodedIds.clear();
128
129 if (!givenIDs.empty()) {
130 for (unsigned int i = 0; i < givenIDs.size(); ++i) {
131 if (getClusters(givenIDs[i], decodedIds, object).isFailure()) {
132 ATH_MSG_ERROR("Unable to decode CSC RDO " << i << "th into CSC PrepRawData");
133 return StatusCode::RECOVERABLE;
134 }
135 }
136 } else {
137 // Clusterization is done for every area
138 if (getClusters(decodedIds, object).isFailure()) {
139 ATH_MSG_ERROR("Unable to decode CSC RDO into CSC PrepRawData");
140 return StatusCode::RECOVERABLE;
141 }
142 }
143 return StatusCode::SUCCESS;
144}
145
146//******************************************************************************
147
148StatusCode CscPeakThresholdClusterBuilderTool::getClusters(IdentifierHash givenHashId, std::vector<IdentifierHash>& decodedIds,
149 Muon::CscPrepDataContainer* pclusters) {
150 // identifiers of collections already decoded and stored in the container will be skipped
151 if (pclusters->indexFindPtr(givenHashId) != nullptr) {
152 decodedIds.push_back(givenHashId);
153 ATH_MSG_DEBUG("A collection already exists in the container for offline id hash. " << (int)givenHashId);
154 return StatusCode::SUCCESS;
155 }
156
157 // Retrieve the CSC digits for this event.
159 if (pdigcon.isValid()) {
160 ATH_MSG_DEBUG("Retrieved strip container " << m_digit_key.key() << " with " << pdigcon->size() << " entries.");
161 } else {
162 ATH_MSG_WARNING("Failure to retrieve strip container " << m_digit_key.key());
163 return StatusCode::SUCCESS;
164 }
165
166 //**********************************************
167 // retrieve specific collection for the givenID
168 const CscStripPrepDataCollection* col = pdigcon->indexFindPtr(givenHashId);
169 if (nullptr == col) {
170 unsigned int coll_hash = givenHashId;
171 ATH_MSG_WARNING("Specific CSC Strip PrepData collection retrieving failed for collection hash = " << coll_hash);
172 return StatusCode::SUCCESS;
173 }
174
175 ATH_MSG_DEBUG("Retrieved " << col->size() << " CSC Strip PrepDatas.");
176
177 Identifier colid = col->identify();
178 int istation = m_idHelperSvc->cscIdHelper().stationName(colid) - 49;
179 int zsec = m_idHelperSvc->cscIdHelper().stationEta(colid);
180 int phisec = m_idHelperSvc->cscIdHelper().stationPhi(colid);
181
182 ATH_MSG_DEBUG(" Strip collection " << chamber(istation, zsec, phisec) << " has " << col->size() << " strips");
183
184 // Create arrays to hold digits and cathode plane parameters.
185 vector<const CscStripPrepData*> strips[8];
186 int maxstrip[8] = {0, 0, 0, 0, 0, 0, 0, 0};
187
188 // retrieve MuonDetectorManager from the conditions store
190 const MuonGM::MuonDetectorManager* MuonDetMgr = DetectorManagerHandle.cptr();
191 if (MuonDetMgr == nullptr) {
192 ATH_MSG_ERROR("Null pointer to the MuonDetectorManager conditions object");
193 return StatusCode::FAILURE;
194 }
195
196 IdentifierHash hash;
197 // Loop over digits and fill these arrays.
198 for (CscStripPrepDataCollection::const_iterator idig = col->begin(); idig != col->end(); ++idig) {
199 const CscStripPrepData& dig = **idig;
200 Identifier did = dig.identify();
201 hash = dig.collectionHash();
202 const CscReadoutElement* pro = MuonDetMgr->getCscReadoutElement(did);
203 int wlay = m_idHelperSvc->cscIdHelper().wireLayer(did);
204 int measphi = m_idHelperSvc->cscIdHelper().measuresPhi(did);
205 int idx = 2 * (wlay - 1) + measphi;
206 // First entry for a cathode plane, initialize.
207 if (maxstrip[idx] == 0) {
208 maxstrip[idx] = pro->maxNumberOfStrips(measphi);
209 for (int istrip = 0; istrip < maxstrip[idx]; ++istrip) strips[idx].push_back(nullptr);
210 }
211 int istrip = m_idHelperSvc->cscIdHelper().strip(did) - 1;
212 if (istrip < 0 || istrip >= maxstrip[idx]) {
213 ATH_MSG_WARNING("Invalid strip number");
214 continue;
215 }
216 strips[idx][istrip] = &dig;
217 }
218
219 // Cluster.
220 CscPrepDataCollection* newCollection = nullptr;
221 for (int measphi = 0; measphi < 2; ++measphi) {
222 for (int wlay = 1; wlay < 5; ++wlay) {
223 int idx = 2 * (wlay - 1) + measphi;
224 if (maxstrip[idx]) {
225 make_clusters(measphi, strips[idx], newCollection);
226 ATH_MSG_DEBUG(" " << wlay << "th layer ");
227 }
228 }
229 }
230 if (newCollection) {
231 if (pclusters->addCollection(newCollection, hash).isFailure()) {
232 ATH_MSG_ERROR("Couldn't add CscPrepdataCollection to container!");
233 return StatusCode::FAILURE;
234 }
235 decodedIds.push_back(hash); // Record that this collection contains data
236 }
237
238 return StatusCode::SUCCESS;
239}
240
241//******************************************************************************
242
243StatusCode CscPeakThresholdClusterBuilderTool::getClusters(std::vector<IdentifierHash>& decodedIds, Muon::CscPrepDataContainer* pclusters) {
244 // Retrieve the CSC digits for this event.
245
247 if (pdigcon.isValid()) {
248 ATH_MSG_DEBUG("Retrieved strip container " << m_digit_key.key() << " with " << pdigcon->size() << " entries.");
249 } else {
250 ATH_MSG_WARNING("Failure to retrieve strip container " << m_digit_key.key());
251 return StatusCode::SUCCESS;
252 }
253
254 // Loop over digit collections.
255 // This a loop over chambers (each with 4 wire planes).
256 const CscStripPrepDataContainer& con = *pdigcon;
257 for (CscStripPrepDataContainer::const_iterator icol = con.begin(); icol != con.end(); ++icol) {
258 const CscStripPrepDataCollection& col = **icol;
259 Identifier colid = col.identify();
260 int istation = m_idHelperSvc->cscIdHelper().stationName(colid) - 49;
261 int zsec = m_idHelperSvc->cscIdHelper().stationEta(colid);
262 int phisec = m_idHelperSvc->cscIdHelper().stationPhi(colid);
263 ATH_MSG_DEBUG(" Strip collection " << chamber(istation, zsec, phisec) << " has " << col.size() << " strips");
264
265 // Create arrays to hold digits and cathode plane parameters.
266 vector<const CscStripPrepData*> strips[8];
267 int maxstrip[8] = {0, 0, 0, 0, 0, 0, 0, 0};
268
269 // retrieve MuonDetectorManager from the conditions store
271 const MuonGM::MuonDetectorManager* MuonDetMgr = DetectorManagerHandle.cptr();
272 if (MuonDetMgr == nullptr) {
273 ATH_MSG_ERROR("Null pointer to the MuonDetectorManager conditions object");
274 return StatusCode::FAILURE;
275 }
276
277 IdentifierHash hash;
278 // Loop over digits and fill these arrays.
279 for (CscStripPrepDataCollection::const_iterator idig = col.begin(); idig != col.end(); ++idig) {
280 const CscStripPrepData& dig = **idig;
281 Identifier did = dig.identify();
282 hash = dig.collectionHash();
283 const CscReadoutElement* pro = MuonDetMgr->getCscReadoutElement(did);
284 int wlay = m_idHelperSvc->cscIdHelper().wireLayer(did);
285 int measphi = m_idHelperSvc->cscIdHelper().measuresPhi(did);
286 int idx = 2 * (wlay - 1) + measphi;
287 // First entry for a cathode plane, initialize.
288 if (maxstrip[idx] == 0) {
289 maxstrip[idx] = pro->maxNumberOfStrips(measphi);
290 for (int istrip = 0; istrip < maxstrip[idx]; ++istrip) strips[idx].push_back(nullptr);
291 }
292 int istrip = m_idHelperSvc->cscIdHelper().strip(did) - 1;
293 if (istrip < 0 || istrip >= maxstrip[idx]) {
294 ATH_MSG_WARNING("Invalid strip number");
295 continue;
296 }
297 strips[idx][istrip] = &dig;
298 }
299
300 // Cluster.
301 CscPrepDataCollection* newCollection = nullptr;
302 for (int measphi = 0; measphi < 2; ++measphi) {
303 for (int wlay = 1; wlay < 5; ++wlay) {
304 int idx = 2 * (wlay - 1) + measphi;
305 if (maxstrip[idx]) {
306 make_clusters(measphi, strips[idx], newCollection);
307 ATH_MSG_DEBUG(" " << wlay << "th layer ");
308 }
309 }
310 }
311 if (newCollection) {
312 if (pclusters->addCollection(newCollection, hash).isFailure()) {
313 ATH_MSG_ERROR("Couldn't add CscPrepdataCollection to container!");
314 return StatusCode::FAILURE;
315 }
316 decodedIds.push_back(hash); // Record that this collection contains data
317 }
318 } // end loop over chambers
319
320 return StatusCode::SUCCESS;
321}
322//******************************************************************************
323
325 ATH_MSG_VERBOSE("Finalizing " << name());
326 return StatusCode::SUCCESS;
327}
328
329//******************************************************************************
330
331// Build clusters.
332// dump - whether to write messages
333// dstrip = CSC digit pointer for each strip.
334// qstrip - charge on each strip
335// Note strip numbering is 0, maxstA, shifted by 1 from ATLAS strip numbers.
336// Center of strip is at pitch * (istrip + 0.5 - maxstrip/2).
337
338int CscPeakThresholdClusterBuilderTool::make_clusters(bool measphi, const vector<const CscStripPrepData*>& strips,
339 CscPrepDataCollection*& newCollection) {
340 // CscPrepDataCollection* newCollection = 0;
341
342 // Loop over channels.
343 unsigned int maxstrip = strips.size();
344
345 ATH_MSG_DEBUG(" Clustering for " << setaphi(measphi) << " plane with " << maxstrip << " strips");
346
347 // Loop over strips and fetch the charge and time for each.
348 // Also set flag indicating if this strip is active, i.e. should be included
349 // in a cluster.
351 std::vector<bool> astrip;
352 IdentifierHash cscHashId;
353
354 for (unsigned int istrip = 0; istrip < strips.size(); ++istrip) {
355 const CscStripPrepData* pstrip = strips[istrip];
357 res.charge = 0.0;
358 res.time = -666.;
359 bool active = false;
360
361 if (pstrip) {
362 if (!newCollection) {
363 Identifier elementId = m_idHelperSvc->cscIdHelper().elementID(pstrip->identify());
364 cscHashId = pstrip->collectionHash();
365 newCollection = new CscPrepDataCollection(cscHashId);
366 newCollection->setIdentifier(elementId);
367 }
368 if (!m_pstrip_fitter) {
369 ATH_MSG_WARNING("Unable to locate strip fitter");
370 return 1;
371 }
372 res = m_pstrip_fitter->fit(*pstrip);
373 active = res.charge > 0.0; // Allow all the positive charged strips...
374 // Log message.
375 ATH_MSG_DEBUG(" Strip " << setw(3) << istrip + 1 << ": charge= " << setw(7) << int(res.charge) << " time=" << setw(3)
376 << int(res.time + 0.5));
377 // if ( active ) *m_log << " *";
378 // else *m_log << " .";
379 // if ( res.status ) *m_log << " x";
380 // else *m_log << " o";
381 // *m_log );
382 }
383
384 // if (res.charge == 0.0) res.charge =40.;
385 stripfits.push_back(res);
386 astrip.push_back(active);
387 }
388
389 // Loop over strips and create clusters.
390 bool incluster = false;
391 int first_strip = 0; // First strip in the cluster.
392 double qpeak = 0;
394 std::vector<const CscStripPrepData*> clusterStrips;
395 std::vector<Identifier> prd_digit_ids;
396 for (unsigned int istrip = 0; istrip < strips.size(); ++istrip) {
397 const CscStripPrepData* pstrip = strips[istrip];
398 ICscClusterFitter::StripFit sfit = stripfits[istrip];
399 double q = sfit.charge;
400
401 // If the current strip is not active, skip it.
402 if (!astrip[istrip]) continue;
403 assert(pstrip != 0);
404
405 // First strip in cluster: initialize a new cluster.
406 if (!incluster) {
407 incluster = true;
408 qpeak = q;
409 first_strip = istrip;
410 sfits.clear();
411 clusterStrips.clear();
412 prd_digit_ids.clear();
413 incluster = true;
414 }
415
416 // Add strip to the current cluster.
417 sfits.push_back(sfit);
418 clusterStrips.push_back(pstrip);
419 prd_digit_ids.push_back(pstrip->identify());
420 if (q > qpeak) qpeak = q;
421
422 // If this is not the last strip in the plane, and the next
423 // strip is active, add the next strip to the cluster.
424 if (istrip != maxstrip - 1 && astrip[istrip + 1]) continue;
425
427 // Create a cluster
428 ATH_MSG_VERBOSE(" Creating cluster");
429
430 // QPeak Threshold Requirement.................
431
432 if (qpeak < (measphi ? m_qpeak_threshold_phi : m_qpeak_threshold_eta)) { // discard cluster and find new one....
433 incluster = false;
434 continue;
435 }
436
437 int fitresult = 99;
438 std::vector<ICscClusterFitter::Result> results;
439 // Precision fit.
440 if (!measphi && m_pfitter_prec) {
441 ATH_MSG_VERBOSE(" Performing precision fit with " << m_pfitter_prec);
442
443 results = m_pfitter_prec->fit(sfits);
444 fitresult = results[0].fitStatus;
445
446 ATH_MSG_VERBOSE(" Precision fit result return=" << fitresult);
447 }
448
449 if (fitresult == 6) { // in case of multipeak cluster
450 ATH_MSG_VERBOSE(" Performing split fit with " << m_pfitter_split);
451
452 results = m_pfitter_split->fit(sfits);
453 fitresult = results[0].fitStatus;
454
455 for (unsigned int i = 0; i < results.size(); ++i) ATH_MSG_VERBOSE(" Split fit result return=" << results[i].fitStatus);
456 }
457 // if splitcluster is succeeded, fitresult should be either 20 or 21
458 // if not, it's 19.
459
460 // Default fit.
461 if (measphi || (fitresult > 0 && fitresult < 20)) { // including measphi case
462 ATH_MSG_VERBOSE(" Performing default fit with " << m_pfitter_def);
464 if (!measphi) res = results[0];
465 CscClusterStatus oldclustatus = res.clusterStatus;
466 results = m_pfitter_def->fit(sfits);
467 res = results[0];
468 fitresult = results[0].fitStatus;
469 if (fitresult) {
470 ATH_MSG_VERBOSE(" Default fit failed: return=" << fitresult);
471 return 1;
472 } else {
473 ATH_MSG_VERBOSE(" Default fit succeeded");
474 }
475 // Keep the status from the first fit if it is defined.
476 if (oldclustatus != Muon::CscStatusUndefined) {
477 res.clusterStatus = oldclustatus;
478 // we want to keep oldcluster status
479 results[0] = res;
480 }
481 }
482
483 // retrieve MuonDetectorManager from the conditions store
485 const MuonGM::MuonDetectorManager* MuonDetMgr = DetectorManagerHandle.cptr();
486 if (MuonDetMgr == nullptr) {
487 ATH_MSG_ERROR("Null pointer to the MuonDetectorManager conditions object");
488 return 0;
489 }
490
491 // Check results.
492 unsigned int nresults = results.size();
493 for (unsigned int ire = 0; ire < nresults; ++ire) {
494 if (results[ire].qpeak < (measphi ? m_qpeak_threshold_phi : m_qpeak_threshold_eta)) continue;
495 double q3sum = results[ire].qleft + results[ire].qpeak + results[ire].qright;
496 if (q3sum < (measphi ? m_q3sum_threshold_phi : m_q3sum_threshold_eta)) continue;
497
498 CscClusterStatus clustatus = results[ire].clusterStatus;
499 Muon::CscTimeStatus timeStatus = results[ire].timeStatus;
500 double pos = results[ire].position;
501 double err = results[ire].dposition;
502 unsigned int id_strip = results[ire].strip;
503 double cluster_charge = results[ire].charge;
504 double cluster_time = results[ire].time;
505 if (clustatus == Muon::CscStatusUndefined) ATH_MSG_DEBUG(" Csc Cluster Status is not defined.");
506
507 if (id_strip >= sfits.size()) {
508 ATH_MSG_WARNING(" Fit size check failed: ");
509 return 1;
510 }
511 // Fetch the strip used to identify this cluster.
512 const CscStripPrepData* pstrip_id = nullptr;
513 if (id_strip < clusterStrips.size()) pstrip_id = clusterStrips[id_strip];
514 if (!pstrip_id) {
515 ATH_MSG_WARNING(" Fit ID check failed: ");
516 return 1;
517 }
518
519 // Create ATLAS CSC cluster.
520 Identifier cluster_id = pstrip_id->identify();
521 IdentifierHash cluster_hash = pstrip_id->collectionHash();
522 int zsec = m_idHelperSvc->cscIdHelper().stationEta(cluster_id);
523 int wlay = m_idHelperSvc->cscIdHelper().wireLayer(cluster_id);
524 // This local position is in the muon (not tracking) coordinate system.
525 // const CscReadoutElement* pro = pstrip_id->detectorElement();
526 const CscReadoutElement* pro = MuonDetMgr->getCscReadoutElement(cluster_id);
527 Amg::Vector3D local_pos = pro->nominalLocalClusterPos(zsec, wlay, measphi, pos);
528 auto cov = Amg::MatrixX(1, 1);
529 (cov)(0, 0) = err * err;
530 Amg::Vector2D plpos(measphi ? local_pos.y() : local_pos.z(), measphi ? local_pos.z() : local_pos.y());
531
532 if (msgLvl(MSG::DEBUG)) {
533 ATH_MSG_DEBUG(" Cluster parameters: " << nresults);
534 ATH_MSG_DEBUG(" ID strip: " << first_strip + id_strip << "(" << first_strip << ":" << id_strip << ")");
535 ATH_MSG_DEBUG(" local position: " << plpos.x() << " " << plpos.y());
536 ATH_MSG_DEBUG(" error: " << Amg::toString(cov));
537 ATH_MSG_DEBUG(" charge: " << cluster_charge);
538 ATH_MSG_DEBUG(" time: " << cluster_time);
539 ATH_MSG_DEBUG(" status: " << Muon::toString(clustatus));
540 }
541 std::vector<Identifier> prd_digit_ids_submit;
542 unsigned int fstrip = results[ire].fstrip;
543 unsigned int lstrip = results[ire].lstrip;
544 prd_digit_ids_submit.reserve(lstrip + 1);
545 for (unsigned int ids_index = fstrip; ids_index < lstrip + 1; ++ids_index) {
546 if (ids_index >= prd_digit_ids.size())
547 ATH_MSG_WARNING(" bad index " << ids_index << " maximum " << prd_digit_ids.size());
548 else
549 prd_digit_ids_submit.push_back(prd_digit_ids[ids_index]);
550 }
551
552 CscPrepData* pclus = new CscPrepData(cluster_id,
553 cluster_hash,
554 plpos,
555 prd_digit_ids_submit,
556 cov,
557 pro,
558 int(cluster_charge + 0.5),
559 cluster_time,
560 clustatus,
561 timeStatus);
562 pclus->setHashAndIndex(newCollection->identifyHash(),
563 newCollection->size());
564
565 newCollection->push_back(pclus);
566 }
567 // Reset incluster.
568 incluster = false;
569 } // end loop over strips
570 return 0;
571}
572
573//******************************************************************************
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
std::pair< std::vector< unsigned int >, bool > res
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
bool msgLvl(const MSG::Level lvl) const
int make_clusters(bool measphi, const std::vector< const Muon::CscStripPrepData * > &strips, Muon::CscPrepDataCollection *&collection)
CscPeakThresholdClusterBuilderTool(const std::string &type, const std::string &aname, const IInterface *)
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
retrieve MuonDetectorManager from the conditions store
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
SG::ReadHandleKey< Muon::CscStripPrepDataContainer > m_digit_key
StatusCode getClusters(std::vector< IdentifierHash > &idVect, std::vector< IdentifierHash > &selectedIdVect, Muon::CscPrepDataContainer *object)
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
value_type push_back(value_type pElem)
const_iterator end() const noexcept
const_iterator begin() const noexcept
size_type size() const noexcept
ICscStripFitter::Result StripFit
std::vector< StripFit > StripFitList
const_iterator end() const
return const_iterator for end of container
virtual const T * indexFindPtr(IdentifierHash hashId) const override final
return pointer on the found entry or null if out of range using hashed index - fast version,...
virtual StatusCode addCollection(const T *coll, IdentifierHash hashId) override final
insert collection into container with id hash if IDC should not take ownership of collection,...
const_iterator begin() const
return const_iterator for first entry
This is a "hash" representation of an Identifier.
Amg::Vector3D nominalLocalClusterPos(int eta, int wireLayer, int measPhi, double x0) const
ignores internal alignment parameters, hence gives generally incorrect answer (local here is the stat...
int maxNumberOfStrips(int measuresPhi) const
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
const CscReadoutElement * getCscReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
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).
virtual const IdentifierHash collectionHash() const final
returns the IdentifierHash corresponding to the channel.
virtual Identifier identify() const override final
virtual void setIdentifier(Identifier id)
virtual IdentifierHash identifyHash() const override final
const_pointer_type cptr()
virtual bool isValid() override final
Can the handle be successfully dereferenced?
Identifier identify() const
return the identifier
void setHashAndIndex(unsigned short collHash, unsigned short objIndex)
TEMP for testing: might make some classes friends later ...
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
MuonPrepDataCollection< CscPrepData > CscPrepDataCollection
MuonPrepDataCollection< CscStripPrepData > CscStripPrepDataCollection
MuonPrepDataContainerT< CscStripPrepData > CscStripPrepDataContainer
std::string toString(CscStripStatus cstat)
Return a string description of a CSC cluster status flag.
CscClusterStatus
Enum to represent the cluster status - see the specific enum values for more details.
@ CscStatusUndefined
Undefined, should not happen, most likely indicates a problem.
MuonPrepDataContainerT< CscPrepData > CscPrepDataContainer
CscTimeStatus
Enum to represent the cluster time measurement status - see the specific enum values for more details...