8 : useAbsEta_(para.getParameter<
bool>(
"useAbsEta")),
9 etaBoundaries_(para.getParameter<
std::
vector<double>>(
"etaBoundaries")) {
10 const auto& trkCutParams = para.
getParameter<std::vector<edm::ParameterSet>>(
"trkCuts");
11 for (
const auto&
params : trkCutParams) {
15 throw cms::Exception(
"ConfigError") <<
"EgammaL1TkIsolation: etaBoundaries parameters size (" 17 <<
") should be one less than the size of trkCuts VPSet (" <<
trkCuts_.size()
22 <<
"EgammaL1TkIsolation: etaBoundaries parameter's entries should be in increasing value";
27 desc.add(
"useAbsEta",
true);
45 for (
const auto& trk :
tracks) {
46 const float trkPt = trk.momentum().perp();
52 return {nrTrks, ptSum};
57 auto sq = [](
double val) {
return val *
val; };
66 desc.add<
double>(
"minPt", 2.0);
67 desc.add<
double>(
"maxDR", 0.3);
68 desc.add<
double>(
"minDR", 0.01);
69 desc.add<
double>(
"minDEta", 0.003);
70 desc.add<
double>(
"maxDZ", 0.7);
92 const float trkEta = trk.eta();
T getParameter(std::string const &) const
std::vector< double > etaBoundaries_
static bool passTrkSel(const L1Track &trk, const double trkPt, const TrkCuts &cuts, const double objEta, const double objPhi, const double objZ)
EgammaL1TkIsolation(const edm::ParameterSet ¶)
double vz() const
z coordinate of the reference point on track
TrkCuts(const edm::ParameterSet ¶)
Abs< T >::type abs(const T &t)
double phi() const
azimuthal angle of momentum vector
std::pair< int, double > calIsol(const reco::TrackBase &trk, const L1TrackCollection &l1Tks) const
static edm::ParameterSetDescription makePSetDescription()
double eta() const
pseudorapidity of momentum vector
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
std::vector< TrkCuts > trkCuts_
static void fillPSetDescription(edm::ParameterSetDescription &desc)
size_t etaBinNr(double eta) const