CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
IslandClusterAlgo.h
Go to the documentation of this file.
1 #ifndef RecoECAL_ECALClusters_IslandClusterAlgo_h
2 #define RecoECAL_ECALClusters_IslandClusterAlgo_h
3 
5 
12 
18 
19 // C/C++ headers
20 #include <string>
21 #include <vector>
22 #include <set>
23 
24 typedef std::map<DetId, EcalRecHit> RecHitsMap;
25 
27 public:
28  enum EcalPart { barrel = 0, endcap = 1 };
29  enum VerbosityLevel { pDEBUG = 0, pWARNING = 1, pINFO = 2, pERROR = 3 };
30 
32 
33  IslandClusterAlgo(double ebst,
34  double ecst,
35  const PositionCalc &posCalc,
36  const std::vector<int> &v_chstatusSeed_Barrel,
37  const std::vector<int> &v_chstatusSeed_Endcap,
38  const std::vector<int> &v_chstatus_Barrel,
39  const std::vector<int> &v_chstatus_Endcap,
40  VerbosityLevel the_verbosity = pERROR)
43  v_chstatusSeed_Barrel_(v_chstatusSeed_Barrel),
44  v_chstatusSeed_Endcap_(v_chstatusSeed_Endcap),
45  v_chstatus_Barrel_(v_chstatus_Barrel),
46  v_chstatus_Endcap_(v_chstatus_Endcap),
47  verbosity(the_verbosity) {
48  posCalculator_ = posCalc;
49  }
50 
51  virtual ~IslandClusterAlgo() {}
52 
53  void setVerbosity(VerbosityLevel the_verbosity) { verbosity = the_verbosity; }
54 
55  // this is the method that will start the clusterisation
56  std::vector<reco::BasicCluster> makeClusters(
57  const EcalRecHitCollection *hits,
59  const CaloSubdetectorTopology *topology_p,
60  const CaloSubdetectorGeometry *geometryES_p,
61  EcalPart ecalPart,
62  bool regional = false,
63  const std::vector<RectangularEtaPhiRegion> &regions = std::vector<RectangularEtaPhiRegion>());
64 
67 
68 private:
69  //algo to compute position of clusters
71 
72  // Energy required for a seed:
75 
76  // collection of all rechits
78 
79  // The vector of seeds:
80  std::vector<EcalRecHit> seeds;
81 
82  // The set of used DetID's
83  std::set<DetId> used_s;
84 
85  // The vector of DetId's in the cluster currently reconstructed
86  std::vector<std::pair<DetId, float> > current_v;
87 
88  // The vector of clusters
89  std::vector<reco::BasicCluster> clusters_v;
90 
91  // channels not to be used for seeding
92  std::vector<int> v_chstatusSeed_Barrel_;
93  std::vector<int> v_chstatusSeed_Endcap_;
94 
95  // channels not to be used for clustering
96  std::vector<int> v_chstatus_Barrel_;
97  std::vector<int> v_chstatus_Endcap_;
98 
99  std::vector<int> v_chstatusSeed_;
100  std::vector<int> v_chstatus_;
101 
102  // The verbosity level
104 
105  void mainSearch(const EcalRecHitCollection *hits,
106  const CaloSubdetectorGeometry *geometry_p,
107  const CaloSubdetectorTopology *topology_p,
108  const CaloSubdetectorGeometry *geometryES_p,
109  EcalPart ecalPart);
110 
115 
118 
119  void makeCluster(const EcalRecHitCollection *hits,
120  const CaloSubdetectorGeometry *geometry_p,
121  const CaloSubdetectorGeometry *geometryES_p);
122 };
123 
124 #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
std::vector< int > v_chstatusSeed_Endcap_
math::XYZPoint Point
point in the space
PositionCalc posCalculator_
std::set< DetId > used_s
VerbosityLevel verbosity
std::vector< std::pair< DetId, float > > current_v
IslandClusterAlgo(double ebst, double ecst, const PositionCalc &posCalc, const std::vector< int > &v_chstatusSeed_Barrel, const std::vector< int > &v_chstatusSeed_Endcap, const std::vector< int > &v_chstatus_Barrel, const std::vector< int > &v_chstatus_Endcap, VerbosityLevel the_verbosity=pERROR)
virtual ~IslandClusterAlgo()
std::vector< EcalRecHit > seeds
std::vector< int > v_chstatus_Endcap_
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< RectangularEtaPhiRegion > &regions=std::vector< RectangularEtaPhiRegion >())
void searchNorth(const CaloNavigator< DetId > &navigator)
bool shouldBeAdded(EcalRecHitCollection::const_iterator candidate_it, EcalRecHitCollection::const_iterator previous_it)
std::vector< int > v_chstatusSeed_
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
std::vector< reco::BasicCluster > clusters_v
void makeCluster(const EcalRecHitCollection *hits, const CaloSubdetectorGeometry *geometry_p, const CaloSubdetectorGeometry *geometryES_p)
std::map< DetId, EcalRecHit > RecHitsMap
void setVerbosity(VerbosityLevel the_verbosity)
std::vector< int > v_chstatusSeed_Barrel_
const EcalRecHitCollection * recHits_
std::vector< int > v_chstatus_
void searchSouth(const CaloNavigator< DetId > &navigator)
std::vector< int > v_chstatus_Barrel_
void mainSearch(const EcalRecHitCollection *hits, const CaloSubdetectorGeometry *geometry_p, const CaloSubdetectorTopology *topology_p, const CaloSubdetectorGeometry *geometryES_p, EcalPart ecalPart)