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 
4 
11 
16 
18 
22 
26 
29 
31 
32 #include "TVector2.h"
33 
34 #include <string>
35 #include <vector>
36 #include <unordered_map>
37 #include <set>
38 
39 #include <memory>
40 
41 class TFile;
42 class TH2F;
43 
45 
53  public:
56 
57  // simple class for associating calibrated energies
59  public:
61 
62  double energy() const { return cluptr->correctedEnergy(); }
63  double energy_nocalib() const { return cluptr->energy(); }
64  double eta() const { return cluptr->positionREP().eta(); }
65  double phi() const { return cluptr->positionREP().phi(); }
66 
68 
69  private:
71  };
72  typedef std::shared_ptr<CalibratedPFCluster> CalibratedClusterPtr;
73  typedef std::vector<CalibratedClusterPtr> CalibratedClusterPtrVector;
74 
75 
78 
80 
81  void setClusteringType(clustering_type thetype) { _clustype = thetype; }
82 
83  void setEnergyWeighting(energy_weight thetype) { _eweight = thetype; }
84 
85  void setUseETForSeeding(bool useET) { threshIsET_ = useET; }
86 
87  void setUseDynamicDPhi(bool useit) { _useDynamicDPhi = useit; }
88 
90 
92 
97 
98  void setPhiwidthSuperClusterBarrel( double phiwidth ){ phiwidthSuperClusterBarrel_ = phiwidth;}
99  void setEtawidthSuperClusterBarrel( double etawidth ){ etawidthSuperClusterBarrel_ = etawidth;}
100  void setPhiwidthSuperClusterEndcap( double phiwidth ){ phiwidthSuperClusterEndcap_ = phiwidth;}
101  void setEtawidthSuperClusterEndcap( double etawidth ){ etawidthSuperClusterEndcap_ = etawidth;}
102  void setUsePS( bool useit ){ usePS = useit; }
103 
104  void setPFClusterCalibration(const std::shared_ptr<PFEnergyCalibration>&);
105 
107 
108  void setSatelliteMerging( const bool doit ) { doSatelliteClusterMerge_ = doit; }
109  void setSatelliteThreshold( const double t ) { satelliteThreshold_ = t; }
110  void setMajorityFraction( const double f ) { fractionForMajority_ = f; }
111  void setDropUnseedable( const bool d ) { dropUnseedable_ = d; }
112  //void setThreshPFClusterMustacheOutBarrel(double thresh){ threshPFClusterMustacheOutBarrel_ = thresh;}
113  //void setThreshPFClusterMustacheOutEndcap(double thresh){ threshPFClusterMustacheOutEndcap_ = thresh;}
114 
116 
118 
120  void update(const edm::EventSetup&);
121 
122 
123  std::unique_ptr<reco::SuperClusterCollection>&
125  std::unique_ptr<reco::SuperClusterCollection>&
127 
128  void loadAndSortPFClusters(const edm::Event &evt);
129 
130  void run();
131 
132  private:
133 
137 
140 
141  CalibratedClusterPtrVector _clustersEB;
142  CalibratedClusterPtrVector _clustersEE;
143  std::unique_ptr<reco::SuperClusterCollection> superClustersEB_;
144  std::unique_ptr<reco::SuperClusterCollection> superClustersEE_;
146  std::shared_ptr<PFEnergyCalibration> _pfEnergyCalibration;
149  void buildAllSuperClusters(CalibratedClusterPtrVector&,
150  double seedthresh);
151  void buildSuperCluster(CalibratedClusterPtr&,
152  CalibratedClusterPtrVector&);
153 
154  bool verbose_;
155 
156  // regression
158  std::unique_ptr<SCEnergyCorrectorSemiParm> regr_;
159 
161 
166 
172 
177 
178  bool doSatelliteClusterMerge_; //rock it
181 
183 
186 
187  bool usePS;
188 
189  // OOT photons
195 };
196 
197 #endif
const ESChannelStatus * channelStatus_
double correctedEnergy() const
Definition: CaloCluster.h:127
std::unique_ptr< reco::SuperClusterCollection > & getEEOutputSCCollection()
bool verbose
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 &&)
void setUseETForSeeding(bool useET)
const REPPoint & positionREP() const
cluster position: rho, eta, phi
Definition: PFCluster.h:97
std::unique_ptr< reco::SuperClusterCollection > & getEBOutputSCCollection()
std::vector< std::pair< CaloClusterPtr::key_type, edm::Ptr< PFCluster > > > EEtoPSAssociation
Definition: PFCluster.h:50
CalibratedClusterPtrVector _clustersEE
void setEnergyWeighting(energy_weight thetype)
double f[11][100]
double energy() const
cluster energy
Definition: PFCluster.h:82
void setThreshPFClusterSeedBarrel(double thresh)
edm::EDGetTokenT< reco::PFCluster::EEtoPSAssociation > inputTagPFClustersES_
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 setThreshPFClusterES(double thresh)
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)