CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
IslandClusterAlgo.h
Go to the documentation of this file.
1 #ifndef RecoECAL_ECALClusters_IslandClusterAlgo_h
2 #define RecoECAL_ECALClusters_IslandClusterAlgo_h
3 
5 
11 
19 
20 // C/C++ headers
21 #include <string>
22 #include <vector>
23 #include <set>
24 
25 typedef std::map<DetId, EcalRecHit> RecHitsMap;
26 
28 {
29  public:
30 
31  enum EcalPart { barrel = 0, endcap = 1 };
32  enum VerbosityLevel { pDEBUG = 0, pWARNING = 1, pINFO = 2, pERROR = 3 };
33 
35  }
36 
37  IslandClusterAlgo(double ebst, double ecst, const PositionCalc& posCalc, VerbosityLevel the_verbosity = pERROR) :
38  ecalBarrelSeedThreshold(ebst), ecalEndcapSeedThreshold(ecst), verbosity(the_verbosity) {
39  posCalculator_ = posCalc;
40  }
41 
43  {
44  }
45 
46  void setVerbosity(VerbosityLevel the_verbosity)
47  {
48  verbosity = the_verbosity;
49  }
50 
51  // this is the method that will start the clusterisation
52  std::vector<reco::BasicCluster> makeClusters(const EcalRecHitCollection* hits,
54  const CaloSubdetectorTopology *topology_p,
55  const CaloSubdetectorGeometry *geometryES_p,
56  EcalPart ecalPart,
57  bool regional = false,
58  const std::vector<EcalEtaPhiRegion>& regions = std::vector<EcalEtaPhiRegion>());
59 
62 
63  private:
64 
65  //algo to compute position of clusters
67 
68 
69  // Energy required for a seed:
72 
73  // collection of all rechits
75 
76  // The vector of seeds:
77  std::vector<EcalRecHit> seeds;
78 
79  // The set of used DetID's
80  std::set<DetId> used_s;
81 
82  // The vector of DetId's in the cluster currently reconstructed
83  std::vector< std::pair<DetId, float> > current_v;
84 
85  // The vector of clusters
86  std::vector<reco::BasicCluster> clusters_v;
87 
88  // The verbosity level
90 
91  void mainSearch(const EcalRecHitCollection* hits,
92  const CaloSubdetectorGeometry *geometry_p,
93  const CaloSubdetectorTopology *topology_p,
94  const CaloSubdetectorGeometry *geometryES_p,
95  EcalPart ecalPart);
96 
97  void searchNorth(const CaloNavigator<DetId> &navigator);
98  void searchSouth(const CaloNavigator<DetId> &navigator);
99  void searchWest (const CaloNavigator<DetId> &navigator, const CaloSubdetectorTopology* topology);
100  void searchEast (const CaloNavigator<DetId> &navigator, const CaloSubdetectorTopology* topology);
101 
103 
104  void makeCluster(const EcalRecHitCollection* hits,const CaloSubdetectorGeometry *geometry_p,const CaloSubdetectorGeometry *geometryES_p);
105 
106  };
107 
108 #endif
void searchEast(const CaloNavigator< DetId > &navigator, const CaloSubdetectorTopology *topology)
void searchWest(const CaloNavigator< DetId > &navigator, const CaloSubdetectorTopology *topology)
std::vector< EcalRecHit >::const_iterator const_iterator
math::XYZPoint Point
point in the space
std::map< DetId, EcalRecHit > RecHitsMap
Definition: HLTAlCaMonPi0.h:24
IslandClusterAlgo(double ebst, double ecst, const PositionCalc &posCalc, VerbosityLevel the_verbosity=pERROR)
PositionCalc posCalculator_
std::set< DetId > used_s
std::vector< reco::BasicCluster > makeClusters(const EcalRecHitCollection *hits, const CaloSubdetectorGeometry *geometry, const CaloSubdetectorTopology *topology_p, const CaloSubdetectorGeometry *geometryES_p, EcalPart ecalPart, bool regional=false, const std::vector< EcalEtaPhiRegion > &regions=std::vector< EcalEtaPhiRegion >())
VerbosityLevel verbosity
virtual ~IslandClusterAlgo()
std::vector< EcalRecHit > seeds
void searchNorth(const CaloNavigator< DetId > &navigator)
bool shouldBeAdded(EcalRecHitCollection::const_iterator candidate_it, EcalRecHitCollection::const_iterator previous_it)
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:13
std::vector< reco::BasicCluster > clusters_v
void makeCluster(const EcalRecHitCollection *hits, const CaloSubdetectorGeometry *geometry_p, const CaloSubdetectorGeometry *geometryES_p)
void setVerbosity(VerbosityLevel the_verbosity)
ESHandle< TrackerGeometry > geometry
std::vector< std::pair< DetId, float > > current_v
const EcalRecHitCollection * recHits_
void searchSouth(const CaloNavigator< DetId > &navigator)
void mainSearch(const EcalRecHitCollection *hits, const CaloSubdetectorGeometry *geometry_p, const CaloSubdetectorTopology *topology_p, const CaloSubdetectorGeometry *geometryES_p, EcalPart ecalPart)