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 setThreshPFClusterMustacheOutBarrel(double thresh){ threshPFClusterMustacheOutBarrel_ = thresh;}
112  //void setThreshPFClusterMustacheOutEndcap(double thresh){ threshPFClusterMustacheOutEndcap_ = thresh;}
113 
115 
117 
119  void update(const edm::EventSetup&);
120 
121 
122  std::unique_ptr<reco::SuperClusterCollection>&
124  std::unique_ptr<reco::SuperClusterCollection>&
126 
127  void loadAndSortPFClusters(const edm::Event &evt);
128 
129  void run();
130 
131  private:
132 
136 
139 
140  CalibratedClusterPtrVector _clustersEB;
141  CalibratedClusterPtrVector _clustersEE;
142  std::unique_ptr<reco::SuperClusterCollection> superClustersEB_;
143  std::unique_ptr<reco::SuperClusterCollection> superClustersEE_;
145  std::shared_ptr<PFEnergyCalibration> _pfEnergyCalibration;
148  void buildAllSuperClusters(CalibratedClusterPtrVector&,
149  double seedthresh);
150  void buildSuperCluster(CalibratedClusterPtr&,
151  CalibratedClusterPtrVector&);
152 
153  bool verbose_;
154 
155  // regression
157  std::unique_ptr<SCEnergyCorrectorSemiParm> regr_;
158 
160 
165 
171 
176 
177  bool doSatelliteClusterMerge_; //rock it
179 
181 
184 
185  bool usePS;
186 
187  // OOT photons
193 };
194 
195 #endif
const ESChannelStatus * channelStatus_
double correctedEnergy() const
Definition: CaloCluster.h:125
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 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)