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

#include <TrackTools.h>

Inheritance diagram for TrackTools:
Collaboration diagram for TrackTools:

Public Member Functions

 TrackTools (const std::string &type, const std::string &name, const IInterface *parent)
 
 ~TrackTools ()
 
StatusCode initialize ()
 
StatusCode finalize ()
 
void getCellsWithinConeAroundTrack (const xAOD::TrackParticle *track, const CaloCellContainer *input, ConstDataVector< CaloCellContainer > *output, double cone, bool includelar)
 
std::vector< double > getXYZEtaPhiInCellSampling (const TRACK *track, const CaloCell *cell)
 
std::vector< double > getXYZEtaPhiInCellSampling (const TRACK *track, CaloSampling::CaloSample sampling)
 
std::unique_ptr< const Trk::TrackParametersgetTrackInCellSampling (const TRACK *track, CaloSampling::CaloSample sampling)
 
std::vector< std::vector< double > > getXYZEtaPhiPerLayer (const TRACK *track)
 
std::vector< std::vector< double > > getXYZEtaPhiPerSampling (const TRACK *track)
 
double getPathInsideCell (const TRACK *track, const CaloCell *cell)
 
int retrieveIndex (int sampling, float eta)
 
bool trackIsolation (xAOD::TrackIsolation &result, const xAOD::TrackParticle &tp, const std::vector< xAOD::Iso::IsolationType > &cones)
 
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 sysInitialize () override
 Perform system initialization for an algorithm. 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
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

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

double getPath (const CaloCell *cell, const Trk::TrackParameters *entrance, const Trk::TrackParameters *exit)
 
 TrackTools (const TrackTools &)
 
TrackToolsoperator= (const TrackTools &)
 
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

ToolHandle< Trk::IParticleCaloExtensionToolm_caloExtensionTool
 Tool to make the step-wise extrapolation. More...
 
ToolHandle< Rec::IParticleCaloCellAssociationToolm_caloCellAssociationTool
 Tool to make the step-wise extrapolation. More...
 
ToolHandle< xAOD::ITrackIsolationToolm_trackIsolationTool
 
ToolHandle< xAOD::INeutralEFlowIsolationToolm_neutralEFlowIsolationTool
 
std::string m_cellContainerName
 
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

Definition at line 19 of file D3PDMaker/TileD3PDMaker/src/TrackTools.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TrackTools() [1/2]

TrackTools::TrackTools ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 17 of file D3PDMaker/TileD3PDMaker/src/TrackTools.cxx.

19  :
21 m_caloExtensionTool("Trk::ParticleCaloExtensionTool/ParticleCaloExtensionTool"),
22 m_caloCellAssociationTool("Rec::ParticleCaloCellAssociationTool/ParticleCaloCellAssociationTool"), //At the moment this tool is not needed
23 m_trackIsolationTool("TrackIsolationTool")
24 {
25 //============================================
26  // INTERFACING
27  declareInterface<ITrackTools>(this);
28 
29  declareProperty("TrackIsolationTool", m_trackIsolationTool );
30  declareProperty("ParticleCaloExtensionTool",m_caloExtensionTool );
31  declareProperty("ParticleCaloCellAssociationTool",m_caloCellAssociationTool ); //At the moment this tool is not needed
32 } // TRACKTOOLS::TRACKTOOLS

◆ ~TrackTools()

TrackTools::~TrackTools ( )

Definition at line 35 of file D3PDMaker/TileD3PDMaker/src/TrackTools.cxx.

35  {
36 //=======================
37 } // TRACKTOOLS::~TRACKTOOLS

◆ TrackTools() [2/2]

TrackTools::TrackTools ( const TrackTools )
private

Member Function Documentation

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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; }

◆ extraDeps_update_handler()

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

◆ finalize()

StatusCode TrackTools::finalize ( )

Definition at line 53 of file D3PDMaker/TileD3PDMaker/src/TrackTools.cxx.

53  {
54 //===============================
55  ATH_MSG_INFO( "Finalizing TrackTools" );
56  return StatusCode::SUCCESS;
57 } // TRACKTOOLS::FINALIZE

◆ getCellsWithinConeAroundTrack()

void TrackTools::getCellsWithinConeAroundTrack ( const xAOD::TrackParticle track,
const CaloCellContainer input,
ConstDataVector< CaloCellContainer > *  output,
double  cone,
bool  includelar 
)
virtual

Implements ITrackTools.

Definition at line 200 of file D3PDMaker/TileD3PDMaker/src/TrackTools.cxx.

204  {
205 //======================================================================
206  // CELLS WITHIN CONE AROUND TRACK
209  for(;icell!=end;++icell){
210  const CaloCell* cell = (*icell);
211  const CaloDetDescrElement* dde = cell->caloDDE();
212 
213  // REASONS TO SKIP THIS CELL OR BREAK THE LOOP
214  if(!dde) continue;
215  if(!includelar && dde->getSubCalo() == CaloCell_ID::LAREM) continue;
216  if(dde->getSubCalo() != CaloCell_ID::LAREM && dde->getSubCalo() != CaloCell_ID::TILE) continue;
217 
218  std::vector<double> coordinates = getXYZEtaPhiInCellSampling(track,dde->getSampling());
219  if(coordinates.size()!=5) continue;
220 
221  double deltaR = KinematicUtils::deltaR( cell->eta(),coordinates[3], cell->phi(),coordinates[4]);
222 
223  if(deltaR<=cone)
224  {
225  unsigned int i=0;
226  while(i!=output->size()){if(output->at(i)==cell){break;}i++;}
227  if(i==output->size())
228  {
229  output->push_back(cell);
230  }
231  }
232  } // FOR
233 } // TrackTools::getCellsWithinConeAroundTrack

◆ getPath()

double TrackTools::getPath ( const CaloCell cell,
const Trk::TrackParameters entrance,
const Trk::TrackParameters exit 
)
privatevirtual

Implements ITrackTools.

Definition at line 271 of file D3PDMaker/TileD3PDMaker/src/TrackTools.cxx.

