CMS 3D CMS Logo

ClusterStorer.h
Go to the documentation of this file.
1 #ifndef RecoAlgos_ClusterStorer_h
2 #define RecoAlgos_ClusterStorer_h
3 
24 
25 namespace helper {
26 
27  class ClusterStorer {
28  public:
33  void clear();
34  //------------------------------------------------------------------
38  //------------------------------------------------------------------
43 
44  private:
46  template <typename ClusterRefType>
48  public:
51  template <typename RecHitType>
53  : detid_(hit.geographicalId().rawId()), hits_(&hits), index_(idx), ref_(hit.cluster()) {}
55  uint32_t detid() const { return detid_; }
57  const ClusterRefType &clusterRef() const { return ref_; }
60  return (detid_ != other.detid_) ? detid_ < other.detid_ : ref_ < other.ref_;
61  }
64  template <typename RecHitType>
65  void rekey(const ClusterRefType &newRef) const;
66 
67  private:
69  uint32_t detid_;
71  size_t index_;
72  ClusterRefType ref_;
73  };
74 
78  //FIXME:: this is just temporary solution for phase2,
79  //probably is good to add a Phase2ClusterStorer?
81 
82  //------------------------------------------------------------------
85  //------------------------------------------------------------------
86  template <typename HitType, typename ClusterType>
90 
91  //--- Information about the cloned clusters
92  std::vector<PixelClusterHitRecord> pixelClusterRecords_;
93  std::vector<StripClusterHitRecord> stripClusterRecords_;
94  std::vector<Phase2OTClusterHitRecord> phase2OTClusterRecords_;
95  };
96 
97 } // namespace helper
98 
99 #endif
edm::RefProd
Definition: EDProductfwd.h:25
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
helper::ClusterStorer::StripClusterHitRecord
ClusterHitRecord< SiStripRecHit2D::ClusterRef > StripClusterHitRecord
Assuming that the ClusterRef is the same for all SiStripRecHit*:
Definition: ClusterStorer.h:77
helper::ClusterStorer::ClusterHitRecord::ClusterHitRecord
ClusterHitRecord()
Definition: ClusterStorer.h:68
SiPixelCluster.h
helper::ClusterStorer::ClusterHitRecord::ClusterHitRecord
ClusterHitRecord(const RecHitType &hit, TrackingRecHitCollection &hits, size_t idx)
Definition: ClusterStorer.h:52
TrackingRecHitFwd.h
helper::ClusterStorer::ClusterHitRecord::index_
size_t index_
Definition: ClusterStorer.h:71
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
reco::RecHitType
RecHitType
Definition: TrackInfoEnum.h:16
helper::ClusterStorer::ClusterHitRecord::detid_
uint32_t detid_
private => unusable
Definition: ClusterStorer.h:69
helper::ClusterStorer::PixelClusterHitRecord
ClusterHitRecord< SiPixelRecHit::ClusterRef > PixelClusterHitRecord
Definition: ClusterStorer.h:75
helper::ClusterStorer::addCluster
void addCluster(TrackingRecHitCollection &hits, size_t index)
add cluster of newHit to list (throws if hit is of unknown type)
Definition: ClusterStorer.cc:24
trackingPlots.other
other
Definition: trackingPlots.py:1467
SiPixelRecHit.h
helper::ClusterStorer::ClusterStorer
ClusterStorer()
Definition: ClusterStorer.h:29
helper::ClusterStorer::Phase2OTClusterHitRecord
ClusterHitRecord< Phase2TrackerRecHit1D::CluRef > Phase2OTClusterHitRecord
Definition: ClusterStorer.h:80
Phase2TrackerRecHit1D.h
helper::ClusterStorer::ClusterHitRecord::detid
uint32_t detid() const
returns the detid
Definition: ClusterStorer.h:55
SiStripCluster.h
helper
Definition: helper.py:1
helper::ClusterStorer
Definition: ClusterStorer.h:27
helper::ClusterStorer::pixelClusterRecords_
std::vector< PixelClusterHitRecord > pixelClusterRecords_
Definition: ClusterStorer.h:92
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
helper::ClusterStorer::clear
void clear()
clear records
Definition: ClusterStorer.cc:71
helper::ClusterStorer::phase2OTClusterRecords_
std::vector< Phase2OTClusterHitRecord > phase2OTClusterRecords_
Definition: ClusterStorer.h:94
edmNew::DetSetVector
Definition: DetSetNew.h:13
helper::ClusterStorer::ClusterHitRecord::rekey
void rekey(const ClusterRefType &newRef) const
Definition: ClusterStorer.cc:138
helper::ClusterStorer::stripClusterRecords_
std::vector< StripClusterHitRecord > stripClusterRecords_
Definition: ClusterStorer.h:93
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
helper::ClusterStorer::ClusterHitRecord::hits_
TrackingRecHitCollection * hits_
Definition: ClusterStorer.h:70
helper::ClusterStorer::ClusterHitRecord::operator<
bool operator<(const ClusterHitRecord< ClusterRefType > &other) const
this one is to sort by detid and then by index of the rechit
Definition: ClusterStorer.h:59
helper::ClusterStorer::ClusterHitRecord::ref_
ClusterRefType ref_
Definition: ClusterStorer.h:72
helper::ClusterStorer::processClusters
void processClusters(std::vector< ClusterHitRecord< typename HitType::ClusterRef > > &clusterRecords, edmNew::DetSetVector< ClusterType > &dsvToFill, edm::RefProd< edmNew::DetSetVector< ClusterType > > &refprod)
Definition: ClusterStorer.cc:96
SiStripRecHit2D.h
DetSetVectorNew.h
helper::ClusterStorer::ClusterHitRecord
A struct for clusters associated to hits.
Definition: ClusterStorer.h:47
hit
Definition: SiStripHitEffFromCalibTree.cc:88
edm::OwnVector< TrackingRecHit >
helper::ClusterStorer::ClusterHitRecord::clusterRef
const ClusterRefType & clusterRef() const
this method is to be able to compare and see if two refs are the same
Definition: ClusterStorer.h:57
helper::ClusterStorer::processAllClusters
void processAllClusters(edmNew::DetSetVector< SiPixelCluster > &pixelDsvToFill, edm::RefProd< edmNew::DetSetVector< SiPixelCluster > > refPixelClusters, edmNew::DetSetVector< SiStripCluster > &stripDsvToFill, edm::RefProd< edmNew::DetSetVector< SiStripCluster > > refStripClusters)
Definition: ClusterStorer.cc:77