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  std::vector<PSimHit> associateHit(const TrackingRecHit & thit);
66  /* std::vector<unsigned int> associateHitId(const TrackingRecHit & thit);
67  std::vector<unsigned int> associateSimpleRecHit(const SiStripRecHit2D * simplerechit);
68  std::vector<unsigned int> associateMatchedRecHit(const SiStripMatchedRecHit2D * matchedrechit);
69  std::vector<unsigned int> associatePixelRecHit(const SiPixelRecHit * pixelrechit);
70  */
71  //for PU events
72  std::vector<SimHitIdpr> associateHitId(const TrackingRecHit & thit);
73  void associateHitId(const TrackingRecHit & thit,std::vector<SimHitIdpr> &simhitid);
74  // std::vector<SimHitIdpr> associateSimpleRecHit(const SiStripRecHit2D * simplerechit);
75  void associateSimpleRecHit(const SiStripRecHit2D * simplerechit,std::vector<SimHitIdpr> & simhitid);
76  void associateSiStripRecHit1D(const SiStripRecHit1D * simplerechit,std::vector<SimHitIdpr> & simhitid);
78  const uint32_t& detID,
79  std::vector<SimHitIdpr>& theSimtrackid,
80  std::vector<PSimHit>& simhit);
82  const uint32_t& detID,
83  std::vector<PSimHit>& simhit);
85  const uint32_t& detID,
86  std::vector<SimHitIdpr>& simtrackid);
87 
88  std::vector<SimHitIdpr> associateMatchedRecHit(const SiStripMatchedRecHit2D * matchedrechit);
89  std::vector<SimHitIdpr> associateProjectedRecHit(const ProjectedSiStripRecHit2D * projectedrechit);
90  // std::vector<SimHitIdpr> associatePixelRecHit(const SiPixelRecHit * pixelrechit);
91  void associatePixelRecHit(const SiPixelRecHit * pixelrechit, std::vector<SimHitIdpr> & simhitid);
92  std::vector<SimHitIdpr> associateGSRecHit(const SiTrackerGSRecHit2D * gsrechit);
93  std::vector<SimHitIdpr> associateMultiRecHitId(const SiTrackerMultiRecHit * multirechit);
94  std::vector<PSimHit> associateMultiRecHit(const SiTrackerMultiRecHit * multirechit);
95  std::vector<SimHitIdpr> associateGSMatchedRecHit(const SiTrackerGSMatchedRecHit2D * gsmrechit);
96 
97  std::vector<PSimHit> theStripHits;
98  typedef std::map<unsigned int, std::vector<PSimHit> > simhit_map;
99  typedef simhit_map::iterator simhit_map_iterator;
101  std::vector<PSimHit> thePixelHits;
102 
103  private:
105  typedef std::vector<std::string> vstring;
107 
108  //ADDED NOW AS A PRIVATE MEMBER
110  std::vector<const CrossingFrame<PSimHit> *> cf_simhitvec;
112 
115  //vector with the trackIds
116  // std::vector<unsigned int> simtrackid;
117  std::vector<SimHitIdpr> simtrackid;
118  //vector with the simhits
119  std::vector<int> simhitCFPos;
120  std::vector<PSimHit> simhitassoc;
121  bool StripHits;
122 
124 
125 };
126 
127 
128 #endif
129 
MixCollection< PSimHit > TrackerHits
std::vector< PSimHit > thePixelHits
edm::Handle< edm::DetSetVector< StripDigiSimLink > > stripdigisimlink
std::vector< PSimHit > theStripHits
std::vector< SimHitIdpr > associateGSRecHit(const SiTrackerGSRecHit2D *gsrechit)
std::vector< std::string > vstring
TrackerHitAssociator(const edm::Event &e)
void associateSimpleRecHit(const SiStripRecHit2D *simplerechit, std::vector< SimHitIdpr > &simhitid)
std::map< unsigned int, std::vector< PSimHit > > simhit_map
edm::Handle< edm::DetSetVector< PixelDigiSimLink > > pixeldigisimlink
std::vector< SimHitIdpr > associateHitId(const TrackingRecHit &thit)
void associateSiStripRecHit1D(const SiStripRecHit1D *simplerechit, std::vector< SimHitIdpr > &simhitid)
std::vector< SimHitIdpr > simtrackid
std::vector< const CrossingFrame< PSimHit > * > cf_simhitvec
void associateSimpleRecHitCluster(const SiStripCluster *clust, const uint32_t &detID, std::vector< SimHitIdpr > &theSimtrackid, std::vector< PSimHit > &simhit)
std::vector< int > simhitCFPos
simhit_map::iterator simhit_map_iterator
std::vector< SimHitIdpr > associateMultiRecHitId(const SiTrackerMultiRecHit *multirechit)
std::vector< PSimHit > associateMultiRecHit(const SiTrackerMultiRecHit *multirechit)
tuple conf
Definition: dbtoconf.py:185
edm::Handle< CrossingFrame< PSimHit > > cf_simhit
std::pair< uint32_t, EncodedEventId > SimHitIdpr
std::vector< PSimHit > associateHit(const TrackingRecHit &thit)
std::vector< PSimHit > simhitassoc
std::vector< SimHitIdpr > associateProjectedRecHit(const ProjectedSiStripRecHit2D *projectedrechit)
const edm::Event & myEvent_
std::vector< SimHitIdpr > associateMatchedRecHit(const SiStripMatchedRecHit2D *matchedrechit)
void associatePixelRecHit(const SiPixelRecHit *pixelrechit, std::vector< SimHitIdpr > &simhitid)
Our base class.
Definition: SiPixelRecHit.h:22
std::vector< SimHitIdpr > associateGSMatchedRecHit(const SiTrackerGSMatchedRecHit2D *gsmrechit)