271  {
272 //====================================================================================================================================
273  ATH_MSG_DEBUG("IN getPath...");
274 
275  // OBTAIN LAYER INDICES FOR LINEAR INTERPOLATION
276  unsigned int SampleID = cell->caloDDE()->getSampling();
277 
278  // OBTAIN TRACK AND CELL PARAMETERS
279  double pathl = 0.;
280  double Layer1X(exit->position().x()),Layer1Y(exit->position().y()),Layer1Z(exit->position().z());
281  double Layer2X(entrance->position().x()),Layer2Y(entrance->position().y()),Layer2Z(entrance->position().z());
282 
283  double CellPhi(cell->caloDDE()->phi()),CellDPhi(cell->caloDDE()->dphi());
284  double CellPhimin = CellPhi-CellDPhi/2.;
285  double CellPhimax = CellPhi+CellDPhi/2.;
286  double CellEta(cell->caloDDE()->eta());
287  double CellZ(cell->caloDDE()->z()),CellDZ(cell->caloDDE()->dz());
288  double CellZmin = CellZ-CellDZ/2.;
289  double CellZmax = CellZ+CellDZ/2.;
290  double CellR(cell->caloDDE()->r()),CellDR(cell->caloDDE()->dr());
291  double CellRmin = CellR-CellDR/2.;
292  double CellRmax = CellR+CellDR/2.;
293 
294  // TILECAL GEOMETRY
295  double RLBAmin = 2300;
296  double RLBAmax = 2600;
297  double RLBBmin = 2600;
298  double RLBBmax = 2990;
299  double RLBCmin = 2990;
300  double RLBCmax = 3440;
301  double RLBDmin = 3440;
302  double RLBDmax = 3820;
303 
304  double REBAmin = 2300;
305  double REBAmax = 2600;
306  double REBBmin = 2600;
307  double REBBmax = 3140;
308  double REBDmin = 3140;
309  double REBDmax = 3820;
310 
311  double RITC_D4_min = 3630 - 380./2.;
312  double RITC_C10_min = 3215 - 450./2.;
313  double RITC_E1_min = 2803 - 313./2.;
314  double RITC_E2_min = 2476 - 341./2.;
315  double RITC_E3_min = 2066 - 478./2.;
316  double RITC_E4_min = 1646 - 362./2.;
317 
318  double RITC_D4_max = 3630 + 380./2.;
319  double RITC_C10_max = 3215 + 450./2.;
320  double RITC_E1_max = 2803 + 313./2.;
321  double RITC_E2_max = 2476 + 341./2.;
322  double RITC_E3_max = 2066 + 478./2.;
323  double RITC_E4_max = 1646 + 362./2.;
324 
325  double ZITC_D4_a = 3405;
326  double ZITC_C10_a = 3511;
327  double ZITC_E1_a = 3552;
328  // double ZITC_E2_a = 3552;
329  double ZITC_E3_a = 3536;
330  // double ZITC_E4_a = 3536;
331 
332  double ZITC_D4_c = 3395;
333  double ZITC_C10_c = 3501;
334  double ZITC_E1_c = 3542;
335  // double ZITC_E2_c = 3542;
336  double ZITC_E3_c = 3526;
337  // double ZITC_E4_c = 3526;
338 
339  double ZDITC_D4 = 309.;
340  double ZDITC_C10 = 95.;
341  double ZDITC_E1 = 12.;
342  // double ZDITC_E2 = 12.;
343  double ZDITC_E3 = 6.;
344  // double ZDITC_E4 = 6.;
345 
346  double CellZB[9] = {141.495, 424.49, 707.485, 999.605, 1300.855, 1615.8, 1949., 2300.46, 2651.52};
347  double CellDZB[9] = {282.99, 283., 282.99, 301.25, 301.25, 328.64, 337.76, 365.16, 336.96};
348  double CellZC[9] = {159.755, 483.83, 812.465, 1150.23, 1497.125, 1857.71, 2241.12, 2628.695,0};
349  double CellDZC[9] = {319.51, 328.64, 328.63, 346.9, 346.89, 374.28, 392.54, 382.61,0};
350 
351  double CellXimp[2], CellYimp[2], CellZimp[2];
352  // double Sxz(0), Syz(0), Sxy(0);
353  double X(0), Y(0), Z(0), R(0), Phi(0);
354  double DeltaPhi;
355 
356  int etaInd(-1);
357 
358  float samplecellmap[81] = {
359  12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
360  13, 13, 13, 13, 13, 13, 13, 13, 13,
361  14, 14, 14, 14,
362  16, 15, 17, 17, 17, 17, //** ITC
363  18, 18, 18, 18, 18,
364  19, 19, 19, 19, 19,
365  20, 20,
366  12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
367  13, 13, 13, 13, 13, 13, 13, 13, 13,
368  14, 14, 14,
369  16, 15, 17, 17, 17, 17, //** ITC
370  18, 18, 18, 18, 18,
371  19, 19, 19, 19, 19,
372  20, 20
373  };
374  float etacellmap[81] = { 0.05,0.15,0.25,0.35,0.45,0.55,0.65,0.75,0.85,0.95,
375  0.05,0.15,0.25,0.35,0.45,0.55,0.65,0.75,0.85,
376  0.0, 0.2,0.4,0.6,
377  0.8579205,0.9583722,1.0589020,1.1593041,1.3098471,1.5103633,
378  1.1594202,1.2586680,1.3579534,1.4572804,1.556651,
379  1.0586925,1.1580252,1.2573844,1.3567756,1.4562022,
380  1.0074122,1.2063241,
381  -0.05,-0.15,-0.25,-0.35,-0.45,-0.55,-0.65,-0.75,-0.85,-0.95,
382  -0.05,-0.15,-0.25,-0.35,-0.45,-0.55,-0.65,-0.75,-0.85,
383  -0.2,-0.4,-0.6,
384  -0.855940, -0.956279, -1.056676, -1.156978,-1.307385,-1.507772,
385  -1.157065,-1.256501,-1.355965,-1.455460,-1.554988,
386  -1.056519,-1.156018,-1.255538,-1.355081,-1.454651,
387  -1.005559,-1.204743
388  };
389 
390  for(int i=0; i<81; i++){
391  if(SampleID==samplecellmap[i] && fabs(CellEta-etacellmap[i])<0.001) etaInd = i;
392  } // FOR
393 
394  // COMPUTE PATH
395  bool compute = true;
396  int lBC(0);
397  while(compute){
398  if(lBC==1 && (etaInd==18 || etaInd==59) ) break;
399  int Np = 0;
400  if(sqrt((Layer1X-Layer2X)*(Layer1X-Layer2X)+(Layer1Y-Layer2Y)*(Layer1Y-Layer2Y)) < 3818.5){
401  if(SampleID == 15){
402  CellRmin = RITC_C10_min;
403  CellRmax = RITC_C10_max;
404  if(CellEta > 0){
405  if(CellZmin < ZITC_C10_a-ZDITC_C10/2.) CellZmin = ZITC_C10_a-ZDITC_C10/2.;
406  if(CellZmax > ZITC_C10_a+ZDITC_C10/2.) CellZmax = ZITC_C10_a+ZDITC_C10/2.;
407  } // IF
408  else if(CellEta < 0){
409  if(CellZmin < -ZITC_C10_c-ZDITC_C10/2.) CellZmin = -ZITC_C10_c-ZDITC_C10/2.;
410  if(CellZmax > -ZITC_C10_c+ZDITC_C10/2.) CellZmax = -ZITC_C10_c+ZDITC_C10/2.;
411  } // ELSE IF
412  } // IF
413  else if(SampleID == 16){
414  CellRmin=RITC_D4_min;
415  CellRmax=RITC_D4_max;
416  if(CellEta > 0){
417  if(CellZmin < ZITC_D4_a-ZDITC_D4/2.) CellZmin = ZITC_D4_a-ZDITC_D4/2.;
418  if(CellZmax > ZITC_D4_a+ZDITC_D4/2.) CellZmax = ZITC_D4_a+ZDITC_D4/2.;
419  } // IF
420  else if(CellEta < 0){
421  if(CellZmin < -ZITC_D4_c-ZDITC_D4/2.) CellZmin = -ZITC_D4_c-ZDITC_D4/2.;
422  if(CellZmax > -ZITC_D4_c+ZDITC_D4/2.) CellZmax = -ZITC_D4_c+ZDITC_D4/2.;
423  } // ELSE IF
424  } // ELSE IF
425  else if(SampleID == 17){
426  if( etaInd==25 || etaInd==65 ){
427  CellRmax = RITC_E1_max;
428  CellRmin = RITC_E1_min;
429  } // IF
430  else if( etaInd==26 || etaInd==66 ){
431  CellRmax = RITC_E2_max;
432  CellRmin = RITC_E2_min;
433  } // ELSE IF
434  else if( etaInd==27 || etaInd==67 ){
435  CellRmax = RITC_E3_max;
436  CellRmin = RITC_E3_min;
437  } // ELSE IF
438  else if( etaInd==28 || etaInd==68 ){
439  CellRmax = RITC_E4_max;
440  CellRmin = RITC_E4_min;
441  } // ELSE IF
442  if( (etaInd>=25 && etaInd<=26) || (etaInd>=65 && etaInd<=66) ){
443  if(CellEta > 0){
444  if(CellZmin < ZITC_E1_a-ZDITC_E1/2.) CellZmin=ZITC_E1_a-ZDITC_E1/2.;
445  if(CellZmax > ZITC_E1_a+ZDITC_E1/2.) CellZmax=ZITC_E1_a+ZDITC_E1/2.;
446  } // IF
447  else if(CellEta < 0){
448  if(CellZmin < -ZITC_E1_c-ZDITC_E1/2.) CellZmin= -ZITC_E1_c-ZDITC_E1/2.;
449  if(CellZmax > -ZITC_E1_c+ZDITC_E1/2.) CellZmax= -ZITC_E1_c+ZDITC_E1/2.;
450  } // ELSE
451  } // IF
452  else if( (etaInd>=27 && etaInd<=28) || (etaInd>=67 && etaInd<=68) ){
453  if(CellEta > 0){
454  if(CellZmin < ZITC_E3_a-ZDITC_E3/2.) CellZmin=ZITC_E3_a-ZDITC_E3/2.;
455  if(CellZmax > ZITC_E3_a+ZDITC_E3/2.) CellZmax=ZITC_E3_a+ZDITC_E3/2.;
456  } // IF
457  else if(CellEta < 0){
458  if(CellZmin < -ZITC_E3_c-ZDITC_E3/2.) CellZmin= -ZITC_E3_c-ZDITC_E3/2.;
459  if(CellZmax > -ZITC_E3_c+ZDITC_E3/2.) CellZmax= -ZITC_E3_c+ZDITC_E3/2.;
460  } // ELSE IF
461  } // ELSE
462  } // ELSE IF
463  else if(SampleID == 12){
464  CellRmin = RLBAmin;
465  CellRmax = RLBAmax;
466 
467  if(CellZmin <-2802.5439) CellZmin=-2802.5439;
468  if(CellZmax > 2802.5454) CellZmax=2802.5454;
469  } // ELSE IF
470  else if(SampleID == 13 && lBC == 0){
471  CellRmin = RLBBmin;
472  CellRmax = RLBBmax;
473  int cpos = fabs(CellEta)/0.1;
474  CellZ = CellZB[cpos];
475  if(CellEta < 0) CellZ=-CellZ;
476  CellDZ = CellDZB[cpos];
477  CellZmin = CellZ-CellDZ/2;
478  CellZmax = CellZ+CellDZ/2;
479  if(CellZmin <-2802.5439) CellZmin=-2802.5439;
480  if(CellZmax > 2802.5454) CellZmax=2802.5454;
481  } // ELSE IF
482  else if(SampleID == 13 && lBC == 1){
483  CellRmin = RLBCmin;
484  CellRmax = RLBCmax;
485  int cpos = fabs(CellEta)/0.1;
486  if(cpos >= 8) return 0;
487  CellZ = CellZC[cpos];
488  if(CellEta < 0) CellZ=-CellZ;
489  CellDZ = CellDZC[cpos];
490  CellZmin = CellZ-CellDZ/2;
491  CellZmax = CellZ+CellDZ/2;
492  if(CellZmin <-2802.5439) CellZmin=-2802.5439;
493  if(CellZmax >2802.5454) CellZmax=2802.5454;
494  } // ELSE IF
495  else if(SampleID == 14){
496  CellRmin = RLBDmin;
497  CellRmax = RLBDmax;
498  if(CellZmin <-2802.5439) CellZmin=-2802.5439;
499  if(CellZmax >2802.5454) CellZmax=2802.5454;
500  } // ELSE IF
501  if(SampleID == 18){
502  CellRmin = REBAmin;
503  CellRmax = REBAmax;
504  if(CellEta > 0){
505  if(CellZmin <3574.5027) CellZmin=3574.4978;
506  if(CellZmax >6130.0039) CellZmax=6130.0039;
507  } // IF
508  else if(CellEta < 0){
509  if(CellZmin <-6120.0018) CellZmin=-6120.0018;
510  if(CellZmax >-3564.5006) CellZmax=-3564.5006;
511  } // IF
512  } // IF
513  if(SampleID == 19){
514  CellRmin = REBBmin;
515  CellRmax = REBBmax;
516  if(CellEta > 0){
517  if(CellZmin <3574.5027) CellZmin=3574.4978;
518  if(CellZmax >6130.0039) CellZmax=6130.0039;
519  } // IF
520  else if(CellEta < 0){
521  if(CellZmin <-6120.0018) CellZmin=-6120.0018;
522  if(CellZmax >-3564.5006) CellZmax=-3564.5006;
523  } // ELSE IF
524  } // IF
525  if(SampleID == 20){
526  CellRmin = REBDmin;
527  CellRmax = REBDmax;
528  if(CellEta > 0){
529  if(CellZmin <3574.5027) CellZmin=3574.4978;
530  if(CellZmax >6130.0039) CellZmax=6130.0039;
531  } // IF
532  else if(CellEta < 0){
533  if(CellZmin <-6120.0018) CellZmin=-6120.0018;
534  if(CellZmax >-3564.5006) CellZmax=-3564.5006;
535  } // ELSE IF
536  } // IF
537 
538  // CALCULATE POINTS OF INTERSECTION
539  // INTERSECTIONS R PLANES
540  double Radius(CellRmin);
541 
542  double x0int(exit->position().x()), x1int(entrance->position().x()),
543  y0int(exit->position().y()), y1int(entrance->position().y()),
544  z0int(exit->position().z()), z1int(entrance->position().z());
545  double S((y1int-y0int)/(x1int-x0int));
546  double a(1+S*S), b(2*S*y0int-2*S*S*x0int), c(y0int*y0int-Radius*Radius+S*S*x0int*x0int-2*y0int*S*x0int);
547  double x1((-b+sqrt(b*b-4*a*c))/(2*a)), x2((-b-sqrt(b*b-4*a*c))/(2*a));
548  double y1(y0int+S*(x1-x0int)), y2(y0int+S*(x2-x0int));
549  double S1 = ((z1int-z0int)/(x1int-x0int));//, R1(sqrt(x1*x1+y1*y1)), R2(sqrt(x2*x2+y2*y2));
550  double z1(z0int+S1*(x1-x0int)), z2(z0int+S1*(x2-x0int));
551 
552  X = x1;
553  Y = y1;
554  Z = z1;
555 
556  if( ((x1-x0int)*(x1-x0int)+(y1-y0int)*(y1-y0int)+(z1-z0int)*(z1-z0int)) >
557  ((x2-x0int)*(x2-x0int)+(y2-y0int)*(y2-y0int)+(z2-z0int)*(z2-z0int)) ){
558  X=x2;
559  Y=y2;
560  Z=z2;
561  } // IF
562 
563  Phi = acos(X/sqrt(X*X+Y*Y));
564  if(Y <= 0) Phi = -Phi;
565  R = CellRmin;
566 
567  if(Z>=CellZmin && Z<=CellZmax && Phi>=CellPhimin && Phi<=CellPhimax){
568  CellXimp[Np]=X;
569  CellYimp[Np]=Y;
570  CellZimp[Np]=Z;
571  Np=Np+1;
572 
573  } // IF
574 
575  Radius = CellRmax;
576 
577  c = y0int*y0int-Radius*Radius+S*S*x0int*x0int-2*y0int*S*x0int;
578  x1 = ((-b+sqrt(b*b-4*a*c))/(2*a));
579  x2 = ((-b-sqrt(b*b-4*a*c))/(2*a));
580  y1 = (y0int+S*(x1-x0int));
581  y2 = (y0int+S*(x2-x0int));
582  z1 = (z0int+S1*(x1-x0int));
583  z2 = (z0int+S1*(x2-x0int));
584  S1 = ((z1int-z0int)/(x1int-x0int));
585 
586  X = x1;
587  Y = y1;
588  Z = z1;
589 
590  if( ((x1-x0int)*(x1-x0int)+(y1-y0int)*(y1-y0int)+(z1-z0int)*(z1-z0int)) >
591  ((x2-x0int)*(x2-x0int)+(y2-y0int)*(y2-y0int)+(z2-z0int)*(z2-z0int)) ){
592  X = x2;
593  Y = y2;
594  Z = z2;
595  } // IF
596 
597  Phi=std::acos(X/sqrt(X*X+Y*Y));
598  if (Y <= 0) Phi=-Phi;
599  R=CellRmax;
600 
601  if(Z>=CellZmin && Z<=CellZmax && Phi>=CellPhimin && Phi<=CellPhimax){
602  CellXimp[Np]=X; CellYimp[Np]=Y; CellZimp[Np]=Z;
603  Np=Np+1;
604 
605  } // IF
606 
607  // INTERSECTIONS Z PLANES
608  if(Np < 2){
609  double Sxz = (Layer2X-Layer1X)/(Layer2Z-Layer1Z);
610  double Syz = (Layer2Y-Layer1Y)/(Layer2Z-Layer1Z);
611  Z = CellZmin;
612  X = Layer1X+Sxz*(Z-Layer1Z);
613  Y = Layer1Y+Syz*(Z-Layer1Z);
614  R = sqrt(X*X+Y*Y);
615  Phi = std::acos(X/R);
616  if(Y <= 0) Phi=-Phi;
617  if(R>=CellRmin && R<=CellRmax && Phi>=CellPhimin && Phi<=CellPhimax){
618  CellXimp[Np]=X; CellYimp[Np]=Y; CellZimp[Np]=Z;
619  Np=Np+1;
620 
621  } // IF
622  } // IF
623 
624  if(Np < 2){
625  double Sxz = (Layer2X-Layer1X)/(Layer2Z-Layer1Z);
626  double Syz = (Layer2Y-Layer1Y)/(Layer2Z-Layer1Z);
627  Z = CellZmax;
628  X = Layer1X+Sxz*(Z-Layer1Z);
629  Y = Layer1Y+Syz*(Z-Layer1Z);
630  R = sqrt(X*X+Y*Y);
631  Phi = std::acos(X/R);
632  if(Y <= 0) Phi=-Phi;
633  if(R>=CellRmin && R<=CellRmax && Phi>=CellPhimin && Phi<=CellPhimax){
634  CellXimp[Np]=X; CellYimp[Np]=Y; CellZimp[Np]=Z;
635  Np=Np+1;
636 
637  } // IF
638  } // IF
639 
640  // INTERSECTIONS PHI PLANES
641  if(Np < 2){
642  double Sxy=(Layer2X-Layer1X)/(Layer2Y-Layer1Y);
643  double Sxz=(Layer2X-Layer1X)/(Layer2Z-Layer1Z);
644  X = (Layer1X-Sxy*Layer1Y)/(1-Sxy*tan(CellPhimin));
645  Y = X*std::tan(CellPhimin);
646  Z = Layer1Z+(1/Sxz)*(X-Layer1X);
647  R = sqrt(X*X+Y*Y);
648  Phi = std::acos(X/R);
649  if(Y <= 0) Phi=-Phi;
650  DeltaPhi=fabs(Phi-CellPhimin);
651  if(DeltaPhi > 3.141593) DeltaPhi=fabs(Phi+CellPhimin);
652  if(R>=CellRmin && R<=CellRmax && Z>=CellZmin && Z<=CellZmax && DeltaPhi<0.0001){
653  CellXimp[Np]=X; CellYimp[Np]=Y; CellZimp[Np]=Z;
654  Np=Np+1;
655  } // IF
656  } // IF
657  if(Np < 2){
658  double Sxy=(Layer2X-Layer1X)/(Layer2Y-Layer1Y);
659  double Sxz=(Layer2X-Layer1X)/(Layer2Z-Layer1Z);
660  X = (Layer1X-Sxy*Layer1Y)/(1-Sxy*tan(CellPhimax));
661  Y = X*std::tan(CellPhimax);
662  Z = Layer1Z+(1/Sxz)*(X-Layer1X);
663  R = sqrt(X*X+Y*Y);
664  Phi=acos(X/R);
665  if(Y <= 0) Phi=-Phi;
666  DeltaPhi=fabs(Phi-CellPhimax);
667  if(DeltaPhi > 3.141593) DeltaPhi=fabs(Phi+CellPhimax);
668  if(R>=CellRmin && R<=CellRmax && Z>=CellZmin && Z<=CellZmax && DeltaPhi<0.0001){
669  CellXimp[Np]=X; CellYimp[Np]=Y; CellZimp[Np]=Z;
670  Np=Np+1;
671  } // IF
672  } // IF
673 
674  // CALCULATE PATH IF TWO INTERSECTIONS WERE FOUND
675  if(Np == 2){
676 
677  pathl += sqrt( (CellXimp[0]-CellXimp[1])*(CellXimp[0]-CellXimp[1]) +
678  (CellYimp[0]-CellYimp[1])*(CellYimp[0]-CellYimp[1]) +
679  (CellZimp[0]-CellZimp[1])*(CellZimp[0]-CellZimp[1]) );
680  } // IF
681  } // IF
682  if(SampleID == 13 && lBC == 0) ++lBC;
683  else compute = false;
684  } // WHILE (FOR LBBC LAYER)
685 
686  return pathl;
687 } // TrackTools::getPath

