ATLAS Offline Software
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 
21 using Muon::CscPrepData;
28 using std::ostringstream;
29 using std::setw;
30 using std::vector;
31 
32 //******************************************************************************
33 // Local definitions.
34 namespace {
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
117  ATH_CHECK(m_idHelperSvc.retrieve());
118 
119  return StatusCode::SUCCESS;
120 }
121 
122 //******************************************************************************
123 
124 StatusCode CscPeakThresholdClusterBuilderTool::getClusters(std::vector<IdentifierHash>& givenIDs, std::vector<IdentifierHash>& decodedIds,
125  Muon::CscPrepDataContainer* object) {
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 
148 StatusCode 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 
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 
243 StatusCode 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) {
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 
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 
338 int 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 //******************************************************************************
CscPeakThresholdClusterBuilderTool::m_qpeak_threshold_eta
double m_qpeak_threshold_eta
Definition: CscPeakThresholdClusterBuilderTool.h:106
Muon::MuonPrepDataContainer
Template for Muon PRD containers (which are basically collections of MuonPrepDataCollections).
Definition: MuonPrepDataContainer.h:42
CscStripPrepDataContainer.h
verify_menu_config.results
results
Definition: verify_menu_config.py:67
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
Surface.h
IdentifiableContainerMT::addCollection
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,...
Definition: IdentifiableContainerMT.h:297
Muon::CscStripPrepDataCollection
MuonPrepDataCollection< CscStripPrepData > CscStripPrepDataCollection
Definition: MuonPrepDataCollection.h:111
calibdata.chamber
chamber
Definition: calibdata.py:32
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
MuonGM::CscReadoutElement::nominalLocalClusterPos
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...
Definition: CscReadoutElement.cxx:410
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
EventPrimitivesHelpers.h
CscPeakThresholdClusterBuilderTool::m_q3sum_threshold_eta
double m_q3sum_threshold_eta
Definition: CscPeakThresholdClusterBuilderTool.h:108
plotBeamSpotVxVal.cov
cov
Definition: plotBeamSpotVxVal.py:201
ICscStripFitter::Result::charge
double charge
Definition: ICscStripFitter.h:31
CscStripPrepData.h
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
CscPeakThresholdClusterBuilderTool::m_qpeak_threshold_phi
double m_qpeak_threshold_phi
Definition: CscPeakThresholdClusterBuilderTool.h:107
CscPeakThresholdClusterBuilderTool::getClusters
StatusCode getClusters(std::vector< IdentifierHash > &idVect, std::vector< IdentifierHash > &selectedIdVect, Muon::CscPrepDataContainer *object)
Definition: CscPeakThresholdClusterBuilderTool.cxx:124
MuonGM::CscReadoutElement
Definition: CscReadoutElement.h:56
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
Muon::CscStripPrepData::collectionHash
virtual const IdentifierHash collectionHash() const final
returns the IdentifierHash corresponding to the channel.
Definition: CscStripPrepData.h:158
atlasStyleMacro.icol
int icol
Definition: atlasStyleMacro.py:13
python.Dumpers.aname
string aname
Definition: Dumpers.py:5546
Muon::CscStripPrepData
Class representing the raw data of one CSC strip (for clusters look at Muon::CscPrepData).
Definition: CscStripPrepData.h:40
Muon::toString
std::string toString(CscStripStatus cstat)
Return a string description of a CSC cluster status flag.
Definition: CscStripStatus.h:48
MuonGM::CscReadoutElement::maxNumberOfStrips
int maxNumberOfStrips(int measuresPhi) const
Definition: CscReadoutElement.cxx:162
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ICscClusterFitter::Result
Definition: ICscClusterFitter.h:52
EventPrimitivesToStringConverter.h
Trk::active
@ active
Definition: Layer.h:48
dqt_zlumi_pandas.err
err
Definition: dqt_zlumi_pandas.py:182
lumiFormat.i
int i
Definition: lumiFormat.py:85
MuonGM::MuonDetectorManager::getCscReadoutElement
const CscReadoutElement * getCscReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx:225
Trk::PrepRawData::setHashAndIndex
void setHashAndIndex(unsigned short collHash, unsigned short objIndex)
TEMP for testing: might make some classes friends later ...
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
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
res
std::pair< std::vector< unsigned int >, bool > res
Definition: JetGroupProductTest.cxx:14
CscReadoutElement.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
CscPeakThresholdClusterBuilderTool::m_pfitter_split
ToolHandle< ICscClusterFitter > m_pfitter_split
Definition: CscPeakThresholdClusterBuilderTool.h:131
CscPeakThresholdClusterBuilderTool::make_clusters
int make_clusters(bool measphi, const std::vector< const Muon::CscStripPrepData * > &strips, Muon::CscPrepDataCollection *&collection)
Definition: CscPeakThresholdClusterBuilderTool.cxx:338
Muon::CscPrepDataContainer
MuonPrepDataContainerT< CscPrepData > CscPrepDataContainer
Definition: MuonPrepDataContainer.h:98
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Muon::CscStripPrepDataContainer
MuonPrepDataContainerT< CscStripPrepData > CscStripPrepDataContainer
Definition: MuonPrepDataContainer.h:99
ICscStripFitter::Result
Definition: ICscStripFitter.h:25
CscPeakThresholdClusterBuilderTool::initialize
StatusCode initialize()
AlgTool InterfaceID.
Definition: CscPeakThresholdClusterBuilderTool.cxx:86
Muon::CscStatusUndefined
@ CscStatusUndefined
Undefined, should not happen, most likely indicates a problem.
Definition: CscClusterStatus.h:94
CscPeakThresholdClusterBuilderTool::m_pfitter_prec
ToolHandle< ICscClusterFitter > m_pfitter_prec
Definition: CscPeakThresholdClusterBuilderTool.h:126
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
CscClusterStatus.h
CscPeakThresholdClusterBuilderTool::m_pstrip_fitter
ToolHandle< ICscStripFitter > m_pstrip_fitter
Definition: CscPeakThresholdClusterBuilderTool.h:114
CscPeakThresholdClusterBuilderTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: CscPeakThresholdClusterBuilderTool.h:137
Trk::PrepRawData::identify
Identifier identify() const
return the identifier
Muon::CscPrepDataCollection
MuonPrepDataCollection< CscPrepData > CscPrepDataCollection
Definition: MuonPrepDataCollection.h:109
EventPrimitives.h
fitman.fitresult
fitresult
Definition: fitman.py:590
CscPrepDataContainer.h
CscPeakThresholdClusterBuilderTool.h
CscPeakThresholdClusterBuilderTool::m_q3sum_threshold_phi
double m_q3sum_threshold_phi
Definition: CscPeakThresholdClusterBuilderTool.h:109
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
CscPeakThresholdClusterBuilderTool::m_pfitter_def
ToolHandle< ICscClusterFitter > m_pfitter_def
Definition: CscPeakThresholdClusterBuilderTool.h:121
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
query_example.col
col
Definition: query_example.py:7
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
IdentifiableContainerMT::indexFindPtr
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,...
Definition: IdentifiableContainerMT.h:289
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
MuonGM::MuonDetectorManager
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:50
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
CscPeakThresholdClusterBuilderTool::finalize
StatusCode finalize()
Definition: CscPeakThresholdClusterBuilderTool.cxx:324
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DEBUG
#define DEBUG
Definition: page_access.h:11
CscPeakThresholdClusterBuilderTool::~CscPeakThresholdClusterBuilderTool
~CscPeakThresholdClusterBuilderTool()
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
extractSporadic.q
list q
Definition: extractSporadic.py:98
ICscClusterFitter::StripFitList
std::vector< StripFit > StripFitList
Definition: ICscClusterFitter.h:40
Muon::CscClusterStatus
CscClusterStatus
Enum to represent the cluster status - see the specific enum values for more details.
Definition: CscClusterStatus.h:23
CscPeakThresholdClusterBuilderTool::m_DetectorManagerKey
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
retrieve MuonDetectorManager from the conditions store
Definition: CscPeakThresholdClusterBuilderTool.h:144
AthAlgTool
Definition: AthAlgTool.h:26
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
CscPeakThresholdClusterBuilderTool::m_digit_key
SG::ReadHandleKey< Muon::CscStripPrepDataContainer > m_digit_key
Definition: CscPeakThresholdClusterBuilderTool.h:110
CscPeakThresholdClusterBuilderTool::CscPeakThresholdClusterBuilderTool
CscPeakThresholdClusterBuilderTool(const std::string &type, const std::string &aname, const IInterface *)
Definition: CscPeakThresholdClusterBuilderTool.cxx:66
Muon::CscTimeStatus
CscTimeStatus
Enum to represent the cluster time measurement status - see the specific enum values for more details...
Definition: CscTimeStatus.h:24
Identifier
Definition: IdentifierFieldParser.cxx:14