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 576 of file TBTrackToCaloAlg.cxx.

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

◆ CompareImpactWithCluster()

void TBTrackToCaloAlg::CompareImpactWithCluster ( )

Definition at line 445 of file TBTrackToCaloAlg.cxx.

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

◆ CreateTrkImpactInCalo()

bool TBTrackToCaloAlg::CreateTrkImpactInCalo ( )

Definition at line 137 of file TBTrackToCaloAlg.cxx.

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

◆ 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 102 of file TBTrackToCaloAlg.cxx.

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

◆ 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 128 of file TBTrackToCaloAlg.cxx.

129 {
130  ATH_MSG_DEBUG ( "TBTrackToCaloAlg::finalize()" );
131 
132  return StatusCode::SUCCESS;
133 }

◆ GetImpactsInCalo()

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

Definition at line 200 of file TBTrackToCaloAlg.cxx.

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

◆ 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  // General access to Tools :
72  IToolSvc* p_toolSvc = 0;
73  ATH_CHECK( service("ToolSvc", p_toolSvc) );
74 
75  IAlgTool* algTool = 0;
76 
77  StatusCode sc = p_toolSvc->retrieveTool("ExtrapolTrackToCaloTool", algTool,this);
78  //m_toCalo=dynamic_cast<IExtrapolTrackToCaloTool*>(algTool);
79  //m_toCalo=dynamic_cast<IExtrapolateToCaloTool*>(algTool);
80  m_toCalo=dynamic_cast<TBExtrapolTrackToCaloTool*>(algTool);
81  if(sc.isFailure() || !m_toCalo) {
82  ATH_MSG_ERROR ( "Cannot get ExtrapolTrackToCaloTool" );
83  return StatusCode::FAILURE;
84  }
85 
86  IAlgTool* tool = 0;
87  ATH_CHECK( p_toolSvc->retrieveTool("TBCaloCoordinate", tool) );
88  m_calo_tb_coord = dynamic_cast<ICaloCoordinateTool*>(tool);
89 
90  // retrived via the Extrapolator to make sure that jobOpt setting is consistent.
92  if (!m_calodepth) {
93  ATH_MSG_ERROR ( "Cannot get CaloDepthTool" );
94  return StatusCode::FAILURE;
95  }
96 
97  ATH_MSG_INFO ( "TBTrackToCaloAlg initialisation OK" );
98  return StatusCode::SUCCESS;
99 }

◆ 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 704 of file TBTrackToCaloAlg.cxx.

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

◆ PrintCellsCrossed()

bool TBTrackToCaloAlg::PrintCellsCrossed ( )

Definition at line 636 of file TBTrackToCaloAlg.cxx.

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

◆ PrintImpact()

void TBTrackToCaloAlg::PrintImpact ( )

Definition at line 495 of file TBTrackToCaloAlg.cxx.

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

◆ 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
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
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
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:79
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:71
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:70
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
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
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:100
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:72
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:195
Trk::d0
@ d0
Definition: ParamDefs.h:69
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:137
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:73
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:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
Trk::phi
@ phi
Definition: ParamDefs.h:81
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
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:576
CaloCell_ID_FCS::EMB3
@ EMB3
Definition: FastCaloSim_CaloCell_ID.h:22
GeV
#define GeV
Definition: CaloTransverseBalanceVecMon.cxx:30
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:71
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:200
ServiceHandle< ICondSvc >