◆ getPathInsideCell()

double TrackTools::getPathInsideCell ( const TRACK track,
const CaloCell cell 
)
virtual

Implements ITrackTools.

Definition at line 236 of file D3PDMaker/TileD3PDMaker/src/TrackTools.cxx.

236  {
237 //======================================================================================
238 
239  ATH_MSG_DEBUG("in TrackInCaloTools::getPathInsideCell" );
240 
241  // GET CELL DESCRIPTOR AND SAMPLING
242  const CaloDetDescrElement* dde = cell->caloDDE();
243  if(!dde) return 0.;
244  int sampling = dde->getSampling();
245  int sampling_entrance = 0;
246  int sampling_exit = 0;
247  switch(sampling){
248  case 12: sampling_entrance = 12; sampling_exit = 14; break;
249  case 13: sampling_entrance = 12; sampling_exit = 14; break;
250  case 14: sampling_entrance = 12; sampling_exit = 14; break;
251  case 15: sampling_entrance = 13; sampling_exit = 14; break;
252  case 16: sampling_entrance = 12; sampling_exit = 13; break;
253  case 17: sampling_entrance = 17; sampling_exit = 19; break;
254  case 18: sampling_entrance = 18; sampling_exit = 20; break;
255  case 19: sampling_entrance = 18; sampling_exit = 20; break;
256  case 20: sampling_entrance = 18; sampling_exit = 20; break;
257  default: return 0.;
258  } // SWITCH
259 
260  std::unique_ptr<const Trk::TrackParameters> pars_entrance =
262  std::unique_ptr<const Trk::TrackParameters> pars_exit =
264 
265  if( !pars_entrance || !pars_exit ) return 0.;
266 
267  return getPath(cell, pars_entrance.get(), pars_exit.get());
268 } // TrackTools::getPathInsideCell

