ATLAS Offline Software
SharedHitMapper.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRACKINGTOOLS_SHAREDHITMAPPER_H
6 #define TRACKINGTOOLS_SHAREDHITMAPPER_H
7 
8 /******************************************************
9  @class SharedHitMaper
10 ********************************************************/
11 
12 //#include "GaudiKernel/Algorithm.h"
15 
16 //namespace xAOD { class TrackParticle; }
17 
18 class PixelID;
19 class SCT_ID;
20 
21 class SharedHitMapper : public AthAlgorithm {
22 
23 public:
24  SharedHitMapper (const std::string& name, ISvcLocator* pSvcLocator);
25  virtual ~SharedHitMapper();
26 
27  virtual StatusCode initialize();
28  virtual StatusCode execute();
29  virtual StatusCode finalize();
30 
31  int numberSharedBLayer() const; // return info for current track
32  int numberSharedPix() const;
33  int numberSharedSct() const;
34 
35 private:
36  std::string m_inputTrackCollection;
37  std::string m_sharedHitMapLocation;
38  double m_deltaRCut;
42  const SCT_ID* m_sctId;
43 
44  static const int m_nbpl = 3;
45  static const int m_nbpd = 3;
46  static const int m_nbsl = 4;
47  static const int m_nbsd = 9;
48  int m_npl[m_nbpl];
49  int m_npd[m_nbpd];
50  int m_nsl[m_nbsl];
51  int m_nsd[m_nbsd];
52 };
53 
54 
55 typedef std::map<const xAOD::TrackParticle* const, int> Assoc;
56 typedef Assoc::const_iterator AssocIter;
57 
58 #include <map>
59 //namespace xAOD { class TrackParticle; }
61  public:
64  void add(const xAOD::TrackParticle* const trk, int shPattern);
65  void add(const xAOD::TrackParticle* const trk, int shB, int shP, int shS);
66  void check(const xAOD::TrackParticle* const trk) const;
67  int size() const { return m_assocs.size(); }
68  void dump() const;
69  int numberSharedBLayer(const xAOD::TrackParticle* const trk) const;
70  int numberSharedPix(const xAOD::TrackParticle* const trk) const;
71  int numberSharedSct(const xAOD::TrackParticle* const trk) const;
72  private:
74 };
76 CLASS_DEF(SharedHitTrackAssoc, 491827624, 0)
77 #endif // TRACKINGTOOLS_SHAREDHITMAPPER_H
SharedHitTrackAssoc::size
int size() const
Definition: SharedHitMapper.h:67
SharedHitTrackAssoc::m_assocs
Assoc m_assocs
Definition: SharedHitMapper.h:73
SharedHitMapper::numberSharedBLayer
int numberSharedBLayer() const
Definition: SharedHitMapper.cxx:306
SharedHitTrackAssoc::numberSharedPix
int numberSharedPix(const xAOD::TrackParticle *const trk) const
Definition: SharedHitMapper.cxx:40
SharedHitMapper::m_nbsd
static const int m_nbsd
Definition: SharedHitMapper.h:47
SharedHitMapper::m_useTrackSummaryShared
bool m_useTrackSummaryShared
Definition: SharedHitMapper.h:40
SharedHitMapper::m_nbpl
static const int m_nbpl
Definition: SharedHitMapper.h:44
SharedHitMapper::m_nbsl
static const int m_nbsl
Definition: SharedHitMapper.h:46
SharedHitMapper::numberSharedPix
int numberSharedPix() const
Definition: SharedHitMapper.cxx:310
SharedHitMapper::m_pixelId
const PixelID * m_pixelId
if true use shared info from track summary instead of recomputing them
Definition: SharedHitMapper.h:41
SharedHitTrackAssoc::numberSharedSct
int numberSharedSct(const xAOD::TrackParticle *const trk) const
Definition: SharedHitMapper.cxx:47
SharedHitMapper::m_inputTrackCollection
std::string m_inputTrackCollection
Definition: SharedHitMapper.h:36
SharedHitTrackAssoc::add
void add(const xAOD::TrackParticle *const trk, int shPattern)
Definition: SharedHitMapper.cxx:26
SharedHitMapper
Definition: SharedHitMapper.h:21
AthAlgorithm.h
SharedHitMapper::m_nbpd
static const int m_nbpd
Definition: SharedHitMapper.h:45
SharedHitTrackAssoc::check
void check(const xAOD::TrackParticle *const trk) const
SharedHitMapper::m_qualOrder
bool m_qualOrder
pairs of tracks with dR>dRCut not considered
Definition: SharedHitMapper.h:39
SharedHitTrackAssoc::~SharedHitTrackAssoc
~SharedHitTrackAssoc()
Definition: SharedHitMapper.cxx:24
ClassID_traits.h
a traits class that associates a CLID to a type T It also detects whether T inherits from Gaudi DataO...
SharedHitMapper::finalize
virtual StatusCode finalize()
Definition: SharedHitMapper.cxx:302
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
SharedHitTrackAssoc::numberSharedBLayer
int numberSharedBLayer(const xAOD::TrackParticle *const trk) const
Definition: SharedHitMapper.cxx:33
AssocIter
Assoc::const_iterator AssocIter
Definition: SharedHitMapper.h:56
SharedHitMapper::m_nsl
int m_nsl[m_nbsl]
Definition: SharedHitMapper.h:50
SharedHitMapper::m_sharedHitMapLocation
std::string m_sharedHitMapLocation
location of inputTracks in StoreGate
Definition: SharedHitMapper.h:37
SharedHitTrackAssoc::SharedHitTrackAssoc
SharedHitTrackAssoc()
Definition: SharedHitMapper.cxx:22
SharedHitMapper::m_nsd
int m_nsd[m_nbsd]
Definition: SharedHitMapper.h:51
Assoc
std::map< const xAOD::TrackParticle *const, int > Assoc
Definition: SharedHitMapper.h:55
AthAlgorithm
Definition: AthAlgorithm.h:47
SharedHitTrackAssoc
Definition: SharedHitMapper.h:60
SharedHitMapper::m_deltaRCut
double m_deltaRCut
location of sharedHitMap in StoreGate
Definition: SharedHitMapper.h:38
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
SharedHitTrackAssoc::dump
void dump() const
Definition: SharedHitMapper.cxx:55
TrackParticle.h
SharedHitMapper::numberSharedSct
int numberSharedSct() const
Definition: SharedHitMapper.cxx:317
SCT_ID
Definition: SCT_ID.h:68
SharedHitMapper::m_npd
int m_npd[m_nbpd]
Definition: SharedHitMapper.h:49
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
SharedHitMapper::m_npl
int m_npl[m_nbpl]
Definition: SharedHitMapper.h:48
SharedHitMapper::execute
virtual StatusCode execute()
Definition: SharedHitMapper.cxx:102
SharedHitMapper::SharedHitMapper
SharedHitMapper(const std::string &name, ISvcLocator *pSvcLocator)
Definition: SharedHitMapper.cxx:74
SharedHitMapper::initialize
virtual StatusCode initialize()
Definition: SharedHitMapper.cxx:86
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
SharedHitMapper::~SharedHitMapper
virtual ~SharedHitMapper()
Definition: SharedHitMapper.cxx:83
PixelID
Definition: PixelID.h:67
SharedHitMapper::m_sctId
const SCT_ID * m_sctId
Definition: SharedHitMapper.h:42