10 #include <unordered_map> 50 if (!pfcConf.
empty()) {
52 if (!acConf.empty()) {
59 if (!acConf2.empty()) {
72 desc.add<
bool>(
"usePFThresholdsFromDB",
true);
91 validator.
add<std::vector<int>>(
"depths", {});
92 validator.
add<std::vector<double>>(
"recHitEnergyNorm", {});
93 std::vector<edm::ParameterSet> vDefaults(2);
94 vDefaults[0].addParameter<
std::string>(
"detector",
"HCAL_BARREL1");
95 vDefaults[0].addParameter<std::vector<int>>(
"depths", {1, 2, 3, 4});
96 vDefaults[0].addParameter<std::vector<double>>(
"recHitEnergyNorm", {0.1, 0.2, 0.3, 0.3});
97 vDefaults[1].addParameter<
std::string>(
"detector",
"HCAL_ENDCAP");
98 vDefaults[1].addParameter<std::vector<int>>(
"depths", {1, 2, 3, 4, 5, 6, 7});
99 vDefaults[1].addParameter<std::vector<double>>(
"recHitEnergyNorm", {0.1, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2});
104 bar.add<
std::string>(
"algoName",
"Basic2DGenericPFlowPositionCalc");
105 bar.add<
double>(
"minFractionInCalc", 1
e-9);
106 bar.add<
int>(
"posCalcNCrystals", 5);
110 validator.
add<std::vector<int>>(
"depths", {});
111 validator.
add<std::vector<double>>(
"logWeightDenominator", {});
112 std::vector<edm::ParameterSet> vDefaults(2);
113 vDefaults[0].addParameter<
std::string>(
"detector",
"HCAL_BARREL1");
114 vDefaults[0].addParameter<std::vector<int>>(
"depths", {1, 2, 3, 4});
115 vDefaults[0].addParameter<std::vector<double>>(
"logWeightDenominator", {0.1, 0.2, 0.3, 0.3});
116 vDefaults[1].addParameter<
std::string>(
"detector",
"HCAL_ENDCAP");
117 vDefaults[1].addParameter<std::vector<int>>(
"depths", {1, 2, 3, 4, 5, 6, 7});
118 vDefaults[1].addParameter<std::vector<double>>(
"logWeightDenominator", {0.1, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2});
119 bar.addVPSet(
"logWeightDenominatorByDetector", validator, vDefaults);
121 bar.add<
double>(
"minAllowedNormalization", 1
e-9);
128 bar.add<
std::string>(
"algoName",
"Basic2DGenericPFlowPositionCalc");
129 bar.add<
double>(
"minFractionInCalc", 1
e-9);
130 bar.add<
int>(
"posCalcNCrystals", -1);
134 validator.
add<std::vector<int>>(
"depths", {});
135 validator.
add<std::vector<double>>(
"logWeightDenominator", {});
136 std::vector<edm::ParameterSet> vDefaults(2);
137 vDefaults[0].addParameter<
std::string>(
"detector",
"HCAL_BARREL1");
138 vDefaults[0].addParameter<std::vector<int>>(
"depths", {1, 2, 3, 4});
139 vDefaults[0].addParameter<std::vector<double>>(
"logWeightDenominator", {0.1, 0.2, 0.3, 0.3});
140 vDefaults[1].addParameter<
std::string>(
"detector",
"HCAL_ENDCAP");
141 vDefaults[1].addParameter<std::vector<int>>(
"depths", {1, 2, 3, 4, 5, 6, 7});
142 vDefaults[1].addParameter<std::vector<double>>(
"logWeightDenominator", {0.1, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2});
143 bar.addVPSet(
"logWeightDenominatorByDetector", validator, vDefaults);
145 bar.add<
double>(
"minAllowedNormalization", 1
e-9);
152 bar.add<
double>(
"corrTermLowE", 0.);
153 bar.add<
double>(
"threshLowE", 6.);
154 bar.add<
double>(
"noiseTerm", 21.86);
155 bar.add<
double>(
"constantTermLowE", 4.24);
156 bar.add<
double>(
"noiseTermLowE", 8.);
157 bar.add<
double>(
"threshHighE", 15.);
158 bar.add<
double>(
"constantTerm", 2.82);
163 bar.add<
double>(
"corrTermLowE", 0.);
164 bar.add<
double>(
"threshLowE", 6.);
165 bar.add<
double>(
"noiseTerm", 21.86);
166 bar.add<
double>(
"constantTermLowE", 4.24);
167 bar.add<
double>(
"noiseTermLowE", 8.);
168 bar.add<
double>(
"threshHighE", 15.);
169 bar.add<
double>(
"constantTerm", 2.82);
217 std::vector<int> nTopoSeeds(nRH, 0);
219 for (
int i = 0;
i < pfClusterSoA.nSeeds();
i++) {
220 nTopoSeeds[pfClusterSoA[
i].topoId()]++;
224 for (
int i = 0;
i < pfClusterSoA.nSeeds();
i++) {
225 unsigned int n = pfClusterSoA[
i].seedRHIdx();
228 int offset = pfClusterSoA[
i].rhfracOffset();
231 if (pfRecHitFractionSoA[
k].pfrhIdx() < nRH && pfRecHitFractionSoA[
k].pfrhIdx() > -1 &&
232 pfRecHitFractionSoA[
k].frac() > 0.0) {
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
std::unique_ptr< PFCPositionCalculatorBase > positionCalc_
const edm::EDGetTokenT< reco::PFClusterHostCollection > pfClusterSoAToken_
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
const edm::EDGetTokenT< reco::PFRecHitFractionHostCollection > pfRecHitFractionSoAToken_
const edm::EDGetTokenT< reco::PFRecHitHostCollection > InputPFRecHitSoA_Token_
uint32_t cc[maxCellsPerHit]
ParameterSet const & getParameterSet(std::string const &) const
Fraction of a PFRecHit (rechits can be shared between several PFCluster's)
const edm::EDPutTokenT< reco::PFClusterCollection > legacyPfClustersToken_
std::unique_ptr< PFCPositionCalculatorBase > allCellsPositionCalc_
#define DEFINE_FWK_MODULE(type)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
edm::Ref< PFRecHitCollection > PFRecHitRef
persistent reference to PFRecHit objects
LegacyPFClusterProducer(edm::ParameterSet const &config)
const edm::ESGetToken< HcalPFCuts, HcalPFCutsRcd > hcalCutsToken_
const edm::EDGetTokenT< reco::PFRecHitCollection > recHitsLabel_
std::vector< PFCluster > PFClusterCollection
collection of PFCluster objects
void produce(edm::Event &, const edm::EventSetup &) override