|
|
◆ B2DGPF
◆ Basic2DGenericPFlowClusterizer() [1/2]
Definition at line 74 of file Basic2DGenericPFlowClusterizer.cc.
98 std::vector<double> rhE_norm;
101 depths =
pset.getParameter<std::vector<int> >(
"depths");
102 rhE_norm =
pset.getParameter<std::vector<double> >(
"recHitEnergyNorm");
105 rhE_norm.push_back(
pset.getParameter<
double>(
"recHitEnergyNorm"));
108 if (rhE_norm.size() !=
depths.size()) {
110 <<
"PFlowClusterizerThreshold mismatch with the numbers of depths";
115 throw cms::Exception(
"InvalidDetectorLayer") <<
"Detector layer : " << det <<
" is not in the list of recognized"
116 <<
" detector layers!";
121 if (conf.
exists(
"allCellsPositionCalc")) {
127 if (conf.
exists(
"positionCalcForConvergence")) {
References PFLayer::ECAL_BARREL, PFLayer::ECAL_ENDCAP, PFLayer::HCAL_BARREL1, PFLayer::HCAL_BARREL2, PFLayer::HCAL_ENDCAP, PFLayer::HF_EM, PFLayer::HF_HAD, createfilelist::int, PFLayer::NONE, PFLayer::PS1, and PFLayer::PS2.
◆ ~Basic2DGenericPFlowClusterizer()
Basic2DGenericPFlowClusterizer::~Basic2DGenericPFlowClusterizer |
( |
| ) |
|
|
overridedefault |
◆ Basic2DGenericPFlowClusterizer() [2/2]
Basic2DGenericPFlowClusterizer::Basic2DGenericPFlowClusterizer |
( |
const B2DGPF & |
| ) |
|
|
delete |
◆ buildClusters()
Implements PFClusterBuilderBase.
Definition at line 134 of file Basic2DGenericPFlowClusterizer.cc.
138 for (
const auto& topocluster :
input) {
139 clustersInTopo.clear();
141 const unsigned tolScal =
std::pow(
std::max(1.0, clustersInTopo.size() - 1.0), 2.0);
142 growPFClusters(topocluster, seedable, tolScal, 0, tolScal, clustersInTopo);
158 for (
auto& clusterout : clustersInTopo) {
References _allCellsPosCalc, _convergencePosCalc, PFClusterBuilderBase::_positionCalc, growPFClusters(), input, SiStripPI::max, eostools::move(), convertSQLitetoXML_cfg::output, funct::pow(), prunePFClusters(), and seedPFClustersFromTopo().
◆ growPFClusters()
void Basic2DGenericPFlowClusterizer::growPFClusters |
( |
const reco::PFCluster & |
topo, |
|
|
const std::vector< bool > & |
seedable, |
|
|
const unsigned |
toleranceScaling, |
|
|
const unsigned |
iter, |
|
|
double |
dist, |
|
|
reco::PFClusterCollection & |
clusters |
|
) |
| const |
|
private |
Definition at line 183 of file Basic2DGenericPFlowClusterizer.cc.
190 LOGDRESSED(
"Basic2DGenericPFlowClusterizer:growAndStabilizePFClusters")
191 <<
"reached " <<
_maxIterations <<
" iterations, terminated position "
192 <<
"fit with diff = " <<
diff;
197 std::vector<reco::PFCluster::REPPoint> clus_prev_pos;
200 clus_prev_pos.emplace_back(repp.rho(), repp.eta(), repp.phi());
208 cluster.resetHitsAndFractions();
211 std::vector<double> dist2,
frac;
215 int cell_layer = (
int)refhit->layer();
228 for (
unsigned int j = 0;
j < recHitEnergyNormDepthPair.second.size(); ++
j) {
229 int depth = recHitEnergyNormDepthPair.first[
j];
242 dist2.emplace_back(d2);
244 LOGDRESSED(
"Basic2DGenericPFlowClusterizer:growAndStabilizePFClusters")
245 <<
"Warning! :: pfcluster-topocell distance is too large! d= " << d2;
277 if (dist2[
i] < 100.0 ||
frac[
i] > 0.9999) {
301 clus_prev_pos.clear();
References _allCellsPosCalc, _convergencePosCalc, _excludeOtherSeeds, _maxIterations, _minFracTot, PFClusterBuilderBase::_positionCalc, _recHitEnergyNorms, _showerSigma2, _stoppingTolerance, funct::abs(), bsc_activity_cfg::clusters, reco::deltaR2(), LEDCalibrationChannels::depth, change_name::diff, myMath::fast_expf(), DivergingColor::frac, HLT_FULL_cff::fraction, PFLayer::HCAL_BARREL1, PFLayer::HCAL_BARREL2, PFLayer::HCAL_ENDCAP, mps_fire::i, createfilelist::int, dqmiolumiharvest::j, edm::Ref< C, T, F >::key(), LOGDRESSED, HLT_FULL_cff::recHitEnergyNorm, reco::PFCluster::recHitFractions(), and mathSSE::sqrt().
Referenced by buildClusters().
◆ operator=()
B2DGPF& Basic2DGenericPFlowClusterizer::operator= |
( |
const B2DGPF & |
| ) |
|
|
delete |
◆ prunePFClusters()
◆ seedPFClustersFromTopo()
◆ update()
◆ _allCellsPosCalc
◆ _convergencePosCalc
◆ _excludeOtherSeeds
const bool Basic2DGenericPFlowClusterizer::_excludeOtherSeeds |
|
private |
◆ _layerMap
const std::unordered_map<std::string, int> Basic2DGenericPFlowClusterizer::_layerMap |
|
private |
◆ _maxIterations
const unsigned Basic2DGenericPFlowClusterizer::_maxIterations |
|
private |
◆ _minFracTot
const double Basic2DGenericPFlowClusterizer::_minFracTot |
|
private |
◆ _recHitEnergyNorms
std::unordered_map<int, std::pair<std::vector<int>, std::vector<double> > > Basic2DGenericPFlowClusterizer::_recHitEnergyNorms |
|
private |
◆ _showerSigma2
const double Basic2DGenericPFlowClusterizer::_showerSigma2 |
|
private |
◆ _stoppingTolerance
const double Basic2DGenericPFlowClusterizer::_stoppingTolerance |
|
private |
std::vector< PFCluster > PFClusterCollection
collection of PFCluster objects
void setSeed(const DetId &id)
std::unique_ptr< PFCPositionCalculatorBase > _convergencePosCalc
static const std::string input
Fraction of a PFRecHit (rechits can be shared between several PFCluster's)
void seedPFClustersFromTopo(const reco::PFCluster &, const std::vector< bool > &, reco::PFClusterCollection &) const
void growPFClusters(const reco::PFCluster &, const std::vector< bool > &, const unsigned toleranceScaling, const unsigned iter, double dist, reco::PFClusterCollection &) const
const std::vector< reco::PFRecHitFraction > & recHitFractions() const
vector of rechit fractions
std::unordered_map< int, std::pair< std::vector< int >, std::vector< double > > > _recHitEnergyNorms
const bool _excludeOtherSeeds
const unsigned _maxIterations
PFClusterBuilderBase(const edm::ParameterSet &conf, edm::ConsumesCollector &cc)
const std::unordered_map< std::string, int > _layerMap
bool exists(std::string const ¶meterName) const
checks if a parameter exists
XYZPointD XYZPoint
point in space with cartesian internal representation
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
XYZVectorD XYZVector
spatial vector with cartesian internal representation
void addRecHitFraction(const reco::PFRecHitFraction &frac)
add a given fraction of the rechit
const double _stoppingTolerance
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
T getParameter(std::string const &) const
VParameterSet const & getParameterSetVector(std::string const &name) const
key_type key() const
Accessor for product key.
Power< A, B >::type pow(const A &a, const B &b)
Abs< T >::type abs(const T &t)
ROOT::Math::PositionVector3D< ROOT::Math::CylindricalEta3D< double > > REPPoint
std::unique_ptr< PosCalc > _positionCalc
const float _minFractionToKeep
std::unique_ptr< PFCPositionCalculatorBase > _allCellsPosCalc
const double _showerSigma2
ParameterSet const & getParameterSet(std::string const &) const
void prunePFClusters(reco::PFClusterCollection &) const