CMS 3D CMS Logo

CosmicClusterAlgo.h
Go to the documentation of this file.
1 #ifndef RecoECAL_ECALClusters_CosmicClusterAlgo_h
2 #define RecoECAL_ECALClusters_CosmicClusterAlgo_h
3 
5 
13 
19 
20 // C/C++ headers
21 #include <string>
22 #include <vector>
23 #include <set>
24 
25 typedef std::map<DetId, EcalRecHit> RecHitsMap;
26 
28 public:
29  enum EcalPart { barrel = 0, endcap = 1 };
30  enum VerbosityLevel { pDEBUG = 0, pWARNING = 1, pINFO = 2, pERROR = 3 };
31 
33 
34  CosmicClusterAlgo(double ebst,
35  double ebSt,
36  double ebDt,
37  double ebSp,
38  double ecst,
39  double ecSt,
40  double ecDt,
41  double ecSp,
42  const PositionCalc &posCalc,
43  VerbosityLevel the_verbosity = pERROR)
52  verbosity(the_verbosity) {
53  posCalculator_ = posCalc;
54  }
55 
56  virtual ~CosmicClusterAlgo() {}
57 
58  void setVerbosity(VerbosityLevel the_verbosity) { verbosity = the_verbosity; }
59 
60  // this is the method that will start the clusterisation
61  std::vector<reco::BasicCluster> makeClusters(
63  const EcalUncalibratedRecHitCollection *uncalibhits,
65  const CaloSubdetectorTopology *topology_p,
66  const CaloSubdetectorGeometry *geometryES_p,
67  EcalPart ecalPart,
68  bool regional = false,
69  const std::vector<RectangularEtaPhiRegion> &regions = std::vector<RectangularEtaPhiRegion>());
70 
73 
74 private:
75  //algo to compute position of clusters
77 
78  // Energy required for a seed:
83 
88 
89  // collection of all rechits
91  // collection of all uncalibrated rechits
93 
94  // The vector of seeds:
95  std::vector<EcalRecHit> seeds;
96 
97  // The set of used DetID's
98  std::set<DetId> used_s;
99  std::set<DetId> canSeed_s; // set of crystals not to be added but which can seed
100  // a new 3x3 (e.g. the outer crystals in a 5x5)
101 
102  //in EB or EE?
103  bool inEB;
104 
105  // The vector of DetId's in the cluster currently reconstructed
106  std::vector<DetId> current_v9;
107  std::vector<DetId> current_v25;
108  std::vector<std::pair<DetId, float> > current_v25Sup;
109 
110  // The vector of clusters
111  std::vector<reco::BasicCluster> clusters_v;
112 
113  // The verbosity level
115 
116  void mainSearch(const CaloSubdetectorGeometry *geometry_p,
117  const CaloSubdetectorTopology *topology_p,
118  const CaloSubdetectorGeometry *geometryES_p,
119  EcalPart ecalPart);
120 
121  // Is the crystal at the navigator position a
122  // local maxiumum in energy?
124 
125  // prepare the 5x5 taking care over which crystals
126  // are allowed to seed new clusters and which are not
127  // after the preparation is complete
129 
130  // Add the crystal with DetId det to the current
131  // vector of crystals if it meets certain criteria
132  void addCrystal(const DetId &det, const bool in9);
133 
134  // take the crystals in the current_v and build
135  // them into a BasicCluster
136  void makeCluster(const CaloSubdetectorGeometry *geometry_p,
137  const CaloSubdetectorGeometry *geometryES_p,
138  DetId seedId);
139 };
140 
141 #endif
CosmicClusterAlgo::clusters_v
std::vector< reco::BasicCluster > clusters_v
Definition: CosmicClusterAlgo.h:111
CosmicClusterAlgo::VerbosityLevel
VerbosityLevel
Definition: CosmicClusterAlgo.h:30
CosmicClusterAlgo::Point
math::XYZPoint Point
point in the space
Definition: CosmicClusterAlgo.h:72
CosmicClusterAlgo::current_v9
std::vector< DetId > current_v9
Definition: CosmicClusterAlgo.h:106
PositionCalc.h
CaloNavigator.h
CosmicClusterAlgo::mainSearch
void mainSearch(const CaloSubdetectorGeometry *geometry_p, const CaloSubdetectorTopology *topology_p, const CaloSubdetectorGeometry *geometryES_p, EcalPart ecalPart)
Definition: CosmicClusterAlgo.cc:134
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
HLT_FULL_cff.navigator
navigator
Definition: HLT_FULL_cff.py:13189
BasicCluster.h
RectangularEtaPhiRegion.h
CosmicClusterAlgo::~CosmicClusterAlgo
virtual ~CosmicClusterAlgo()
Definition: CosmicClusterAlgo.h:56
geometry
Definition: geometry.py:1
EBDetId.h
CosmicClusterAlgo::ecalEndcapSeedThreshold
double ecalEndcapSeedThreshold
Definition: CosmicClusterAlgo.h:84
CosmicClusterAlgo::endcap
Definition: CosmicClusterAlgo.h:29
CosmicClusterAlgo::ecalEndcapSupThreshold
double ecalEndcapSupThreshold
Definition: CosmicClusterAlgo.h:87
edm::SortedCollection< EcalRecHit >
EcalUncalibratedRecHit.h
CosmicClusterAlgo::prepareCluster
void prepareCluster(CaloNavigator< DetId > &navigator, const CaloSubdetectorGeometry *geometry)
Definition: CosmicClusterAlgo.cc:309
CosmicClusterAlgo::ecalBarrelSingleThreshold
double ecalBarrelSingleThreshold
Definition: CosmicClusterAlgo.h:80
CosmicClusterAlgo::ecalBarrelSupThreshold
double ecalBarrelSupThreshold
Definition: CosmicClusterAlgo.h:82
CosmicClusterAlgo::recHits_
const EcalRecHitCollection * recHits_
Definition: CosmicClusterAlgo.h:90
EcalRecHitCollections.h
CosmicClusterAlgo::ecalBarrelSecondThreshold
double ecalBarrelSecondThreshold
Definition: CosmicClusterAlgo.h:81
CosmicClusterAlgo::EcalPart
EcalPart
Definition: CosmicClusterAlgo.h:29
CosmicClusterAlgo::makeClusters
std::vector< reco::BasicCluster > makeClusters(const EcalRecHitCollection *hits, const EcalUncalibratedRecHitCollection *uncalibhits, 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: CosmicClusterAlgo.cc:16
DetId
Definition: DetId.h:17
RecHitsMap
std::map< DetId, EcalRecHit > RecHitsMap
Definition: CosmicClusterAlgo.h:25
CosmicClusterAlgo::ecalEndcapSecondThreshold
double ecalEndcapSecondThreshold
Definition: CosmicClusterAlgo.h:86
CosmicClusterAlgo::seeds
std::vector< EcalRecHit > seeds
Definition: CosmicClusterAlgo.h:95
CosmicClusterAlgo::ecalEndcapSingleThreshold
double ecalEndcapSingleThreshold
Definition: CosmicClusterAlgo.h:85
CosmicClusterAlgo::current_v25
std::vector< DetId > current_v25
Definition: CosmicClusterAlgo.h:107
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
CosmicClusterAlgo::verbosity
VerbosityLevel verbosity
Definition: CosmicClusterAlgo.h:114
CosmicClusterAlgo::canSeed_s
std::set< DetId > canSeed_s
Definition: CosmicClusterAlgo.h:99
CosmicClusterAlgo
Definition: CosmicClusterAlgo.h:27
PositionCalc
Definition: PositionCalc.h:29
CosmicClusterAlgo::CosmicClusterAlgo
CosmicClusterAlgo()
Definition: CosmicClusterAlgo.h:32
CaloSubdetectorTopology
Definition: CaloSubdetectorTopology.h:17
CosmicClusterAlgo::checkMaxima
bool checkMaxima(CaloNavigator< DetId > &navigator)
Definition: CosmicClusterAlgo.cc:275
EcalBarrelHardcodedTopology.h
EcalRecHit.h
CosmicClusterAlgo::pERROR
Definition: CosmicClusterAlgo.h:30
EcalEndcapNavigator.h
CosmicClusterAlgo::used_s
std::set< DetId > used_s
Definition: CosmicClusterAlgo.h:98
CosmicClusterAlgo::ecalBarrelSeedThreshold
double ecalBarrelSeedThreshold
Definition: CosmicClusterAlgo.h:79
CaloNavigator
Definition: CaloNavigator.h:7
CosmicClusterAlgo::setVerbosity
void setVerbosity(VerbosityLevel the_verbosity)
Definition: CosmicClusterAlgo.h:58
CosmicClusterAlgo::pWARNING
Definition: CosmicClusterAlgo.h:30
CosmicClusterAlgo::inEB
bool inEB
Definition: CosmicClusterAlgo.h:103
CosmicClusterAlgo::uncalibRecHits_
const EcalUncalibratedRecHitCollection * uncalibRecHits_
Definition: CosmicClusterAlgo.h:92
CosmicClusterAlgo::posCalculator_
PositionCalc posCalculator_
Definition: CosmicClusterAlgo.h:76
CaloGeometry.h
Point3D.h
CosmicClusterAlgo::CosmicClusterAlgo
CosmicClusterAlgo(double ebst, double ebSt, double ebDt, double ebSp, double ecst, double ecSt, double ecDt, double ecSp, const PositionCalc &posCalc, VerbosityLevel the_verbosity=pERROR)
Definition: CosmicClusterAlgo.h:34
CaloSubdetectorGeometry
Definition: CaloSubdetectorGeometry.h:22
CosmicClusterAlgo::current_v25Sup
std::vector< std::pair< DetId, float > > current_v25Sup
Definition: CosmicClusterAlgo.h:108
AlignmentPI::regions
regions
Definition: AlignmentPayloadInspectorHelper.h:76
EcalBarrelNavigator.h
CosmicClusterAlgo::pDEBUG
Definition: CosmicClusterAlgo.h:30
CosmicClusterAlgo::makeCluster
void makeCluster(const CaloSubdetectorGeometry *geometry_p, const CaloSubdetectorGeometry *geometryES_p, DetId seedId)
Definition: CosmicClusterAlgo.cc:194
CosmicClusterAlgo::barrel
Definition: CosmicClusterAlgo.h:29
CosmicClusterAlgo::pINFO
Definition: CosmicClusterAlgo.h:30
CosmicClusterAlgo::addCrystal
void addCrystal(const DetId &det, const bool in9)
Definition: CosmicClusterAlgo.cc:359