CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
CosmicClusterAlgo Class Reference

#include <CosmicClusterAlgo.h>

Public Types

enum  EcalPart { barrel = 0, endcap = 1 }
 
typedef math::XYZPoint Point
 point in the space More...
 
enum  VerbosityLevel { pDEBUG = 0, pWARNING = 1, pINFO = 2, pERROR = 3 }
 

Public Member Functions

 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)
 
std::vector< reco::BasicClustermakeClusters (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< EcalEtaPhiRegion > &regions=std::vector< EcalEtaPhiRegion >())
 
void setVerbosity (VerbosityLevel the_verbosity)
 
virtual ~CosmicClusterAlgo ()
 

Private Member Functions

void addCrystal (const DetId &det, const bool in9)
 
bool checkMaxima (CaloNavigator< DetId > &navigator)
 
void mainSearch (const CaloSubdetectorGeometry *geometry_p, const CaloSubdetectorTopology *topology_p, const CaloSubdetectorGeometry *geometryES_p, EcalPart ecalPart)
 
void makeCluster (const CaloSubdetectorGeometry *geometry_p, const CaloSubdetectorGeometry *geometryES_p, DetId seedId)
 
void prepareCluster (CaloNavigator< DetId > &navigator, const CaloSubdetectorGeometry *geometry)
 

Private Attributes

std::set< DetIdcanSeed_s
 
std::vector< reco::BasicClusterclusters_v
 
std::vector< DetIdcurrent_v25
 
std::vector< std::pair< DetId,
float > > 
current_v25Sup
 
std::vector< DetIdcurrent_v9
 
double ecalBarrelSecondThreshold
 
double ecalBarrelSeedThreshold
 
double ecalBarrelSingleThreshold
 
double ecalBarrelSupThreshold
 
double ecalEndcapSecondThreshold
 
double ecalEndcapSeedThreshold
 
double ecalEndcapSingleThreshold
 
double ecalEndcapSupThreshold
 
bool inEB
 
PositionCalc posCalculator_
 
const EcalRecHitCollectionrecHits_
 
std::vector< EcalRecHitseeds
 
const
EcalUncalibratedRecHitCollection
uncalibRecHits_
 
std::set< DetIdused_s
 
VerbosityLevel verbosity
 

Detailed Description

Definition at line 28 of file CosmicClusterAlgo.h.

Member Typedef Documentation

point in the space

Definition at line 63 of file CosmicClusterAlgo.h.

Member Enumeration Documentation

Enumerator
barrel 
endcap 

Definition at line 32 of file CosmicClusterAlgo.h.

Enumerator
pDEBUG 
pWARNING 
pINFO 
pERROR 

Definition at line 33 of file CosmicClusterAlgo.h.

Constructor & Destructor Documentation

CosmicClusterAlgo::CosmicClusterAlgo ( )
inline

Definition at line 35 of file CosmicClusterAlgo.h.

35  {
36  }
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 
)
inline

Definition at line 38 of file CosmicClusterAlgo.h.

References posCalculator_.

virtual CosmicClusterAlgo::~CosmicClusterAlgo ( )
inlinevirtual

Definition at line 43 of file CosmicClusterAlgo.h.

44  {
45  }

Member Function Documentation

void CosmicClusterAlgo::addCrystal ( const DetId det,
const bool  in9 
)
private

Definition at line 405 of file CosmicClusterAlgo.cc.

References current_v25, current_v9, edm::SortedCollection< T, SORT >::end(), edm::SortedCollection< T, SORT >::find(), recHits_, uncalibRecHits_, and used_s.

Referenced by prepareCluster().

406 {
407 
409  if ((thisIt != recHits_->end()) && (thisIt->id() != DetId(0)))
410  {
411  if ((used_s.find(thisIt->id()) == used_s.end()))
412  {
414  used_s.insert(det);
415  if ((thisIt->energy() >= -1.) && !(thisItu->chi2() < -1.))
416  {
417  if (in9) current_v9.push_back(det);
418  current_v25.push_back(det);
419  }
420 
421  }
422  }
423 
424 }
const EcalUncalibratedRecHitCollection * uncalibRecHits_
std::vector< EcalRecHit >::const_iterator const_iterator
std::vector< DetId > current_v9
const EcalRecHitCollection * recHits_
const_iterator end() const
Definition: DetId.h:18
std::vector< DetId > current_v25
iterator find(key_type k)
std::set< DetId > used_s
bool CosmicClusterAlgo::checkMaxima ( CaloNavigator< DetId > &  navigator)
private

