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 
18 
19 // C/C++ headers
20 #include <string>
21 #include <vector>
22 #include <set>
23 
24 typedef std::map<DetId, EcalRecHit> RecHitsMap;
25 
27 {
28  public:
29 
30  enum EcalPart { barrel = 0, endcap = 1 };
31  enum VerbosityLevel { pDEBUG = 0, pWARNING = 1, pINFO = 2, pERROR = 3 };
32 
34  }
35 
36  IslandClusterAlgo(double ebst, double ecst, const PositionCalc& posCalc,
37  const std::vector<int>& v_chstatusSeed_Barrel, const std::vector<int>& v_chstatusSeed_Endcap,
38  const std::vector<int>& v_chstatus_Barrel, const std::vector<int>& v_chstatus_Endcap,
39  VerbosityLevel the_verbosity = pERROR) :
41  v_chstatusSeed_Barrel_(v_chstatusSeed_Barrel), v_chstatusSeed_Endcap_(v_chstatusSeed_Endcap),
42  v_chstatus_Barrel_(v_chstatus_Barrel), v_chstatus_Endcap_(v_chstatus_Endcap),
43  verbosity(the_verbosity) {
44  posCalculator_ = posCalc;
45  }
46 
48  {
49  }
50 
51  void setVerbosity(VerbosityLevel the_verbosity)
52  {
53  verbosity = the_verbosity;
54  }
55 
56  // this is the method that will start the clusterisation
57  std::vector<reco::BasicCluster> makeClusters(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 
70  //algo to compute position of clusters
72 
73 
74  // Energy required for a seed:
77 
78  // collection of all rechits
80 
81  // The vector of seeds:
82  std::vector<EcalRecHit> seeds;
83 
84  // The set of used DetID's
85  std::set<DetId> used_s;
86 
87  // The vector of DetId's in the cluster currently reconstructed
88  std::vector< std::pair<DetId, float> > current_v;
89 
90  // The vector of clusters
91  std::vector<reco::BasicCluster> clusters_v;
92 
93  // channels not to be used for seeding
94  std::vector<int> v_chstatusSeed_Barrel_;
95  std::vector<int> v_chstatusSeed_Endcap_;
96 
97  // channels not to be used for clustering
98  std::vector<int> v_chstatus_Barrel_;
99  std::vector<int> v_chstatus_Endcap_;
100 
101  std::vector<int> v_chstatusSeed_;
102  std::vector<int> v_chstatus_;
103 
104  // The verbosity level
106 
107  void mainSearch(const EcalRecHitCollection* hits,
108  const CaloSubdetectorGeometry *geometry_p,
109  const CaloSubdetectorTopology *topology_p,
110  const CaloSubdetectorGeometry *geometryES_p,
111  EcalPart ecalPart);
112 
117 
119 
120  void makeCluster(const EcalRecHitCollection* hits,const CaloSubdetectorGeometry *geometry_p,const CaloSubdetectorGeometry *geometryES_p);
121 
122  };
123 
124 #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)