CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
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)
std::unique_ptr< reco::SuperClusterCollection > superClustersEB_
edm::EDGetTokenT< EcalRecHitCollection > inputTagBarrelRecHits_
CalibratedPFCluster(const edm::Ptr< reco::PFCluster > &p)
const reco::BeamSpot * beamSpot_
void setCrackCorrections(bool applyCrackCorrections)
void setThreshPFClusterBarrel(double thresh)
const EcalMustacheSCParameters * mustacheSCParams_
const reco::PFCluster::EEtoPSAssociation * EEtoPS_
void setThreshSuperClusterEt(double thresh)
edm::Ptr< reco::PFCluster > the_ptr() const
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)
tuple d
Definition: ztail.py:151
void setPhiwidthSuperClusterBarrel(double phiwidth)
void setVerbosityLevel(bool verbose)
void loadAndSortPFClusters(const edm::Event &evt)
void update(const edm::EventSetup &)
std::vector< CalibratedClusterPtr > CalibratedClusterPtrVector
std::shared_ptr< CalibratedPFCluster > CalibratedClusterPtr
void buildAllSuperClusters(CalibratedClusterPtrVector &, double seedthresh)
std::shared_ptr< PFEnergyCalibration > _pfEnergyCalibration
void setThreshPFClusterEndcap(double thresh)
void setTokens(const edm::ParameterSet &, edm::ConsumesCollector &&)
static constexpr int verbose
void setUseETForSeeding(bool useET)
std::unique_ptr< reco::SuperClusterCollection > & getEBOutputSCCollection()
CalibratedClusterPtrVector _clustersEE
edm::ESGetToken< ESChannelStatus, ESChannelStatusRcd > esChannelStatusToken_
void setEnergyWeighting(energy_weight thetype)
edm::ESGetToken< EcalSCDynamicDPhiParameters, EcalSCDynamicDPhiParametersRcd > ecalSCDynamicDPhiParametersToken_
void setThreshPFClusterSeedBarrel(double thresh)
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_
void buildSuperCluster(CalibratedClusterPtr &, CalibratedClusterPtrVector &)
\ Algorithm for box particle flow super clustering in the ECAL
void setUseDynamicDPhi(bool useit)
void setDropUnseedable(const bool d)
tuple isOOTCollection
void updateSCParams(const edm::EventSetup &)
void setPhiwidthSuperClusterEndcap(double phiwidth)
tuple applyCrackCorrections
void setUseRegression(bool useRegression)
const EcalRecHitCollection * barrelRecHits_
void setSatelliteThreshold(const double t)
void setPFClusterCalibration(const std::shared_ptr< PFEnergyCalibration > &)
CalibratedClusterPtrVector _clustersEB
const EcalRecHitCollection * endcapRecHits_
void setIsOOTCollection(bool isOOTCollection)