Definition at line 306 of file CosmicClusterAlgo.cc.

References CaloNavigator< T, TOPO >::east(), edm::SortedCollection< T, SORT >::end(), edm::SortedCollection< T, SORT >::find(), CaloNavigator< T, TOPO >::home(), i, CaloNavigator< T, TOPO >::north(), CaloNavigator< T, TOPO >::pos(), recHits_, CaloNavigator< T, TOPO >::south(), and CaloNavigator< T, TOPO >::west().

Referenced by mainSearch().

307 {
308 
309  bool maxima = true;
311  EcalRecHitCollection::const_iterator seedHit = recHits_->find(navigator.pos());
312  double thisEnergy = 0.;
313  double seedEnergy = seedHit->energy();
314 
315  std::vector<DetId> swissCrossVec;
316  swissCrossVec.clear();
317 
318  swissCrossVec.push_back(navigator.west());
319  navigator.home();
320  swissCrossVec.push_back(navigator.east());
321  navigator.home();
322  swissCrossVec.push_back(navigator.north());
323  navigator.home();
324  swissCrossVec.push_back(navigator.south());
325  navigator.home();
326 
327  std::vector<DetId>::const_iterator detItr;
328  for (unsigned int i = 0; i < swissCrossVec.size(); ++i)
329  {
330  thisHit = recHits_->find(swissCrossVec[i]);
331  if ((swissCrossVec[i] == DetId(0)) || thisHit == recHits_->end()) thisEnergy = 0.0;
332  else thisEnergy = thisHit->energy();
333  if (thisEnergy > seedEnergy)
334  {
335  maxima = false;
336  break;
337  }
338  }
339 
340  return maxima;
341 
342 }
int i
Definition: DBlmapReader.cc:9
std::vector< EcalRecHit >::const_iterator const_iterator
T west() const
move the navigator west
Definition: CaloNavigator.h:59
const EcalRecHitCollection * recHits_
T south() const
move the navigator south
Definition: CaloNavigator.h:45
T pos() const
get the current position
Definition: CaloNavigator.h:32
const_iterator end() const
T east() const
move the navigator east
Definition: CaloNavigator.h:52
void home() const
move the navigator back to the starting point
Definition: DetId.h:18
iterator find(key_type k)
T north() const
move the navigator north
Definition: CaloNavigator.h:38
void CosmicClusterAlgo::mainSearch ( const CaloSubdetectorGeometry geometry_p,
const CaloSubdetectorTopology topology_p,
const CaloSubdetectorGeometry geometryES_p,
EcalPart  ecalPart 
)
private

Definition at line 151 of file CosmicClusterAlgo.cc.

References canSeed_s, checkMaxima(), gather_cfg::cout, current_v25, current_v25Sup, current_v9, makeCluster(), HLT_25ns10e33_v2_cff::navigator, pINFO, prepareCluster(), seeds, used_s, and verbosity.

Referenced by makeClusters().

