CMS 3D CMS Logo

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

\ Algorithm for box particle flow super clustering in the ECAL More...

#include <PFECALSuperClusterAlgo.h>

Classes

class  CalibratedPFCluster
 

Public Types

typedef std::shared_ptr
< CalibratedPFCluster
CalibratedClusterPtr
 
typedef std::vector
< CalibratedClusterPtr
CalibratedClusterPtrVector
 
enum  clustering_type { kBOX =1, kMustache =2 }
 
enum  energy_weight { kRaw, kCalibratedNoPS, kCalibratedTotal }
 

Public Member Functions

std::auto_ptr
< reco::SuperClusterCollection > & 
getEBOutputSCCollection ()
 
std::auto_ptr
< reco::SuperClusterCollection > & 
getEEOutputSCCollection ()
 
void loadAndSortPFClusters (const edm::Event &evt)
 
 PFECALSuperClusterAlgo ()
 constructor More...
 
void run ()
 
void setClusteringType (clustering_type thetype)
 
void setCrackCorrections (bool applyCrackCorrections)
 
void setEnergyWeighting (energy_weight thetype)
 
void setEtawidthSuperClusterBarrel (double etawidth)
 
void setEtawidthSuperClusterEndcap (double etawidth)
 
void setMajorityFraction (const double f)
 
void setPFClusterCalibration (const std::shared_ptr< PFEnergyCalibration > &)
 
void setPhiwidthSuperClusterBarrel (double phiwidth)
 
void setPhiwidthSuperClusterEndcap (double phiwidth)
 
void setSatelliteMerging (const bool doit)
 
void setSatelliteThreshold (const double t)
 
void setThreshPFClusterBarrel (double thresh)
 
void setThreshPFClusterEndcap (double thresh)
 
void setThreshPFClusterES (double thresh)
 
void setThreshPFClusterSeedBarrel (double thresh)
 
void setThreshPFClusterSeedEndcap (double thresh)
 
void setThreshSuperClusterEt (double thresh)
 
void setTokens (const edm::ParameterSet &, edm::ConsumesCollector &&)
 
void setUseDynamicDPhi (bool useit)
 
void setUseETForSeeding (bool useET)
 
void setUsePS (bool useit)
 
void setUseRegression (bool useRegression)
 
void setVerbosityLevel (bool verbose)
 
void update (const edm::EventSetup &)
 

Private Member Functions

void buildAllSuperClusters (CalibratedClusterPtrVector &, double seedthresh)
 
void buildSuperCluster (CalibratedClusterPtr &, CalibratedClusterPtrVector &)
 

Private Attributes

CalibratedClusterPtrVector _clustersEB
 
CalibratedClusterPtrVector _clustersEE
 
clustering_type _clustype
 
energy_weight _eweight
 
std::shared_ptr
< PFEnergyCalibration
_pfEnergyCalibration
 
bool _useDynamicDPhi
 
bool applyCrackCorrections_
 
const reco::BeamSpotbeamSpot_
 
const ESChannelStatuschannelStatus_
 
bool doSatelliteClusterMerge_
 
const
reco::PFCluster::EEtoPSAssociation
EEtoPS_
 
double etawidthSuperCluster_
 
double etawidthSuperClusterBarrel_
 
double etawidthSuperClusterEndcap_
 
double fractionForMajority_
 
edm::EDGetTokenT< reco::BeamSpotinputTagBeamSpot_
 
edm::EDGetTokenT< edm::View
< reco::PFCluster > > 
inputTagPFClusters_
 
edm::EDGetTokenT
< reco::PFCluster::EEtoPSAssociation
inputTagPFClustersES_
 
double phiwidthSuperCluster_
 
double phiwidthSuperClusterBarrel_
 
double phiwidthSuperClusterEndcap_
 
std::unique_ptr
< SCEnergyCorrectorSemiParm
regr_
 
double satelliteThreshold_
 
std::auto_ptr
< reco::SuperClusterCollection
superClustersEB_
 
std::auto_ptr
< reco::SuperClusterCollection
superClustersEE_
 
bool threshIsET_
 
double threshPFCluster_
 
double threshPFClusterBarrel_
 
double threshPFClusterEndcap_
 
double threshPFClusterES_
 
double threshPFClusterSeed_
 
double threshPFClusterSeedBarrel_
 
double threshPFClusterSeedEndcap_
 
double threshSuperClusterEt_
 
bool usePS
 
bool useRegression_
 
bool verbose_
 

Detailed Description

\ Algorithm for box particle flow super clustering in the ECAL

Original Author: Nicolas Chanon Additional Authors (Mustache): Y. Gershtein, R. Patel, L. Gray

Date
July 2012

Definition at line 50 of file PFECALSuperClusterAlgo.h.

Member Typedef Documentation

Definition at line 70 of file PFECALSuperClusterAlgo.h.

Definition at line 71 of file PFECALSuperClusterAlgo.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

