13 #include "TLorentzVector.h" 24 chargedPionMass = 0.139;
25 booleanOutput = iConfig.
getParameter<
bool>(
"BooleanOutput");
35 double DeltaE(
const PFTauRef&)
const ;
48 double dE = DeltaE(tau);
55 const std::vector<CandidatePtr>& signalTracks = tau->signalChargedHadrCands();
56 for(
size_t i = 0;
i < signalTracks.size(); ++
i){
58 p4.SetXYZM(signalTracks[
i]->px(),
59 signalTracks[
i]->py(),
60 signalTracks[
i]->pz(),
65 double hadrTauP = tau->momentum().r() * (1.0 - tau->emFraction());
66 if (tau->emFraction() >= 1.0) {
69 return tracksE / hadrTauP - 1.0;
77 desc.
add<
double>(
"deltaEmin", -0.15);
83 psd1.
add<
double>(
"cut");
89 desc.
add<
double>(
"deltaEmax", 1.0);
90 desc.
add<
bool>(
"BooleanOutput",
true);
92 descriptions.
add(
"pfRecoTauDiscriminationByDeltaE", desc);
T getParameter(std::string const &) const
PFRecoTauDiscriminationByDeltaE(const ParameterSet &iConfig)
ParameterDescriptionBase * addOptional(U const &iLabel, T const &value)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
double DeltaE(const PFTauRef &) const
#define DEFINE_FWK_MODULE(type)
~PFRecoTauDiscriminationByDeltaE() override
double discriminate(const reco::PFTauRef &) const override
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void beginEvent(const edm::Event &, const edm::EventSetup &) override