155 {
156 
157  if (verbosity < pINFO)
158  {
159  std::cout << "Building clusters............" << std::endl;
160  }
161 
162  // Loop over seeds:
163  std::vector<EcalRecHit>::iterator it;
164  for (it = seeds.begin(); it != seeds.end(); it++)
165  {
166 
167  // check if this crystal is able to seed
168  // (event though it is already used)
169  bool usedButCanSeed = false;
170  if (canSeed_s.find(it->id()) != canSeed_s.end()) usedButCanSeed = true;
171 
172  // make sure the current seed does not belong to a cluster already.
173  if ((used_s.find(it->id()) != used_s.end()) && (usedButCanSeed == false))
174  {
175  if (it == seeds.begin())
176  {
177  if (verbosity < pINFO)
178  {
179  std::cout << "##############################################################" << std::endl;
180  std::cout << "DEBUG ALERT: Highest energy seed already belongs to a cluster!" << std::endl;
181  std::cout << "##############################################################" << std::endl;
182  }
183  }
184 
185  // seed crystal is used or is used and cannot seed a cluster
186  // so continue to the next seed crystal...
187  continue;
188  }
189 
190  // clear the vector of hits in current clusterconst EcalRecHitCollection* hits,
191  current_v9.clear();
192  current_v25.clear();
193  current_v25Sup.clear();
194 
195  // Create a navigator at the seed
196  CaloNavigator<DetId> navigator(it->id(), topology_p);
197  DetId seedId = navigator.pos();
198  navigator.setHome(seedId);
199 
200  // Is the seed a local maximum?
201  bool localMaxima = checkMaxima(navigator);
202 
203  if (localMaxima)
204  {
205  // build the 5x5 taking care over which crystals //JHaupt 4-27-08 3x3 is a good option...
206  // can seed new clusters and which can't
207  prepareCluster(navigator, geometry_p);
208  }
209 
210  // If some crystals in the current vector then
211  // make them into a cluster
212  if (current_v25.size() > 0)
213  {
214  makeCluster(geometry_p, geometryES_p, seedId);
215  }
216 
217  } // End loop on seed crystals
218 
219 }
std::vector< DetId > current_v9
std::vector< std::pair< DetId, float > > current_v25Sup
void prepareCluster(CaloNavigator< DetId > &navigator, const CaloSubdetectorGeometry *geometry)
std::vector< EcalRecHit > seeds
Definition: DetId.h:18
void makeCluster(const CaloSubdetectorGeometry *geometry_p, const CaloSubdetectorGeometry *geometryES_p, DetId seedId)
std::vector< DetId > current_v25
VerbosityLevel verbosity
std::set< DetId > canSeed_s
tuple cout
Definition: gather_cfg.py:145
bool checkMaxima(CaloNavigator< DetId > &navigator)
std::set< DetId > used_s
void CosmicClusterAlgo::makeCluster ( const CaloSubdetectorGeometry geometry_p,
const CaloSubdetectorGeometry geometryES_p,
DetId  seedId 
)
private

Definition at line 221 of file CosmicClusterAlgo.cc.

References EcalUncalibratedRecHit::amplitude(), PositionCalc::Calculate_Location(), beam_dqm_sourceclient-live_cfg::chi2, clusters_v, gather_cfg::cout, current_v25, current_v25Sup, current_v9, ecalBarrelSecondThreshold, ecalBarrelSingleThreshold, ecalBarrelSupThreshold, ecalEndcapSecondThreshold, ecalEndcapSingleThreshold, ecalEndcapSupThreshold, edm::SortedCollection< T, SORT >::end(), relval_parameters_module::energy, EcalRecHit::energy(), edm::SortedCollection< T, SORT >::find(), EcalUncalibratedRecHit::id(), EcalRecHit::id(), inEB, EcalRecHit::kGood, EcalRecHit::kOutOfTime, EcalRecHit::kPoorCalib, reco::CaloCluster::multi5x5, pINFO, posCalculator_, position, recHits_, std::swap(), uncalibRecHits_, and verbosity.

Referenced by mainSearch().

