CMS 3D CMS Logo

PFECALSuperClusterAlgo.h
Go to the documentation of this file.
1 #ifndef RecoEcal_EgammaClusterAlgos_PFECALSuperClusterAlgo_h
2 #define RecoEcal_EgammaClusterAlgos_PFECALSuperClusterAlgo_h
3 
10 
15 
17 
19 
21 
25 
28 
30 
31 #include <vector>
32 #include <memory>
33 
35 
43 public:
44  enum clustering_type { kBOX = 1, kMustache = 2 };
46 
47  // simple class for associating calibrated energies
49  public:
51 
52  double energy() const { return cluptr->correctedEnergy(); }
53  double energy_nocalib() const { return cluptr->energy(); }
54  double eta() const { return cluptr->positionREP().eta(); }
55  double phi() const { return cluptr->positionREP().phi(); }
56 
58 
59  private:
61  };
62  typedef std::shared_ptr<CalibratedPFCluster> CalibratedClusterPtr;
63  typedef std::vector<CalibratedClusterPtr> CalibratedClusterPtrVector;
64 
67 
69 
70  void setClusteringType(clustering_type thetype) { _clustype = thetype; }
71 
72  void setEnergyWeighting(energy_weight thetype) { _eweight = thetype; }
73 
74  void setUseETForSeeding(bool useET) { threshIsET_ = useET; }
75 
76  void setUseDynamicDPhi(bool useit) { useDynamicDPhi_ = useit; }
77 
79 
81 
86 
87  void setPhiwidthSuperClusterBarrel(double phiwidth) { phiwidthSuperClusterBarrel_ = phiwidth; }
88  void setEtawidthSuperClusterBarrel(double etawidth) { etawidthSuperClusterBarrel_ = etawidth; }
89  void setPhiwidthSuperClusterEndcap(double phiwidth) { phiwidthSuperClusterEndcap_ = phiwidth; }
90  void setEtawidthSuperClusterEndcap(double etawidth) { etawidthSuperClusterEndcap_ = etawidth; }
91 
92  void setPFClusterCalibration(const std::shared_ptr<PFEnergyCalibration>&);
93 
94  void setSatelliteMerging(const bool doit) { doSatelliteClusterMerge_ = doit; }
95  void setSatelliteThreshold(const double t) { satelliteThreshold_ = t; }
96  void setMajorityFraction(const double f) { fractionForMajority_ = f; }
97  void setDropUnseedable(const bool d) { dropUnseedable_ = d; }
98 
100 
102 
104  void update(const edm::EventSetup&);
105 
106  std::unique_ptr<reco::SuperClusterCollection>& getEBOutputSCCollection() { return superClustersEB_; }
107  std::unique_ptr<reco::SuperClusterCollection>& getEEOutputSCCollection() { return superClustersEE_; }
108 
109  void loadAndSortPFClusters(const edm::Event& evt);
110 
111  void run();
112 
113 private:
117 
120 
123  std::unique_ptr<reco::SuperClusterCollection> superClustersEB_;
124  std::unique_ptr<reco::SuperClusterCollection> superClustersEE_;
126  std::shared_ptr<PFEnergyCalibration> _pfEnergyCalibration;
129  void buildAllSuperClusters(CalibratedClusterPtrVector&, double seedthresh);
131 
132  bool verbose_;
133 
134  // regression
136  std::unique_ptr<SCEnergyCorrectorSemiParm> regr_;
137 
139 
144 
149 
150  bool doSatelliteClusterMerge_; //rock it
153 
155 
158 
159  // OOT photons
165 };
166 
167 #endif
PFECALSuperClusterAlgo::clustering_type
clustering_type
Definition: PFECALSuperClusterAlgo.h:44
PFECALSuperClusterAlgo::inputTagPFClustersES_
edm::EDGetTokenT< reco::PFCluster::EEtoPSAssociation > inputTagPFClustersES_
Definition: PFECALSuperClusterAlgo.h:115
PFRecHitFwd.h
PFECALSuperClusterAlgo::verbose_
bool verbose_
Definition: PFECALSuperClusterAlgo.h:132
PFECALSuperClusterAlgo::buildAllSuperClusters
void buildAllSuperClusters(CalibratedClusterPtrVector &, double seedthresh)
Definition: PFECALSuperClusterAlgo.cc:235
HLT_2018_cff.applyCrackCorrections
applyCrackCorrections
Definition: HLT_2018_cff.py:12007
PFECALSuperClusterAlgo::CalibratedPFCluster::phi
double phi() const
Definition: PFECALSuperClusterAlgo.h:55
PFECALSuperClusterAlgo::superClustersEE_
std::unique_ptr< reco::SuperClusterCollection > superClustersEE_
Definition: PFECALSuperClusterAlgo.h:124
PFECALSuperClusterAlgo::doSatelliteClusterMerge_
bool doSatelliteClusterMerge_
Definition: PFECALSuperClusterAlgo.h:150
ESHandle.h
HLT_2018_cff.isOOTCollection
isOOTCollection
Definition: HLT_2018_cff.py:13515
PFECALSuperClusterAlgo::inputTagEndcapRecHits_
edm::EDGetTokenT< EcalRecHitCollection > inputTagEndcapRecHits_
Definition: PFECALSuperClusterAlgo.h:162
PFECALSuperClusterAlgo::setThreshPFClusterSeedEndcap
void setThreshPFClusterSeedEndcap(double thresh)
Definition: PFECALSuperClusterAlgo.h:84
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
PFECALSuperClusterAlgo::setThreshPFClusterBarrel
void setThreshPFClusterBarrel(double thresh)
Definition: PFECALSuperClusterAlgo.h:83
PFECALSuperClusterAlgo
\ Algorithm for box particle flow super clustering in the ECAL
Definition: PFECALSuperClusterAlgo.h:42
PFECALSuperClusterAlgo::getEEOutputSCCollection
std::unique_ptr< reco::SuperClusterCollection > & getEEOutputSCCollection()
Definition: PFECALSuperClusterAlgo.h:107
BasicCluster.h
edm::EDGetTokenT
Definition: EDGetToken.h:33
PFECALSuperClusterAlgo::inputTagPFClusters_
edm::EDGetTokenT< edm::View< reco::PFCluster > > inputTagPFClusters_
Definition: PFECALSuperClusterAlgo.h:114
PFECALSuperClusterAlgo::_eweight
energy_weight _eweight
Definition: PFECALSuperClusterAlgo.h:128
PFECALSuperClusterAlgo::_pfEnergyCalibration
std::shared_ptr< PFEnergyCalibration > _pfEnergyCalibration
Definition: PFECALSuperClusterAlgo.h:126
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
PFECALSuperClusterAlgo::setSatelliteMerging
void setSatelliteMerging(const bool doit)
Definition: PFECALSuperClusterAlgo.h:94
PFECALSuperClusterAlgo::barrelRecHits_
const EcalRecHitCollection * barrelRecHits_
Definition: PFECALSuperClusterAlgo.h:163
PFECALSuperClusterAlgo::channelStatus_
const ESChannelStatus * channelStatus_
Definition: PFECALSuperClusterAlgo.h:119
PFECALSuperClusterAlgo::CalibratedPFCluster::eta
double eta() const
Definition: PFECALSuperClusterAlgo.h:54
edm::SortedCollection< EcalRecHit >
PFECALSuperClusterAlgo::setSatelliteThreshold
void setSatelliteThreshold(const double t)
Definition: PFECALSuperClusterAlgo.h:95
PFECALSuperClusterAlgo::setCrackCorrections
void setCrackCorrections(bool applyCrackCorrections)
Definition: PFECALSuperClusterAlgo.h:101
PFECALSuperClusterAlgo::setEtawidthSuperClusterEndcap
void setEtawidthSuperClusterEndcap(double etawidth)
Definition: PFECALSuperClusterAlgo.h:90
PFECALSuperClusterAlgo::etawidthSuperClusterEndcap_
double etawidthSuperClusterEndcap_
Definition: PFECALSuperClusterAlgo.h:148
PFECALSuperClusterAlgo::kMustache
Definition: PFECALSuperClusterAlgo.h:44
EcalRecHitCollections.h
BasicClusterFwd.h
PFECALSuperClusterAlgo::setPFClusterCalibration
void setPFClusterCalibration(const std::shared_ptr< PFEnergyCalibration > &)
Definition: PFECALSuperClusterAlgo.cc:111
PFRecHit.h
PFECALSuperClusterAlgo::useRegression_
bool useRegression_
Definition: PFECALSuperClusterAlgo.h:135
PFECALSuperClusterAlgo::setThreshPFClusterEndcap
void setThreshPFClusterEndcap(double thresh)
Definition: PFECALSuperClusterAlgo.h:85
PFLayer.h
PFECALSuperClusterAlgo::CalibratedPFCluster::the_ptr
edm::Ptr< reco::PFCluster > the_ptr() const
Definition: PFECALSuperClusterAlgo.h:57
PFECALSuperClusterAlgo::threshPFClusterSeedEndcap_
double threshPFClusterSeedEndcap_
Definition: PFECALSuperClusterAlgo.h:142
PFEnergyCalibration.h
PFECALSuperClusterAlgo::loadAndSortPFClusters
void loadAndSortPFClusters(const edm::Event &evt)
Definition: PFECALSuperClusterAlgo.cc:148
PFECALSuperClusterAlgo::phiwidthSuperClusterBarrel_
double phiwidthSuperClusterBarrel_
Definition: PFECALSuperClusterAlgo.h:145
reco::PFCluster::energy
double energy() const
cluster energy
Definition: PFCluster.h:78
PFECALSuperClusterAlgo::setPhiwidthSuperClusterBarrel
void setPhiwidthSuperClusterBarrel(double phiwidth)
Definition: PFECALSuperClusterAlgo.h:87
PFECALSuperClusterAlgo::setIsOOTCollection
void setIsOOTCollection(bool isOOTCollection)
Definition: PFECALSuperClusterAlgo.h:99
PFECALSuperClusterAlgo::run
void run()
Definition: PFECALSuperClusterAlgo.cc:228
PFECALSuperClusterAlgo::CalibratedClusterPtr
std::shared_ptr< CalibratedPFCluster > CalibratedClusterPtr
Definition: PFECALSuperClusterAlgo.h:62
PFECALSuperClusterAlgo::buildSuperCluster
void buildSuperCluster(CalibratedClusterPtr &, CalibratedClusterPtrVector &)
Definition: PFECALSuperClusterAlgo.cc:248
BeamSpot.h
PFECALSuperClusterAlgo::energy_weight
energy_weight
Definition: PFECALSuperClusterAlgo.h:45
PFECALSuperClusterAlgo::CalibratedPFCluster::CalibratedPFCluster
CalibratedPFCluster(const edm::Ptr< reco::PFCluster > &p)
Definition: PFECALSuperClusterAlgo.h:50
PFECALSuperClusterAlgo::setMajorityFraction
void setMajorityFraction(const double f)
Definition: PFECALSuperClusterAlgo.h:96
PFECALSuperClusterAlgo::threshSuperClusterEt_
double threshSuperClusterEt_
Definition: PFECALSuperClusterAlgo.h:138
reco::BeamSpot
Definition: BeamSpot.h:21
PFECALSuperClusterAlgo::CalibratedClusterPtrVector
std::vector< CalibratedClusterPtr > CalibratedClusterPtrVector
Definition: PFECALSuperClusterAlgo.h:63
PFCluster.h
verbose
static constexpr int verbose
Definition: HLTExoticaSubAnalysis.cc:25
PFECALSuperClusterAlgo::setTokens
void setTokens(const edm::ParameterSet &, edm::ConsumesCollector &&)
Definition: PFECALSuperClusterAlgo.cc:115
PFECALSuperClusterAlgo::CalibratedPFCluster::energy_nocalib
double energy_nocalib() const
Definition: PFECALSuperClusterAlgo.h:53
PFECALSuperClusterAlgo::dropUnseedable_
bool dropUnseedable_
Definition: PFECALSuperClusterAlgo.h:152
PFECALSuperClusterAlgo::_clustype
clustering_type _clustype
Definition: PFECALSuperClusterAlgo.h:127
PFECALSuperClusterAlgo::threshPFClusterEndcap_
double threshPFClusterEndcap_
Definition: PFECALSuperClusterAlgo.h:143
reco::PFCluster::positionREP
const REPPoint & positionREP() const
cluster position: rho, eta, phi
Definition: PFCluster.h:96
PFECALSuperClusterAlgo::getEBOutputSCCollection
std::unique_ptr< reco::SuperClusterCollection > & getEBOutputSCCollection()
Definition: PFECALSuperClusterAlgo.h:106
OrderedSet.t
t
Definition: OrderedSet.py:90
PFECALSuperClusterAlgo::setClusteringType
void setClusteringType(clustering_type thetype)
Definition: PFECALSuperClusterAlgo.h:70
PFECALSuperClusterAlgo::setEnergyWeighting
void setEnergyWeighting(energy_weight thetype)
Definition: PFECALSuperClusterAlgo.h:72
PFECALSuperClusterAlgo::setVerbosityLevel
void setVerbosityLevel(bool verbose)
Definition: PFECALSuperClusterAlgo.h:68
PFECALSuperClusterAlgo::kRaw
Definition: PFECALSuperClusterAlgo.h:45
PFECALSuperClusterAlgo::inputTagBarrelRecHits_
edm::EDGetTokenT< EcalRecHitCollection > inputTagBarrelRecHits_
Definition: PFECALSuperClusterAlgo.h:161
PFECALSuperClusterAlgo::CalibratedPFCluster::energy
double energy() const
Definition: PFECALSuperClusterAlgo.h:52
edm::ParameterSet
Definition: ParameterSet.h:36
PFECALSuperClusterAlgo::threshPFClusterSeedBarrel_
double threshPFClusterSeedBarrel_
Definition: PFECALSuperClusterAlgo.h:140
PFECALSuperClusterAlgo::applyCrackCorrections_
bool applyCrackCorrections_
Definition: PFECALSuperClusterAlgo.h:156
PFECALSuperClusterAlgo::fractionForMajority_
double fractionForMajority_
Definition: PFECALSuperClusterAlgo.h:151
Event.h
PFECALSuperClusterAlgo::threshPFClusterBarrel_
double threshPFClusterBarrel_
Definition: PFECALSuperClusterAlgo.h:141
SCEnergyCorrectorSemiParm.h
PFECALSuperClusterAlgo::EEtoPS_
const reco::PFCluster::EEtoPSAssociation * EEtoPS_
Definition: PFECALSuperClusterAlgo.h:125
PFECALSuperClusterAlgo::setEtawidthSuperClusterBarrel
void setEtawidthSuperClusterBarrel(double etawidth)
Definition: PFECALSuperClusterAlgo.h:88
ESChannelStatus.h
PFECALSuperClusterAlgo::setThreshPFClusterSeedBarrel
void setThreshPFClusterSeedBarrel(double thresh)
Definition: PFECALSuperClusterAlgo.h:82
PFClusterFwd.h
PFECALSuperClusterAlgo::setUseRegression
void setUseRegression(bool useRegression)
Definition: PFECALSuperClusterAlgo.h:78
edm::EventSetup
Definition: EventSetup.h:57
PFECALSuperClusterAlgo::inputTagBeamSpot_
edm::EDGetTokenT< reco::BeamSpot > inputTagBeamSpot_
Definition: PFECALSuperClusterAlgo.h:116
PFECALSuperClusterAlgo::setThreshSuperClusterEt
void setThreshSuperClusterEt(double thresh)
Definition: PFECALSuperClusterAlgo.h:80
ESCondObjectContainer
Definition: ESCondObjectContainer.h:11
PFECALSuperClusterAlgo::phiwidthSuperClusterEndcap_
double phiwidthSuperClusterEndcap_
Definition: PFECALSuperClusterAlgo.h:147
PFECALSuperClusterAlgo::satelliteThreshold_
double satelliteThreshold_
Definition: PFECALSuperClusterAlgo.h:151
InputTag.h
edm::Ptr< reco::PFCluster >
GOODCOLL_filter_cfg.thresh
thresh
Definition: GOODCOLL_filter_cfg.py:74
reco::PFCluster::EEtoPSAssociation
std::vector< std::pair< CaloClusterPtr::key_type, edm::Ptr< PFCluster > > > EEtoPSAssociation
Definition: PFCluster.h:48
PFECALSuperClusterAlgo::setUseDynamicDPhi
void setUseDynamicDPhi(bool useit)
Definition: PFECALSuperClusterAlgo.h:76
PFECALSuperClusterAlgo::kCalibratedTotal
Definition: PFECALSuperClusterAlgo.h:45
PFECALSuperClusterAlgo::setDropUnseedable
void setDropUnseedable(const bool d)
Definition: PFECALSuperClusterAlgo.h:97
PFECALSuperClusterAlgo::update
void update(const edm::EventSetup &)
Definition: PFECALSuperClusterAlgo.cc:134
SuperClusterFwd.h
PFECALSuperClusterAlgo::_clustersEE
CalibratedClusterPtrVector _clustersEE
Definition: PFECALSuperClusterAlgo.h:122
SuperCluster.h
HLT_2018_cff.useRegression
useRegression
Definition: HLT_2018_cff.py:13513
PFECALSuperClusterAlgo::kBOX
Definition: PFECALSuperClusterAlgo.h:44
PFECALSuperClusterAlgo::setUseETForSeeding
void setUseETForSeeding(bool useET)
Definition: PFECALSuperClusterAlgo.h:74
EventSetup.h
PFECALSuperClusterAlgo::_clustersEB
CalibratedClusterPtrVector _clustersEB
Definition: PFECALSuperClusterAlgo.h:121
reco::CaloCluster::correctedEnergy
double correctedEnergy() const
Definition: CaloCluster.h:150
ztail.d
d
Definition: ztail.py:151
PFECALSuperClusterAlgo::CalibratedPFCluster
Definition: PFECALSuperClusterAlgo.h:48
ConsumesCollector.h
PFECALSuperClusterAlgo::beamSpot_
const reco::BeamSpot * beamSpot_
Definition: PFECALSuperClusterAlgo.h:118
PFECALSuperClusterAlgo::superClustersEB_
std::unique_ptr< reco::SuperClusterCollection > superClustersEB_
Definition: PFECALSuperClusterAlgo.h:123
PFECALSuperClusterAlgo::PFECALSuperClusterAlgo
PFECALSuperClusterAlgo()
constructor
Definition: PFECALSuperClusterAlgo.cc:109
PFECALSuperClusterAlgo::etawidthSuperClusterBarrel_
double etawidthSuperClusterBarrel_
Definition: PFECALSuperClusterAlgo.h:146
edm::Event
Definition: Event.h:73
PFECALSuperClusterAlgo::kCalibratedNoPS
Definition: PFECALSuperClusterAlgo.h:45
PFECALSuperClusterAlgo::CalibratedPFCluster::cluptr
edm::Ptr< reco::PFCluster > cluptr
Definition: PFECALSuperClusterAlgo.h:60
PFECALSuperClusterAlgo::endcapRecHits_
const EcalRecHitCollection * endcapRecHits_
Definition: PFECALSuperClusterAlgo.h:164
PFECALSuperClusterAlgo::setPhiwidthSuperClusterEndcap
void setPhiwidthSuperClusterEndcap(double phiwidth)
Definition: PFECALSuperClusterAlgo.h:89
PFECALSuperClusterAlgo::isOOTCollection_
bool isOOTCollection_
Definition: PFECALSuperClusterAlgo.h:160
edm::ConsumesCollector
Definition: ConsumesCollector.h:39
PFECALSuperClusterAlgo::useDynamicDPhi_
bool useDynamicDPhi_
Definition: PFECALSuperClusterAlgo.h:154
PFECALSuperClusterAlgo::threshIsET_
bool threshIsET_
Definition: PFECALSuperClusterAlgo.h:157
PFECALSuperClusterAlgo::regr_
std::unique_ptr< SCEnergyCorrectorSemiParm > regr_
Definition: PFECALSuperClusterAlgo.h:136