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 
20 
26 
28 
32 
36 
40 
45 
50 
52 
53 #include <vector>
54 #include <memory>
55 
57 
64 typedef std::shared_ptr<CalibratedPFCluster> CalibratedClusterPtr;
65 typedef std::vector<CalibratedClusterPtr> CalibratedClusterPtrVector;
66 
68 public:
69  enum clustering_type { kBOX = 1, kMustache = 2, kDeepSC = 3 };
71 
74 
76 
77  void setClusteringType(clustering_type thetype) { _clustype = thetype; }
78 
79  void setEnergyWeighting(energy_weight thetype) { _eweight = thetype; }
80 
81  void setUseETForSeeding(bool useET) { threshIsET_ = useET; }
82 
83  void setUseDynamicDPhi(bool useit) { useDynamicDPhi_ = useit; }
84 
86 
88 
93 
94  void setPhiwidthSuperClusterBarrel(double phiwidth) { phiwidthSuperClusterBarrel_ = phiwidth; }
95  void setEtawidthSuperClusterBarrel(double etawidth) { etawidthSuperClusterBarrel_ = etawidth; }
96  void setPhiwidthSuperClusterEndcap(double phiwidth) { phiwidthSuperClusterEndcap_ = phiwidth; }
97  void setEtawidthSuperClusterEndcap(double etawidth) { etawidthSuperClusterEndcap_ = etawidth; }
98 
99  void setPFClusterCalibration(const std::shared_ptr<PFEnergyCalibration>&);
100 
101  void setSatelliteMerging(const bool doit) { doSatelliteClusterMerge_ = doit; }
102  void setSatelliteThreshold(const double t) { satelliteThreshold_ = t; }
103  void setMajorityFraction(const double f) { fractionForMajority_ = f; }
104  void setDropUnseedable(const bool d) { dropUnseedable_ = d; }
105 
107 
109 
111 
112  void update(const edm::EventSetup&);
113  void updateSCParams(const edm::EventSetup&);
114 
115  std::unique_ptr<reco::SuperClusterCollection>& getEBOutputSCCollection() { return superClustersEB_; }
116  std::unique_ptr<reco::SuperClusterCollection>& getEEOutputSCCollection() { return superClustersEE_; }
117 
118  void loadAndSortPFClusters(const edm::Event& evt);
119 
120  void run();
121 
122 private:
126 
133 
141 
144 
147  std::unique_ptr<reco::SuperClusterCollection> superClustersEB_;
148  std::unique_ptr<reco::SuperClusterCollection> superClustersEE_;
150  std::shared_ptr<PFEnergyCalibration> _pfEnergyCalibration;
153  void buildAllSuperClusters(CalibratedClusterPtrVector&, double seedthresh);
158 
159  bool verbose_;
160 
161  // regression
163  std::unique_ptr<SCEnergyCorrectorSemiParm> regr_;
164 
166 
171 
176 
177  bool doSatelliteClusterMerge_; //rock it
180 
182 
185 
187 
188  // OOT photons
194 };
195 
196 #endif
std::vector< CalibratedClusterPtr > CalibratedClusterPtrVector
const ESChannelStatus * channelStatus_
std::unique_ptr< reco::SuperClusterCollection > & getEEOutputSCCollection()
edm::EDGetTokenT< edm::View< reco::PFCluster > > inputTagPFClusters_
void setMajorityFraction(const double f)
std::unique_ptr< SCEnergyCorrectorSemiParm > regr_
void setSatelliteMerging(const bool doit)
void setThreshPFClusterSeedEndcap(double thresh)
bool verbose
std::unique_ptr< reco::SuperClusterCollection > superClustersEB_
edm::EDGetTokenT< EcalRecHitCollection > inputTagBarrelRecHits_
const reco::BeamSpot * beamSpot_
void setCrackCorrections(bool applyCrackCorrections)
void setThreshPFClusterBarrel(double thresh)
const EcalMustacheSCParameters * mustacheSCParams_
const reco::PFCluster::EEtoPSAssociation * EEtoPS_
const reco::SCProducerCache * SCProducerCache_
void buildSuperClusterMustacheOrBox(CalibratedClusterPtr &, CalibratedClusterPtrVector &)
void setThreshSuperClusterEt(double thresh)
edm::ESGetToken< ESEEIntercalibConstants, ESEEIntercalibConstantsRcd > esEEInterCalibToken_
std::unique_ptr< reco::SuperClusterCollection > superClustersEE_
void setEtawidthSuperClusterBarrel(double etawidth)
const EcalSCDynamicDPhiParameters * scDynamicDPhiParams_
edm::EDGetTokenT< EcalRecHitCollection > inputTagEndcapRecHits_
void setClusteringType(clustering_type thetype)
void setEtawidthSuperClusterEndcap(double etawidth)
void buildAllSuperClustersDeepSC(CalibratedClusterPtrVector &, double seedthresh)
void setPhiwidthSuperClusterBarrel(double phiwidth)
void setVerbosityLevel(bool verbose)
void loadAndSortPFClusters(const edm::Event &evt)
void update(const edm::EventSetup &)
void buildAllSuperClusters(CalibratedClusterPtrVector &, double seedthresh)
std::shared_ptr< PFEnergyCalibration > _pfEnergyCalibration
void setThreshPFClusterEndcap(double thresh)
void setTokens(const edm::ParameterSet &, edm::ConsumesCollector &&)
void setUseETForSeeding(bool useET)
std::unique_ptr< reco::SuperClusterCollection > & getEBOutputSCCollection()
CalibratedClusterPtrVector _clustersEE
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeometryToken_
edm::ESGetToken< ESChannelStatus, ESChannelStatusRcd > esChannelStatusToken_
void setEnergyWeighting(energy_weight thetype)
double f[11][100]
d
Definition: ztail.py:151
edm::ESGetToken< EcalSCDynamicDPhiParameters, EcalSCDynamicDPhiParametersRcd > ecalSCDynamicDPhiParametersToken_
void buildAllSuperClustersMustacheOrBox(CalibratedClusterPtrVector &, double seedthresh)
const CaloSubdetectorGeometry * eeGeom_
void setThreshPFClusterSeedBarrel(double thresh)
const CaloSubdetectorGeometry * esGeom_
edm::ESGetToken< CaloTopology, CaloTopologyRecord > caloTopologyToken_
edm::EDGetTokenT< reco::PFCluster::EEtoPSAssociation > inputTagPFClustersES_
std::vector< std::pair< CaloClusterPtr::key_type, edm::Ptr< PFCluster > > > EEtoPSAssociation
Definition: PFCluster.h:44
edm::EDGetTokenT< reco::BeamSpot > inputTagBeamSpot_
edm::ESGetToken< EcalMustacheSCParameters, EcalMustacheSCParametersRcd > ecalMustacheSCParametersToken_
const CaloTopology * topology_
const CaloGeometry * geometry_
void finalizeSuperCluster(CalibratedClusterPtr &seed, CalibratedClusterPtrVector &clustered, bool isEE)
PFECALSuperClusterAlgo(const reco::SCProducerCache *cache)
constructor
void setUseDynamicDPhi(bool useit)
void setDropUnseedable(const bool d)
def cache(function)
Definition: utilities.py:3
void updateSCParams(const edm::EventSetup &)
void setPhiwidthSuperClusterEndcap(double phiwidth)
void setUseRegression(bool useRegression)
const EcalRecHitCollection * barrelRecHits_
std::shared_ptr< CalibratedPFCluster > CalibratedClusterPtr
\ Algorithm for box particle flow super clustering in the ECAL
void setSatelliteThreshold(const double t)
void setPFClusterCalibration(const std::shared_ptr< PFEnergyCalibration > &)
CalibratedClusterPtrVector _clustersEB
const CaloSubdetectorGeometry * ebGeom_
const EcalRecHitCollection * endcapRecHits_
void setIsOOTCollection(bool isOOTCollection)