CMS 3D CMS Logo

IslandClusterAlgo.h
Go to the documentation of this file.
1 #ifndef RecoECAL_ECALClusters_IslandClusterAlgo_h
2 #define RecoECAL_ECALClusters_IslandClusterAlgo_h
3 
5 
12 
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,
38  const std::vector<int>& v_chstatusSeed_Barrel, const std::vector<int>& v_chstatusSeed_Endcap,
39  const std::vector<int>& v_chstatus_Barrel, const std::vector<int>& v_chstatus_Endcap,
40  VerbosityLevel the_verbosity = pERROR) :
42  v_chstatusSeed_Barrel_(v_chstatusSeed_Barrel), v_chstatusSeed_Endcap_(v_chstatusSeed_Endcap),
43  v_chstatus_Barrel_(v_chstatus_Barrel), v_chstatus_Endcap_(v_chstatus_Endcap),
44  verbosity(the_verbosity) {
45  posCalculator_ = posCalc;
46  }
47 
49  {
50  }
51 
52  void setVerbosity(VerbosityLevel the_verbosity)
53  {
54  verbosity = the_verbosity;
55  }
56 
57  // this is the method that will start the clusterisation
58  std::vector<reco::BasicCluster> makeClusters(const EcalRecHitCollection* hits,
60  const CaloSubdetectorTopology *topology_p,
61  const CaloSubdetectorGeometry *geometryES_p,
62  EcalPart ecalPart,
63  bool regional = false,
64  const std::vector<RectangularEtaPhiRegion>& regions = std::vector<RectangularEtaPhiRegion>());
65 
68 
69  private:
70 
71  //algo to compute position of clusters
73 
74 
75  // Energy required for a seed:
78 
79  // collection of all rechits
81 
82  // The vector of seeds:
83  std::vector<EcalRecHit> seeds;
84 
85  // The set of used DetID's
86  std::set<DetId> used_s;
87 
88  // The vector of DetId's in the cluster currently reconstructed
89  std::vector< std::pair<DetId, float> > current_v;
90 
91  // The vector of clusters
92  std::vector<reco::BasicCluster> clusters_v;
93 
94  // channels not to be used for seeding
95  std::vector<int> v_chstatusSeed_Barrel_;
96  std::vector<int> v_chstatusSeed_Endcap_;
97 
98  // channels not to be used for clustering
99  std::vector<int> v_chstatus_Barrel_;
100  std::vector<int> v_chstatus_Endcap_;
101 
102  std::vector<int> v_chstatusSeed_;
103  std::vector<int> v_chstatus_;
104 
105  // The verbosity level
107 
108  void mainSearch(const EcalRecHitCollection* hits,
109  const CaloSubdetectorGeometry *geometry_p,
110  const CaloSubdetectorTopology *topology_p,
111  const CaloSubdetectorGeometry *geometryES_p,
112  EcalPart ecalPart);
113 
118 
120 
121  void makeCluster(const EcalRecHitCollection* hits,const CaloSubdetectorGeometry *geometry_p,const CaloSubdetectorGeometry *geometryES_p);
122 
123  };
124 
125 #endif
void searchEast(const CaloNavigator< DetId > &navigator, const CaloSubdetectorTopology *topology)
CaloTopology const * topology(0)
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
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
std::map< DetId, EcalRecHit > RecHitsMap
void makeCluster(const EcalRecHitCollection *hits, const CaloSubdetectorGeometry *geometry_p, const CaloSubdetectorGeometry *geometryES_p)
void setVerbosity(VerbosityLevel the_verbosity)
std::vector< std::pair< DetId, float > > current_v
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)