42 produces<edm::ValueMap<float>>(
"convVtxFitProb");
43 produces<edm::ValueMap<float>>(
"kfhits");
44 produces<edm::ValueMap<float>>(
"kfchi2");
64 std::vector<float> convVtxFitProbVals;
65 std::vector<float> kfhitsVals;
66 std::vector<float> kfchi2Vals;
73 float convVtxFitProb = -1.;
77 convVtxFitProb = TMath::Prob( vtx.
chi2(), vtx.
ndof());
81 convVtxFitProbVals.push_back(convVtxFitProb);
88 float kfchi2 = validKf ? trackRef->normalizedChi2() : 0 ;
89 float kfhits = validKf ? trackRef->hitPattern().trackerLayersWithMeasurement() : -1. ;
91 kfchi2Vals.push_back(kfchi2);
92 kfhitsVals.push_back(kfhits);
99 writeValueMap(iEvent, electrons, convVtxFitProbVals,
"convVtxFitProb" );
112 descriptions.
add(
"electronMVAVariableHelper", desc);
bool isNonnull() const
Checks for non-null.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
bool isValid() const
Tells whether the vertex is valid.
~ElectronMVAVariableHelper() override
ElectronMVAVariableHelper(const edm::ParameterSet &iConfig)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
double chi2() const
chi-squares
MultiTokenT< reco::VertexCollection > vtxToken_
T const * get() const
Returns C++ pointer to the item.
ParameterDescriptionBase * add(U const &iLabel, T const &value)
MultiTokenT< reco::ConversionCollection > conversionsToken_
bool isNull() const
Checks for null.
edm::Handle< T > getValidHandle(const edm::Event &iEvent)
T const * product() const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
MultiTokenT< edm::View< reco::GsfElectron > > electronsToken_
const Point & position() const
position
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_