ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
TBTrackToCaloAlg Class Reference

This Algorithm is meant to be an example of use of the TrackToCalo tools : More...

#include <TBTrackToCaloAlg.h>

Inheritance diagram for TBTrackToCaloAlg:
Collaboration diagram for TBTrackToCaloAlg:

Public Member Functions

 TBTrackToCaloAlg (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual StatusCode initialize () override
 
virtual StatusCode execute () override
 
virtual StatusCode finalize () override
 
bool CreateTrkImpactInCalo ()
 
ImpactInCaloGetImpactsInCalo (const Trk::Track *track, bool &got_a_track)
 
void CompareImpactWithCluster ()
 
void PrintImpact ()
 
CaloCellListCellsCrossedByTrack (const Trk::Track *trk, const CaloCell_ID::CaloSample sam, int neta, int nphi)
 
bool PrintCellsCrossed ()
 
void PrintBeamPosition ()
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
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. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

 TBTrackToCaloAlg ()
 
 TBTrackToCaloAlg (const TBTrackToCaloAlg &)
 
TBTrackToCaloAlgoperator= (const TBTrackToCaloAlg &)
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

std::string m_TrackName
 
const TrackCollectionm_tracks
 
std::string m_TrackParticleName
 
const Rec::TrackParticleContainerm_particle
 
std::string m_trkinput
 
std::string m_cluster_container
 
std::string m_cell_container
 
const CaloCell_IDm_calo_id
 
std::string m_ImpactInCalosOutputName
 
TBExtrapolTrackToCaloToolm_toCalo
 
CaloDepthToolm_calodepth
 
CaloPhiRange m_phiRange
 
ICaloCoordinateToolm_calo_tb_coord
 
SG::ReadCondHandleKey< CaloDetDescrManagerm_caloMgrKey {this,"CaloDetDescrManager", "CaloDetDescrManager"}
 
DataObjIDColl m_extendedExtraObjects
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

This Algorithm is meant to be an example of use of the TrackToCalo tools :

Definition at line 63 of file TBTrackToCaloAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TBTrackToCaloAlg() [1/3]

TBTrackToCaloAlg::TBTrackToCaloAlg ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 44 of file TBTrackToCaloAlg.cxx.

45  :
46  AthAlgorithm(name,pSvcLocator),
47  m_TrackName("Tracks"),
48  m_tracks(0),
49  m_calodepth(nullptr)
50 {
51  // Get parameter values from jobOptions file
52  declareProperty("TrackName", m_TrackName);
53  declareProperty("TrackParticleName", m_TrackParticleName);
54  declareProperty("ClusterContainerName", m_cluster_container);
55  declareProperty("CaloCellContainerName", m_cell_container);
56  declareProperty("ImpactInCaloContainerName", m_ImpactInCalosOutputName);
57  declareProperty("TrackInputType", m_trkinput);
58  m_calo_id = 0;
59  m_calo_tb_coord = 0;
60  m_particle = 0;
61  m_toCalo = 0;
62 }

◆ TBTrackToCaloAlg() [2/3]

TBTrackToCaloAlg::TBTrackToCaloAlg ( )
private

◆ TBTrackToCaloAlg() [3/3]

TBTrackToCaloAlg::TBTrackToCaloAlg ( const TBTrackToCaloAlg )
private

Member Function Documentation

◆ CellsCrossedByTrack()

CaloCellList * TBTrackToCaloAlg::CellsCrossedByTrack ( const Trk::Track trk,
const CaloCell_ID::CaloSample  sam,
int  neta,
int  nphi 
)

Definition at line 572 of file TBTrackToCaloAlg.cxx.

575 {
576  CaloCellList* my_list = 0;
577 
578  // Retreive CaloCell's from StoreGate :
579 
580  const CaloCellContainer* cell_container;
581  StatusCode sc=evtStore()->retrieve(cell_container,m_cell_container);
582  if ( sc != StatusCode::SUCCESS ) return 0;
583 
585  const CaloDetDescrManager* caloDDMgr = *caloMgrHandle;
586 
587  // Where is the track shooting ?
588  double offset = 0.;
589  double trketa_at = 0.;
590  double trkphi_at = 0.;
591  Amg::Vector3D* pt_ctb = new Amg::Vector3D();
592  Amg::Vector3D* pt_local = new Amg::Vector3D();
593  bool result = m_toCalo->
594  TrackSeenByCalo(trk,sam,offset,pt_ctb,pt_local,trketa_at,trkphi_at);
595 
596  if (!result) {
597  delete pt_ctb;
598  delete pt_local;
599  return 0;
600  }
601 
602  double eta = pt_local->eta();
603  double phi = pt_local->phi();
604 
605  // CaloCellList needs both enums: subCalo and CaloSample
606  CaloCell_ID::SUBCALO subcalo;
607  bool barrel;
608  int sampling_or_module;
609  CaloDetDescrManager::decode_sample (subcalo, barrel, sampling_or_module, sam);
610 
611  // Get the corresponding grannularities : needs to know where you are
612  // the easiest is to look for the CaloDetDescrElement
613  const CaloDetDescrElement* dde =
614  caloDDMgr->get_element(subcalo,sampling_or_module,barrel,eta,phi);
615 
616  double deta = int(neta/2)*dde->deta();
617  double dphi = int(nphi/2)*dde->dphi();
618 
619  //std::cout << "zone is ..." << eta << " " << phi << " "
620  // << deta << " " << dphi << " " << std::endl;
621  // Construct the list :
622  my_list = new CaloCellList(caloDDMgr, cell_container,subcalo);
623  my_list->select(eta,phi,deta,dphi, (int) sam);
624 
625  // cleanup
626  delete pt_ctb;
627  delete pt_local;
628 
629  return my_list ;
630 }

◆ CompareImpactWithCluster()

void TBTrackToCaloAlg::CompareImpactWithCluster ( )

Definition at line 441 of file TBTrackToCaloAlg.cxx.

442 {
443  StatusCode sc1, sc2;
444 
445  ATH_MSG_DEBUG ( "TBTrackToCaloAlg::CompareImpactWithCluster()" );
446 
447  // loop on clusters
448 
449  const CaloClusterContainer* cluster_container = nullptr;
450  sc1=evtStore()->retrieve(cluster_container,m_cluster_container);
451 
452  const ImpactInCaloCollection* impact_collection;
453  sc2=evtStore()->retrieve(impact_collection,m_ImpactInCalosOutputName);
454 
455  if(sc1 == StatusCode::SUCCESS && sc2 == StatusCode::SUCCESS ){
456 
457  typedef ImpactInCaloCollection::const_iterator impact_iterator;
458  impact_iterator f_imp = impact_collection->begin();
459  impact_iterator l_imp = impact_collection->end();
460 
461  for (const CaloCluster* cluster : *cluster_container) {
462  double hecluster = cluster->energy()/GeV;
463  double heta = cluster->eta();
464  double hphi = cluster->phi();
465 
466  ATH_MSG_INFO ( "Found a cluster : E= " << hecluster
467  << "(GeV), etaCaloLocal=" << heta
468  << ", phiCaloLocal=" << hphi );
469 
470  for ( ; f_imp!=l_imp; ++f_imp){
471  const ImpactInCalo* impact = (*f_imp);
472 
473  ATH_MSG_INFO
474  ( "==> Comparison between cluster and impact in Middle : deta="
475  << heta-impact->etaCaloLocal_2()
476  << " , dphi=" << hphi-impact->phiCaloLocal_2() );
477  }
478  }
479  }
480  else {
481  if (sc1 != StatusCode::SUCCESS)
482  ATH_MSG_ERROR ("Clusters not found"
483  << m_cluster_container );
484  if (sc2 != StatusCode::SUCCESS)
485  ATH_MSG_ERROR ("ImpactInCalos not found"
487  }
488 }

◆ CreateTrkImpactInCalo()

bool TBTrackToCaloAlg::CreateTrkImpactInCalo ( )

Definition at line 133 of file TBTrackToCaloAlg.cxx.

134 {
135  bool got_a_track = false;
136 
137  ATH_MSG_DEBUG ( "TBTrackToCaloAlg::CreateTrkImpactInCalo()" );
138 
139  //create and record new ImpactInCalo container
140  ImpactInCaloCollection* outputContainer = new ImpactInCaloCollection();
141  StatusCode sc=evtStore()->record(outputContainer,m_ImpactInCalosOutputName,false); //"false" indicates it can't be modified by another algorithm
142  if(sc != StatusCode::SUCCESS){
143  ATH_MSG_ERROR ( " Could not record ImpactInCaloCollection"
145  return got_a_track ;
146  }
147 
148  m_particle = 0;
149  m_tracks = 0;
150 
151  if( m_trkinput == "TrackParticleCandidates")
152  {
153  if (m_TrackParticleName == "") {
154  ATH_MSG_ERROR ("m_TrackParticleName not set" );
155  return true;
156  }
157 
158  sc = evtStore()->retrieve(m_particle, m_TrackParticleName);
159 
160  if (sc.isFailure()) ATH_MSG_ERROR ("TrackParticle not found: will only play with calo " << m_TrackParticleName );
161  else {
162  ATH_MSG_DEBUG ("TrackParticle found in StoreGate" );
163  for (const Rec::TrackParticle* tp : *m_particle) {
164  const Trk::Track* tr = tp->originalTrack();
165 
166  ImpactInCalo * imp = GetImpactsInCalo(tr, got_a_track);
167  if(imp) outputContainer->push_back(imp);
168  else ATH_MSG_DEBUG (" ImpactInCalo pointer not valid for this track");
169  }
170  }
171  }
172 
173  else
174  {
175  if (m_TrackName == "") {
176  ATH_MSG_ERROR ("m_TrackName not set" );
177  return true;
178  }
179 
180  sc = evtStore()->retrieve(m_tracks, m_TrackName);
181 
182  if (sc.isFailure()) ATH_MSG_ERROR ("Tracks not found: will only play with calo " << m_TrackName );
183  else {
184  ATH_MSG_DEBUG ("Tracks found in StoreGate" );
185  for (const Trk::Track* tr : *m_tracks) {
186  ImpactInCalo * imp = GetImpactsInCalo(tr, got_a_track);
187  if(imp) outputContainer->push_back(imp);
188  else ATH_MSG_DEBUG (" ImpactInCalo pointer not valid for this track");
189  }
190  }
191  }
192 
193  return got_a_track;
194 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

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

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

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

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

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

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

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

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

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

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

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

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

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

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

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

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode TBTrackToCaloAlg::execute ( )
overridevirtual

Definition at line 98 of file TBTrackToCaloAlg.cxx.

99 {
100  ATH_MSG_DEBUG ( "TBTrackToCaloAlg::execute()" );
101 
102  // just a simple test ( trick to trigger position reading )
103  // PrintBeamPosition();
104 
105  // Create the impacts :
106  /*found_a_track =*/ CreateTrkImpactInCalo();
107 
108  // Example 1 : you want to read them and compare to clusters
109 
110  /*
111  if (found_a_track) {
112  PrintImpact();
113  //CompareImpactWithCluster();
114  }
115  */
116 
117  // Example 2 : you want to know the list of cells crossed by the track
118  // bool found_cells = PrintCellsCrossed();
120  return StatusCode::SUCCESS;
121 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::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

◆ extraOutputDeps()

const DataObjIDColl & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 50 of file AthAlgorithm.cxx.

51 {
52  // If we didn't find any symlinks to add, just return the collection
53  // from the base class. Otherwise, return the extended collection.
54  if (!m_extendedExtraObjects.empty()) {
56  }
57  return Algorithm::extraOutputDeps();
58 }

◆ finalize()

StatusCode TBTrackToCaloAlg::finalize ( )
overridevirtual

Definition at line 124 of file TBTrackToCaloAlg.cxx.

125 {
126  ATH_MSG_DEBUG ( "TBTrackToCaloAlg::finalize()" );
127 
128  return StatusCode::SUCCESS;
129 }

◆ GetImpactsInCalo()

ImpactInCalo * TBTrackToCaloAlg::GetImpactsInCalo ( const Trk::Track track,
bool &  got_a_track 
)

Definition at line 196 of file TBTrackToCaloAlg.cxx.

197 {
198  Amg::Vector3D* pt_calo_ctb = new Amg::Vector3D;
199  Amg::Vector3D* pt_calo_local = new Amg::Vector3D;
200 
202  const CaloDetDescrManager* caloDDMgr = *caloMgrHandle;
203 
204  double trketa = 0.;
205  // take the last measured point to find out if I am in barrel or endcap :
206  const DataVector <const Trk::TrackParameters>* paramvec = track->trackParameters();
207  if (paramvec) {
208  for (const Trk::TrackParameters* params : *paramvec)
209  trketa = params->eta();
210  }
211  else
212  ATH_MSG_ERROR ( " No track parameters for this track ??? do nothing " );
213 
214  double distbar = 0.;
215  double distec = 0.;
216  double offset = 0.;
217  double trketa_at = 0.;
218  double trkphi_at = 0.;
219  bool result = false;
221 
222  // PreSampler :
223  double x_ctb_0 = 0;
224  double y_ctb_0 = 0;
225  double z_ctb_0 = 0;
226  double etaCaloLocal_0 = 0;
227  double phiCaloLocal_0 = 0;
228  double trketa_at_0 = 0.;
229  double trkphi_at_0 = 0.;
230  // Strip :
231  double x_ctb_1 = 0;
232  double y_ctb_1 = 0;
233  double z_ctb_1 = 0;
234  double etaCaloLocal_1 = 0;
235  double phiCaloLocal_1 = 0;
236  double trketa_at_1 = 0.;
237  double trkphi_at_1 = 0.;
238  // Middle :
239  double x_ctb_2 = 0;
240  double y_ctb_2 = 0;
241  double z_ctb_2 = 0;
242  double etaCaloLocal_2 = 0;
243  double phiCaloLocal_2 = 0;
244  double trketa_at_2 = 0.;
245  double trkphi_at_2 = 0.;
246  // Back :
247  double x_ctb_3 = 0;
248  double y_ctb_3 = 0;
249  double z_ctb_3 = 0;
250  double etaCaloLocal_3 = 0;
251  double phiCaloLocal_3 = 0;
252  double trketa_at_3 = 0.;
253  double trkphi_at_3 = 0.;
254  // Tiles :
255  double x_ctb_tile = 0;
256  double y_ctb_tile = 0;
257  double z_ctb_tile = 0;
258  double etaCaloLocal_tile = 0;
259  double phiCaloLocal_tile = 0;
260  double trketa_at_tile = 0.;
261  double trkphi_at_tile = 0.;
262 
263  if (paramvec) {
264 
265  // PS :
266  distbar = CaloDepthTool::deta(CaloCell_ID::PreSamplerB,trketa,caloDDMgr);
267  distec = CaloDepthTool::deta(CaloCell_ID::PreSamplerE,trketa,caloDDMgr);
268 
269  ATH_MSG_DEBUG ( " TrackTo ...PS : for eta= " << trketa << " dist to Barrel =" << distbar
270  << " to endcap =" << distec );
271  if (distbar < 0 ) sample = CaloCell_ID::PreSamplerB;
272  else if (distec < 0 ) sample = CaloCell_ID::PreSamplerE;
273  else if ( distbar < distec) sample = CaloCell_ID::PreSamplerB;
275  ATH_MSG_DEBUG ( " => will shoot in sample " << sample );
276 
278  pt_calo_ctb,pt_calo_local,trketa_at,trkphi_at);
279 
280  if (result) {
281  got_a_track=true;
282  x_ctb_0 = pt_calo_ctb->x();
283  y_ctb_0 = pt_calo_ctb->y();
284  z_ctb_0 = pt_calo_ctb->z();
285  etaCaloLocal_0 = pt_calo_local->eta();
286  phiCaloLocal_0 = pt_calo_local->phi();
287  trketa_at_0 = trketa_at;
288  trkphi_at_0 = trkphi_at;
289 
290  ATH_MSG_DEBUG ( "Extrapolation to PreSamplerB gives: "
291  << " etaCaloLocal=" << pt_calo_local->eta()
292  << " phiCaloLocal=" << pt_calo_local->phi() );
293  }
294 
295  // strip :
296  distbar = CaloDepthTool::deta(CaloCell_ID::EMB1,trketa,caloDDMgr);
297  distec = CaloDepthTool::deta(CaloCell_ID::EME1,trketa,caloDDMgr);
298 
299  ATH_MSG_DEBUG ( " TrackTo ...Strip : for eta= " << trketa << " dist to Barrel =" << distbar
300  << " to endcap =" << distec );
301  if (distbar < 0 ) sample = CaloCell_ID::EMB1;
302  else if (distec < 0 ) sample = CaloCell_ID::EME1;
303  else if ( distbar < distec) sample = CaloCell_ID::EMB1;
304  else sample = CaloCell_ID::EME1;
305  ATH_MSG_DEBUG ( " => will shoot in sample " << sample );
306 
308  pt_calo_ctb,pt_calo_local,trketa_at,trkphi_at);
309 
310  if (result) {
311  got_a_track=true;
312  x_ctb_1 = pt_calo_ctb->x();
313  y_ctb_1 = pt_calo_ctb->y();
314  z_ctb_1 = pt_calo_ctb->z();
315  etaCaloLocal_1 = pt_calo_local->eta();
316  phiCaloLocal_1 = pt_calo_local->phi();
317  trketa_at_1 = trketa_at;
318  trkphi_at_1 = trkphi_at;
319 
320  ATH_MSG_DEBUG ( "Extrapolation to EMB1 gives: "
321  << " etaCaloLocal=" << pt_calo_local->eta()
322  << " phiCaloLocal=" << pt_calo_local->phi() );
323  }
324 
325 
326  // middle :
327  distbar = CaloDepthTool::deta(CaloCell_ID::EMB2,trketa,caloDDMgr);
328  distec = CaloDepthTool::deta(CaloCell_ID::EME2,trketa,caloDDMgr);
329 
330  ATH_MSG_DEBUG ( " TrackTo ...Middle : for eta= " << trketa << " dist to Barrel =" << distbar
331  << " to endcap =" << distec );
332  if (distbar < 0 ) sample = CaloCell_ID::EMB2;
333  else if (distec < 0 ) sample = CaloCell_ID::EME2;
334  else if ( distbar < distec) sample = CaloCell_ID::EMB2;
335  else sample = CaloCell_ID::EME2;
336  ATH_MSG_DEBUG ( " => will shoot in sample " << sample );
337 
339  pt_calo_ctb,pt_calo_local,trketa_at,trkphi_at);
340 
341  if (result) {
342  got_a_track=true;
343  x_ctb_2 = pt_calo_ctb->x();
344  y_ctb_2 = pt_calo_ctb->y();
345  z_ctb_2 = pt_calo_ctb->z();
346  etaCaloLocal_2 = pt_calo_local->eta();
347  phiCaloLocal_2 = pt_calo_local->phi();
348  trketa_at_2 = trketa_at;
349  trkphi_at_2 = trkphi_at;
350 
351  ATH_MSG_DEBUG ( "Extrapolation to EMB2 gives: "
352  << " etaCaloLocal=" << pt_calo_local->eta()
353  << " phiCaloLocal=" << pt_calo_local->phi() );
354  }
355 
356  // Back :
357  //
358  // there is a real gap between 1.35 (end of EMB3) and 1.5 (start of EMEC3)
359  // => for TrackToCalo chooses the closest. One could choose to stay in
360  // barrel as long as not in endcap
361  // In both cases, m_calodepth will see that you are outside the accpetance and
362  // will use the backup solution (egparametrisation right now, rel 10.0.2).
363  //
364 
365  distbar = CaloDepthTool::deta(CaloCell_ID::EMB3,trketa,caloDDMgr);
366  distec = CaloDepthTool::deta(CaloCell_ID::EME3,trketa,caloDDMgr);
367 
368  ATH_MSG_DEBUG ( " TrackTo ...Back : for eta= " << trketa << " dist to Barrel =" << distbar
369  << " to endcap =" << distec );
370  if (distbar < 0 ) sample = CaloCell_ID::EMB3;
371  else if (distec < 0 ) sample = CaloCell_ID::EME3;
372  else if ( distbar < distec) sample = CaloCell_ID::EMB3;
373  else sample = CaloCell_ID::EME3;
374  ATH_MSG_DEBUG ( " => will shoot in sample " << sample );
375 
377  pt_calo_ctb,pt_calo_local,trketa_at,trkphi_at);
378 
379  if (result) {
380  got_a_track=true;
381  x_ctb_3 = pt_calo_ctb->x();
382  y_ctb_3 = pt_calo_ctb->y();
383  z_ctb_3 = pt_calo_ctb->z();
384  etaCaloLocal_3 = pt_calo_local->eta();
385  phiCaloLocal_3 = pt_calo_local->phi();
386  trketa_at_3 = trketa_at;
387  trkphi_at_3 = trkphi_at;
388 
389  ATH_MSG_DEBUG ( "Extrapolation to EMB3 gives: "
390  << " etaCaloLocal=" << pt_calo_local->eta()
391  << " phiCaloLocal=" << pt_calo_local->phi() );
392  }
393 
394  // Tile or HEC0 :
395  distbar = CaloDepthTool::deta(CaloCell_ID::TileBar0,trketa,caloDDMgr);
396  distec = CaloDepthTool::deta(CaloCell_ID::HEC0,trketa,caloDDMgr);
397 
398  ATH_MSG_DEBUG ( " TrackTo ...Tile : for eta= " << trketa << " dist to Barrel =" << distbar
399  << " to endcap =" << distec );
400  if (distbar < 0 ) sample = CaloCell_ID::TileBar0;
401  else if (distec < 0 ) sample = CaloCell_ID::HEC0;
402  else if ( distbar > distec && distec < 10. ) sample = CaloCell_ID::HEC0;
404  ATH_MSG_DEBUG ( " => will shoot in sample " << sample );
405 
407  pt_calo_ctb,pt_calo_local,trketa_at,trkphi_at);
408 
409  if (result) {
410  got_a_track=true;
411  x_ctb_tile = pt_calo_ctb->x();
412  y_ctb_tile = pt_calo_ctb->y();
413  z_ctb_tile = pt_calo_ctb->z();
414  etaCaloLocal_tile = pt_calo_local->eta();
415  phiCaloLocal_tile = pt_calo_local->phi();
416  trketa_at_tile = trketa_at;
417  trkphi_at_tile = trkphi_at;
418 
419  ATH_MSG_DEBUG ( "Extrapolation to TileBar0 gives: "
420  << " etaCaloLocal=" << pt_calo_local->eta()
421  << " phiCaloLocal=" << pt_calo_local->phi() );
422  }
423  }
424 
425  ImpactInCalo * imp= new ImpactInCalo(x_ctb_0, y_ctb_0, z_ctb_0, etaCaloLocal_0, phiCaloLocal_0, trketa_at_0, trkphi_at_0,
426  x_ctb_1, y_ctb_1, z_ctb_1, etaCaloLocal_1, phiCaloLocal_1, trketa_at_1, trkphi_at_1,
427  x_ctb_2, y_ctb_2, z_ctb_2, etaCaloLocal_2, phiCaloLocal_2, trketa_at_2, trkphi_at_2,
428  x_ctb_3, y_ctb_3, z_ctb_3, etaCaloLocal_3, phiCaloLocal_3, trketa_at_3, trkphi_at_3,
429  x_ctb_tile, y_ctb_tile, z_ctb_tile, etaCaloLocal_tile, phiCaloLocal_tile, trketa_at_tile, trkphi_at_tile);
430 
431  if(pt_calo_ctb) delete pt_calo_ctb;
432  if(pt_calo_local) delete pt_calo_local;
433 
434  return imp;
435 }