◆ getTrackInCellSampling()

std::unique_ptr< const Trk::TrackParameters > TrackTools::getTrackInCellSampling ( const TRACK track,
CaloSampling::CaloSample  sampling 
)
virtual

Implements ITrackTools.

Definition at line 60 of file D3PDMaker/TileD3PDMaker/src/TrackTools.cxx.

60  {
61 //==================================================================================================
62  if( !m_caloExtensionTool.empty() ){
63  std::unique_ptr<Trk::CaloExtension> extension =
64  m_caloExtensionTool->caloExtension(Gaudi::Hive::currentContext(), *track);
65  if (!extension)
66  return nullptr;
67 
68  Trk::TrackParametersIdHelper parsIdHelper;
69 
70  std::map<CaloSampling::CaloSample,const Trk::CurvilinearParameters*> Samplings;
71 
72  // loop over calo layers, keep track of previous layer
73  auto cur = extension->caloLayerIntersections().begin();
74  auto prev = cur;
75  for( ; cur != extension->caloLayerIntersections().end() ; ++cur ){
76  // check that prev and cur are not the same, if not fill if the previous was an entry layer
77  if( prev != cur && parsIdHelper.isEntryToVolume((*prev).cIdentifier()) )
78  {
79  TrackParametersIdentifier id = (*prev).cIdentifier();
80  CaloSampling::CaloSample sample = parsIdHelper.caloSample(id);
81  Samplings[sample] = &(*prev);
82  }
83  prev=cur;
84  }
85  if(!Samplings[sampling]) {return nullptr ;}
86  else {return std::make_unique<const Trk::CurvilinearParameters> (*(Samplings[sampling]));}
87  }
88  return nullptr;
89 }

