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 
19 
23 
26 
27 #include "TVector2.h"
28 
29 #include <string>
30 #include <vector>
31 #include <unordered_map>
32 #include <set>
33 
34 #include <memory>
35 
36 class TFile;
37 class TH2F;
38 
40 
48  public:
51 
52  // simple class for associating calibrated energies
54  public:
56 
57  double energy() const { return cluptr->correctedEnergy(); }
58  double energy_nocalib() const { return cluptr->energy(); }
59  double eta() const { return cluptr->positionREP().eta(); }
60  double phi() const { return cluptr->positionREP().phi(); }
61 
63 
64  private:
66  };
67  typedef std::shared_ptr<CalibratedPFCluster> CalibratedClusterPtr;
68  typedef std::vector<CalibratedClusterPtr> CalibratedClusterPtrVector;
69 
70 
73 
75 
76  void setClusteringType(clustering_type thetype) { _clustype = thetype; }
77 
78  void setEnergyWeighting(energy_weight thetype) { _eweight = thetype; }
79 
80  void setUseETForSeeding(bool useET) { threshIsET_ = useET; }
81 
82  void setUseDynamicDPhi(bool useit) { _useDynamicDPhi = useit; }
83 
84  void setUseRegression(bool useRegression) { useRegression_ = useRegression; }
85 
87 
92 
93  void setPhiwidthSuperClusterBarrel( double phiwidth ){ phiwidthSuperClusterBarrel_ = phiwidth;}
94  void setEtawidthSuperClusterBarrel( double etawidth ){ etawidthSuperClusterBarrel_ = etawidth;}
95  void setPhiwidthSuperClusterEndcap( double phiwidth ){ phiwidthSuperClusterEndcap_ = phiwidth;}
96  void setEtawidthSuperClusterEndcap( double etawidth ){ etawidthSuperClusterEndcap_ = etawidth;}
97  void setUsePS( bool useit ){ usePS = useit; }
98 
99  void setPFClusterCalibration(const std::shared_ptr<PFEnergyCalibration>&);
100 
102 
103  void setSatelliteMerging( const bool doit ) { doSatelliteClusterMerge_ = doit; }
104  void setSatelliteThreshold( const double t ) { satelliteThreshold_ = t; }
105  void setMajorityFraction( const double f ) { fractionForMajority_ = f; }
106  //void setThreshPFClusterMustacheOutBarrel(double thresh){ threshPFClusterMustacheOutBarrel_ = thresh;}
107  //void setThreshPFClusterMustacheOutEndcap(double thresh){ threshPFClusterMustacheOutEndcap_ = thresh;}
108 
109  void setCrackCorrections( bool applyCrackCorrections) { applyCrackCorrections_ = applyCrackCorrections;}
110 
112  void update(const edm::EventSetup&);
113 
114 
115  std::auto_ptr<reco::SuperClusterCollection>&
117  std::auto_ptr<reco::SuperClusterCollection>&
119 
120  void loadAndSortPFClusters(const edm::Event &evt);
121 
122  void run();
123 
124  private:
125 
129 
131 
134  std::auto_ptr<reco::SuperClusterCollection> superClustersEB_;
135  std::auto_ptr<reco::SuperClusterCollection> superClustersEE_;
137  std::shared_ptr<PFEnergyCalibration> _pfEnergyCalibration;
141  double seedthresh);
144 
145  bool verbose_;
146 
147  // regression
149  std::unique_ptr<PFSCRegressionCalc> regr_;
150 
152 
157 
163 
168 
169  bool doSatelliteClusterMerge_; //rock it
171 
173 
176 
177  bool usePS;
178 
179 };
180 
181 #endif
std::auto_ptr< reco::SuperClusterCollection > superClustersEB_
edm::EDGetTokenT< edm::View< reco::PFCluster > > inputTagPFClusters_
void setMajorityFraction(const double f)
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::unique_ptr< PFSCRegressionCalc > regr_
std::vector< std::pair< CaloClusterPtr::key_type, edm::Ptr< PFCluster > > > EEtoPSAssociation
Definition: PFCluster.h:46
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()