◆ initialize()

StatusCode TBTrackToCaloAlg::initialize ( )
overridevirtual

Definition at line 65 of file TBTrackToCaloAlg.cxx.

66 {
67  ATH_MSG_DEBUG ( "TBTrackToCaloAlg::initialize()" );
68 
69  ATH_CHECK(detStore()->retrieve(m_calo_id,"CaloCell_ID"));
70 
71  IAlgTool* algTool = 0;
72 
73  StatusCode sc = toolSvc()->retrieveTool("ExtrapolTrackToCaloTool", algTool,this);
74  //m_toCalo=dynamic_cast<IExtrapolTrackToCaloTool*>(algTool);
75  //m_toCalo=dynamic_cast<IExtrapolateToCaloTool*>(algTool);
76  m_toCalo=dynamic_cast<TBExtrapolTrackToCaloTool*>(algTool);
77  if(sc.isFailure() || !m_toCalo) {
78  ATH_MSG_ERROR ( "Cannot get ExtrapolTrackToCaloTool" );
79  return StatusCode::FAILURE;
80  }
81 
82  IAlgTool* tool = 0;
83  ATH_CHECK( toolSvc()->retrieveTool("TBCaloCoordinate", tool) );
84  m_calo_tb_coord = dynamic_cast<ICaloCoordinateTool*>(tool);
85 
86  // retrived via the Extrapolator to make sure that jobOpt setting is consistent.
88  if (!m_calodepth) {
89  ATH_MSG_ERROR ( "Cannot get CaloDepthTool" );
90  return StatusCode::FAILURE;
91  }
92 
93  ATH_MSG_INFO ( "TBTrackToCaloAlg initialisation OK" );
94  return StatusCode::SUCCESS;
95 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::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.

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< Algorithm >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

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

Definition at line 30 of file AthCommonMsg.h.

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

◆ operator=()

TBTrackToCaloAlg& TBTrackToCaloAlg::operator= ( const TBTrackToCaloAlg )
private

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::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.

◆ PrintBeamPosition()

void TBTrackToCaloAlg::PrintBeamPosition ( )

Definition at line 700 of file TBTrackToCaloAlg.cxx.

701 {
702  // Get the messaging service, print where you are
703  ATH_MSG_INFO ( "TBTrackToCaloAlg::PrintBeamPosition()" );
704 
705  ATH_MSG_INFO ( "Just a check... beam direction in calo : " );
707  Amg::Vector3D beam (1.,0.,0.);
709 }

◆ PrintCellsCrossed()

bool TBTrackToCaloAlg::PrintCellsCrossed ( )

Definition at line 632 of file TBTrackToCaloAlg.cxx.

633 {
634 
635  // Get the messaging service, print where you are
636  ATH_MSG_INFO ( "TBTrackToCaloAlg::PrintCellsCrossed()" );
637 
638  // Here we are :
640  int neta = 5;
641  int nphi = 5;
642 
643  // get tracks from TDS
644  if (m_TrackName == "") {
645  ATH_MSG_ERROR ("m_TrackName not set" );
646  return true;
647  }
648 
649  StatusCode sc = evtStore()->retrieve(m_tracks, m_TrackName);
650  if (sc.isFailure()){
651  ATH_MSG_ERROR ("Tracks not found: will only play with calo "
652  << m_TrackName );
653  }
654  else{
655  ATH_MSG_DEBUG ("Tracks found in StoreGate" );
656 
657  for (const Trk::Track* tr : *m_tracks) {
658 
659  const Trk::Perigee *aMeasPer=
660  dynamic_cast<const Trk::Perigee*>(tr->perigeeParameters());
661  if (aMeasPer==0){
662  ATH_MSG_ERROR ( "Could not get Trk::MeasuredPerigee" );
663  }
664  else {
665  double d0 = aMeasPer->parameters()[Trk::d0];
666  double z0 = aMeasPer->parameters()[Trk::z0];
667  double phi0 = aMeasPer->parameters()[Trk::phi0];
668  double theta = aMeasPer->parameters()[Trk::theta];
669  double qOverP = aMeasPer->parameters()[Trk::qOverP];
670  ATH_MSG_INFO ( " " );
671  ATH_MSG_INFO ( "Found a track: parameters are " << d0 << " "
672  << z0 << " " << phi0 << " " << theta << " " << qOverP );
673  }
674 
675  // Warning : if anything fails, CellsCrossedByTrack will
676  // simply return a null pointer
677  // if it works, it does a new CaloCellList
678  // ==> the client has to do the delete !!!!
679 
680  CaloCellList* my_list = CellsCrossedByTrack(tr, sam, neta, nphi);
681 
682  if (my_list) {
683 
684  for (const CaloCell* cell : *my_list)
685  ATH_MSG_INFO ( "found cell ! eta=" << cell->eta()
686  << " phi=" << cell->phi() << " energy=" << cell->energy() );
687 
688  delete my_list;
689 
690  }
691  else
692  ATH_MSG_ERROR (" :-( extrapolation did not work");
693  }
694  }
695 
696  return true;
697 }

◆ PrintImpact()

void TBTrackToCaloAlg::PrintImpact ( )

Definition at line 491 of file TBTrackToCaloAlg.cxx.

492 {
493  StatusCode sc;
494 
495  ATH_MSG_INFO ( " Method PrintImpacts : " );
496 
497  ATH_MSG_INFO ( " " );
498  ATH_MSG_INFO ( " Start with Impacts : " );
499 
500  const ImpactInCaloCollection* impact_collection;
501  sc=evtStore()->retrieve(impact_collection,m_ImpactInCalosOutputName);
502 
503  if(sc == StatusCode::SUCCESS ){
504 
505  for (const ImpactInCalo* impact : *impact_collection) {
506  const double impcosPhi = std::cos(impact->phiCaloLocal_1());
507  const double impeta = impact->etaCaloLocal_1();
508 
509  ATH_MSG_INFO ( "Found an impact in strips : parameters are eta = " << impeta
510  << " cosPhi = " << impcosPhi );
511 
512  //impact->print();
513  }
514  }
515  else {
516  ATH_MSG_ERROR ("ImpactInCalos not found"
518  }
519 
520  if (m_tracks) {
521 
522  ATH_MSG_INFO ( " " );
523  ATH_MSG_INFO (" Now loop on Trk::Track collection " );
524  ATH_MSG_INFO ( " " );
525 
526  for (const Trk::Track* tr : *m_tracks) {
527  const Trk::Perigee *aMeasPer=
528  dynamic_cast<const Trk::Perigee*>(tr->perigeeParameters());
529  if (aMeasPer==0){
530  ATH_MSG_ERROR ( "Could not get Trk::MeasuredPerigee" );
531  }
532  else {
533 
534  const double trkcosPhi = cos(aMeasPer->parameters()[Trk::phi]);
535  const double trketa = aMeasPer->eta();
536 
537  ATH_MSG_INFO ( "Found a Trk::Track : parameters are eta = " << trketa
538  << " cosPhi = " << trkcosPhi );
539  }
540  }
541  }
542 
543  if (m_particle) {
544 
545  ATH_MSG_INFO ( " " );
546  ATH_MSG_INFO (" Now loop on Trk::TrackParticle collection " );
547  ATH_MSG_INFO ( " " );
548 
550  itr != m_particle->end(); ++itr )
551  {
552  const Trk::Perigee *aMeasPer=
553  dynamic_cast<const Trk::Perigee*>(((*itr)->originalTrack())->perigeeParameters());
554  if (aMeasPer==0){
555  ATH_MSG_ERROR ( "Could not get TrkParticle::MeasuredPerigee" );
556  }
557  else {
558 
559  const double partcosPhi = cos(aMeasPer->parameters()[Trk::phi]);
560  const double parteta = aMeasPer->eta();
561 
562  ATH_MSG_INFO ( "Found a trackparticle : parameters are eta = " << parteta
563  << " cosPhi = " << partcosPhi );
564  }
565  }
566  }
567 }

◆ 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< Algorithm > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

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

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

StatusCode AthAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, PyAthena::Alg, and AthHistogramAlgorithm.

Definition at line 66 of file AthAlgorithm.cxx.

66  {
68 
69  if (sc.isFailure()) {
70  return sc;
71  }
72  ServiceHandle<ICondSvc> cs("CondSvc",name());
73  for (auto h : outputHandles()) {
74  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75  // do this inside the loop so we don't create the CondSvc until needed
76  if ( cs.retrieve().isFailure() ) {
77  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78  return StatusCode::SUCCESS;
79  }
80  if (cs->regHandle(this,*h).isFailure()) {
81  sc = StatusCode::FAILURE;
82  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83  << " with CondSvc");
84  }
85  }
86  }
87  return sc;
88 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Algorithm > >::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< Algorithm > >::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) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_calo_id