◆ getXYZEtaPhiInCellSampling() [1/2]

std::vector< double > TrackTools::getXYZEtaPhiInCellSampling ( const TRACK track,
CaloSampling::CaloSample  sampling 
)
virtual

Implements ITrackTools.

Definition at line 92 of file D3PDMaker/TileD3PDMaker/src/TrackTools.cxx.

92  {
93 //==================================================================================================
94  std::vector<double> coordinates;
95  if( !m_caloExtensionTool.empty() ){
96  std::unique_ptr<Trk::CaloExtension> extension =
97  m_caloExtensionTool->caloExtension(Gaudi::Hive::currentContext(), *track);
98  if (!extension)
99  return coordinates;
100 
101  Trk::TrackParametersIdHelper parsIdHelper;
102 
103  std::map<CaloSampling::CaloSample,const Trk::TrackParameters*> Samplings;
104 
105  // loop over calo layers, keep track of previous layer
106  auto cur = extension->caloLayerIntersections().begin();
107  auto prev = cur;
108  for( ; cur != extension->caloLayerIntersections().end() ; ++cur ){
109  // check that prev and cur are not the same, if not fill if the previous was an entry layer
110  if( prev != cur && parsIdHelper.isEntryToVolume((*prev).cIdentifier()) )
111  {
112  TrackParametersIdentifier id = (*prev).cIdentifier();
113  CaloSampling::CaloSample sample = parsIdHelper.caloSample(id);
114  Samplings[sample] = &(*prev);
115  }
116  prev=cur;
117  }
118  if(!(Samplings[sampling])) return coordinates;
119  coordinates.push_back(Samplings[sampling]->position().x());
120  coordinates.push_back(Samplings[sampling]->position().y());
121  coordinates.push_back(Samplings[sampling]->position().z());
122  coordinates.push_back(Samplings[sampling]->position().eta());
123  coordinates.push_back(Samplings[sampling]->position().phi());
124  }
125  return coordinates;
126 } // getXYZEtaPhiInCellSampling

