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 
29 
34 
39 
40 #include <vector>
41 #include <memory>
42 
44 
52 public:
53  enum clustering_type { kBOX = 1, kMustache = 2 };
55 
56  // simple class for associating calibrated energies
58  public:
60 
61  double energy() const { return cluptr->correctedEnergy(); }
62  double energy_nocalib() const { return cluptr->energy(); }
63  double eta() const { return cluptr->positionREP().eta(); }
64  double phi() const { return cluptr->positionREP().phi(); }
65 
67 
68  private:
70  };
71  typedef std::shared_ptr<CalibratedPFCluster> CalibratedClusterPtr;
72  typedef std::vector<CalibratedClusterPtr> CalibratedClusterPtrVector;
73 
76 
78 
79  void setClusteringType(clustering_type thetype) { _clustype = thetype; }
80 
81  void setEnergyWeighting(energy_weight thetype) { _eweight = thetype; }
82 
83  void setUseETForSeeding(bool useET) { threshIsET_ = useET; }
84 
85  void setUseDynamicDPhi(bool useit) { useDynamicDPhi_ = useit; }
86 
88 
90 
95 
96  void setPhiwidthSuperClusterBarrel(double phiwidth) { phiwidthSuperClusterBarrel_ = phiwidth; }
97  void setEtawidthSuperClusterBarrel(double etawidth) { etawidthSuperClusterBarrel_ = etawidth; }
98  void setPhiwidthSuperClusterEndcap(double phiwidth) { phiwidthSuperClusterEndcap_ = phiwidth; }
99  void setEtawidthSuperClusterEndcap(double etawidth) { etawidthSuperClusterEndcap_ = etawidth; }
100 
101  void setPFClusterCalibration(const std::shared_ptr<PFEnergyCalibration>&);
102 
103  void setSatelliteMerging(const bool doit) { doSatelliteClusterMerge_ = doit; }
104  void setSatelliteThreshold(const double t) { satelliteThreshold_ = t; }
105  void setMajorityFraction(const double f) { fractionForMajority_ = f; }
106  void setDropUnseedable(const bool d) { dropUnseedable_ = d; }
107 
109 
111 
113  void update(const edm::EventSetup&);
114  void updateSCParams(const edm::EventSetup&);
115 
116  std::unique_ptr<reco::SuperClusterCollection>& getEBOutputSCCollection() { return superClustersEB_; }
117  std::unique_ptr<reco::SuperClusterCollection>& getEEOutputSCCollection() { return superClustersEE_; }
118 
119  void loadAndSortPFClusters(const edm::Event& evt);
120 
121  void run();
122 
123 private:
127 
132 
137 
140  std::unique_ptr<reco::SuperClusterCollection> superClustersEB_;
141  std::unique_ptr<reco::SuperClusterCollection> superClustersEE_;
143  std::shared_ptr<PFEnergyCalibration> _pfEnergyCalibration;
146  void buildAllSuperClusters(CalibratedClusterPtrVector&, double seedthresh);
148 
149  bool verbose_;
150 
151  // regression
153  std::unique_ptr<SCEnergyCorrectorSemiParm> regr_;
154 
156 
161 
166 
167  bool doSatelliteClusterMerge_; //rock it
170 
172 
175 
176  // OOT photons
182 };
183 
184 #endif
PFECALSuperClusterAlgo::clustering_type
clustering_type
Definition: PFECALSuperClusterAlgo.h:53
PFECALSuperClusterAlgo::inputTagPFClustersES_
edm::EDGetTokenT< reco::PFCluster::EEtoPSAssociation > inputTagPFClustersES_
Definition: PFECALSuperClusterAlgo.h:125
PFRecHitFwd.h
PFECALSuperClusterAlgo::verbose_
bool verbose_
Definition: PFECALSuperClusterAlgo.h:149
PFECALSuperClusterAlgo::buildAllSuperClusters
void buildAllSuperClusters(CalibratedClusterPtrVector &, double seedthresh)
Definition: PFECALSuperClusterAlgo.cc:254
PFECALSuperClusterAlgo::CalibratedPFCluster::phi
double phi() const
Definition: PFECALSuperClusterAlgo.h:64
HLT_FULL_cff.isOOTCollection
isOOTCollection
Definition: HLT_FULL_cff.py:14945
PFECALSuperClusterAlgo::superClustersEE_
std::unique_ptr< reco::SuperClusterCollection > superClustersEE_
Definition: PFECALSuperClusterAlgo.h:141
PFECALSuperClusterAlgo::doSatelliteClusterMerge_
bool doSatelliteClusterMerge_
Definition: PFECALSuperClusterAlgo.h:167
ESHandle.h
PFECALSuperClusterAlgo::inputTagEndcapRecHits_
edm::EDGetTokenT< EcalRecHitCollection > inputTagEndcapRecHits_
Definition: PFECALSuperClusterAlgo.h:179
PFECALSuperClusterAlgo::setThreshPFClusterSeedEndcap
void setThreshPFClusterSeedEndcap(double thresh)
Definition: PFECALSuperClusterAlgo.h:93
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
PFECALSuperClusterAlgo::setThreshPFClusterBarrel
void setThreshPFClusterBarrel(double thresh)
Definition: PFECALSuperClusterAlgo.h:92
PFECALSuperClusterAlgo
\ Algorithm for box particle flow super clustering in the ECAL
Definition: PFECALSuperClusterAlgo.h:51
PFECALSuperClusterAlgo::getEEOutputSCCollection
std::unique_ptr< reco::SuperClusterCollection > & getEEOutputSCCollection()
Definition: PFECALSuperClusterAlgo.h:117
BasicCluster.h
edm::EDGetTokenT
Definition: EDGetToken.h:33
PFECALSuperClusterAlgo::inputTagPFClusters_
edm::EDGetTokenT< edm::View< reco::PFCluster > > inputTagPFClusters_
Definition: PFECALSuperClusterAlgo.h:124
PFECALSuperClusterAlgo::_eweight
energy_weight _eweight
Definition: PFECALSuperClusterAlgo.h:145
PFECALSuperClusterAlgo::_pfEnergyCalibration
std::shared_ptr< PFEnergyCalibration > _pfEnergyCalibration
Definition: PFECALSuperClusterAlgo.h:143
PFECALSuperClusterAlgo::setSatelliteMerging
void setSatelliteMerging(const bool doit)
Definition: PFECALSuperClusterAlgo.h:103
PFECALSuperClusterAlgo::barrelRecHits_
const EcalRecHitCollection * barrelRecHits_
Definition: PFECALSuperClusterAlgo.h:180
PFECALSuperClusterAlgo::channelStatus_
const ESChannelStatus * channelStatus_
Definition: PFECALSuperClusterAlgo.h:134
PFECALSuperClusterAlgo::CalibratedPFCluster::eta
double eta() const
Definition: PFECALSuperClusterAlgo.h:63
edm::SortedCollection< EcalRecHit >
PFECALSuperClusterAlgo::setSatelliteThreshold
void setSatelliteThreshold(const double t)
Definition: PFECALSuperClusterAlgo.h:104
PFECALSuperClusterAlgo::setCrackCorrections
void setCrackCorrections(bool applyCrackCorrections)
Definition: PFECALSuperClusterAlgo.h:110
PFECALSuperClusterAlgo::setEtawidthSuperClusterEndcap
void setEtawidthSuperClusterEndcap(double etawidth)
Definition: PFECALSuperClusterAlgo.h:99
PFECALSuperClusterAlgo::scDynamicDPhiParams_
const EcalSCDynamicDPhiParameters * scDynamicDPhiParams_
Definition: PFECALSuperClusterAlgo.h:136
PFECALSuperClusterAlgo::etawidthSuperClusterEndcap_
double etawidthSuperClusterEndcap_
Definition: PFECALSuperClusterAlgo.h:165
ESChannelStatusRcd.h
PFECALSuperClusterAlgo::esEEInterCalibToken_
edm::ESGetToken< ESEEIntercalibConstants, ESEEIntercalibConstantsRcd > esEEInterCalibToken_
Definition: PFECALSuperClusterAlgo.h:128
EcalMustacheSCParameters
Definition: EcalMustacheSCParameters.h:13
ESGetToken.h
PFECALSuperClusterAlgo::kMustache
Definition: PFECALSuperClusterAlgo.h:53
EcalRecHitCollections.h
BasicClusterFwd.h
PFECALSuperClusterAlgo::setPFClusterCalibration
void setPFClusterCalibration(const std::shared_ptr< PFEnergyCalibration > &)
Definition: PFECALSuperClusterAlgo.cc:112
PFRecHit.h
PFECALSuperClusterAlgo::useRegression_
bool useRegression_
Definition: PFECALSuperClusterAlgo.h:152
PFECALSuperClusterAlgo::setThreshPFClusterEndcap
void setThreshPFClusterEndcap(double thresh)
Definition: PFECALSuperClusterAlgo.h:94
EcalMustacheSCParametersRcd.h
PFLayer.h
PFECALSuperClusterAlgo::CalibratedPFCluster::the_ptr
edm::Ptr< reco::PFCluster > the_ptr() const
Definition: PFECALSuperClusterAlgo.h:66
PFECALSuperClusterAlgo::threshPFClusterSeedEndcap_
double threshPFClusterSeedEndcap_
Definition: PFECALSuperClusterAlgo.h:159
PFEnergyCalibration.h
PFECALSuperClusterAlgo::loadAndSortPFClusters
void loadAndSortPFClusters(const edm::Event &evt)
Definition: PFECALSuperClusterAlgo.cc:167
PFECALSuperClusterAlgo::phiwidthSuperClusterBarrel_
double phiwidthSuperClusterBarrel_
Definition: PFECALSuperClusterAlgo.h:162
reco::PFCluster::energy
double energy() const
cluster energy
Definition: PFCluster.h:74
PFECALSuperClusterAlgo::setPhiwidthSuperClusterBarrel
void setPhiwidthSuperClusterBarrel(double phiwidth)
Definition: PFECALSuperClusterAlgo.h:96
PFECALSuperClusterAlgo::setIsOOTCollection
void setIsOOTCollection(bool isOOTCollection)
Definition: PFECALSuperClusterAlgo.h:108
PFECALSuperClusterAlgo::run
void run()
Definition: PFECALSuperClusterAlgo.cc:247
PFECALSuperClusterAlgo::CalibratedClusterPtr
std::shared_ptr< CalibratedPFCluster > CalibratedClusterPtr
Definition: PFECALSuperClusterAlgo.h:71
EcalSCDynamicDPhiParametersRcd.h
PFECALSuperClusterAlgo::buildSuperCluster
void buildSuperCluster(CalibratedClusterPtr &, CalibratedClusterPtrVector &)
Definition: PFECALSuperClusterAlgo.cc:267
BeamSpot.h
PFECALSuperClusterAlgo::energy_weight
energy_weight
Definition: PFECALSuperClusterAlgo.h:54
PFECALSuperClusterAlgo::CalibratedPFCluster::CalibratedPFCluster
CalibratedPFCluster(const edm::Ptr< reco::PFCluster > &p)
Definition: PFECALSuperClusterAlgo.h:59
PFECALSuperClusterAlgo::setMajorityFraction
void setMajorityFraction(const double f)
Definition: PFECALSuperClusterAlgo.h:105
PFECALSuperClusterAlgo::threshSuperClusterEt_
double threshSuperClusterEt_
Definition: PFECALSuperClusterAlgo.h:155
reco::BeamSpot
Definition: BeamSpot.h:21
PFECALSuperClusterAlgo::CalibratedClusterPtrVector
std::vector< CalibratedClusterPtr > CalibratedClusterPtrVector
Definition: PFECALSuperClusterAlgo.h:72
EcalSCDynamicDPhiParameters
Definition: EcalSCDynamicDPhiParameters.h:13
PFCluster.h
verbose
static constexpr int verbose
Definition: HLTExoticaSubAnalysis.cc:25
PFECALSuperClusterAlgo::ecalSCDynamicDPhiParametersToken_
edm::ESGetToken< EcalSCDynamicDPhiParameters, EcalSCDynamicDPhiParametersRcd > ecalSCDynamicDPhiParametersToken_
Definition: PFECALSuperClusterAlgo.h:131
PFECALSuperClusterAlgo::setTokens
void setTokens(const edm::ParameterSet &, edm::ConsumesCollector &&)
Definition: PFECALSuperClusterAlgo.cc:116
PFECALSuperClusterAlgo::CalibratedPFCluster::energy_nocalib
double energy_nocalib() const
Definition: PFECALSuperClusterAlgo.h:62
PFECALSuperClusterAlgo::dropUnseedable_
bool dropUnseedable_
Definition: PFECALSuperClusterAlgo.h:169
PFECALSuperClusterAlgo::_clustype
clustering_type _clustype
Definition: PFECALSuperClusterAlgo.h:144
PFECALSuperClusterAlgo::threshPFClusterEndcap_
double threshPFClusterEndcap_
Definition: PFECALSuperClusterAlgo.h:160
reco::PFCluster::positionREP
const REPPoint & positionREP() const
cluster position: rho, eta, phi
Definition: PFCluster.h:92
PFECALSuperClusterAlgo::getEBOutputSCCollection
std::unique_ptr< reco::SuperClusterCollection > & getEBOutputSCCollection()
Definition: PFECALSuperClusterAlgo.h:116
PFECALSuperClusterAlgo::updateSCParams
void updateSCParams(const edm::EventSetup &)
Definition: PFECALSuperClusterAlgo.cc:158
PFECALSuperClusterAlgo::setClusteringType
void setClusteringType(clustering_type thetype)
Definition: PFECALSuperClusterAlgo.h:79
PFECALSuperClusterAlgo::setEnergyWeighting
void setEnergyWeighting(energy_weight thetype)
Definition: PFECALSuperClusterAlgo.h:81
PFECALSuperClusterAlgo::setVerbosityLevel
void setVerbosityLevel(bool verbose)
Definition: PFECALSuperClusterAlgo.h:77
PFECALSuperClusterAlgo::kRaw
Definition: PFECALSuperClusterAlgo.h:54
PFECALSuperClusterAlgo::inputTagBarrelRecHits_
edm::EDGetTokenT< EcalRecHitCollection > inputTagBarrelRecHits_
Definition: PFECALSuperClusterAlgo.h:178
PFECALSuperClusterAlgo::CalibratedPFCluster::energy
double energy() const
Definition: PFECALSuperClusterAlgo.h:61
EcalSCDynamicDPhiParameters.h
edm::ParameterSet
Definition: ParameterSet.h:47
PFECALSuperClusterAlgo::threshPFClusterSeedBarrel_
double threshPFClusterSeedBarrel_
Definition: PFECALSuperClusterAlgo.h:157
PFECALSuperClusterAlgo::applyCrackCorrections_
bool applyCrackCorrections_
Definition: PFECALSuperClusterAlgo.h:173
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
PFECALSuperClusterAlgo::fractionForMajority_
double fractionForMajority_
Definition: PFECALSuperClusterAlgo.h:168
Event.h
PFECALSuperClusterAlgo::threshPFClusterBarrel_
double threshPFClusterBarrel_
Definition: PFECALSuperClusterAlgo.h:158
SCEnergyCorrectorSemiParm.h
PFECALSuperClusterAlgo::mustacheSCParams_
const EcalMustacheSCParameters * mustacheSCParams_
Definition: PFECALSuperClusterAlgo.h:135
EcalMustacheSCParameters.h
PFECALSuperClusterAlgo::EEtoPS_
const reco::PFCluster::EEtoPSAssociation * EEtoPS_
Definition: PFECALSuperClusterAlgo.h:142
PFECALSuperClusterAlgo::setEtawidthSuperClusterBarrel
void setEtawidthSuperClusterBarrel(double etawidth)
Definition: PFECALSuperClusterAlgo.h:97
ESChannelStatus.h
PFECALSuperClusterAlgo::setThreshPFClusterSeedBarrel
void setThreshPFClusterSeedBarrel(double thresh)
Definition: PFECALSuperClusterAlgo.h:91
PFECALSuperClusterAlgo::ecalMustacheSCParametersToken_
edm::ESGetToken< EcalMustacheSCParameters, EcalMustacheSCParametersRcd > ecalMustacheSCParametersToken_
Definition: PFECALSuperClusterAlgo.h:130
PFClusterFwd.h
PFECALSuperClusterAlgo::setUseRegression
void setUseRegression(bool useRegression)
Definition: PFECALSuperClusterAlgo.h:87
edm::EventSetup
Definition: EventSetup.h:58
ESEEIntercalibConstantsRcd.h
PFECALSuperClusterAlgo::inputTagBeamSpot_
edm::EDGetTokenT< reco::BeamSpot > inputTagBeamSpot_
Definition: PFECALSuperClusterAlgo.h:126
PFECALSuperClusterAlgo::setThreshSuperClusterEt
void setThreshSuperClusterEt(double thresh)
Definition: PFECALSuperClusterAlgo.h:89
ESEEIntercalibConstants.h
ESCondObjectContainer
Definition: ESCondObjectContainer.h:11
PFECALSuperClusterAlgo::phiwidthSuperClusterEndcap_
double phiwidthSuperClusterEndcap_
Definition: PFECALSuperClusterAlgo.h:164
PFECALSuperClusterAlgo::satelliteThreshold_
double satelliteThreshold_
Definition: PFECALSuperClusterAlgo.h:168
edm::ESGetToken< ESEEIntercalibConstants, ESEEIntercalibConstantsRcd >
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:44
PFECALSuperClusterAlgo::setUseDynamicDPhi
void setUseDynamicDPhi(bool useit)
Definition: PFECALSuperClusterAlgo.h:85
PFECALSuperClusterAlgo::kCalibratedTotal
Definition: PFECALSuperClusterAlgo.h:54
PFECALSuperClusterAlgo::setDropUnseedable
void setDropUnseedable(const bool d)
Definition: PFECALSuperClusterAlgo.h:106
PFECALSuperClusterAlgo::update
void update(const edm::EventSetup &)
Definition: PFECALSuperClusterAlgo.cc:146
SuperClusterFwd.h
PFECALSuperClusterAlgo::_clustersEE
CalibratedClusterPtrVector _clustersEE
Definition: PFECALSuperClusterAlgo.h:139
SuperCluster.h
PFECALSuperClusterAlgo::kBOX
Definition: PFECALSuperClusterAlgo.h:53
PFECALSuperClusterAlgo::setUseETForSeeding
void setUseETForSeeding(bool useET)
Definition: PFECALSuperClusterAlgo.h:83
EventSetup.h
PFECALSuperClusterAlgo::_clustersEB
CalibratedClusterPtrVector _clustersEB
Definition: PFECALSuperClusterAlgo.h:138
reco::CaloCluster::correctedEnergy
double correctedEnergy() const
Definition: CaloCluster.h:150
ztail.d
d
Definition: ztail.py:151
HLT_FULL_cff.applyCrackCorrections
applyCrackCorrections
Definition: HLT_FULL_cff.py:13414
PFECALSuperClusterAlgo::esChannelStatusToken_
edm::ESGetToken< ESChannelStatus, ESChannelStatusRcd > esChannelStatusToken_
Definition: PFECALSuperClusterAlgo.h:129
PFECALSuperClusterAlgo::CalibratedPFCluster
Definition: PFECALSuperClusterAlgo.h:57
ConsumesCollector.h
HLT_FULL_cff.useRegression
useRegression
Definition: HLT_FULL_cff.py:14911
PFECALSuperClusterAlgo::beamSpot_
const reco::BeamSpot * beamSpot_
Definition: PFECALSuperClusterAlgo.h:133
PFECALSuperClusterAlgo::superClustersEB_
std::unique_ptr< reco::SuperClusterCollection > superClustersEB_
Definition: PFECALSuperClusterAlgo.h:140
PFECALSuperClusterAlgo::PFECALSuperClusterAlgo
PFECALSuperClusterAlgo()
constructor
Definition: PFECALSuperClusterAlgo.cc:110
PFECALSuperClusterAlgo::etawidthSuperClusterBarrel_
double etawidthSuperClusterBarrel_
Definition: PFECALSuperClusterAlgo.h:163
edm::Event
Definition: Event.h:73
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
PFECALSuperClusterAlgo::kCalibratedNoPS
Definition: PFECALSuperClusterAlgo.h:54
PFECALSuperClusterAlgo::CalibratedPFCluster::cluptr
edm::Ptr< reco::PFCluster > cluptr
Definition: PFECALSuperClusterAlgo.h:69
PFECALSuperClusterAlgo::endcapRecHits_
const EcalRecHitCollection * endcapRecHits_
Definition: PFECALSuperClusterAlgo.h:181
PFECALSuperClusterAlgo::setPhiwidthSuperClusterEndcap
void setPhiwidthSuperClusterEndcap(double phiwidth)
Definition: PFECALSuperClusterAlgo.h:98
PFECALSuperClusterAlgo::isOOTCollection_
bool isOOTCollection_
Definition: PFECALSuperClusterAlgo.h:177
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
PFECALSuperClusterAlgo::useDynamicDPhi_
bool useDynamicDPhi_
Definition: PFECALSuperClusterAlgo.h:171
PFECALSuperClusterAlgo::threshIsET_
bool threshIsET_
Definition: PFECALSuperClusterAlgo.h:174
PFECALSuperClusterAlgo::regr_
std::unique_ptr< SCEnergyCorrectorSemiParm > regr_
Definition: PFECALSuperClusterAlgo.h:153