const CaloCell_ID* TBTrackToCaloAlg::m_calo_id
private

Definition at line 121 of file TBTrackToCaloAlg.h.

◆ m_calo_tb_coord

ICaloCoordinateTool* TBTrackToCaloAlg::m_calo_tb_coord
private

Definition at line 130 of file TBTrackToCaloAlg.h.

◆ m_calodepth

CaloDepthTool* TBTrackToCaloAlg::m_calodepth
private

Definition at line 126 of file TBTrackToCaloAlg.h.

◆ m_caloMgrKey

SG::ReadCondHandleKey<CaloDetDescrManager> TBTrackToCaloAlg::m_caloMgrKey {this,"CaloDetDescrManager", "CaloDetDescrManager"}
private

Definition at line 132 of file TBTrackToCaloAlg.h.

◆ m_cell_container

std::string TBTrackToCaloAlg::m_cell_container
private

Definition at line 120 of file TBTrackToCaloAlg.h.

◆ m_cluster_container

std::string TBTrackToCaloAlg::m_cluster_container
private

Definition at line 119 of file TBTrackToCaloAlg.h.

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_ImpactInCalosOutputName

std::string TBTrackToCaloAlg::m_ImpactInCalosOutputName
private

Definition at line 124 of file TBTrackToCaloAlg.h.

