5 using namespace l1tpf_impl;
8 :
debug_(iConfig.getUntrackedParameter<int>(
"debug", 0)),
9 etaCharged_(iConfig.getParameter<double>(
"etaCharged")),
10 vtxRes_(iConfig.getParameter<double>(
"vtxRes")),
11 vtxAdaptiveCut_(iConfig.getParameter<bool>(
"vtxAdaptiveCut")) {}
16 int16_t iZ0 = round(z0 * InputTrack::Z0_SCALE);
17 int16_t iDZ = round(1.5 *
vtxRes_ * InputTrack::Z0_SCALE);
29 int lNBins = int(40. /
vtxRes_);
32 std::unique_ptr<TH1F> h_dz(
new TH1F(
"h_dz",
"h_dz", lNBins, -20, 20));
37 if (!
r.fiducialLocal(p.floatVtxEta(), p.floatVtxPhi()))
40 h_dz->Fill(p.floatDZ(),
std::min(p.floatPt(), 50.f));
48 int imaxbin = h_dz->GetMaximumBin();
49 pvdz = h_dz->GetXaxis()->GetBinCenter(imaxbin);
54 for (
int b = 1;
b <= lNBins; ++
b) {
55 float sum3 = h_dz->GetBinContent(
b) + h_dz->GetBinContent(
b + 1) + h_dz->GetBinContent(
b - 1);
56 if (bmax == -1 || sum3 > max) {
61 pvdz = h_dz->GetXaxis()->GetBinCenter(bmax);
64 int16_t iZ0 = round(pvdz * InputTrack::Z0_SCALE);
65 int16_t iDZ = round(1.5 *
vtxRes_ * InputTrack::Z0_SCALE);
70 if (
r.relativeCoordinates)
72 (
std::abs(
r.globalAbsEta(p.floatVtxEta())) < 1.3);
79 static const std::vector<std::string> empty_;
const bool relativeCoordinates
float globalAbsEta(float localEta) const
virtual void runChargedPV(Region &r, float z0) const
PUAlgoBase(const edm::ParameterSet &)
Abs< T >::type abs(const T &t)
std::vector< PFParticle > pf
virtual void doVertexing(std::vector< Region > &rs, VertexAlgo algo, float &vz) const
virtual const std::vector< std::string > & puGlobalNames() const
VertexAlgo
global operations