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 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(
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 
106  const CaloSubdetectorGeometry *geometry_p,
107  const CaloSubdetectorTopology *topology_p,
108  const CaloSubdetectorGeometry *geometryES_p,
109  EcalPart ecalPart);
110 
115 
118 
120  const CaloSubdetectorGeometry *geometry_p,
121  const CaloSubdetectorGeometry *geometryES_p);
122 };
123 
124 #endif
IslandClusterAlgo::v_chstatusSeed_Barrel_
std::vector< int > v_chstatusSeed_Barrel_
Definition: IslandClusterAlgo.h:92
IslandClusterAlgo::pDEBUG
Definition: IslandClusterAlgo.h:29
IslandClusterAlgo::searchWest
void searchWest(const CaloNavigator< DetId > &navigator, const CaloSubdetectorTopology *topology)
Definition: IslandClusterAlgo.cc:193
IslandClusterAlgo::setVerbosity
void setVerbosity(VerbosityLevel the_verbosity)
Definition: IslandClusterAlgo.h:53
PositionCalc.h
edm::SortedCollection< EcalRecHit >::const_iterator
std::vector< EcalRecHit >::const_iterator const_iterator
Definition: SortedCollection.h:80
CaloNavigator.h
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
IslandClusterAlgo::endcap
Definition: IslandClusterAlgo.h:28
IslandClusterAlgo::VerbosityLevel
VerbosityLevel
Definition: IslandClusterAlgo.h:29
IslandClusterAlgo::ecalEndcapSeedThreshold
double ecalEndcapSeedThreshold
Definition: IslandClusterAlgo.h:74
IslandClusterAlgo::v_chstatusSeed_Endcap_
std::vector< int > v_chstatusSeed_Endcap_
Definition: IslandClusterAlgo.h:93
HLT_FULL_cff.navigator
navigator
Definition: HLT_FULL_cff.py:13126
IslandClusterAlgo::v_chstatus_
std::vector< int > v_chstatus_
Definition: IslandClusterAlgo.h:100
BasicCluster.h
RectangularEtaPhiRegion.h
geometry
Definition: geometry.py:1
IslandClusterAlgo::Point
math::XYZPoint Point
point in the space
Definition: IslandClusterAlgo.h:66
EBDetId.h
IslandClusterAlgo::posCalculator_
PositionCalc posCalculator_
Definition: IslandClusterAlgo.h:70
IslandClusterAlgo::EcalPart
EcalPart
Definition: IslandClusterAlgo.h:28
edm::SortedCollection< EcalRecHit >
IslandClusterAlgo::mainSearch
void mainSearch(const EcalRecHitCollection *hits, const CaloSubdetectorGeometry *geometry_p, const CaloSubdetectorTopology *topology_p, const CaloSubdetectorGeometry *geometryES_p, EcalPart ecalPart)
Definition: IslandClusterAlgo.cc:109
EcalRecHitCollections.h
IslandClusterAlgo::~IslandClusterAlgo
virtual ~IslandClusterAlgo()
Definition: IslandClusterAlgo.h:51
RecHitsMap
std::map< DetId, EcalRecHit > RecHitsMap
Definition: IslandClusterAlgo.h:24
ecaldqm::topology
const CaloTopology * topology(nullptr)
IslandClusterAlgo::searchNorth
void searchNorth(const CaloNavigator< DetId > &navigator)
Definition: IslandClusterAlgo.cc:154
IslandClusterAlgo::barrel
Definition: IslandClusterAlgo.h:28
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
IslandClusterAlgo::makeCluster
void makeCluster(const EcalRecHitCollection *hits, const CaloSubdetectorGeometry *geometry_p, const CaloSubdetectorGeometry *geometryES_p)
Definition: IslandClusterAlgo.cc:253
IslandClusterAlgo
Definition: IslandClusterAlgo.h:26
PositionCalc
Definition: PositionCalc.h:29
IslandClusterAlgo::pERROR
Definition: IslandClusterAlgo.h:29
CaloSubdetectorTopology
Definition: CaloSubdetectorTopology.h:17
IslandClusterAlgo::verbosity
VerbosityLevel verbosity
Definition: IslandClusterAlgo.h:103
IslandClusterAlgo::recHits_
const EcalRecHitCollection * recHits_
Definition: IslandClusterAlgo.h:77
EcalBarrelHardcodedTopology.h
IslandClusterAlgo::seeds
std::vector< EcalRecHit > seeds
Definition: IslandClusterAlgo.h:80
EcalRecHit.h
EcalEndcapNavigator.h
IslandClusterAlgo::IslandClusterAlgo
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)
Definition: IslandClusterAlgo.h:33
CaloNavigator
Definition: CaloNavigator.h:7
IslandClusterAlgo::used_s
std::set< DetId > used_s
Definition: IslandClusterAlgo.h:83
IslandClusterAlgo::searchSouth
void searchSouth(const CaloNavigator< DetId > &navigator)
Definition: IslandClusterAlgo.cc:174
IslandClusterAlgo::makeClusters
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 >())
Definition: IslandClusterAlgo.cc:17
IslandClusterAlgo::v_chstatus_Barrel_
std::vector< int > v_chstatus_Barrel_
Definition: IslandClusterAlgo.h:96
CaloGeometry.h
IslandClusterAlgo::pINFO
Definition: IslandClusterAlgo.h:29
IslandClusterAlgo::current_v
std::vector< std::pair< DetId, float > > current_v
Definition: IslandClusterAlgo.h:86
Point3D.h
IslandClusterAlgo::searchEast
void searchEast(const CaloNavigator< DetId > &navigator, const CaloSubdetectorTopology *topology)
Definition: IslandClusterAlgo.cc:216
CaloSubdetectorGeometry
Definition: CaloSubdetectorGeometry.h:22
IslandClusterAlgo::pWARNING
Definition: IslandClusterAlgo.h:29
AlignmentPI::regions
regions
Definition: AlignmentPayloadInspectorHelper.h:76
IslandClusterAlgo::clusters_v
std::vector< reco::BasicCluster > clusters_v
Definition: IslandClusterAlgo.h:89
EcalBarrelNavigator.h
IslandClusterAlgo::IslandClusterAlgo
IslandClusterAlgo()
Definition: IslandClusterAlgo.h:31
IslandClusterAlgo::v_chstatus_Endcap_
std::vector< int > v_chstatus_Endcap_
Definition: IslandClusterAlgo.h:97
IslandClusterAlgo::v_chstatusSeed_
std::vector< int > v_chstatusSeed_
Definition: IslandClusterAlgo.h:99
IslandClusterAlgo::shouldBeAdded
bool shouldBeAdded(EcalRecHitCollection::const_iterator candidate_it, EcalRecHitCollection::const_iterator previous_it)
Definition: IslandClusterAlgo.cc:240
IslandClusterAlgo::ecalBarrelSeedThreshold
double ecalBarrelSeedThreshold
Definition: IslandClusterAlgo.h:73