PFECALSuperClusterAlgo::PFECALSuperClusterAlgo ( )

constructor

Definition at line 175 of file PFECALSuperClusterAlgo.cc.

175 : beamSpot_(0) { }
const reco::BeamSpot * beamSpot_

Member Function Documentation

void PFECALSuperClusterAlgo::buildAllSuperClusters ( CalibratedClusterPtrVector ,
double  seedthresh 
)
private

Definition at line 288 of file PFECALSuperClusterAlgo.cc.

References buildSuperCluster(), HLT_FULL_cff::clusters, and threshIsET_.

Referenced by run().

289  {
290  IsASeed seedable(seedthresh,threshIsET_);
291  // make sure only seeds appear at the front of the list of clusters
292  std::stable_partition(clusters.begin(),clusters.end(),seedable);
293  // in each iteration we are working on a list that is already sorted
294  // in the cluster energy and remains so through each iteration
295  // NB: since clusters is sorted in loadClusters any_of has O(1)
296  // timing until you run out of seeds!
297  while( std::any_of(clusters.cbegin(), clusters.cend(), seedable) ) {
299  }
300 }
void buildSuperCluster(CalibratedClusterPtr &, CalibratedClusterPtrVector &)
void PFECALSuperClusterAlgo::buildSuperCluster ( CalibratedClusterPtr ,
CalibratedClusterPtrVector  
)
private

Definition at line 303 of file PFECALSuperClusterAlgo.cc.

References _clustype, _eweight, _pfEnergyCalibration, _useDynamicDPhi, reco::SuperCluster::addCluster(), reco::CaloCluster::addHitAndFraction(), reco::SuperCluster::addPreshowerCluster(), applyCrackCorrections_, beamSpot_, channelStatus_, TauDecayModes::dec, doSatelliteClusterMerge_, PFLayer::ECAL_BARREL, PFLayer::ECAL_ENDCAP, EEtoPS_, reco::CaloCluster::energy(), etawidthSuperClusterBarrel_, etawidthSuperClusterEndcap_, Exception, ESCondObjectContainer< T >::find(), spr::find(), fractionForMajority_, edm::Ptr< T >::get(), ESCondObjectContainer< T >::getMap(), kCalibratedNoPS, kCalibratedTotal, kRaw, PFClusterWidthAlgo::pflowEtaWidth(), PFClusterWidthAlgo::pflowPhiWidth(), phiwidthSuperClusterBarrel_, phiwidthSuperClusterEndcap_, reco::BeamSpot::position(), reco::CaloCluster::position(), reco::SuperCluster::preshowerClustersBegin(), reco::SuperCluster::preshowerClustersEnd(), PFLayer::PS1, PFLayer::PS2, ptFast(), reco::SuperCluster::rawEnergy(), regr_, satelliteThreshold_, reco::CaloCluster::setCorrectedEnergy(), reco::SuperCluster::setEtaWidth(), reco::SuperCluster::setPhiWidth(), reco::SuperCluster::setPreshowerEnergy(), reco::SuperCluster::setPreshowerEnergyPlane1(), reco::SuperCluster::setPreshowerEnergyPlane2(), reco::SuperCluster::setSeed(), superClustersEB_, superClustersEE_, threshSuperClusterEt_, useRegression_, and verbose_.

Referenced by buildAllSuperClusters().