◆ m_particle

const Rec::TrackParticleContainer* TBTrackToCaloAlg::m_particle
private

Definition at line 115 of file TBTrackToCaloAlg.h.

◆ m_phiRange

CaloPhiRange TBTrackToCaloAlg::m_phiRange
private

Definition at line 127 of file TBTrackToCaloAlg.h.

◆ m_toCalo

TBExtrapolTrackToCaloTool* TBTrackToCaloAlg::m_toCalo
private

Definition at line 125 of file TBTrackToCaloAlg.h.

◆ m_TrackName

std::string TBTrackToCaloAlg::m_TrackName
private

Definition at line 112 of file TBTrackToCaloAlg.h.

◆ m_TrackParticleName

std::string TBTrackToCaloAlg::m_TrackParticleName
private

Definition at line 114 of file TBTrackToCaloAlg.h.

◆ m_tracks

const TrackCollection* TBTrackToCaloAlg::m_tracks
private

Definition at line 113 of file TBTrackToCaloAlg.h.

◆ m_trkinput

std::string TBTrackToCaloAlg::m_trkinput
private

Definition at line 116 of file TBTrackToCaloAlg.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
CaloDetDescrElement::deta
float deta() const
cell deta
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:356
TBTrackToCaloAlg::m_caloMgrKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Definition: TBTrackToCaloAlg.h:132
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
TBTrackToCaloAlg::m_ImpactInCalosOutputName
std::string m_ImpactInCalosOutputName
Definition: TBTrackToCaloAlg.h:124
ImpactInCaloCollection
Definition: ImpactInCaloCollection.h:13
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
get_generator_info.result
result
Definition: get_generator_info.py:21
CaloCellList
Definition: CaloCellList.h:40
constants.EMB1
int EMB1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:53
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
CaloCellList::select
void select(double eta, double phi, double deta, double dphi)
Definition: CaloCellList.cxx:67
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
TBExtrapolTrackToCaloTool::getCaloDepth
CaloDepthTool * getCaloDepth()
access to the private tool used to define the extrapolation depth, needed to play with delta-eta
Definition: TBExtrapolTrackToCaloTool.cxx:412
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
CaloClusterContainer
Storable container for CaloCluster.
Definition: Calorimeter/CaloEvent/CaloEvent/CaloClusterContainer.h:37
ImpactInCalo
The ImpactInCalo collection is created by the TrackToCaloAlg algorithm, which loops on all Tracks of ...
Definition: ImpactInCalo.h:33
InDetAccessor::phi0
@ phi0
Definition: InDetAccessor.h:33
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
theta
Scalar theta() const
theta method
Definition: AmgMatrixBasePlugin.h:75
CaloDetDescrManager_Base::get_element
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
Definition: CaloDetDescrManager.cxx:159
TBTrackToCaloAlg::m_TrackName
std::string m_TrackName
Definition: TBTrackToCaloAlg.h:112
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
ImpactInCalo::etaCaloLocal_2
double etaCaloLocal_2() const
Definition: ImpactInCalo.h:107
ParticleTest.tp
tp
Definition: ParticleTest.py:25
Trk::z0
@ z0
Definition: ParamDefs.h:64
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
InDetAccessor::qOverP
@ qOverP
perigee
Definition: InDetAccessor.h:35
TBTrackToCaloAlg::m_TrackParticleName
std::string m_TrackParticleName
Definition: TBTrackToCaloAlg.h:114
TBExtrapolTrackToCaloTool
This class takes a given TrkTrack, extrapolates it to the Calo and returns the variables needed to co...
Definition: TBExtrapolTrackToCaloTool.h:83
TBTrackToCaloAlg::m_toCalo
TBExtrapolTrackToCaloTool * m_toCalo
Definition: TBTrackToCaloAlg.h:125
TBExtrapolTrackToCaloTool::TrackSeenByCalo
bool TrackSeenByCalo(const Trk::Track *trk, const CaloCell_ID::CaloSample sample, const double offset, Amg::Vector3D *pt_ctb, Amg::Vector3D *pt_local)
The "do-it-all" method which combines the 3 steps.
Definition: TBExtrapolTrackToCaloTool.cxx:207
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
TBTrackToCaloAlg::m_trkinput
std::string m_trkinput
Definition: TBTrackToCaloAlg.h:116
TBTrackToCaloAlg::m_cell_container
std::string m_cell_container
Definition: TBTrackToCaloAlg.h:120
AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
TBTrackToCaloAlg::m_calo_id
const CaloCell_ID * m_calo_id
Definition: TBTrackToCaloAlg.h:121
AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
TBTrackToCaloAlg::m_calodepth
CaloDepthTool * m_calodepth
Definition: TBTrackToCaloAlg.h:126
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthAlgorithm.cxx:66
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
constants.EMB2
int EMB2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:54
FullCPAlgorithmsTest_eljob.sample
sample
Definition: FullCPAlgorithmsTest_eljob.py:116
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
CaloCell_ID_FCS::TileBar0
@ TileBar0
Definition: FastCaloSim_CaloCell_ID.h:31
Trk::theta
@ theta
Definition: ParamDefs.h:66
ICaloCoordinateTool::transform_ctb_to_calo
virtual Amg::Transform3D * transform_ctb_to_calo()=0
method accessing the transformations
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
TBTrackToCaloAlg::m_cluster_container
std::string m_cluster_container
Definition: TBTrackToCaloAlg.h:119
CaloCell_Base_ID::SUBCALO
SUBCALO
enumeration of sub calorimeters
Definition: CaloCell_Base_ID.h:46
TRT::Track::d0
@ d0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:62
constants.EME1
int EME1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:55
CaloCluster
Principal data class for CaloCell clusters.
Definition: Calorimeter/CaloEvent/CaloEvent/CaloCluster.h:79
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CaloDepthTool::deta
static double deta(const CaloCell_ID::SUBCALO subcalo, const int sampling_or_module, const bool barrel, const double eta, const CaloDetDescrManager *caloDD)
How far are you (in eta) from a given sample or - if you are in - how far are you from the edge ?
Definition: CaloDepthTool.cxx:142
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
Trk::ParametersBase
Definition: ParametersBase.h:55
TRT::Track::z0
@ z0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:63
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
ICaloCoordinateTool
This (clean) interface is implemented in the (rather dirty) ICaloCoordinateTool class,...
Definition: ICaloCoordinateTool.h:65
ImpactInCalo::phiCaloLocal_2
double phiCaloLocal_2() const
Definition: ImpactInCalo.h:108
jobOptions.beam
beam
Definition: jobOptions.SuperChic_ALP2.py:16
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
TBTrackToCaloAlg::m_tracks
const TrackCollection * m_tracks
Definition: TBTrackToCaloAlg.h:113
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
Trk::d0
@ d0
Definition: ParamDefs.h:63
CaloCell_ID_FCS::EME3
@ EME3
Definition: FastCaloSim_CaloCell_ID.h:26
Trk::perigeeParameters
@ perigeeParameters
Definition: MeasurementType.h:19
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:453
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
TBTrackToCaloAlg::CreateTrkImpactInCalo
bool CreateTrkImpactInCalo()
Definition: TBTrackToCaloAlg.cxx:133
TBTrackToCaloAlg::m_calo_tb_coord
ICaloCoordinateTool * m_calo_tb_coord
Definition: TBTrackToCaloAlg.h:130
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
CaloCellContainer
Container class for CaloCell.
Definition: CaloCellContainer.h:55
Rec::TrackParticle
Definition: Reconstruction/Particle/Particle/TrackParticle.h:47
CaloCell_ID_FCS::HEC0
@ HEC0
Definition: FastCaloSim_CaloCell_ID.h:27
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
CaloDetDescrElement::dphi
float dphi() const
cell dphi
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:358
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
a
TList * a
Definition: liststreamerinfos.cxx:10
h
CaloDetDescrManager
This class provides the client interface for accessing the detector description information common to...
Definition: CaloDetDescrManager.h:473
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
CaloCell_ID_FCS::PreSamplerE
@ PreSamplerE
Definition: FastCaloSim_CaloCell_ID.h:23
CaloCell_ID_FCS::PreSamplerB
@ PreSamplerB
Definition: FastCaloSim_CaloCell_ID.h:19
ICaloCoordinateTool::read_table_position
virtual void read_table_position()=0
clients who want the real position must call this
Trk::qOverP
@ qOverP
perigee
Definition: ParamDefs.h:67
CaloDetDescrManager_Base::decode_sample
static void decode_sample(CaloCell_ID::SUBCALO &subCalo, bool &barrel, int &sampling_or_module, CaloCell_ID::CaloSample sample)
translate between the 2 ways to label a sub-detector:
Definition: CaloDetDescrManager.cxx:1468
DetectorZone::barrel
@ barrel
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
Trk::phi
@ phi
Definition: ParamDefs.h:75
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
PowhegControl_ttFCNC_NLO.params
params
Definition: PowhegControl_ttFCNC_NLO.py:226
TBTrackToCaloAlg::CellsCrossedByTrack
CaloCellList * CellsCrossedByTrack(const Trk::Track *trk, const CaloCell_ID::CaloSample sam, int neta, int nphi)
Definition: TBTrackToCaloAlg.cxx:572
CaloCell_ID_FCS::EMB3
@ EMB3
Definition: FastCaloSim_CaloCell_ID.h:22
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
Trk::phi0
@ phi0
Definition: ParamDefs.h:65
constants.EME2
int EME2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:56
TBTrackToCaloAlg::m_particle
const Rec::TrackParticleContainer * m_particle
Definition: TBTrackToCaloAlg.h:115
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
fitman.k
k
Definition: fitman.py:528
TBTrackToCaloAlg::GetImpactsInCalo
ImpactInCalo * GetImpactsInCalo(const Trk::Track *track, bool &got_a_track)
Definition: TBTrackToCaloAlg.cxx:196
ServiceHandle< ICondSvc >