ATLAS Offline Software
StripClusterTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "GaudiKernel/ConcurrencyFlags.h"
6 
8 
9 namespace NSWL1 {
10 
11  StripClusterTool::StripClusterTool( const std::string& type, const std::string& name, const IInterface* parent) :
13  m_detManager(nullptr),
14  m_tree(nullptr)
15  {
16  declareInterface<NSWL1::IStripClusterTool>(this);
17  }
18 
20  ATH_MSG_DEBUG( "initializing " << name() );
21  ATH_MSG_DEBUG( name() << " configuration:");
22  ATH_MSG_DEBUG(" " << std::setw(32) << std::setfill('.') << std::setiosflags(std::ios::left) << m_doNtuple.name() << ((m_doNtuple)? "[True]":"[False]")
23  << std::setfill(' ') << std::setiosflags(std::ios::right) );
24 
26 
27  const IInterface* parent = this->parent();
28  const INamedInterface* pnamed = dynamic_cast<const INamedInterface*>(parent);
29  const std::string& algo_name = pnamed->name();
30 
31  if ( m_doNtuple ) {
32  if (Gaudi::Concurrency::ConcurrencyFlags::numConcurrentEvents() > 1) {
33  ATH_MSG_ERROR("DoNtuple is not possible in multi-threaded mode");
34  return StatusCode::FAILURE;
35  }
36 
37  ATH_CHECK( m_incidentSvc.retrieve() );
38  m_incidentSvc->addListener(this,IncidentType::BeginEvent);
39 
40  if ( algo_name=="NSWL1Simulation" ){
41  ITHistSvc* tHistSvc;
42  ATH_CHECK(service("THistSvc", tHistSvc));
43  m_tree = 0;
44  std::string ntuple_name = algo_name+"Tree";
45  ATH_CHECK(this->init_branches());
46  ATH_CHECK(tHistSvc->getTree(ntuple_name,m_tree));
47  ATH_CHECK(this->book_branches());
48  }
49  }
50 
51  // retrieve the MuonDetectormanager
53  ATH_CHECK(m_idHelperSvc.retrieve());
54  return StatusCode::SUCCESS;
55  }
56 
57  void StripClusterTool::handle(const Incident& inc) {
58  if( inc.type()==IncidentType::BeginEvent ) {
59  this->clear_ntuple_variables();
60  }
61  }
62 
64  m_cl_n = 0;
65  m_cl_charge = nullptr;
66  m_cl_size = nullptr;
67  m_cl_x = nullptr;
68  m_cl_y = nullptr;
69  m_cl_z = nullptr;
70  m_cl_lx = nullptr;
71  m_cl_ly = nullptr;
72  m_cl_lz = nullptr;
73  m_cl_ltgx = nullptr;
74  m_cl_ltgy = nullptr;
75  m_cl_ltgz = nullptr;
76  m_cl_truth_x = nullptr;
77  m_cl_truth_y = nullptr;
78  m_cl_truth_z = nullptr;
79  m_cl_truth_lx = nullptr;
80  m_cl_truth_ly = nullptr;
81  m_cl_truth_lz = nullptr;
82  m_cl_truth_E = nullptr;
83  m_cl_truth_n = nullptr;
84  m_cl_side = nullptr;
85  m_cl_isSmall = nullptr;
86  m_cl_wedge = nullptr;
87  m_cl_sector = nullptr;
88  m_cl_module = nullptr;
89  m_cl_layer = nullptr;
90  m_cl_bandId = nullptr;
91  m_cl_phiId = nullptr;
92 
93  return StatusCode::SUCCESS;
94  }
95 
97  m_cl_n= 0;
98  m_cl_charge = new std::vector< int >();
99  m_cl_size = new std::vector< int >();
100  m_cl_x= new std::vector< float >();
101  m_cl_y= new std::vector< float >();
102  m_cl_z= new std::vector< float >();
103  m_cl_lx= new std::vector< float >();
104  m_cl_ly= new std::vector< float >();
105  m_cl_lz= new std::vector< float >();
106  m_cl_ltgx= new std::vector< float >();
107  m_cl_ltgy= new std::vector< float >();
108  m_cl_ltgz= new std::vector< float >();
109  m_cl_truth_x= new std::vector<float >();
110  m_cl_truth_y= new std::vector<float >();
111  m_cl_truth_z= new std::vector<float>();
112  m_cl_truth_lx= new std::vector<float >();
113  m_cl_truth_ly= new std::vector<float >();
114  m_cl_truth_lz= new std::vector<float>();
115  m_cl_truth_E= new std::vector<float >();
116  m_cl_truth_n= new std::vector<int >();
117  m_cl_side= new std::vector<int>();
118  m_cl_isSmall= new std::vector<int>();
119  m_cl_wedge= new std::vector<int>();
120  m_cl_sector= new std::vector<int>();
121  m_cl_module= new std::vector<int>();
122  m_cl_layer= new std::vector<int>();
123  m_cl_bandId= new std::vector<int>();
124  m_cl_phiId= new std::vector<int>();
125 
126  if (m_tree) {
127  std::string ToolName = name().substr( name().find("::")+2,std::string::npos );
128  const char* n = ToolName.c_str();
129  m_tree->Branch(TString::Format("%s_cl_n",n).Data(),&m_cl_n,TString::Format("%s_cl_n/i",n).Data());
130  m_tree->Branch(TString::Format("%s_cl_charge",n).Data(),&m_cl_charge);
131  m_tree->Branch(TString::Format("%s_cl_x",n).Data(),&m_cl_x);
132  m_tree->Branch(TString::Format("%s_cl_y",n).Data(),&m_cl_y);
133  m_tree->Branch(TString::Format("%s_cl_z",n).Data(),&m_cl_z);
134  m_tree->Branch(TString::Format("%s_cl_lx",n).Data(),&m_cl_lx);
135  m_tree->Branch(TString::Format("%s_cl_ly",n).Data(),&m_cl_ly);
136  m_tree->Branch(TString::Format("%s_cl_lz",n).Data(),&m_cl_lz);
137  m_tree->Branch(TString::Format("%s_cl_ltgx",n).Data(),&m_cl_ltgx);
138  m_tree->Branch(TString::Format("%s_cl_ltgy",n).Data(),&m_cl_ltgy);
139  m_tree->Branch(TString::Format("%s_cl_ltgz",n).Data(),&m_cl_ltgz);
140  m_tree->Branch(TString::Format("%s_cl_size",n).Data(),&m_cl_size);
141  m_tree->Branch(TString::Format("%s_cl_isSmall",n).Data(),&m_cl_isSmall);
142  m_tree->Branch(TString::Format("%s_cl_side",n).Data(),&m_cl_side);
143  m_tree->Branch(TString::Format("%s_cl_wedge",n).Data(),&m_cl_wedge);
144  m_tree->Branch(TString::Format("%s_cl_sector",n).Data(),&m_cl_sector);
145  m_tree->Branch(TString::Format("%s_cl_module",n).Data(),&m_cl_module);
146  m_tree->Branch(TString::Format("%s_cl_layer",n).Data(),&m_cl_layer);
147  m_tree->Branch(TString::Format("%s_cl_bandId",n).Data(),&m_cl_bandId);
148  m_tree->Branch(TString::Format("%s_cl_phiId",n).Data(),&m_cl_phiId);
149  m_tree->Branch(TString::Format("%s_cl_truth_x",n).Data(),&m_cl_truth_x);
150  m_tree->Branch(TString::Format("%s_cl_truth_y",n).Data(),&m_cl_truth_y);
151  m_tree->Branch(TString::Format("%s_cl_truth_z",n).Data(),&m_cl_truth_z);
152  m_tree->Branch(TString::Format("%s_cl_truth_lx",n).Data(),&m_cl_truth_lx);
153  m_tree->Branch(TString::Format("%s_cl_truth_ly",n).Data(),&m_cl_truth_ly);
154  m_tree->Branch(TString::Format("%s_cl_truth_lz",n).Data(),&m_cl_truth_lz);
155  m_tree->Branch(TString::Format("%s_cl_truth_E",n).Data(),&m_cl_truth_E);
156  m_tree->Branch(TString::Format("%s_cl_truth_n",n).Data(),&m_cl_truth_n);
157  }
158  return StatusCode::SUCCESS;
159  }
160 
162  if ( m_tree==0 ) return;
163 
164  //clear the ntuple variables
165  m_cl_n = 0;
166  m_cl_charge->clear();
167  m_cl_x->clear();
168  m_cl_y->clear();
169  m_cl_z->clear();
170  m_cl_lx->clear();
171  m_cl_ly->clear();
172  m_cl_lz->clear();
173  m_cl_ltgx->clear();
174  m_cl_ltgy->clear();
175  m_cl_ltgz->clear();
176  m_cl_size->clear();
177  m_cl_truth_x->clear();
178  m_cl_truth_y->clear();
179  m_cl_truth_z->clear();
180  m_cl_truth_E->clear();
181  m_cl_truth_n->clear();
182  m_cl_truth_lx->clear();
183  m_cl_truth_ly->clear();
184  m_cl_truth_lz->clear();
185  m_cl_side->clear();
186  m_cl_isSmall->clear();
187  m_cl_wedge->clear();
188  m_cl_sector->clear();
189  m_cl_module->clear();
190  m_cl_layer->clear();
191  m_cl_bandId->clear();
192  m_cl_phiId->clear();
193  }
194 
196  std::vector<std::unique_ptr<StripClusterData>>& clusters,
197  std::vector<std::shared_ptr<std::vector<std::unique_ptr<StripData> >> > &cluster_cache) const {
198 
199  ATH_MSG_DEBUG("Cluster cache received " << cluster_cache.size());
200 
201  bool first_strip=true;
202  for(const auto &this_cl : cluster_cache){
203  float x_pos=0;
204  float y_pos=0;
205  float z_pos=0;
206 
207  float x_lpos=0;
208  float y_lpos=0;
209  float z_lpos=0;
210 
211  int charge=0;
212  int n_strip=0;
213 
214  first_strip=true;
215  float locx=-999999;
216  float locy=-999999;
217  if (this_cl->empty()){
218  ATH_MSG_WARNING("Zero size cluster!!");
219  continue;
220  }
221 
222  const MuonSimDataCollection* sdo_container = nullptr;
223  if(m_isMC) {
224  SG::ReadHandle<MuonSimDataCollection> readMuonSimDataCollection( m_sTgcSdoContainerKey, ctx );
225  if( !readMuonSimDataCollection.isValid() ){
226  ATH_MSG_WARNING("could not retrieve the sTGC SDO container: it will not be possible to associate the MC truth");
227  return StatusCode::FAILURE;
228  }
229  sdo_container = readMuonSimDataCollection.cptr();
230  }
231 
232  for(const auto &strip_cl : *this_cl){
233  n_strip++;
234  ATH_MSG_DEBUG("Start strip" << n_strip);
235  // Save truth deposits associated with cluster should be the same on for the whole strip, so take the first one need to work on this logic
236  if(m_isMC && first_strip) {
237  first_strip=false;
238  Identifier Id = strip_cl->Identity();
240  auto it = sdo_container->find(Id);
241  if(it == sdo_container->end()) continue;
242  const MuonSimData strip_sdo = it->second;
243  std::vector<MuonSimData::Deposit> deposits;
244  strip_sdo.deposits(deposits);
245  //retrieve the info of the first associated hit, i.e. the fastest in time
246  if (deposits.size()!=1) ATH_MSG_WARNING("Multiple cluster hits for strip!");
247  if (deposits.empty()){
248  ATH_MSG_WARNING("Empty hit here");
249  continue;
250  }
251 
252  int truth_barcode = deposits[0].first.barcode();
253  double truth_localPosX = deposits[0].second.firstEntry();
254  double truth_localPosY = deposits[0].second.secondEntry();
255  Amg::Vector3D hit_gpos(0.,0.,0.);
256  Amg::Vector2D lpos(truth_localPosX,truth_localPosY);
257  rdoEl->surface(Id).localToGlobal(lpos, hit_gpos,hit_gpos);
258  double truth_globalPosX = hit_gpos.x();
259  double truth_globalPosY = hit_gpos.y();
260  double truth_globalPosZ = hit_gpos.z();
261  float truth_energy = strip_sdo.word();
262 
263  if(std::abs(locx-lpos.x())>.001 || std::abs(locy - lpos.y())>.001){
264  ATH_MSG_DEBUG("OLD locx " << locx << " new locx " << lpos.x() << " b " << int(locx!=lpos.x()));
265  ATH_MSG_DEBUG("OLD locy " << locy << " new locy " << lpos.y() << " b " << int(locy!=lpos.y()));
266  ATH_MSG_DEBUG("Cluster hit, truth barcode = " << truth_barcode);
267  ATH_MSG_DEBUG("Cluster hit, truth globalPosX = " << truth_globalPosX
268  << ", truth globalPosY = " << truth_globalPosY
269  << ", truth globalPosZ = " << truth_globalPosZ
270  << ", truth enegy deposit = " << truth_energy);
271  ATH_MSG_DEBUG("Cluster hit, truth localPosX = " << lpos.x()
272  << ", truth localPosY = " << lpos.y()
273  << ", truth enegy deposit = " << truth_energy);
274 
275  if (m_doNtuple) {
276  m_cl_truth_x->push_back( hit_gpos.x() );
277  m_cl_truth_y->push_back( hit_gpos.y() );
278  m_cl_truth_z->push_back( hit_gpos.z() );
279 
280  m_cl_truth_lx->push_back( lpos.x() );
281  m_cl_truth_ly->push_back( lpos.y() );
282  m_cl_truth_lz->push_back( 0 );
283  m_cl_truth_E->push_back( truth_energy );
284  }
285  }
286  }
287 
288  float s_charge=strip_cl->strip_charge_6bit();
289  charge+=s_charge;
290  x_pos+=strip_cl->globX()*s_charge;
291  y_pos+=strip_cl->globY()*s_charge;
292  z_pos+=strip_cl->globZ()*s_charge;
293 
294  x_lpos+=(strip_cl->locX())*s_charge;
295  y_lpos+=(strip_cl->locY())*s_charge;
296  z_lpos+=(strip_cl->locZ())*s_charge;
297 
298 
299  ATH_MSG_DEBUG("Cluster ------------------------------------------" );
300  ATH_MSG_DEBUG("Cluster strip charge: " << s_charge);
301  ATH_MSG_DEBUG("Cluster strip loc X: " << strip_cl->locX());
302  ATH_MSG_DEBUG("Cluster strip loc Y: " << strip_cl->locY());
303  ATH_MSG_DEBUG("Cluster strip glob X: " << strip_cl->globX());
304  ATH_MSG_DEBUG("Cluster strip glob Y: " << strip_cl->globY());
305  ATH_MSG_DEBUG("Cluster strip glob Z: " << strip_cl->globZ());
306  ATH_MSG_DEBUG("Cluster strip locx dist: " << locx-strip_cl->locX());
307  ATH_MSG_DEBUG("Cluster strip charge o dist: " << s_charge/(locx-strip_cl->locX()));
308  ATH_MSG_DEBUG("Channel " << strip_cl->channelId());
309 
310  }//end of this_cl loop
311 
312  if (charge != 0){
313  if ( std::abs(x_pos/charge)<200. && std::abs(y_pos/charge)<200.){
314  ATH_MSG_WARNING("Cluster ------------------------------------------" );
315  ATH_MSG_WARNING("Cluster strip charge: " << charge );
316  ATH_MSG_WARNING("Cluster strip glob X: " << x_pos << x_pos/charge);
317  ATH_MSG_WARNING("Cluster strip glob Y: " << y_pos << y_pos/charge);
318  ATH_MSG_WARNING("Cluster strip glob Z: " << z_pos << z_pos/charge);
319  }
320  x_pos=x_pos/charge;
321  y_pos=y_pos/charge;
322  z_pos=z_pos/charge;
323  x_lpos=x_lpos/charge;
324  y_lpos=y_lpos/charge;
325  z_lpos=z_lpos/charge;
326  }
327  if (m_doNtuple) {
328  m_cl_x->push_back(x_pos);
329  m_cl_y->push_back(y_pos);
330  m_cl_z->push_back(z_pos);
331 
332  m_cl_lx->push_back(x_lpos);
333  m_cl_ly->push_back(y_lpos);
334  m_cl_lz->push_back(z_lpos);
335  m_cl_charge->push_back(charge);
336  m_cl_size->push_back(n_strip);
337 
338  m_cl_side->push_back(this_cl->at(0)->sideId() );
339  m_cl_isSmall->push_back(this_cl->at(0)->isSmall() );
340  m_cl_wedge->push_back(this_cl->at(0)->wedge());
341  m_cl_sector->push_back(this_cl->at(0)->sectorId());
342  m_cl_module->push_back(this_cl->at(0)->moduleId() );
343  m_cl_layer->push_back(this_cl->at(0)->layer());
344  m_cl_bandId->push_back(this_cl->at(0)->bandId());
345  m_cl_phiId->push_back(this_cl->at(0)->phiId());
346  }
347  ATH_MSG_DEBUG("Cluster dump with X:" << x_pos << " Y: " << y_pos << " Z: " << z_pos << " cluster charge: " << charge);
348  ATH_MSG_DEBUG("Cluster dump with lX:" << x_lpos << " lY: " << y_lpos << " lZ: " << z_lpos << " cluster charge: " << charge);
349 
350  auto stripClOfflData=std::make_unique<StripClusterOfflineData>(
351  this_cl->at(0)->bandId(),
352  this_cl->at(0)->trig_BCID(),
353  this_cl->at(0)->sideId(),
354  this_cl->at(0)->phiId(),
355  this_cl->at(0)->isSmall(),
356  this_cl->at(0)->moduleId(),
357  this_cl->at(0)->sectorId(),
358  this_cl->at(0)->wedge(),
359  this_cl->at(0)->layer(),
360  n_strip,
361  charge,
362  x_pos,
363  y_pos,
364  z_pos);
365  clusters.push_back(std::move(stripClOfflData));
366  }
367  if (m_doNtuple) m_cl_n = clusters.size();
368  ATH_MSG_DEBUG("Finished Fill");
369  return StatusCode::SUCCESS;
370  }
371 
372 
373  StatusCode StripClusterTool::cluster_strip_data(const EventContext& ctx, std::vector<std::unique_ptr<StripData>>& strips, std::vector< std::unique_ptr<StripClusterData> >& clusters) const {
374 
375  if(strips.empty()){
376  ATH_MSG_WARNING("Received 0 strip hits... Skip event");
377  return StatusCode::SUCCESS;
378  }
379 
380  std::map<uint32_t, std::vector<std::unique_ptr<StripData>> > stripMap;
381  // Filter by layer:
382  for (auto& st : strips) {
383  // sideId [0, 1]
384  auto sideId = st->sideId();
385  // sectorType: small==0, large==1
386  auto sectorType = st->sectorType();
387  // sectorId [1,8]
388  auto sectorId = st->sectorId();
389  // etaId [1,3]
390  auto etaId = st->moduleId();
391  // wedgeId [1,2]
392  auto wedgeId = st->wedge();
393  // layer [1,4]
394  auto layerId = st->layer();
395 
396  // add 1 as the first placeholder, hence cache_hash always has 7 digits
397  std::string id_str = std::to_string(1)+std::to_string(sideId)+std::to_string(sectorType)+std::to_string(sectorId)+std::to_string(etaId)+std::to_string(wedgeId)+std::to_string(layerId);
398  const uint32_t cache_hash = atoi(id_str.c_str());
399 
400  auto it = stripMap.find(cache_hash);
401  if (it != stripMap.end()){
402  it->second.push_back(std::move(st));
403  }
404  else{
405  stripMap[cache_hash].push_back(std::move(st));
406  }
407 
408  }
409 
410  std::vector< std::shared_ptr<std::vector<std::unique_ptr<StripData> >> > cluster_cache;
411  for (auto &item : stripMap) {
412  std::vector<std::unique_ptr<StripData>>& stripList = item.second;
413 
414  //S.I sort strip w.r.t channelId in ascending order
415  std::sort(stripList.begin(), stripList.end(), [](const auto& s1,const auto& s2) { return s1->channelId()<s2->channelId(); });
416 
417  auto hit=stripList.begin();
418  ATH_MSG_DEBUG("Cluster Hits :" << (*hit)->channelId() << " " << m_idHelperSvc->stgcIdHelper().gasGap( (*hit)->Identity())
419  << " " << (*hit)->moduleId() << " " << (*hit)->sectorId() << " " << (*hit)->wedge() << " " << (*hit)->sideId() );
420  int first_ch=(*hit)->channelId();//channel id of the first strip
421  int prev_ch=-1;
422 
423  auto cr_cluster=std::make_shared< std::vector<std::unique_ptr<StripData>> >();
424 
425  for(auto& this_hit : stripList){
426  if(!(this_hit)->readStrip() ) continue;
427  if( ((this_hit)->bandId()==-1 || this_hit->phiId()==-1) ){
428  ATH_MSG_WARNING("Read Strip without BandId :" << (this_hit)->channelId() << " " << m_idHelperSvc->stgcIdHelper().gasGap( (this_hit)->Identity())
429  << " " << (this_hit)->moduleId() << " " << (this_hit)->sectorId() << " " << (this_hit)->wedge() << " " << (this_hit)->sideId() );
430  continue;
431  }
432 
433  if (prev_ch==-1){//for the first time...
434  prev_ch = first_ch;
435  cr_cluster->push_back(std::move(this_hit));
436  continue;
437  }
438 
439  int this_ch=(this_hit)->channelId();
440  if ( (this_ch < prev_ch)) {
441  ATH_MSG_ERROR("Hits Ordered incorrectly!!!" );
442  return StatusCode::FAILURE;
443  }
444 
445  if (this_ch == prev_ch || this_ch == prev_ch+1) cr_cluster->push_back(std::move(this_hit)); // form cluster with adjacent +-1 strips
446  else {
447  cluster_cache.push_back(std::move(cr_cluster)); //put the current cluster into the clusters buffer
448  cr_cluster=std::make_shared<std::vector<std::unique_ptr<StripData>>>(); //create a new empty cluster and assign this hit as the first hit
449  cr_cluster->push_back(std::move(this_hit));
450  }
451 
452  prev_ch=this_ch;
453  }
454 
455  if(!cr_cluster->empty()) cluster_cache.push_back(std::move(cr_cluster)); //don't forget the last cluster in the loop
456  }
457 
458  ATH_MSG_DEBUG("Found :" << cluster_cache.size() << " clusters");
459  ATH_CHECK(fill_strip_validation_id(ctx, clusters, cluster_cache));
460  cluster_cache.clear();
461 
462  return StatusCode::SUCCESS;
463  }
464 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
NSWL1::StripClusterTool::initialize
virtual StatusCode initialize() override
Definition: StripClusterTool.cxx:19
MuonSimData::word
int word() const
Definition: MuonSimData.h:89
NSWL1::StripClusterTool::handle
virtual void handle(const Incident &inc) override
Definition: StripClusterTool.cxx:57
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
SG::ReadHandle::cptr
const_pointer_type cptr()
Dereference the pointer.
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
Data
@ Data
Definition: BaseObject.h:11
StateLessPT_NewConfig.Format
Format
Definition: StateLessPT_NewConfig.py:146
NSWL1::StripClusterTool::m_sTgcSdoContainerKey
SG::ReadHandleKey< MuonSimDataCollection > m_sTgcSdoContainerKey
Definition: StripClusterTool.h:84
skel.it
it
Definition: skel.GENtoEVGEN.py:423
NSWL1::StripClusterTool::init_branches
StatusCode init_branches()
init the branches
Definition: StripClusterTool.cxx:63
NSWL1::StripClusterTool::fill_strip_validation_id
StatusCode fill_strip_validation_id(const EventContext &ctx, std::vector< std::unique_ptr< StripClusterData >> &clusters, std::vector< std::shared_ptr< std::vector< std::unique_ptr< StripData > >> > &cluster_cache) const
Definition: StripClusterTool.cxx:195
MuonGM::MuonClusterReadoutElement::surface
virtual const Trk::PlaneSurface & surface() const override
access to chamber surface (phi orientation), uses the first gas gap
Definition: MuonClusterReadoutElement.h:123
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
NSWL1::StripClusterTool::book_branches
StatusCode book_branches()
book the branches to analyze the StripTds
Definition: StripClusterTool.cxx:96
NSWL1::StripClusterTool::m_incidentSvc
ServiceHandle< IIncidentSvc > m_incidentSvc
Athena/Gaudi incident Service.
Definition: StripClusterTool.h:78
MuonSimData::deposits
void deposits(std::vector< Deposit > &deposits) const
Definition: MuonSimData.h:99
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
beamspotman.n
n
Definition: beamspotman.py:731
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
MuonGM::sTgcReadoutElement
An sTgcReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station c...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/sTgcReadoutElement.h:28
MuonSimDataCollection
Definition: MuonSimDataCollection.h:21
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
StripClusterTool.h
NSWL1::StripClusterTool::m_doNtuple
Gaudi::Property< bool > m_doNtuple
Definition: StripClusterTool.h:83
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
CaloCondBlobAlgs_fillNoiseFromASCII.channelId
channelId
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:122
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
charge
double charge(const T &p)
Definition: AtlasPID.h:494
NSWL1::StripClusterTool::cluster_strip_data
virtual StatusCode cluster_strip_data(const EventContext &ctx, std::vector< std::unique_ptr< StripData >> &strips, std::vector< std::unique_ptr< StripClusterData >> &clusters) const override
Definition: StripClusterTool.cxx:373
MuonSimData
Definition: MuonSimData.h:62
item
Definition: ItemListSvc.h:43
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
NSWL1::StripClusterTool::m_tree
TTree * m_tree
ntuple for analysis
Definition: StripClusterTool.h:89
NSWL1::StripClusterTool::StripClusterTool
StripClusterTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: StripClusterTool.cxx:11
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
ReadCellNoiseFromCoolCompare.s2
s2
Definition: ReadCellNoiseFromCoolCompare.py:379
RunTileMonitoring.clusters
clusters
Definition: RunTileMonitoring.py:133
CxxUtils::atoi
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
Definition: Control/CxxUtils/Root/StringUtils.cxx:85
MuonGM::MuonDetectorManager::getsTgcReadoutElement
const sTgcReadoutElement * getsTgcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx:259
AthAlgTool
Definition: AthAlgTool.h:26
Trk::PlaneSurface::localToGlobal
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const override final
Specified for PlaneSurface: LocalToGlobal method without dynamic memory allocation.
Definition: PlaneSurface.cxx:204
NSWL1::StripClusterTool::clear_ntuple_variables
void clear_ntuple_variables()
clear the variables used in the analysis
Definition: StripClusterTool.cxx:161
NSWL1
A trigger trigger candidate for a stgc sector.
Definition: NSWL1Simulation.cxx:9
NSWL1::StripClusterTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: StripClusterTool.h:80
NSWL1::StripClusterTool::m_detManager
const MuonGM::MuonDetectorManager * m_detManager
MuonDetectorManager.
Definition: StripClusterTool.h:79
NSWL1::StripClusterTool::m_isMC
Gaudi::Property< bool > m_isMC
Definition: StripClusterTool.h:82