CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
20 
24 
27 
29 
30 #include "TVector2.h"
31 
32 #include <string>
33 #include <vector>
34 #include <unordered_map>
35 #include <set>
36 
37 #include <memory>
38 
39 class TFile;
40 class TH2F;
41 
43 
51  public:
54 
55  // simple class for associating calibrated energies
57  public:
59 
60  double energy() const { return cluptr->correctedEnergy(); }
61  double energy_nocalib() const { return cluptr->energy(); }
62  double eta() const { return cluptr->positionREP().eta(); }
63  double phi() const { return cluptr->positionREP().phi(); }
64 
66 
67  private:
69  };
70  typedef std::shared_ptr<CalibratedPFCluster> CalibratedClusterPtr;
71  typedef std::vector<CalibratedClusterPtr> CalibratedClusterPtrVector;
72 
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  void setUsePS( bool useit ){ usePS = useit; }
101 
102  void setPFClusterCalibration(const std::shared_ptr<PFEnergyCalibration>&);
103 
105 
106  void setSatelliteMerging( const bool doit ) { doSatelliteClusterMerge_ = doit; }
107  void setSatelliteThreshold( const double t ) { satelliteThreshold_ = t; }
108  void setMajorityFraction( const double f ) { fractionForMajority_ = f; }
109  //void setThreshPFClusterMustacheOutBarrel(double thresh){ threshPFClusterMustacheOutBarrel_ = thresh;}
110  //void setThreshPFClusterMustacheOutEndcap(double thresh){ threshPFClusterMustacheOutEndcap_ = thresh;}
111 
113 
115  void update(const edm::EventSetup&);
116 
117 
118  std::auto_ptr<reco::SuperClusterCollection>&
120  std::auto_ptr<reco::SuperClusterCollection>&
122 
123  void loadAndSortPFClusters(const edm::Event &evt);
124 
125  void run();
126 
127  private:
128 
132 
135 
138  std::auto_ptr<reco::SuperClusterCollection> superClustersEB_;
139  std::auto_ptr<reco::SuperClusterCollection> superClustersEE_;
141  std::shared_ptr<PFEnergyCalibration> _pfEnergyCalibration;
145  double seedthresh);
148 
149  bool verbose_;
150 
151  // regression
153  std::unique_ptr<SCEnergyCorrectorSemiParm> regr_;
154 
156 
161 
167 
172 
173  bool doSatelliteClusterMerge_; //rock it
175 
177 
180 
181  bool usePS;
182 
183 };
184 
185 #endif
std::auto_ptr< reco::SuperClusterCollection > superClustersEB_
const ESChannelStatus * channelStatus_
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)
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
void setEtawidthSuperClusterBarrel(double etawidth)
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)
std::vector< std::pair< CaloClusterPtr::key_type, edm::Ptr< PFCluster > > > EEtoPSAssociation
Definition: PFCluster.h:50
std::auto_ptr< reco::SuperClusterCollection > & getEEOutputSCCollection()
CalibratedClusterPtrVector _clustersEE
void setEnergyWeighting(energy_weight thetype)
double f[11][100]
void setThreshPFClusterSeedBarrel(double thresh)
edm::EDGetTokenT< reco::PFCluster::EEtoPSAssociation > inputTagPFClustersES_
edm::EDGetTokenT< reco::BeamSpot > inputTagBeamSpot_
std::auto_ptr< reco::SuperClusterCollection > superClustersEE_
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)
void setSatelliteThreshold(const double t)
void setPFClusterCalibration(const std::shared_ptr< PFEnergyCalibration > &)
CalibratedClusterPtrVector _clustersEB
std::auto_ptr< reco::SuperClusterCollection > & getEBOutputSCCollection()