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 
121  CalibratedClusterPtrVector _clustersEB;
122  CalibratedClusterPtrVector _clustersEE;
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);
130  void buildSuperCluster(CalibratedClusterPtr&, CalibratedClusterPtrVector&);
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
const ESChannelStatus * channelStatus_
double correctedEnergy() const
Definition: CaloCluster.h:149
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 reco::PFCluster::EEtoPSAssociation * EEtoPS_
void setThreshSuperClusterEt(double thresh)
edm::Ptr< reco::PFCluster > the_ptr() const
std::unique_ptr< reco::SuperClusterCollection > superClustersEE_
void setEtawidthSuperClusterBarrel(double etawidth)
edm::EDGetTokenT< EcalRecHitCollection > inputTagEndcapRecHits_
void setClusteringType(clustering_type thetype)
void setEtawidthSuperClusterEndcap(double etawidth)
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 int verbose
void setUseETForSeeding(bool useET)
const REPPoint & positionREP() const
cluster position: rho, eta, phi
Definition: PFCluster.h:96
std::unique_ptr< reco::SuperClusterCollection > & getEBOutputSCCollection()
CalibratedClusterPtrVector _clustersEE
void setEnergyWeighting(energy_weight thetype)
double f[11][100]
d
Definition: ztail.py:151
double energy() const
cluster energy
Definition: PFCluster.h:78
void setThreshPFClusterSeedBarrel(double thresh)
edm::EDGetTokenT< reco::PFCluster::EEtoPSAssociation > inputTagPFClustersES_
std::vector< std::pair< CaloClusterPtr::key_type, edm::Ptr< PFCluster > > > EEtoPSAssociation
Definition: PFCluster.h:48
edm::EDGetTokenT< reco::BeamSpot > inputTagBeamSpot_
void buildSuperCluster(CalibratedClusterPtr &, CalibratedClusterPtrVector &)
\ Algorithm for box particle flow super clustering in the ECAL
void setUseDynamicDPhi(bool useit)
void setDropUnseedable(const bool d)
void setPhiwidthSuperClusterEndcap(double phiwidth)
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)