304  {
305  IsClustered IsClusteredWithSeed(seed,_clustype,_useDynamicDPhi);
306  IsLinkedByRecHit MatchesSeedByRecHit(seed,satelliteThreshold_,
307  fractionForMajority_,0.1,0.2);
308  bool isEE = false;
309  SumPSEnergy sumps1(PFLayer::PS1), sumps2(PFLayer::PS2);
310  switch( seed->the_ptr()->layer() ) {
312  IsClusteredWithSeed.phiwidthSuperCluster_ = phiwidthSuperClusterBarrel_;
313  IsClusteredWithSeed.etawidthSuperCluster_ = etawidthSuperClusterBarrel_;
314  edm::LogInfo("PFClustering") << "Building SC number "
315  << superClustersEB_->size() + 1
316  << " in the ECAL barrel!";
317  break;
318  case PFLayer::ECAL_ENDCAP:
319  IsClusteredWithSeed.phiwidthSuperCluster_ = phiwidthSuperClusterEndcap_;
320  IsClusteredWithSeed.etawidthSuperCluster_ = etawidthSuperClusterEndcap_;
321  edm::LogInfo("PFClustering") << "Building SC number "
322  << superClustersEE_->size() + 1
323  << " in the ECAL endcap!" << std::endl;
324  isEE = true;
325  break;
326  default:
327  break;
328  }
329 
330  // this function shuffles the list of clusters into a list
331  // where all clustered sub-clusters are at the front
332  // and returns a pointer to the first unclustered cluster.
333  // The relative ordering of clusters is preserved
334  // (i.e. both resulting sub-lists are sorted by energy).
335  auto not_clustered = std::stable_partition(clusters.begin(),clusters.end(),
336  IsClusteredWithSeed);
337  // satellite cluster merging
338  // it was found that large clusters can split!
339  if( doSatelliteClusterMerge_ ) {
340  not_clustered = std::stable_partition(not_clustered,clusters.end(),
341  MatchesSeedByRecHit);
342  }
343 
344  if(verbose_) {
345  edm::LogInfo("PFClustering") << "Dumping cluster detail";
346  edm::LogVerbatim("PFClustering")
347  << "\tPassed seed: e = " << seed->energy_nocalib()
348  << " eta = " << seed->eta() << " phi = " << seed->phi()
349  << std::endl;
350  for( auto clus = clusters.cbegin(); clus != not_clustered; ++clus ) {
351  edm::LogVerbatim("PFClustering")
352  << "\t\tClustered cluster: e = " << (*clus)->energy_nocalib()
353  << " eta = " << (*clus)->eta() << " phi = " << (*clus)->phi()
354  << std::endl;
355  }
356  for( auto clus = not_clustered; clus != clusters.end(); ++clus ) {
357  edm::LogVerbatim("PFClustering")
358  << "\tNon-Clustered cluster: e = " << (*clus)->energy_nocalib()
359  << " eta = " << (*clus)->eta() << " phi = " << (*clus)->phi()
360  << std::endl;
361  }
362  }
363  // move the clustered clusters out of available cluster list
364  // and into a temporary vector for building the SC
365  CalibratedClusterPtrVector clustered(clusters.begin(),not_clustered);
366  clusters.erase(clusters.begin(),not_clustered);
367  // need the vector of raw pointers for a PF width class
368  std::vector<const reco::PFCluster*> bare_ptrs;
369  // calculate necessary parameters and build the SC
370  double posX(0), posY(0), posZ(0),
371  corrSCEnergy(0), corrPS1Energy(0), corrPS2Energy(0),
372  ePS1(0), ePS2(0), energyweight(0), energyweighttot(0);
373  std::vector<double> ps1_energies, ps2_energies;
374  int condP1(1), condP2(1);
375  for( auto& clus : clustered ) {
376  ePS1 = ePS2 = 0;
377  energyweight = clus->energy_nocalib();
378  bare_ptrs.push_back(clus->the_ptr().get());
379  // update EE calibrated super cluster energies
380  if( isEE ) {
381  ePS1 = ePS2 = 0;
382  condP1 = condP2 = 1;
383  ps1_energies.clear();
384  ps2_energies.clear();
385  auto ee_key_val =
386  std::make_pair(clus->the_ptr().key(),edm::Ptr<reco::PFCluster>());
387  const auto clustops = std::equal_range(EEtoPS_->begin(),
388  EEtoPS_->end(),
389  ee_key_val,
390  sortByKey);
391  for( auto i_ps = clustops.first; i_ps != clustops.second; ++i_ps) {
392  edm::Ptr<reco::PFCluster> psclus(i_ps->second);
393 
394  auto const& recH_Frac = psclus->recHitFractions();
395 
396  switch( psclus->layer() ) {
397  case PFLayer::PS1:
398  ps1_energies.push_back(psclus->energy());
399  for (auto const& recH : recH_Frac){
400  ESDetId strip1 = recH.recHitRef()->detId();
401  if(strip1 != ESDetId(0)){
403  // getStatusCode() == 1 => dead channel
404  //apply correction if all recHits in dead region
405  if(status_p1->getStatusCode() == 0) condP1 = 0; //active
406  }
407  }
408  break;
409  case PFLayer::PS2:
410  ps2_energies.push_back(psclus->energy());
411  for (auto const& recH : recH_Frac){
412  ESDetId strip2 = recH.recHitRef()->detId();
413  if(strip2 != ESDetId(0)) {
415  if(status_p2->getStatusCode() == 0) condP2 = 0;
416  }
417  }
418  break;
419  default:
420  break;
421  }
422  }
423  if(condP1 == 1) ePS1 = -1.;
424  if(condP2 == 1) ePS2 = -1.;
425  _pfEnergyCalibration->energyEm(*(clus->the_ptr()),
426  ps1_energies,ps2_energies,
427  ePS1,ePS2,
429  }
430 
431  if(ePS1 == -1.) ePS1 = 0;
432  if(ePS2 == -1.) ePS2 = 0;
433 
434  switch( _eweight ) {
435  case kRaw: // energyweight is initialized to raw cluster energy
436  break;
437  case kCalibratedNoPS:
438  energyweight = clus->energy() - ePS1 - ePS2;
439  break;
440  case kCalibratedTotal:
441  energyweight = clus->energy();
442  break;
443  default:
444  break;
445  }
446  const math::XYZPoint& cluspos = clus->the_ptr()->position();
447  posX += energyweight * cluspos.X();
448  posY += energyweight * cluspos.Y();
449  posZ += energyweight * cluspos.Z();
450 
451  energyweighttot += energyweight;
452  corrSCEnergy += clus->energy();
453  corrPS1Energy += ePS1;
454  corrPS2Energy += ePS2;
455  }
456  posX /= energyweighttot;
457  posY /= energyweighttot;
458  posZ /= energyweighttot;
459 
460  // now build the supercluster
461  reco::SuperCluster new_sc(corrSCEnergy,math::XYZPoint(posX,posY,posZ));
462  new_sc.setCorrectedEnergy(corrSCEnergy);
463  new_sc.setSeed(clustered.front()->the_ptr());
464  new_sc.setPreshowerEnergy(corrPS1Energy+corrPS2Energy);
465  new_sc.setPreshowerEnergyPlane1(corrPS1Energy);
466  new_sc.setPreshowerEnergyPlane2(corrPS2Energy);
467  for( const auto& clus : clustered ) {
468  new_sc.addCluster(clus->the_ptr());
469 
470  auto& hits_and_fractions = clus->the_ptr()->hitsAndFractions();
471  for( auto& hit_and_fraction : hits_and_fractions ) {
472  new_sc.addHitAndFraction(hit_and_fraction.first,hit_and_fraction.second);
473  }
474  if( isEE ) {
475  auto ee_key_val =
476  std::make_pair(clus->the_ptr().key(),edm::Ptr<reco::PFCluster>());
477  const auto clustops = std::equal_range(EEtoPS_->begin(),
478  EEtoPS_->end(),
479  ee_key_val,
480  sortByKey);
481  // EE rechits should be uniquely matched to sets of pre-shower
482  // clusters at this point, so we throw an exception if otherwise
483  // now wrapped in EDM debug flags
484  for( auto i_ps = clustops.first; i_ps != clustops.second; ++i_ps) {
485  edm::Ptr<reco::PFCluster> psclus(i_ps->second);
486 #ifdef EDM_ML_DEBUG
487  auto found_pscluster = std::find(new_sc.preshowerClustersBegin(),
488  new_sc.preshowerClustersEnd(),
489  i_ps->second);
490  if( found_pscluster == new_sc.preshowerClustersEnd() ) {
491 #endif
492  new_sc.addPreshowerCluster(psclus);
493 #ifdef EDM_ML_DEBUG
494  } else {
495  throw cms::Exception("PFECALSuperClusterAlgo::buildSuperCluster")
496  << "Found a PS cluster matched to more than one EE cluster!"
497  << std::endl << std::hex << psclus.get() << " == "
498  << found_pscluster->get() << std::dec << std::endl;
499  }
500 #endif
501  }
502  }
503  }
504 
505  // calculate linearly weighted cluster widths
506  PFClusterWidthAlgo pfwidth(bare_ptrs);
507  new_sc.setEtaWidth(pfwidth.pflowEtaWidth());
508  new_sc.setPhiWidth(pfwidth.pflowPhiWidth());
509 
510  // cache the value of the raw energy
511  new_sc.rawEnergy();
512 
513  //apply regression energy corrections
514  if( useRegression_ ) {
515  regr_->modifyObject(new_sc);
516  }
517 
518  // save the super cluster to the appropriate list (if it passes the final
519  // Et threshold)
520  //Note that Et is computed here with respect to the beamspot position
521  //in order to be consistent with the cut applied in the
522  //ElectronSeedProducer
523  double scEtBS =
524  ptFast(new_sc.energy(),new_sc.position(),beamSpot_->position());
525 
526  if ( scEtBS > threshSuperClusterEt_ ) {
527  switch( seed->the_ptr()->layer() ) {
529  superClustersEB_->push_back(new_sc);
530  break;
531  case PFLayer::ECAL_ENDCAP:
532  superClustersEE_->push_back(new_sc);
533  break;
534  default:
535  break;
536  }
537  }
538 }
std::auto_ptr< reco::SuperClusterCollection > superClustersEB_
const ESChannelStatus * channelStatus_
std::unique_ptr< SCEnergyCorrectorSemiParm > regr_
const self & getMap() const
const reco::BeamSpot * beamSpot_
const reco::PFCluster::EEtoPSAssociation * EEtoPS_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
double ptFast(const double energy, const math::XYZPoint &position, const math::XYZPoint &origin)
std::vector< CalibratedClusterPtr > CalibratedClusterPtrVector
std::shared_ptr< PFEnergyCalibration > _pfEnergyCalibration
const_iterator find(uint32_t rawId) const
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
std::auto_ptr< reco::SuperClusterCollection > superClustersEE_
std::vector< Item >::const_iterator const_iterator
const Point & position() const
position
Definition: BeamSpot.h:62
std::auto_ptr<reco::SuperClusterCollection>& PFECALSuperClusterAlgo::getEBOutputSCCollection ( )
inline

Definition at line 119 of file PFECALSuperClusterAlgo.h.

References superClustersEB_.

119 { return superClustersEB_; }
std::auto_ptr< reco::SuperClusterCollection > superClustersEB_
std::auto_ptr<reco::SuperClusterCollection>& PFECALSuperClusterAlgo::getEEOutputSCCollection ( )
inline

Definition at line 121 of file PFECALSuperClusterAlgo.h.

References superClustersEE_.

121 { return superClustersEE_; }
std::auto_ptr< reco::SuperClusterCollection > superClustersEE_
void PFECALSuperClusterAlgo::loadAndSortPFClusters ( const edm::Event evt)

Definition at line 219 of file PFECALSuperClusterAlgo.cc.

References _clustersEB, _clustersEE, beamSpot_, HLT_FULL_cff::clusters, PFLayer::ECAL_BARREL, PFLayer::ECAL_ENDCAP, EEtoPS_, edm::Event::getByToken(), i, inputTagBeamSpot_, inputTagPFClusters_, inputTagPFClustersES_, LogDebug, edm::Handle< T >::product(), regr_, superClustersEB_, superClustersEE_, threshPFClusterBarrel_, threshPFClusterEndcap_, and useRegression_.

219  {
220 
221  //load input collections
222  //Load the pfcluster collections
223  edm::Handle<edm::View<reco::PFCluster> > pfclustersHandle;
224  iEvent.getByToken( inputTagPFClusters_, pfclustersHandle );
225 
227  iEvent.getByToken( inputTagPFClustersES_, psAssociationHandle);
228 
229  const PFClusterView& clusters = *pfclustersHandle.product();
230  const reco::PFCluster::EEtoPSAssociation& psclusters = *psAssociationHandle.product();
231 
232  //load BeamSpot
234  iEvent.getByToken( inputTagBeamSpot_, bsHandle);
235  beamSpot_ = bsHandle.product();
236 
237  //initialize regression for this event
238  if (useRegression_) {
239  regr_->setEvent(iEvent);
240  }
241 
242  // reset the system for running
244  _clustersEB.clear();
246  _clustersEE.clear();
247  EEtoPS_ = &psclusters;
248 
249  //Select PF clusters available for the clustering
250  for ( size_t i = 0; i < clusters.size(); ++i ){
251  auto cluster = clusters.ptrAt(i);
252  LogDebug("PFClustering")
253  << "Loading PFCluster i="<<cluster.key()
254  <<" energy="<<cluster->energy()<<std::endl;
255 
256  CalibratedClusterPtr calib_cluster(new CalibratedPFCluster(cluster));
257  switch( cluster->layer() ) {
259  if( calib_cluster->energy() > threshPFClusterBarrel_ ) {
260  _clustersEB.push_back(calib_cluster);
261  }
262  break;
264  if( calib_cluster->energy() > threshPFClusterEndcap_ ) {
265  _clustersEE.push_back(calib_cluster);
266  }
267  break;
268  default:
269  break;
270  }
271  }
272  // sort full cluster collections by their calibrated energy
273  // this will put all the seeds first by construction
274  GreaterByEt greater;
275  std::sort(_clustersEB.begin(), _clustersEB.end(), greater);
276  std::sort(_clustersEE.begin(), _clustersEE.end(), greater);
277 
278 }
#define LogDebug(id)
std::auto_ptr< reco::SuperClusterCollection > superClustersEB_
int i
Definition: DBlmapReader.cc:9
edm::EDGetTokenT< edm::View< reco::PFCluster > > inputTagPFClusters_
std::unique_ptr< SCEnergyCorrectorSemiParm > regr_
const reco::BeamSpot * beamSpot_
const reco::PFCluster::EEtoPSAssociation * EEtoPS_
std::shared_ptr< CalibratedPFCluster > CalibratedClusterPtr
int iEvent
Definition: GenABIO.cc:230
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
std::vector< std::pair< CaloClusterPtr::key_type, edm::Ptr< PFCluster > > > EEtoPSAssociation
Definition: PFCluster.h:50
CalibratedClusterPtrVector _clustersEE
edm::EDGetTokenT< reco::PFCluster::EEtoPSAssociation > inputTagPFClustersES_
T const * product() const
Definition: Handle.h:81
edm::EDGetTokenT< reco::BeamSpot > inputTagBeamSpot_
std::auto_ptr< reco::SuperClusterCollection > superClustersEE_
CalibratedClusterPtrVector _clustersEB
void PFECALSuperClusterAlgo::run ( void  )

Definition at line 280 of file PFECALSuperClusterAlgo.cc.

References _clustersEB, _clustersEE, buildAllSuperClusters(), threshPFClusterSeedBarrel_, and threshPFClusterSeedEndcap_.

280  {
281  // clusterize the EB
283  // clusterize the EE
285 }
void buildAllSuperClusters(CalibratedClusterPtrVector &, double seedthresh)
CalibratedClusterPtrVector _clustersEE
CalibratedClusterPtrVector _clustersEB
void PFECALSuperClusterAlgo::setClusteringType ( clustering_type  thetype)
inline

Definition at line 79 of file PFECALSuperClusterAlgo.h.

References _clustype.

79 { _clustype = thetype; }
void PFECALSuperClusterAlgo::setCrackCorrections ( bool  applyCrackCorrections)
inline
void PFECALSuperClusterAlgo::setEnergyWeighting ( energy_weight  thetype)
inline

Definition at line 81 of file PFECALSuperClusterAlgo.h.

References _eweight.

81 { _eweight = thetype; }
void PFECALSuperClusterAlgo::setEtawidthSuperClusterBarrel ( double  etawidth)
inline

Definition at line 97 of file PFECALSuperClusterAlgo.h.

References etawidthSuperClusterBarrel_.

void PFECALSuperClusterAlgo::setEtawidthSuperClusterEndcap ( double  etawidth)
inline

Definition at line 99 of file PFECALSuperClusterAlgo.h.

References etawidthSuperClusterEndcap_.

void PFECALSuperClusterAlgo::setMajorityFraction ( const double  f)
inline

Definition at line 108 of file PFECALSuperClusterAlgo.h.

References f, and fractionForMajority_.

108 { fractionForMajority_ = f; }
double f[11][100]
void PFECALSuperClusterAlgo::setPFClusterCalibration ( const std::shared_ptr< PFEnergyCalibration > &  calib)

Definition at line 178 of file PFECALSuperClusterAlgo.cc.

References _pfEnergyCalibration, and calib.

178  {
180 }
MVATrainerComputer * calib
Definition: MVATrainer.cc:64
std::shared_ptr< PFEnergyCalibration > _pfEnergyCalibration
void PFECALSuperClusterAlgo::setPhiwidthSuperClusterBarrel ( double  phiwidth)
inline

Definition at line 96 of file PFECALSuperClusterAlgo.h.

References phiwidthSuperClusterBarrel_.

void PFECALSuperClusterAlgo::setPhiwidthSuperClusterEndcap ( double  phiwidth)
inline

Definition at line 98 of file PFECALSuperClusterAlgo.h.

References phiwidthSuperClusterEndcap_.

void PFECALSuperClusterAlgo::setSatelliteMerging ( const bool  doit)
inline

Definition at line 106 of file PFECALSuperClusterAlgo.h.

References doSatelliteClusterMerge_.

void PFECALSuperClusterAlgo::setSatelliteThreshold ( const double  t)
inline

Definition at line 107 of file PFECALSuperClusterAlgo.h.

References satelliteThreshold_, and lumiQTWidget::t.

void PFECALSuperClusterAlgo::setThreshPFClusterBarrel ( double  thresh)
inline
void PFECALSuperClusterAlgo::setThreshPFClusterEndcap ( double  thresh)
inline
void PFECALSuperClusterAlgo::setThreshPFClusterES ( double  thresh)
inline
void PFECALSuperClusterAlgo::setThreshPFClusterSeedBarrel ( double  thresh)
inline
void PFECALSuperClusterAlgo::setThreshPFClusterSeedEndcap ( double  thresh)
inline
void PFECALSuperClusterAlgo::setThreshSuperClusterEt ( double  thresh)
inline
void PFECALSuperClusterAlgo::setTokens ( const edm::ParameterSet iConfig,
edm::ConsumesCollector &&  cc 
)

Definition at line 182 of file PFECALSuperClusterAlgo.cc.

References edm::ParameterSet::getParameter(), inputTagBeamSpot_, inputTagPFClusters_, inputTagPFClustersES_, regr_, and useRegression_.

182  {
183 
185  cc.consumes<edm::View<reco::PFCluster> >(iConfig.getParameter<edm::InputTag>("PFClusters"));
189  cc.consumes<reco::BeamSpot>(iConfig.getParameter<edm::InputTag>("BeamSpot"));
190 
191  if (useRegression_) {
192  const edm::ParameterSet &regconf = iConfig.getParameter<edm::ParameterSet>("regressionConfig");
193 
194  regr_.reset(new SCEnergyCorrectorSemiParm());
195  regr_->setTokens(regconf, cc);
196  }
197 
198 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
edm::EDGetTokenT< edm::View< reco::PFCluster > > inputTagPFClusters_
std::unique_ptr< SCEnergyCorrectorSemiParm > regr_
std::vector< std::pair< CaloClusterPtr::key_type, edm::Ptr< PFCluster > > > EEtoPSAssociation
Definition: PFCluster.h:50
edm::EDGetTokenT< reco::PFCluster::EEtoPSAssociation > inputTagPFClustersES_
edm::EDGetTokenT< reco::BeamSpot > inputTagBeamSpot_
void PFECALSuperClusterAlgo::setUseDynamicDPhi ( bool  useit)
inline

Definition at line 85 of file PFECALSuperClusterAlgo.h.

References _useDynamicDPhi.

void PFECALSuperClusterAlgo::setUseETForSeeding ( bool  useET)
inline

Definition at line 83 of file PFECALSuperClusterAlgo.h.

References threshIsET_.

void PFECALSuperClusterAlgo::setUsePS ( bool  useit)
inline

Definition at line 100 of file PFECALSuperClusterAlgo.h.

References usePS.

100 { usePS = useit; }
void PFECALSuperClusterAlgo::setUseRegression ( bool  useRegression)
inline
void PFECALSuperClusterAlgo::setVerbosityLevel ( bool  verbose)
inline

Definition at line 77 of file PFECALSuperClusterAlgo.h.

References verbose, and verbose_.

void PFECALSuperClusterAlgo::update ( const edm::EventSetup setup)

Definition at line 200 of file PFECALSuperClusterAlgo.cc.

References _pfEnergyCalibration, channelStatus_, edm::EventSetup::get(), edm::ESHandle< class >::product(), regr_, and useRegression_.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

200  {
201 
202  if (useRegression_) {
203  regr_->setEventSetup(setup);
204  }
205 
206  edm::ESHandle<ESEEIntercalibConstants> esEEInterCalibHandle_;
207  setup.get<ESEEIntercalibConstantsRcd>().get(esEEInterCalibHandle_);
208  _pfEnergyCalibration->initAlphaGamma_ESplanes_fromDB(esEEInterCalibHandle_.product());
209 
210  edm::ESHandle<ESChannelStatus> esChannelStatusHandle_;
211  setup.get<ESChannelStatusRcd>().get(esChannelStatusHandle_);
212  channelStatus_ = esChannelStatusHandle_.product();
213 
214 }
const ESChannelStatus * channelStatus_
std::unique_ptr< SCEnergyCorrectorSemiParm > regr_
std::shared_ptr< PFEnergyCalibration > _pfEnergyCalibration
const T & get() const
Definition: EventSetup.h:56
T const * product() const
Definition: ESHandle.h:86

Member Data Documentation

CalibratedClusterPtrVector PFECALSuperClusterAlgo::_clustersEB
private

Definition at line 136 of file PFECALSuperClusterAlgo.h.

Referenced by loadAndSortPFClusters(), and run().

CalibratedClusterPtrVector PFECALSuperClusterAlgo::_clustersEE
private

Definition at line 137 of file PFECALSuperClusterAlgo.h.

Referenced by loadAndSortPFClusters(), and run().

clustering_type PFECALSuperClusterAlgo::_clustype
private

Definition at line 142 of file PFECALSuperClusterAlgo.h.

Referenced by buildSuperCluster(), and setClusteringType().

energy_weight PFECALSuperClusterAlgo::_eweight
private

Definition at line 143 of file PFECALSuperClusterAlgo.h.

Referenced by buildSuperCluster(), and setEnergyWeighting().

std::shared_ptr<PFEnergyCalibration> PFECALSuperClusterAlgo::_pfEnergyCalibration
private

Definition at line 141 of file PFECALSuperClusterAlgo.h.

Referenced by buildSuperCluster(), setPFClusterCalibration(), and update().

bool PFECALSuperClusterAlgo::_useDynamicDPhi
private

Definition at line 176 of file PFECALSuperClusterAlgo.h.

Referenced by buildSuperCluster(), and setUseDynamicDPhi().

bool PFECALSuperClusterAlgo::applyCrackCorrections_
private

Definition at line 178 of file PFECALSuperClusterAlgo.h.

Referenced by buildSuperCluster(), and setCrackCorrections().

const reco::BeamSpot* PFECALSuperClusterAlgo::beamSpot_
private

Definition at line 133 of file PFECALSuperClusterAlgo.h.

Referenced by buildSuperCluster(), and loadAndSortPFClusters().

const ESChannelStatus* PFECALSuperClusterAlgo::channelStatus_
private

Definition at line 134 of file PFECALSuperClusterAlgo.h.

Referenced by buildSuperCluster(), and update().

bool PFECALSuperClusterAlgo::doSatelliteClusterMerge_
private

Definition at line 173 of file PFECALSuperClusterAlgo.h.

Referenced by buildSuperCluster(), and setSatelliteMerging().

const reco::PFCluster::EEtoPSAssociation* PFECALSuperClusterAlgo::EEtoPS_
private

Definition at line 140 of file PFECALSuperClusterAlgo.h.

Referenced by buildSuperCluster(), and loadAndSortPFClusters().

double PFECALSuperClusterAlgo::etawidthSuperCluster_
private

Definition at line 159 of file PFECALSuperClusterAlgo.h.

double PFECALSuperClusterAlgo::etawidthSuperClusterBarrel_
private

Definition at line 169 of file PFECALSuperClusterAlgo.h.

Referenced by buildSuperCluster(), and setEtawidthSuperClusterBarrel().

double PFECALSuperClusterAlgo::etawidthSuperClusterEndcap_
private

Definition at line 171 of file PFECALSuperClusterAlgo.h.

Referenced by buildSuperCluster(), and setEtawidthSuperClusterEndcap().

double PFECALSuperClusterAlgo::fractionForMajority_
private

Definition at line 174 of file PFECALSuperClusterAlgo.h.

Referenced by buildSuperCluster(), and setMajorityFraction().

edm::EDGetTokenT<reco::BeamSpot> PFECALSuperClusterAlgo::inputTagBeamSpot_
private

Definition at line 131 of file PFECALSuperClusterAlgo.h.

Referenced by loadAndSortPFClusters(), and setTokens().

edm::EDGetTokenT<edm::View<reco::PFCluster> > PFECALSuperClusterAlgo::inputTagPFClusters_
private

Definition at line 129 of file PFECALSuperClusterAlgo.h.

Referenced by loadAndSortPFClusters(), and setTokens().

edm::EDGetTokenT<reco::PFCluster::EEtoPSAssociation> PFECALSuperClusterAlgo::inputTagPFClustersES_
private

Definition at line 130 of file PFECALSuperClusterAlgo.h.

Referenced by loadAndSortPFClusters(), and setTokens().

double PFECALSuperClusterAlgo::phiwidthSuperCluster_
private

Definition at line 160 of file PFECALSuperClusterAlgo.h.

double PFECALSuperClusterAlgo::phiwidthSuperClusterBarrel_
private

Definition at line 168 of file PFECALSuperClusterAlgo.h.

Referenced by buildSuperCluster(), and setPhiwidthSuperClusterBarrel().

double PFECALSuperClusterAlgo::phiwidthSuperClusterEndcap_
private

Definition at line 170 of file PFECALSuperClusterAlgo.h.

Referenced by buildSuperCluster(), and setPhiwidthSuperClusterEndcap().

std::unique_ptr<SCEnergyCorrectorSemiParm> PFECALSuperClusterAlgo::regr_
private
double PFECALSuperClusterAlgo::satelliteThreshold_
private

Definition at line 174 of file PFECALSuperClusterAlgo.h.

Referenced by buildSuperCluster(), and setSatelliteThreshold().

std::auto_ptr<reco::SuperClusterCollection> PFECALSuperClusterAlgo::superClustersEB_
private
std::auto_ptr<reco::SuperClusterCollection> PFECALSuperClusterAlgo::superClustersEE_
private
bool PFECALSuperClusterAlgo::threshIsET_
private

Definition at line 179 of file PFECALSuperClusterAlgo.h.

Referenced by buildAllSuperClusters(), and setUseETForSeeding().

double PFECALSuperClusterAlgo::threshPFCluster_
private

Definition at line 158 of file PFECALSuperClusterAlgo.h.

double PFECALSuperClusterAlgo::threshPFClusterBarrel_
private

Definition at line 163 of file PFECALSuperClusterAlgo.h.

Referenced by loadAndSortPFClusters(), and setThreshPFClusterBarrel().

double PFECALSuperClusterAlgo::threshPFClusterEndcap_
private

Definition at line 165 of file PFECALSuperClusterAlgo.h.

Referenced by loadAndSortPFClusters(), and setThreshPFClusterEndcap().

double PFECALSuperClusterAlgo::threshPFClusterES_
private

Definition at line 166 of file PFECALSuperClusterAlgo.h.

Referenced by setThreshPFClusterES().

double PFECALSuperClusterAlgo::threshPFClusterSeed_
private

Definition at line 157 of file PFECALSuperClusterAlgo.h.

double PFECALSuperClusterAlgo::threshPFClusterSeedBarrel_
private

Definition at line 162 of file PFECALSuperClusterAlgo.h.

Referenced by run(), and setThreshPFClusterSeedBarrel().

double PFECALSuperClusterAlgo::threshPFClusterSeedEndcap_
private

Definition at line 164 of file PFECALSuperClusterAlgo.h.

Referenced by run(), and setThreshPFClusterSeedEndcap().

double PFECALSuperClusterAlgo::threshSuperClusterEt_
private

Definition at line 155 of file PFECALSuperClusterAlgo.h.

Referenced by buildSuperCluster(), and setThreshSuperClusterEt().

bool PFECALSuperClusterAlgo::usePS
private

Definition at line 181 of file PFECALSuperClusterAlgo.h.

Referenced by setUsePS().

bool PFECALSuperClusterAlgo::useRegression_
private
bool PFECALSuperClusterAlgo::verbose_
private

Definition at line 149 of file PFECALSuperClusterAlgo.h.

Referenced by buildSuperCluster(), and setVerbosityLevel().