CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HybridClusterAlgo.h
Go to the documentation of this file.
1 #ifndef RecoEcal_EgammaClusterAlgos_HybridClusterAlgo_h
2 #define RecoEcal_EgammaClusterAlgos_HybridClusterAlgo_h
3 
19 
20 
22 
23 #include <vector>
24 #include <set>
25 
27 
28 //Less than operator for sorting EcalRecHits according to energy.
29 struct less_mag : public std::binary_function<EcalRecHit, EcalRecHit, bool> {
30  bool operator()(EcalRecHit x, EcalRecHit y) { return x.energy() > y.energy() ; }
31 };
32 
34 {
35  private:
36  //Quick typedef for position calculation.
38 
39  //Thresholds for seeds.
40  double eb_st;
41 
42  //Number of steps in phi that the Hybrid algorithm will take
43  //when clustering. Remember, uses phiSteps_ in positive direction
44  //and then phiSteps_ in negative direction.
45  int phiSteps_;
46 
47  // et in 25
48  double et25(EcalBarrelNavigator &navigator,
49  const EcalRecHitCollection *hits,
51 
52 
54 
55  //Threshold for basic cluster.
56  double eThres_;
57  double eThresA_;
58  double eThresB_;
59 
60  //Threshold for becoming a sub-peak in the supercluster.
61  double Eseed;
62 
63  //Threshold for adding the additional two 'wing' cells to domino.
64  double Ewing;
65 
66  // do dynamic phi road
68 
69  // do dynamic ethres
71 
72  //Map of DetId, RecHit relationship. EcalRecHit knows what DetId it is,
73  //but DetId doesn't know what EcalRecHit it is.
74  // std::map<DetId, EcalRecHit> rechits_m;
75 
76  // colection of all rechits
78 
79  // topology
81 
82  // SuperClusterShapeAlgo* SCShape_;
83 
84  //Set of DetIds that have already been used.
85  std::set<DetId> useddetids;
86 
87  // The vector of seeds:
88  std::vector<EcalRecHit> seeds;
89 
90  //The vector of seed clusters:
91  std::vector<reco::BasicCluster> seedClus_;
92 
93  //Map of basicclusters and what supercluster they will belong to.
94  std::map<int, std::vector<reco::BasicCluster> > clustered_;
95 
96  //Control the verbosity.
98 
99  //algo to calulate position of clusters
101 
102  // channels not to be used for seeding
103  std::vector<int> v_chstatus_;
104 
105  // severity levels to discriminate against
106  std::vector<int> v_severitylevel_;
109 
111  std::set<DetId> excludedCrys_;
112 
113  public:
114  enum DebugLevel { pDEBUG = 0, pINFO = 1, pERROR = 2 };
115 
116  //The default constructor
118 
119  //The real constructor
120  HybridClusterAlgo(double eb_str,
121  int step,
122  double ethres,
123  double eseed,
124  double ewing,
125  std::vector<int> v_chstatus,
126  const PositionCalc& posCalculator,
127  DebugLevel debugLevel = pINFO,
128  bool dynamicEThres = false,
129  double eThresA = 0,
130  double eThresB = 0.1,
131  std::vector<int> severityToExclude=std::vector<int>(999),
132  //double severityRecHitThreshold=0.08,
133  //int severitySpikeId=1,
134  //double severitySpikeThreshold=0,
135  bool excludeFromCluster=false
136  );
137 // const edm::ParameterSet &bremRecoveryPset,
138 
139  // destructor
141  {
142  if (dynamicPhiRoad_) delete phiRoadAlgo_;
143  delete topo_;
144  // delete SCShape_;
145  }
146 
147  void setDynamicPhiRoad(const edm::ParameterSet &bremRecoveryPset)
148  {
149  dynamicPhiRoad_ = true;
150  phiRoadAlgo_ = new BremRecoveryPhiRoadAlgo(bremRecoveryPset);
151  }
152 
153  //Hand over the map, the geometry, and I'll hand you back clusters.
156  reco::BasicClusterCollection &basicClusters,
157  const EcalSeverityLevelAlgo * sevLv,
158  bool regional = false,
159  const std::vector<EcalEtaPhiRegion>& regions = std::vector<EcalEtaPhiRegion>()
160  );
161 
162  //Make superclusters from the references to the BasicClusters in the event.
164 
165  //The routine doing the real work.
166  void mainSearch(const EcalRecHitCollection* hits, const CaloSubdetectorGeometry * geometry);
167 
168  //Make dominos for the hybrid method.
169  double makeDomino(EcalBarrelNavigator &navigator, std::vector <EcalRecHit> &cells);
170 
171 };
172 
173 #endif
list step
Definition: launcher.py:15
double et25(EcalBarrelNavigator &navigator, const EcalRecHitCollection *hits, const CaloSubdetectorGeometry *geometry)
EcalBarrelHardcodedTopology * topo_
void mainSearch(const EcalRecHitCollection *hits, const CaloSubdetectorGeometry *geometry)
std::map< int, std::vector< reco::BasicCluster > > clustered_
double makeDomino(EcalBarrelNavigator &navigator, std::vector< EcalRecHit > &cells)
PositionCalc posCalculator_
std::vector< EcalRecHit > seeds
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
float energy() const
Definition: CaloRecHit.h:19
reco::SuperClusterCollection makeSuperClusters(const reco::CaloClusterPtrVector &)
BremRecoveryPhiRoadAlgo * phiRoadAlgo_
std::vector< int > v_chstatus_
std::set< DetId > useddetids
void setDynamicPhiRoad(const edm::ParameterSet &bremRecoveryPset)
std::set< DetId > excludedCrys_
math::XYZPoint Point
std::vector< int > v_severitylevel_
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:13
std::vector< BasicCluster > BasicClusterCollection
collection of BasicCluster objects
ESHandle< TrackerGeometry > geometry
const EcalRecHitCollection * recHits_
Definition: DDAxes.h:10
bool operator()(EcalRecHit x, EcalRecHit y)
std::vector< reco::BasicCluster > seedClus_
void makeClusters(const EcalRecHitCollection *, const CaloSubdetectorGeometry *geometry, reco::BasicClusterCollection &basicClusters, const EcalSeverityLevelAlgo *sevLv, bool regional=false, const std::vector< EcalEtaPhiRegion > &regions=std::vector< EcalEtaPhiRegion >())