225 {
226 
227  double energy = 0;
228  double energySecond = 0.;//JHaupt 4-27-08 Added for the second crystal stream
229  double energyMax = 0.;//JHaupt 4-27-08 Added for the max crystal stream
230  double chi2 = 0;
231  DetId detFir;
232  DetId detSec;
233  //bool goodCluster = false; //JHaupt 4-27-08 Added so that some can be earased.. used another day Might not be needed as seeds are energy ordered...
234 
235 
236  std::vector<DetId>::iterator it;
237  for (it = current_v9.begin(); it != current_v9.end(); it++)
238  {
239  // Martina - check recoFlag for crystals sorrounding the good one
241  // double-check that iterator can be dereferenced
242  if(itt==recHits_->end()) continue;
243  // if rechit affected by features other than these, do not allow 2 crystal seeding either
244  // features are hard coded, for now; add severity?
245  uint32_t rhFlag = (*itt).recoFlag();
246  if (!(
247  rhFlag == EcalRecHit::kGood ||
248  rhFlag == EcalRecHit::kOutOfTime ||
249  rhFlag == EcalRecHit::kPoorCalib
250  )
251  ) continue;
252 
254 
256  EcalUncalibratedRecHit uhit_p = *ittu;
257 
258  if (uhit_p.amplitude() > energySecond ) {energySecond = uhit_p.amplitude(); detSec = uhit_p.id();}
259  if (energySecond > energyMax ) {std::swap(energySecond,energyMax); std::swap(detFir,detSec);}
260  }
261 
262  //if ((detFir.det() == DetId::Ecal) && (detFir.subdetId() == EcalEndcap)) inEB = false;
263  //We ignore the possiblity that the cluster may span into the EE
264 
265  if ((energyMax < (inEB ? ecalBarrelSingleThreshold : ecalEndcapSingleThreshold)) && (energySecond < (inEB ? ecalBarrelSecondThreshold : ecalEndcapSecondThreshold) )) return;
266 
267  for (it = current_v25.begin(); it != current_v25.end(); it++)
268  {
270  EcalRecHit hit_p = *itt;
271 
273  EcalUncalibratedRecHit uhit_p = *ittu;
274 
276  {
277  // energy fraction = 1
278  current_v25Sup.push_back( std::pair<DetId, float>( hit_p.id(), 1.) );
279  energy += hit_p.energy(); //Keep the fully corrected energy
280  chi2 += 0;
281  }
282  }
283 
284  Point position;
286 
287  //don't write empty clusters
288  if (energy == 0 && position == Point(0,0,0)) return;
289 
290  chi2 /= energy;
291  if (verbosity < pINFO)
292  {
293  std::cout << "JH******** NEW CLUSTER ********" << std::endl;
294  std::cout << "JHNo. of crystals = " << current_v25Sup.size() << std::endl;
295  std::cout << "JH Energy = " << energy << std::endl;
296  std::cout << "JH Phi = " << position.phi() << std::endl;
297  std::cout << "JH Eta = " << position.eta() << std::endl;
298  std::cout << "JH*****************************" << std::endl;
299  // specialize this
300 // std::cout << "JH****Emax**** "<<energyMax << " ieta " <<detFir.ieta() <<" iphi "<<detFir.ieta() << std::endl;
301 // std::cout << "JH****Esec**** "<<energySecond << " ieta " <<detSec.ieta() <<" iphi "<<detSec.ieta() << std::endl;
302  }
303  clusters_v.push_back(reco::BasicCluster(energy, position, reco::CaloID(), current_v25Sup, reco::CaloCluster::multi5x5, seedId));
304 }
const EcalUncalibratedRecHitCollection * uncalibRecHits_
double ecalBarrelSingleThreshold
std::vector< EcalRecHit >::const_iterator const_iterator
std::vector< DetId > current_v9
std::vector< reco::BasicCluster > clusters_v
double ecalEndcapSingleThreshold
std::vector< std::pair< DetId, float > > current_v25Sup
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
double ecalBarrelSecondThreshold
const EcalRecHitCollection * recHits_
math::XYZPoint Point
float energy() const
Definition: EcalRecHit.h:68
const_iterator end() const
Definition: DetId.h:18
double ecalEndcapSecondThreshold
DetId id() const
get the id
Definition: EcalRecHit.h:76
std::vector< DetId > current_v25
VerbosityLevel verbosity
ESHandle< TrackerGeometry > geometry
iterator find(key_type k)
math::XYZPoint Calculate_Location(const HitsAndFractions &iDetIds, const edm::SortedCollection< HitType > *iRecHits, const CaloSubdetectorGeometry *iSubGeom, const CaloSubdetectorGeometry *iESGeom=0)
Definition: PositionCalc.h:68
static int position[264][3]
Definition: ReadPGInfo.cc:509
tuple cout
Definition: gather_cfg.py:145
math::XYZPoint Point
point in the space
PositionCalc posCalculator_
std::vector< reco::BasicCluster > CosmicClusterAlgo::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< EcalEtaPhiRegion > &  regions = std::vector<EcalEtaPhiRegion>() 
)

Definition at line 18 of file CosmicClusterAlgo.cc.