◆ getXYZEtaPhiInCellSampling() [2/2]

std::vector< double > TrackTools::getXYZEtaPhiInCellSampling ( const TRACK track,
const CaloCell cell 
)
virtual

Implements ITrackTools.

Definition at line 130 of file D3PDMaker/TileD3PDMaker/src/TrackTools.cxx.

130  {
131 //==========================================================================================================
132  std::vector<double> coordinates;
133 
134  if(!cell || !track) return coordinates;
135  // GET CELL DESCRIPTOR AND SAMPLING
136  const CaloDetDescrElement* dde = cell->caloDDE();
137  if(!dde) return coordinates;
138  CaloSampling::CaloSample sampling = dde->getSampling();
139 
140  return getXYZEtaPhiInCellSampling(track,sampling);
141 } // getXYZEtaPhiInCellSampling

◆ getXYZEtaPhiPerLayer()

std::vector< std::vector< double > > TrackTools::getXYZEtaPhiPerLayer ( const TRACK track)
virtual

Implements ITrackTools.

Definition at line 145 of file D3PDMaker/TileD3PDMaker/src/TrackTools.cxx.

145  {
146 //====================================================================================================
147  std::vector< std::vector<double> > coordinates(11);
148 
149  for(unsigned int sample=0 ; sample<21; ++sample) //Samplings:http://acode-browser.usatlas.bnl.gov/lxr/source/atlas/Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.def
150  {
151  std::vector<double> TrkPars(5);
152  std::vector<double> XYZEtaPhi = getXYZEtaPhiInCellSampling( track, (CaloSampling::CaloSample)sample );
153  TrkPars[0] = ( XYZEtaPhi.size()!=5 ) ? -9999. : XYZEtaPhi[0] ;
154  TrkPars[1] = ( XYZEtaPhi.size()!=5 ) ? -9999. : XYZEtaPhi[1] ;
155  TrkPars[2] = ( XYZEtaPhi.size()!=5 ) ? -9999. : XYZEtaPhi[2] ;
156  TrkPars[3] = ( XYZEtaPhi.size()!=5 ) ? -9999. : XYZEtaPhi[3] ;
157  TrkPars[4] = ( XYZEtaPhi.size()!=5 ) ? -9999. : XYZEtaPhi[4] ;
158  int lay=-1;
159  if (sample==0 || sample==4 ){lay=0;}
160  else if(sample==1 || sample==5 ){lay=1;}
161  else if(sample==2 || sample==6 ){lay=2;}
162  else if(sample==3 || sample==7 ){lay=3;}
163  else if(sample==12 || sample==18){lay=4;}
164  else if(sample==13 || sample==19){lay=5;}
165  else if(sample==15 || sample==17){lay=5;}
166  else if(sample==14 || sample==20){lay=6;}
167  else if(sample==16) {lay=6;}
168  else if(sample==8 ){lay=7;}
169  else if(sample==9 ){lay=8;}
170  else if(sample==10 ){lay=9;}
171  else if(sample==11 ){lay=10;}
172  if(lay!=-1) coordinates[lay] = TrkPars;
173  } // FOR
174 
175  return coordinates;
176 } // TrackTools::getXYZEtaPhiPerLayer

◆ getXYZEtaPhiPerSampling()

std::vector< std::vector< double > > TrackTools::getXYZEtaPhiPerSampling ( const TRACK track)
virtual

Implements ITrackTools.

Definition at line 179 of file D3PDMaker/TileD3PDMaker/src/TrackTools.cxx.

179  {
180 //====================================================================================================
181  std::vector< std::vector<double> > coordinates;
182 
183  for(unsigned int s=0 ; s<21; ++s) //Samplings: http://acode-browser.usatlas.bnl.gov/lxr/source/atlas/Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.def
184  {
185  std::vector<double> TrkPars(5);
186  std::vector<double> XYZEtaPhi = getXYZEtaPhiInCellSampling( track, (CaloSampling::CaloSample)s );
187  TrkPars[0] = ( XYZEtaPhi.size()!=5 ) ? -9999. : XYZEtaPhi[0] ;
188  TrkPars[1] = ( XYZEtaPhi.size()!=5 ) ? -9999. : XYZEtaPhi[1] ;
189  TrkPars[2] = ( XYZEtaPhi.size()!=5 ) ? -9999. : XYZEtaPhi[2] ;
190  TrkPars[3] = ( XYZEtaPhi.size()!=5 ) ? -9999. : XYZEtaPhi[3] ;
191  TrkPars[4] = ( XYZEtaPhi.size()!=5 ) ? -9999. : XYZEtaPhi[4] ;
192  coordinates.push_back(TrkPars);
193  } // FOR
194 
195  return coordinates;
196 } // TrackTools::getXYZEtaPhiPerSampling

