CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrackerHitAssociator.h
Go to the documentation of this file.
1 #ifndef TrackerHitAssociator_h
2 #define TrackerHitAssociator_h
3 
4 /* \class TrackerHitAssociator
5  *
6  ** Associates SimHits and RecHits based on information produced during
7  * digitisation (StripDigiSimLinks).
8  * The association works in both ways: from a SimHit to RecHits and
9  * from a RecHit to SimHits.
10  *
11  * \author Patrizia Azzi (INFN PD), Vincenzo Chiochia (Uni Zuerich)
12  *
13  * \version 1st version: April 2006. Add configurable switch: August 2006
14  *
15  *
16  ************************************************************/
17 
18 //#include <vector>
25 
26 //--- for SimHit
29 
34 
35 //--- for RecHit
46 
48 
49 #include <string>
50 #include <vector>
51 
52 typedef std::pair<uint32_t, EncodedEventId> SimHitIdpr;
53 
55 
56  public:
57 
58  // Simple constructor
60  // Constructor with configurables
62  // Destructor
64 
65  typedef std::pair<unsigned int, unsigned int> simHitCollectionID;
66  typedef std::pair<simHitCollectionID, unsigned int> simhitAddr;
67 
68  std::vector<PSimHit> associateHit(const TrackingRecHit & thit) const;
69  //for PU events
70  std::vector<SimHitIdpr> associateHitId(const TrackingRecHit & thit) const;
71  void associateHitId(const TrackingRecHit & thit,std::vector<SimHitIdpr> &simhitid, std::vector<simhitAddr>* simhitCFPos=0) const;
72  template<typename T>
73  void associateSiStripRecHit(const T *simplerechit, std::vector<SimHitIdpr>& simtrackid, std::vector<simhitAddr>* simhitCFPos=0) const;
75  const DetId& detid,
76  std::vector<SimHitIdpr>& simtrackid, std::vector<simhitAddr>* simhitCFPos=0) const;
77 
78  std::vector<SimHitIdpr> associateMatchedRecHit(const SiStripMatchedRecHit2D * matchedrechit, std::vector<simhitAddr>* simhitCFPos=0) const;
79  std::vector<SimHitIdpr> associateProjectedRecHit(const ProjectedSiStripRecHit2D * projectedrechit, std::vector<simhitAddr>* simhitCFPos=0) const;
80  void associatePixelRecHit(const SiPixelRecHit * pixelrechit, std::vector<SimHitIdpr> & simhitid, std::vector<simhitAddr>* simhitCFPos=0) const;
81  std::vector<SimHitIdpr> associateGSRecHit(const SiTrackerGSRecHit2D * gsrechit) const;
82  std::vector<SimHitIdpr> associateMultiRecHitId(const SiTrackerMultiRecHit * multirechit, std::vector<simhitAddr>* simhitCFPos=0) const;
83  std::vector<PSimHit> associateMultiRecHit(const SiTrackerMultiRecHit * multirechit) const;
84  std::vector<SimHitIdpr> associateGSMatchedRecHit(const SiTrackerGSMatchedRecHit2D * gsmrechit) const;
85 
86  typedef std::map<unsigned int, std::vector<PSimHit> > simhit_map;
88  typedef std::map<simHitCollectionID, std::vector<PSimHit> > simhit_collectionMap;
90 
91  private:
92  typedef std::vector<std::string> vstring;
93 
94  void makeMaps(const edm::Event& theEvent, const vstring trackerContainers);
95 
98 
100 
101 };
102 
103 
104 #endif
105 
std::vector< SimHitIdpr > associateMultiRecHitId(const SiTrackerMultiRecHit *multirechit, std::vector< simhitAddr > *simhitCFPos=0) const
edm::Handle< edm::DetSetVector< StripDigiSimLink > > stripdigisimlink
std::vector< PSimHit > associateMultiRecHit(const SiTrackerMultiRecHit *multirechit) const
std::vector< std::string > vstring
TrackerHitAssociator(const edm::Event &e)
std::pair< simHitCollectionID, unsigned int > simhitAddr
void associatePixelRecHit(const SiPixelRecHit *pixelrechit, std::vector< SimHitIdpr > &simhitid, std::vector< simhitAddr > *simhitCFPos=0) const
std::map< unsigned int, std::vector< PSimHit > > simhit_map
edm::Handle< edm::DetSetVector< PixelDigiSimLink > > pixeldigisimlink
void associateSimpleRecHitCluster(const SiStripCluster *clust, const DetId &detid, std::vector< SimHitIdpr > &simtrackid, std::vector< simhitAddr > *simhitCFPos=0) const
std::vector< SimHitIdpr > associateGSMatchedRecHit(const SiTrackerGSMatchedRecHit2D *gsmrechit) const
tuple conf
Definition: dbtoconf.py:185
simhit_collectionMap SimHitCollMap
Definition: DetId.h:18
void makeMaps(const edm::Event &theEvent, const vstring trackerContainers)
std::pair< uint32_t, EncodedEventId > SimHitIdpr
std::map< simHitCollectionID, std::vector< PSimHit > > simhit_collectionMap
std::vector< SimHitIdpr > associateHitId(const TrackingRecHit &thit) const
std::vector< SimHitIdpr > associateProjectedRecHit(const ProjectedSiStripRecHit2D *projectedrechit, std::vector< simhitAddr > *simhitCFPos=0) const
std::vector< PSimHit > associateHit(const TrackingRecHit &thit) const
std::vector< SimHitIdpr > associateGSRecHit(const SiTrackerGSRecHit2D *gsrechit) const
long double T
std::vector< SimHitIdpr > associateMatchedRecHit(const SiStripMatchedRecHit2D *matchedrechit, std::vector< simhitAddr > *simhitCFPos=0) const
void associateSiStripRecHit(const T *simplerechit, std::vector< SimHitIdpr > &simtrackid, std::vector< simhitAddr > *simhitCFPos=0) const
std::pair< unsigned int, unsigned int > simHitCollectionID
Pixel Reconstructed Hit.