References EcalUncalibratedRecHit::amplitude(), barrel, edm::SortedCollection< T, SORT >::begin(), canSeed_s, clusters_v, gather_cfg::cout, ecalBarrelSeedThreshold, ecalEndcapSeedThreshold, edm::SortedCollection< T, SORT >::end(), endcap, CaloCellGeometry::etaPos(), edm::SortedCollection< T, SORT >::find(), CaloSubdetectorGeometry::getGeometry(), inEB, EcalRecHit::kGood, EcalRecHit::kOutOfTime, EcalRecHit::kPoorCalib, mainSearch(), CaloCellGeometry::phiPos(), pINFO, recHits_, HLT_25ns10e33_v2_cff::region, seeds, AlCaHLTBitMon_QueryRunRegistry::string, dtDQMClient_cfg::threshold, uncalibRecHits_, used_s, and verbosity.

Referenced by CosmicClusterProducer::clusterizeECALPart().

27 {
28  seeds.clear();
29  used_s.clear();
30  canSeed_s.clear();
31  clusters_v.clear();
32 
33  recHits_ = hits;
34  uncalibRecHits_ = uncalibhits;
35 
36  inEB = true;
37  double threshold = 0;
38  std::string ecalPart_string;
39  if (ecalPart == endcap)
40  {
41  threshold = ecalEndcapSeedThreshold;
42  ecalPart_string = "EndCap";
43  inEB = false;
44  }
45  if (ecalPart == barrel)
46  {
47  threshold = ecalBarrelSeedThreshold;
48  ecalPart_string = "Barrel";
49  inEB = true;
50  }
51 
52  if (verbosity < pINFO)
53  {
54  std::cout << "-------------------------------------------------------------" << std::endl;
55  std::cout << "Island algorithm invoked for ECAL" << ecalPart_string << std::endl;
56  std::cout << "Looking for seeds, threshold used = " << threshold << " ADC" <<std::endl;
57  }
58 
59  int nregions=0;
60  if(regional) nregions=regions.size();
61 
62  if(!regional || nregions) {
63 
65  for(it = recHits_->begin(); it != recHits_->end(); it++)
66  {
67 
68  if (!uncalibRecHits_){
69  if (verbosity < pINFO)
70  {
71  std::cout << "-------------------------------------------------------------" << std::endl;
72  std::cout << "No Uncalibrated RecHits no Uncalibrated rec hit collection available" << std::endl;
73  }
74  continue;
75  }
76 
77  // if rechit affected by features other than these, do not allow if seeding
78  // features are hard coded, for now; add severity?
79  uint32_t rhFlag = (*it).recoFlag();
80  if (!(
81  rhFlag == EcalRecHit::kGood ||
82  rhFlag == EcalRecHit::kOutOfTime ||
83  rhFlag == EcalRecHit::kPoorCalib
84  )
85  ) continue;
86 
88 
89  if (itt == uncalibRecHits_->end()){
90  if (verbosity < pINFO)
91  {
92  std::cout << "-------------------------------------------------------------" << std::endl;
93  std::cout << "No Uncalibrated RecHit associated with the RecHit Probably no Uncalibrated rec hit collection available" << std::endl;
94  }
95  continue;
96  }
97 
98  EcalUncalibratedRecHit uhit_p = *itt;
99 
100  // looking for cluster seeds
101  if (uhit_p.amplitude() < (inEB ? ecalBarrelSeedThreshold : ecalEndcapSeedThreshold) ) continue; //
102 
103  const CaloCellGeometry & thisCell = *geometry_p->getGeometry(it->id());
104 
105  // Require that RecHit is within clustering region in case
106  // of regional reconstruction
107  bool withinRegion = false;
108  if (regional) {
109  std::vector<EcalEtaPhiRegion>::const_iterator region;
110  for (region=regions.begin(); region!=regions.end(); region++) {
111  if (region->inRegion(thisCell.etaPos(),thisCell.phiPos())) {
112  withinRegion = true;
113  break;
114  }
115  }
116  }
117 
118  if (!regional || withinRegion) {
119  seeds.push_back(*it); // JHaupt 4-27-2008 Et -> energy, most likely not needed as there is already a threshold requirement.
120  }
121  }
122 
123  }
124 
125  sort(seeds.begin(), seeds.end(), EcalRecHitLess());
126 
127  if (verbosity < pINFO)
128  {
129  std::cout << "JH Total number of seeds found in event = " << seeds.size() << std::endl;
130  for (EcalRecHitCollection::const_iterator ji = seeds.begin(); ji != seeds.end(); ++ji)
131  {
132  //std::cout << "JH Seed Energy " << ji->energy() << " hashed " << ((EBDetId)ji->id()).hashedIndex() << std::endl;
133 
134  }
135  }
136 
137  mainSearch(geometry_p,topology_p,geometryES_p,ecalPart );
138  sort(clusters_v.rbegin(), clusters_v.rend(),ClusterEtLess());
139 
140  if (verbosity < pINFO)
141  {
142  std::cout << "---------- end of main search. clusters have been sorted ----" << std::endl;
143  }
144 
145  return clusters_v;
146 
147 }
const EcalUncalibratedRecHitCollection * uncalibRecHits_
float phiPos() const
std::vector< EcalRecHit >::const_iterator const_iterator
std::vector< reco::BasicCluster > clusters_v
void mainSearch(const CaloSubdetectorGeometry *geometry_p, const CaloSubdetectorTopology *topology_p, const CaloSubdetectorGeometry *geometryES_p, EcalPart ecalPart)
const EcalRecHitCollection * recHits_
const_iterator end() const
std::vector< EcalRecHit > seeds
VerbosityLevel verbosity
std::set< DetId > canSeed_s
iterator find(key_type k)
float etaPos() const
tuple cout
Definition: gather_cfg.py:145
std::set< DetId > used_s
const_iterator begin() const
void CosmicClusterAlgo::prepareCluster ( CaloNavigator< DetId > &  navigator,
const CaloSubdetectorGeometry geometry 
)
private