◆ initialize()

StatusCode TrackTools::initialize ( )

Definition at line 40 of file D3PDMaker/TileD3PDMaker/src/TrackTools.cxx.

40  {
41 //=================================
42 
43  ATH_MSG_INFO( "Initializing TrackTools" );
44 
45  ATH_CHECK(m_caloExtensionTool.retrieve());
46  ATH_CHECK(m_caloCellAssociationTool.retrieve()); //At the moment this tool is not needed
47  ATH_CHECK(m_trackIsolationTool.retrieve());
48 
49  return StatusCode::SUCCESS;
50 } // TrackTools::initialize

◆ inputHandles()

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

◆ interfaceID()

static const InterfaceID& ITrackTools::interfaceID ( )
inlinestaticinherited

Definition at line 131 of file D3PDMaker/TileD3PDMaker/src/ITrackTools.h.

131 { return IID_ITrackTools; };

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::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< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

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

◆ operator=()

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

◆ outputHandles()

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

◆ 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< AlgTool > >::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< AlgTool > >::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  }

◆ retrieveIndex()

int TrackTools::retrieveIndex ( int  sampling,
float  eta 
)
virtual

Implements ITrackTools.

Definition at line 690 of file D3PDMaker/TileD3PDMaker/src/TrackTools.cxx.

690  {
691 //====================================================
692  // STORE ETA MAP
693  float etamap[81] = { -0.95,-0.85,-0.75,-0.65,-0.55,-0.45,-0.35,-0.25,-0.15,-0.05, // CELLS A-10 TO A-1 (SAMPLING 12) INDICES 0:9
694  0.05, 0.15, 0.25, 0.35, 0.45, 0.55, 0.65, 0.75, 0.85, 0.95, // CELLS A1 TO A10 (SAMPLING 12) INDICES 10:19
695  -0.85,-0.75,-0.65,-0.55,-0.45,-0.35,-0.25,-0.15,-0.05, // CELLS BC-9 TO BC-1 (SAMPLING 13) INDICES 20:28
696  0.05, 0.15, 0.25, 0.35, 0.45, 0.55, 0.65, 0.75, 0.85, // CELLS BC1 TO BC9 (SAMPLING 13) INDICES 29:37
697  -0.60,-0.40,-0.20, // CELLS D-3 TO D-1 (SAMPLING 14) INDICES 38:40
698  0.00, 0.20, 0.40, 0.60, // CELLS D0 TO D3 (SAMPLING 14) INDICES 41:44
699  -0.956279,0.9583722, // CELLS C-10 TO C10 (SAMPLING 15) INDICES 45:46
700  -0.855940,0.8579205, // CELLS D-4 TO D4 (SAMPLING 16) INDICES 47:48
701  -1.507772,-1.307385,-1.156978,-1.056676, // CELLS E-4 TO E-1 (SAMPLING 17) INDICES 49:52
702  1.0589020,1.1593041,1.3098471,1.5103633, // CELLS E1 TO E4 (SAMPLING 17) INDICES 53:56
703  -1.554988,-1.455460,-1.355965,-1.256501,-1.157065, // CELLS A-16 TO A-12 (SAMPLING 18) INDICES 57:61
704  1.1594202,1.258668,1.3579534,1.4572804,1.5566510, // CELLS A12 TO A16 (SAMPLING 18) INDICES 62:66
705  -1.454651,-1.355081,-1.255538,-1.156018,-1.056519, // CELLS B-15 TO B-11 (SAMPLING 19) INDICES 67:71
706  1.0586925,1.1580252,1.2573844,1.3567756,1.4562022, // CELLS B11 TO B15 (SAMPLING 19) INDICES 72:76
707  -1.204743,-1.005559, // CELLS D-6 TO D-5 (SAMPLING 20) INDICES 77:78
708  1.0074122,1.2063241}; // CELLS D5 TO D6 (SAMPLING 20) INDICES 79:80
709  // CALCULATE INDEX
710  int index(999),i_start(999),i_end(999);
711  switch(sampling){
712  case 12: i_start = 0; i_end = 19; break;
713  case 13: i_start = 20; i_end = 37; break;
714  case 14: i_start = 38; i_end = 44; break;
715  case 15: i_start = 45; i_end = 46; break;
716  case 16: i_start = 47; i_end = 48; break;
717  case 17: i_start = 49; i_end = 56; break;
718  case 18: i_start = 57; i_end = 66; break;
719  case 19: i_start = 67; i_end = 76; break;
720  case 20: i_start = 77; i_end = 80; break;
721  default: break;
722  } // SWITCH
723 
724  if(i_start==999 || i_end==999) return -1;
725 
726  index = i_start;
727 
728  for(int i=i_start;i<=i_end;++i) index = fabs(eta-etamap[i]) <= fabs(eta-etamap[index]) ? i : index;
729  return index;
730 } // TRACKTOOLS::RETRIEVEINDEX

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::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.

◆ trackIsolation()

bool TrackTools::trackIsolation ( xAOD::TrackIsolation result,
const xAOD::TrackParticle tp,
const std::vector< xAOD::Iso::IsolationType > &  cones 
)
inlinevirtual

Implements ITrackTools.

Definition at line 43 of file D3PDMaker/TileD3PDMaker/src/TrackTools.h.

44  {
45  if(!m_trackIsolationTool.empty()) {
46  xAOD::TrackCorrection corrlist;
47  corrlist.trackbitset.set(static_cast<unsigned int>(xAOD::Iso::IsolationTrackCorrection::coreTrackPtr));
48  return m_trackIsolationTool->trackIsolation(result, tp, cones, corrlist);
49  }
50  return false;
51  };

◆ updateVHKA()

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

ToolHandle<Rec::IParticleCaloCellAssociationTool> TrackTools::m_caloCellAssociationTool
private

Tool to make the step-wise extrapolation.

Definition at line 76 of file D3PDMaker/TileD3PDMaker/src/TrackTools.h.

◆ m_caloExtensionTool

ToolHandle<Trk::IParticleCaloExtensionTool> TrackTools::m_caloExtensionTool
private

Tool to make the step-wise extrapolation.

