CMS 3D CMS Logo

HybridClusterAlgo.h
Go to the documentation of this file.
1 #ifndef RecoEcal_EgammaClusterAlgos_HybridClusterAlgo_h
2 #define RecoEcal_EgammaClusterAlgos_HybridClusterAlgo_h
3 
18 
19 
21 
22 #include <vector>
23 #include <set>
24 
26 
28 {
29  private:
30  //Quick typedef for position calculation.
32 
33  //Thresholds for seeds.
34  double eb_st;
35 
36  //Number of steps in phi that the Hybrid algorithm will take
37  //when clustering. Remember, uses phiSteps_ in positive direction
38  //and then phiSteps_ in negative direction.
39  int phiSteps_;
40 
41  // et in 25
45  // ratio Et/e
49 
50 
52 
53  //Threshold for basic cluster.
54  double eThres_;
55  double eThresA_;
56  double eThresB_;
57 
58  //Threshold for becoming a sub-peak in the supercluster.
59  double Eseed;
60 
61  //Coefficient to increase Eseed as a function of 5x5
62  double Xi;
63 
64  //Increase Eseed as a function of et_5x5 (othwewise it's e_5x5)
65  bool UseEtForXi;
66 
67  //Threshold for adding the additional two 'wing' cells to domino.
68  double Ewing;
69 
70  // do dynamic phi road
72 
73  // do dynamic ethres
75 
76  //Map of DetId, RecHit relationship. EcalRecHit knows what DetId it is,
77  //but DetId doesn't know what EcalRecHit it is.
78  // std::map<DetId, EcalRecHit> rechits_m;
79 
80  // colection of all rechits
82 
83  // topology
85 
86  // SuperClusterShapeAlgo* SCShape_;
87 
88  //Set of DetIds that have already been used.
89  std::set<DetId> useddetids;
90 
91  // The vector of seeds:
92  std::vector<EcalRecHit> seeds;
93 
94  //The vector of seed clusters:
95  std::vector<reco::BasicCluster> seedClus_;
96 
97  //Map of basicclusters and what supercluster they will belong to.
98  std::map<int, std::vector<reco::BasicCluster> > clustered_;
99 
100  //algo to calulate position of clusters
102 
103  // channels not to be used for seeding
104  std::vector<int> v_chstatus_;
105 
106  // severity levels to discriminate against
107  std::vector<int> v_severitylevel_;
110 
112  std::set<DetId> excludedCrys_;
113 
114  public:
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 xi,
125  bool useEtForXi,
126  double ewing,
127  const std::vector<int>& v_chstatus,
128  const PositionCalc& posCalculator,
129  bool dynamicEThres = false,
130  double eThresA = 0,
131  double eThresB = 0.1,
132  const std::vector<int>& severityToExclude=std::vector<int>().operator=(std::vector<int>(999)),
133  //double severityRecHitThreshold=0.08,
134  //int severitySpikeId=1,
135  //double severitySpikeThreshold=0,
136  bool excludeFromCluster=false
137  );
138 // const edm::ParameterSet &bremRecoveryPset,
139 
140  // destructor
142  {
143  if (dynamicPhiRoad_) delete phiRoadAlgo_;
144  delete topo_;
145  // delete SCShape_;
146  }
147 
149  {
150  dynamicPhiRoad_ = true;
151  phiRoadAlgo_ = new BremRecoveryPhiRoadAlgo(bremRecoveryPset);
152  }
153 
154  //Hand over the map, the geometry, and I'll hand you back clusters.
157  reco::BasicClusterCollection &basicClusters,
158  const EcalSeverityLevelAlgo * sevLv,
159  bool regional = false,
160  const std::vector<RectangularEtaPhiRegion>& regions = std::vector<RectangularEtaPhiRegion>()
161  );
162 
163  //Make superclusters from the references to the BasicClusters in the event.
165 
166  //The routine doing the real work.
167  void mainSearch(const EcalRecHitCollection* hits, const CaloSubdetectorGeometry * geometry);
168 
169  //Make dominos for the hybrid method.
170  double makeDomino(EcalBarrelNavigatorHT &navigator, std::vector <EcalRecHit> &cells);
171 
172 };
173 
174 #endif
EcalBarrelHardcodedTopology * topo_
void mainSearch(const EcalRecHitCollection *hits, const CaloSubdetectorGeometry *geometry)
std::map< int, std::vector< reco::BasicCluster > > clustered_
double e2Et(EcalBarrelNavigatorHT &navigator, const EcalRecHitCollection *hits, const CaloSubdetectorGeometry *geometry)
PositionCalc posCalculator_
std::vector< EcalRecHit > seeds
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
reco::SuperClusterCollection makeSuperClusters(const reco::CaloClusterPtrVector &)
BremRecoveryPhiRoadAlgo * phiRoadAlgo_
std::vector< int > v_chstatus_
std::set< DetId > useddetids
double et25(EcalBarrelNavigatorHT &navigator, const EcalRecHitCollection *hits, const CaloSubdetectorGeometry *geometry)
void setDynamicPhiRoad(const edm::ParameterSet &bremRecoveryPset)
std::set< DetId > excludedCrys_
math::XYZPoint Point
std::vector< int > v_severitylevel_
double makeDomino(EcalBarrelNavigatorHT &navigator, std::vector< EcalRecHit > &cells)
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
std::vector< BasicCluster > BasicClusterCollection
collection of BasicCluster objects
const EcalRecHitCollection * recHits_
step
Definition: StallMonitor.cc:94
void makeClusters(const EcalRecHitCollection *, const CaloSubdetectorGeometry *geometry, reco::BasicClusterCollection &basicClusters, const EcalSeverityLevelAlgo *sevLv, bool regional=false, const std::vector< RectangularEtaPhiRegion > &regions=std::vector< RectangularEtaPhiRegion >())
std::vector< reco::BasicCluster > seedClus_