Definition at line 344 of file CosmicClusterAlgo.cc.

References funct::abs(), addCrystal(), canSeed_s, CaloNavigator< T, TOPO >::home(), and CaloNavigator< T, TOPO >::offsetBy().

Referenced by mainSearch().

346 {
347 
348  DetId thisDet;
349  std::set<DetId>::iterator setItr;
350 
351  // now add the 5x5 taking care to mark the edges
352  // as able to seed and where overlapping in the central
353  // region with crystals that were previously able to seed
354  // change their status so they are not able to seed
355  //std::cout << std::endl;
356  for (int dx = -2; dx < 3; ++dx) //for (int dx = -2; dx < 3; ++dx)
357  {
358  for (int dy = -2; dy < 3; ++ dy) //for (int dy = -2; dy < 3; ++ dy)
359  {
360 
361  // navigate in free steps forming
362  // a full 5x5
363  thisDet = navigator.offsetBy(dx, dy);
364  navigator.home();
365 
366  // add the current crystal
367  //std::cout << "adding " << dx << ", " << dy << std::endl;
368 
369 
370 
371  // now consider if we are in an edge (outer 16)
372  // or central (inner 9) region
373  if ((abs(dx) > 1) || (abs(dy) > 1))
374  {
375  // this is an "edge" so should be allowed to seed
376  // provided it is not already used
377  //std::cout << " setting can seed" << std::endl;
378  addCrystal(thisDet,false); //These are in the V25
379  canSeed_s.insert(thisDet);
380  } // end if "edge"
381  else
382  {
383  // or else we are in the central 3x3
384  // and must remove any of these crystals from the canSeed set
385  setItr = canSeed_s.find(thisDet);
386  addCrystal(thisDet,true); //These are in the V9
387  if (setItr != canSeed_s.end())
388  {
389  //std::cout << " unsetting can seed" << std::endl;
390  canSeed_s.erase(setItr);
391  }
392  } // end if "centre"
393 
394 
395  } // end loop on dy
396 
397  } // end loop on dx
398 
399  //std::cout << "*** " << std::endl;
400  //std::cout << " current_v contains " << current_v.size() << std::endl;
401  //std::cout << "*** " << std::endl;
402 }
T offsetBy(int deltaX, int deltaY) const
Free movement of arbitray steps.
Definition: CaloNavigator.h:80
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
void home() const
move the navigator back to the starting point
Definition: DetId.h:18
std::set< DetId > canSeed_s
void addCrystal(const DetId &det, const bool in9)
void CosmicClusterAlgo::setVerbosity ( VerbosityLevel  the_verbosity)
inline