Definition at line 75 of file D3PDMaker/TileD3PDMaker/src/TrackTools.h.

◆ m_cellContainerName

std::string TrackTools::m_cellContainerName
private

Definition at line 83 of file D3PDMaker/TileD3PDMaker/src/TrackTools.h.

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_neutralEFlowIsolationTool

ToolHandle<xAOD::INeutralEFlowIsolationTool> TrackTools::m_neutralEFlowIsolationTool
private

Definition at line 80 of file D3PDMaker/TileD3PDMaker/src/TrackTools.h.

◆ m_trackIsolationTool

ToolHandle<xAOD::ITrackIsolationTool> TrackTools::m_trackIsolationTool
private

Definition at line 79 of file D3PDMaker/TileD3PDMaker/src/TrackTools.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
S1
struct TBPatternUnitContext S1
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
get_generator_info.result
result
Definition: get_generator_info.py:21
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
xAOD::TrackCorrection
Definition: IsolationCommon.h:18
WriteCellNoiseToCool.icell
icell
Definition: WriteCellNoiseToCool.py:339
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
IDTPM::R
float R(const U &p)
Definition: TrackParametersHelper.h:101
beamspotman.cur
def cur
Definition: beamspotman.py:671
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
Trk::ParametersBase::position
const Amg::Vector3D & position() const
Access method for the position.
index
Definition: index.py:1
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Monitored::Z
@ Z
Definition: HistogramFillerUtils.h:24
xAOD::Iso::coreTrackPtr
@ coreTrackPtr
tracks pointer
Definition: Event/xAOD/xAODPrimitives/xAODPrimitives/IsolationCorrection.h:66
plotBeamSpotCompare.x2
x2
Definition: plotBeamSpotCompare.py:218
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
xAOD::TrackCorrection::trackbitset
Iso::IsolationTrackCorrectionBitset trackbitset
Definition: IsolationCommon.h:19
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
ParticleTest.tp
tp
Definition: ParticleTest.py:25
TrackTools::getPath
double getPath(const CaloCell *cell, const Trk::TrackParameters *entrance, const Trk::TrackParameters *exit)
Definition: D3PDMaker/TileD3PDMaker/src/TrackTools.cxx:271
Trk::TrackParametersIdHelper::caloSample
CaloSampling::CaloSample caloSample(TrackParametersIdentifier id) const
CaloSample encoded in id, returns CaloSampling::Unknown if id is not valid
Definition: TrackParametersIdHelper.h:91
Phi
@ Phi
Definition: RPCdef.h:8
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
TrackTools::m_trackIsolationTool
ToolHandle< xAOD::ITrackIsolationTool > m_trackIsolationTool
Definition: D3PDMaker/TileD3PDMaker/src/TrackTools.h:79
x
#define x
Trk::TrackParametersIdHelper::isEntryToVolume
bool isEntryToVolume(TrackParametersIdentifier id) const
returns true if the id belongs to the volume entrance
Definition: TrackParametersIdHelper.h:81
JetTiledMap::S
@ S
Definition: TiledEtaPhiMap.h:44
makeTRTBarrelCans.y1
tuple y1
Definition: makeTRTBarrelCans.py:15
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
Monitored::X
@ X
Definition: HistogramFillerUtils.h:24
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
CaloDetDescrElement::getSubCalo
CaloCell_ID::SUBCALO getSubCalo() const
cell subcalo
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:433
Trk::TrackParametersIdHelper
helper class to encode and decode a TrackParametersIdentifier
Definition: TrackParametersIdHelper.h:18
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
FullCPAlgorithmsTest_eljob.sample
sample
Definition: FullCPAlgorithmsTest_eljob.py:100
lumiFormat.i
int i
Definition: lumiFormat.py:92
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
z
#define z
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
makeTRTBarrelCans.y2
tuple y2
Definition: makeTRTBarrelCans.py:18
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CaloCell_Base_ID::TILE
@ TILE
Definition: CaloCell_Base_ID.h:46
drawFromPickle.tan
tan
Definition: drawFromPickle.py:36
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
TrackTools::getTrackInCellSampling
std::unique_ptr< const Trk::TrackParameters > getTrackInCellSampling(const TRACK *track, CaloSampling::CaloSample sampling)
Definition: D3PDMaker/TileD3PDMaker/src/TrackTools.cxx:60
calibdata.exit
exit
Definition: calibdata.py:236
TrackParametersIdentifier
unsigned int TrackParametersIdentifier
Definition: TrackParametersIdHelper.h:13
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
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.output
output
Definition: merge.py:17
Monitored::Y
@ Y
Definition: HistogramFillerUtils.h:24
python.TriggerEDMRun2.Samplings
Samplings
Definition: TriggerEDMRun2.py:76
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
TrackTools::m_caloCellAssociationTool
ToolHandle< Rec::IParticleCaloCellAssociationTool > m_caloCellAssociationTool
Tool to make the step-wise extrapolation.
Definition: D3PDMaker/TileD3PDMaker/src/TrackTools.h:76
DeMoScan.index
string index
Definition: DeMoScan.py:362
a
TList * a
Definition: liststreamerinfos.cxx:10
y
#define y
h
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
CaloDetDescrElement::getSampling
CaloCell_ID::CaloSample getSampling() const
cell sampling
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:395
TrackTools::m_caloExtensionTool
ToolHandle< Trk::IParticleCaloExtensionTool > m_caloExtensionTool
Tool to make the step-wise extrapolation.
Definition: D3PDMaker/TileD3PDMaker/src/TrackTools.h:51
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
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
TrackTools::getXYZEtaPhiInCellSampling
std::vector< double > getXYZEtaPhiInCellSampling(const TRACK *track, const CaloCell *cell)
Definition: D3PDMaker/TileD3PDMaker/src/TrackTools.cxx:130
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
KinematicUtils::deltaR
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: D3PDMaker/TileD3PDMaker/src/ITrackTools.h:114
Trk::CaloExtension::caloLayerIntersections
const std::vector< CurvilinearParameters > & caloLayerIntersections() const
access to the intersections with the calorimeter layers.
Definition: CaloExtension.h:76
CaloCell_Base_ID::LAREM
@ LAREM
Definition: CaloCell_Base_ID.h:46
makeComparison.deltaR
float deltaR
Definition: makeComparison.py:36
python.compressB64.c
def c
Definition: compressB64.py:93
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
fitman.k
k
Definition: fitman.py:528