CMS 3D CMS Logo

PFlow2DClusterizerWithTime.h
Go to the documentation of this file.
1 #ifndef __PFlow2DClusterizerWithTime_H__
2 #define __PFlow2DClusterizerWithTime_H__
3 
6 
8 
9 #include <unordered_map>
10 
13 
14 public:
16 
17  ~PFlow2DClusterizerWithTime() override = default;
18  PFlow2DClusterizerWithTime(const B2DGPF&) = delete;
19  B2DGPF& operator=(const B2DGPF&) = delete;
20 
21  void update(const edm::EventSetup& es) override {
22  _positionCalc->update(es);
23  if (_allCellsPosCalc)
24  _allCellsPosCalc->update(es);
26  _convergencePosCalc->update(es);
27  }
28 
30  const std::vector<bool>&,
31  reco::PFClusterCollection& outclus) override;
32 
33 private:
34  const unsigned _maxIterations;
35  const double _stoppingTolerance;
36  const double _showerSigma2;
37  const double _timeSigma_eb;
38  const double _timeSigma_ee;
39  const bool _excludeOtherSeeds;
40  const double _minFracTot;
41  const double _maxNSigmaTime;
42  const double _minChi2Prob;
44 
45  const std::unordered_map<std::string, int> _layerMap;
46  std::unordered_map<int, double> _recHitEnergyNorms;
47  std::unique_ptr<PFCPositionCalculatorBase> _allCellsPosCalc;
48  std::unique_ptr<PFCPositionCalculatorBase> _convergencePosCalc;
49 
50  std::unique_ptr<CaloRecHitResolutionProvider> _timeResolutionCalcBarrel;
51  std::unique_ptr<CaloRecHitResolutionProvider> _timeResolutionCalcEndcap;
52 
53  void seedPFClustersFromTopo(const reco::PFCluster&, const std::vector<bool>&, reco::PFClusterCollection&) const;
54 
55  void growPFClusters(const reco::PFCluster&,
56  const std::vector<bool>&,
57  const unsigned toleranceScaling,
58  const unsigned iter,
59  double dist,
61  void clusterTimeResolution(reco::PFCluster& cluster, double& res) const;
62  void clusterTimeResolutionFromSeed(reco::PFCluster& cluster, double& res) const;
63  double dist2Time(const reco::PFCluster&, const reco::PFRecHitRef&, int cell_layer, double prev_timeres2) const;
64  bool passChi2Prob(size_t iCluster,
65  double dist2,
66  std::vector<double>& clus_chi2,
67  std::vector<size_t>& clus_chi2_nhits) const;
69 };
70 
72 
73 #endif
reco::PFClusterCollection
std::vector< PFCluster > PFClusterCollection
collection of PFCluster objects
Definition: PFClusterFwd.h:9
PFlow2DClusterizerWithTime::_timeSigma_ee
const double _timeSigma_ee
Definition: PFlow2DClusterizerWithTime.h:38
PFlow2DClusterizerWithTime::clusterTimeResolution
void clusterTimeResolution(reco::PFCluster &cluster, double &res) const
Definition: PFlow2DClusterizerWithTime.cc:291
PFlow2DClusterizerWithTime::_allCellsPosCalc
std::unique_ptr< PFCPositionCalculatorBase > _allCellsPosCalc
Definition: PFlow2DClusterizerWithTime.h:47
PFlow2DClusterizerWithTime::buildClusters
void buildClusters(const reco::PFClusterCollection &, const std::vector< bool > &, reco::PFClusterCollection &outclus) override
Definition: PFlow2DClusterizerWithTime.cc:83
PFlow2DClusterizerWithTime::update
void update(const edm::EventSetup &es) override
Definition: PFlow2DClusterizerWithTime.h:21
edm::Ref< PFRecHitCollection >
PFlow2DClusterizerWithTime::_excludeOtherSeeds
const bool _excludeOtherSeeds
Definition: PFlow2DClusterizerWithTime.h:39
PFlow2DClusterizerWithTime::growPFClusters
void growPFClusters(const reco::PFCluster &, const std::vector< bool > &, const unsigned toleranceScaling, const unsigned iter, double dist, reco::PFClusterCollection &) const
Definition: PFlow2DClusterizerWithTime.cc:132
PFlow2DClusterizerWithTime::_maxNSigmaTime
const double _maxNSigmaTime
Definition: PFlow2DClusterizerWithTime.h:41
PFClusterBuilderBase.h
PFlow2DClusterizerWithTime::_showerSigma2
const double _showerSigma2
Definition: PFlow2DClusterizerWithTime.h:36
PFlow2DClusterizerWithTime::~PFlow2DClusterizerWithTime
~PFlow2DClusterizerWithTime() override=default
PFlow2DClusterizerWithTime::_timeSigma_eb
const double _timeSigma_eb
Definition: PFlow2DClusterizerWithTime.h:37
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition: PluginFactory.h:124
PFlow2DClusterizerWithTime
Definition: PFlow2DClusterizerWithTime.h:11
PFlow2DClusterizerWithTime::_minFracTot
const double _minFracTot
Definition: PFlow2DClusterizerWithTime.h:40
edm::ParameterSet
Definition: ParameterSet.h:47
PFlow2DClusterizerWithTime::_convergencePosCalc
std::unique_ptr< PFCPositionCalculatorBase > _convergencePosCalc
Definition: PFlow2DClusterizerWithTime.h:48
PFlow2DClusterizerWithTime::_stoppingTolerance
const double _stoppingTolerance
Definition: PFlow2DClusterizerWithTime.h:35
edmplugin::PluginFactory
Definition: PluginFactory.h:34
PFlow2DClusterizerWithTime::_timeResolutionCalcEndcap
std::unique_ptr< CaloRecHitResolutionProvider > _timeResolutionCalcEndcap
Definition: PFlow2DClusterizerWithTime.h:51
PFlow2DClusterizerWithTime::passChi2Prob
bool passChi2Prob(size_t iCluster, double dist2, std::vector< double > &clus_chi2, std::vector< size_t > &clus_chi2_nhits) const
Definition: PFlow2DClusterizerWithTime.cc:355
PFlow2DClusterizerWithTime::operator=
B2DGPF & operator=(const B2DGPF &)=delete
PFlow2DClusterizerWithTime::clusterTimeResolutionFromSeed
void clusterTimeResolutionFromSeed(reco::PFCluster &cluster, double &res) const
Definition: PFlow2DClusterizerWithTime.cc:274
edm::EventSetup
Definition: EventSetup.h:57
PFlow2DClusterizerWithTime::_recHitEnergyNorms
std::unordered_map< int, double > _recHitEnergyNorms
Definition: PFlow2DClusterizerWithTime.h:46
res
Definition: Electron.h:6
PFRecHitFraction.h
PFlow2DClusterizerWithTime::seedPFClustersFromTopo
void seedPFClustersFromTopo(const reco::PFCluster &, const std::vector< bool > &, reco::PFClusterCollection &) const
Definition: PFlow2DClusterizerWithTime.cc:113
PFlow2DClusterizerWithTime::_clusterTimeResFromSeed
const bool _clusterTimeResFromSeed
Definition: PFlow2DClusterizerWithTime.h:43
PFlow2DClusterizerWithTime::dist2Time
double dist2Time(const reco::PFCluster &, const reco::PFRecHitRef &, int cell_layer, double prev_timeres2) const
Definition: PFlow2DClusterizerWithTime.cc:322
PFlow2DClusterizerWithTime::PFlow2DClusterizerWithTime
PFlow2DClusterizerWithTime(const edm::ParameterSet &conf)
Definition: PFlow2DClusterizerWithTime.cc:26
CaloRecHitResolutionProvider.h
PFlow2DClusterizerWithTime::_maxIterations
const unsigned _maxIterations
Definition: PFlow2DClusterizerWithTime.h:34
reco::PFCluster
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
Definition: PFCluster.h:42
PFlow2DClusterizerWithTime::_timeResolutionCalcBarrel
std::unique_ptr< CaloRecHitResolutionProvider > _timeResolutionCalcBarrel
Definition: PFlow2DClusterizerWithTime.h:50
PFClusterBuilderBase
Definition: PFClusterBuilderBase.h:18
PFClusterBuilderBase::_positionCalc
std::unique_ptr< PosCalc > _positionCalc
Definition: PFClusterBuilderBase.h:57
PFlow2DClusterizerWithTime::prunePFClusters
void prunePFClusters(reco::PFClusterCollection &) const
Definition: PFlow2DClusterizerWithTime.cc:268
PFlow2DClusterizerWithTime::_layerMap
const std::unordered_map< std::string, int > _layerMap
Definition: PFlow2DClusterizerWithTime.h:45
PFlow2DClusterizerWithTime::_minChi2Prob
const double _minChi2Prob
Definition: PFlow2DClusterizerWithTime.h:42
PFlow2DClusterizerWithTime::B2DGPF
PFlow2DClusterizerWithTime B2DGPF
Definition: PFlow2DClusterizerWithTime.h:12