Definition at line 47 of file CosmicClusterAlgo.h.

References verbosity.

48  {
49  verbosity = the_verbosity;
50  }
VerbosityLevel verbosity

Member Data Documentation

std::set<DetId> CosmicClusterAlgo::canSeed_s
private

Definition at line 92 of file CosmicClusterAlgo.h.

Referenced by mainSearch(), makeClusters(), and prepareCluster().

std::vector<reco::BasicCluster> CosmicClusterAlgo::clusters_v
private

Definition at line 104 of file CosmicClusterAlgo.h.

Referenced by makeCluster(), and makeClusters().

std::vector<DetId> CosmicClusterAlgo::current_v25
private

Definition at line 100 of file CosmicClusterAlgo.h.

Referenced by addCrystal(), mainSearch(), and makeCluster().

std::vector< std::pair<DetId, float> > CosmicClusterAlgo::current_v25Sup
private

Definition at line 101 of file CosmicClusterAlgo.h.

Referenced by mainSearch(), and makeCluster().

std::vector<DetId> CosmicClusterAlgo::current_v9
private

Definition at line 99 of file CosmicClusterAlgo.h.

Referenced by addCrystal(), mainSearch(), and makeCluster().

double CosmicClusterAlgo::ecalBarrelSecondThreshold
private

Definition at line 74 of file CosmicClusterAlgo.h.

Referenced by makeCluster().

double CosmicClusterAlgo::ecalBarrelSeedThreshold
private

Definition at line 72 of file CosmicClusterAlgo.h.

Referenced by makeClusters().

double CosmicClusterAlgo::ecalBarrelSingleThreshold
private

Definition at line 73 of file CosmicClusterAlgo.h.

Referenced by makeCluster().

double CosmicClusterAlgo::ecalBarrelSupThreshold
private

Definition at line 75 of file CosmicClusterAlgo.h.

Referenced by makeCluster().

double CosmicClusterAlgo::ecalEndcapSecondThreshold
private

Definition at line 79 of file CosmicClusterAlgo.h.

Referenced by makeCluster().

double CosmicClusterAlgo::ecalEndcapSeedThreshold
private

Definition at line 77 of file CosmicClusterAlgo.h.

Referenced by makeClusters().

double CosmicClusterAlgo::ecalEndcapSingleThreshold
private

Definition at line 78 of file CosmicClusterAlgo.h.

Referenced by makeCluster().

double CosmicClusterAlgo::ecalEndcapSupThreshold
private

Definition at line 80 of file CosmicClusterAlgo.h.

Referenced by makeCluster().

bool CosmicClusterAlgo::inEB
private

Definition at line 96 of file CosmicClusterAlgo.h.

Referenced by makeCluster(), and makeClusters().

PositionCalc CosmicClusterAlgo::posCalculator_
private

Definition at line 68 of file CosmicClusterAlgo.h.

Referenced by CosmicClusterAlgo(), and makeCluster().

const EcalRecHitCollection* CosmicClusterAlgo::recHits_
private

Definition at line 83 of file CosmicClusterAlgo.h.

Referenced by addCrystal(), checkMaxima(), makeCluster(), and makeClusters().

std::vector<EcalRecHit> CosmicClusterAlgo::seeds
private

Definition at line 88 of file CosmicClusterAlgo.h.

Referenced by mainSearch(), and makeClusters().

const EcalUncalibratedRecHitCollection* CosmicClusterAlgo::uncalibRecHits_
private

Definition at line 85 of file CosmicClusterAlgo.h.

Referenced by addCrystal(), makeCluster(), and makeClusters().

std::set<DetId> CosmicClusterAlgo::used_s
private

Definition at line 91 of file CosmicClusterAlgo.h.

Referenced by addCrystal(), mainSearch(), and makeClusters().

VerbosityLevel CosmicClusterAlgo::verbosity
private

Definition at line 107 of file CosmicClusterAlgo.h.

Referenced by mainSearch(), makeCluster(), makeClusters(), and setVerbosity().