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);
77  /*
78  void associateSimpleRecHitCluster(const SiStripCluster* clust,
79  const uint32_t& detID,
80  std::vector<SimHitIdpr>& theSimtrackid,
81  std::vector<PSimHit>& clusterSimHits);
82  void associateSimpleRecHitCluster(const SiStripCluster* clust,
83  const uint32_t& detID,
84  std::vector<PSimHit>& clusterSimHits);
85  */
87  const uint32_t& detID,
88  std::vector<SimHitIdpr>& simtrackid);
89 
90  std::vector<SimHitIdpr> associateMatchedRecHit(const SiStripMatchedRecHit2D * matchedrechit);
91  std::vector<SimHitIdpr> associateProjectedRecHit(const ProjectedSiStripRecHit2D * projectedrechit);
92  // std::vector<SimHitIdpr> associatePixelRecHit(const SiPixelRecHit * pixelrechit);
93  void associatePixelRecHit(const SiPixelRecHit * pixelrechit, std::vector<SimHitIdpr> & simhitid);
94  std::vector<SimHitIdpr> associateGSRecHit(const SiTrackerGSRecHit2D * gsrechit);
95  std::vector<SimHitIdpr> associateMultiRecHitId(const SiTrackerMultiRecHit * multirechit);
96  std::vector<PSimHit> associateMultiRecHit(const SiTrackerMultiRecHit * multirechit);
97  std::vector<SimHitIdpr> associateGSMatchedRecHit(const SiTrackerGSMatchedRecHit2D * gsmrechit);
98 
99  std::vector<PSimHit> theStripHits;
100  typedef std::map<unsigned int, std::vector<PSimHit> > simhit_map;
101  typedef simhit_map::iterator simhit_map_iterator;
104  std::vector<PSimHit> thePixelHits;
105 
106  private:
108  typedef std::vector<std::string> vstring;
110 
111  //ADDED NOW AS A PRIVATE MEMBER
113  std::vector<const CrossingFrame<PSimHit> *> cf_simhitvec;
114  /* MixCollection<PSimHit> TrackerHits; */
115 
118  //vector with the trackIds
119  // std::vector<unsigned int> simtrackid;
120  std::vector<SimHitIdpr> simtrackid;
121  //vector with the simhits
122  std::vector<int> simhitCFPos;
123  std::vector<PSimHit> simhitassoc;
124  bool StripHits;
125 
127  bool useCFpos_;
128 
129 };
130 
131 
132 #endif
133 
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
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
void associateSimpleRecHitCluster(const SiStripCluster *clust, const uint32_t &detID, std::vector< SimHitIdpr > &simtrackid)
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)
Pixel Reconstructed Hit.
std::vector< SimHitIdpr > associateGSMatchedRecHit(const SiTrackerGSMatchedRecHit2D *gsmrechit)