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 
20 
22 
26 
29 
31 
32 #include <vector>
33 #include <memory>
34 
36 
44  public:
47 
48  // simple class for associating calibrated energies
50  public:
52 
53  double energy() const { return cluptr->correctedEnergy(); }
54  double energy_nocalib() const { return cluptr->energy(); }
55  double eta() const { return cluptr->positionREP().eta(); }
56  double phi() const { return cluptr->positionREP().phi(); }
57 
59 
60  private:
62  };
63  typedef std::shared_ptr<CalibratedPFCluster> CalibratedClusterPtr;
64  typedef std::vector<CalibratedClusterPtr> CalibratedClusterPtrVector;
65 
66 
69 
71 
72  void setClusteringType(clustering_type thetype) { _clustype = thetype; }
73 
74  void setEnergyWeighting(energy_weight thetype) { _eweight = thetype; }
75 
76  void setUseETForSeeding(bool useET) { threshIsET_ = useET; }
77 
78  void setUseDynamicDPhi(bool useit) { useDynamicDPhi_ = useit; }
79 
81 
83 
88 
89  void setPhiwidthSuperClusterBarrel( double phiwidth ){ phiwidthSuperClusterBarrel_ = phiwidth;}
90  void setEtawidthSuperClusterBarrel( double etawidth ){ etawidthSuperClusterBarrel_ = etawidth;}
91  void setPhiwidthSuperClusterEndcap( double phiwidth ){ phiwidthSuperClusterEndcap_ = phiwidth;}
92  void setEtawidthSuperClusterEndcap( double etawidth ){ etawidthSuperClusterEndcap_ = etawidth;}
93 
94  void setPFClusterCalibration(const std::shared_ptr<PFEnergyCalibration>&);
95 
96  void setSatelliteMerging( const bool doit ) { doSatelliteClusterMerge_ = doit; }
97  void setSatelliteThreshold( const double t ) { satelliteThreshold_ = t; }
98  void setMajorityFraction( const double f ) { fractionForMajority_ = f; }
99  void setDropUnseedable( const bool d ) { dropUnseedable_ = d; }
100 
102 
104 
106  void update(const edm::EventSetup&);
107 
108 
109  std::unique_ptr<reco::SuperClusterCollection>&
111  std::unique_ptr<reco::SuperClusterCollection>&
113 
114  void loadAndSortPFClusters(const edm::Event &evt);
115 
116  void run();
117 
118  private:
119 
123 
126 
127  CalibratedClusterPtrVector _clustersEB;
128  CalibratedClusterPtrVector _clustersEE;
129  std::unique_ptr<reco::SuperClusterCollection> superClustersEB_;
130  std::unique_ptr<reco::SuperClusterCollection> superClustersEE_;
132  std::shared_ptr<PFEnergyCalibration> _pfEnergyCalibration;
135  void buildAllSuperClusters(CalibratedClusterPtrVector&,
136  double seedthresh);
137  void buildSuperCluster(CalibratedClusterPtr&,
138  CalibratedClusterPtrVector&);
139 
140  bool verbose_;
141 
142  // regression
144  std::unique_ptr<SCEnergyCorrectorSemiParm> regr_;
145 
147 
152 
157 
158  bool doSatelliteClusterMerge_; //rock it
161 
163 
166 
167  // OOT photons
173 };
174 
175 #endif
const ESChannelStatus * channelStatus_
double correctedEnergy() const
Definition: CaloCluster.h:127
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: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 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)