20 #include "TLorentzVector.h" 29 explicit CaloRecoTauDiscriminationByFlightPathSignificance(
37 booleanOutput = iConfig.
getParameter<
bool>(
"BooleanOutput");
39 ~CaloRecoTauDiscriminationByFlightPathSignificance()
override{}
45 double threeProngFlightPathSig(
const CaloTauRef&)
const ;
58 void CaloRecoTauDiscriminationByFlightPathSignificance::beginEvent(
68 transientTrackBuilder = builder.
product();
72 CaloRecoTauDiscriminationByFlightPathSignificance::discriminate(
75 return ( threeProngFlightPathSig(tau) >
flightPathSig ? 1. : 0. );
76 return threeProngFlightPathSig(tau);
80 CaloRecoTauDiscriminationByFlightPathSignificance::threeProngFlightPathSig(
82 double flightPathSignificance = 0;
85 vector<TransientTrack> transientTracks;
86 for(
size_t i = 0;
i < signalTracks.
size(); ++
i){
88 transientTrackBuilder->build(signalTracks[
i]);
89 transientTracks.push_back(transientTrack);
91 if(transientTracks.size() > 1) {
97 flightPathSignificance = vertexSignificance(
primaryVertex,secVer,tauDir);
100 return flightPathSignificance;
104 CaloRecoTauDiscriminationByFlightPathSignificance::vertexSignificance(
117 desc.
add<
double>(
"flightPathSig", 1.5);
119 desc.add<
bool>(
"BooleanOutput",
true);
122 pset_signalQualityCuts.
add<
double>(
"maxDeltaZ", 0.4);
123 pset_signalQualityCuts.add<
double>(
"minTrackPt", 0.5);
124 pset_signalQualityCuts.add<
double>(
"minTrackVertexWeight", -1.0);
125 pset_signalQualityCuts.add<
double>(
"maxTrackChi2", 100.0);
126 pset_signalQualityCuts.add<
unsigned int>(
"minTrackPixelHits", 0);
127 pset_signalQualityCuts.add<
double>(
"minGammaEt", 1.0);
128 pset_signalQualityCuts.add<
unsigned int>(
"minTrackHits", 3);
129 pset_signalQualityCuts.add<
double>(
"minNeutralHadronEt", 30.0);
130 pset_signalQualityCuts.add<
double>(
"maxTransverseImpactParameter", 0.1);
131 pset_signalQualityCuts.addOptional<
bool>(
"useTracksInsteadOfPFHadrons");
134 pset_vxAssocQualityCuts.
add<
double>(
"minTrackPt", 0.5);
135 pset_vxAssocQualityCuts.add<
double>(
"minTrackVertexWeight", -1.0);
136 pset_vxAssocQualityCuts.add<
double>(
"maxTrackChi2", 100.0);
137 pset_vxAssocQualityCuts.add<
unsigned int>(
"minTrackPixelHits", 0);
138 pset_vxAssocQualityCuts.add<
double>(
"minGammaEt", 1.0);
139 pset_vxAssocQualityCuts.add<
unsigned int>(
"minTrackHits", 3);
140 pset_vxAssocQualityCuts.add<
double>(
"maxTransverseImpactParameter", 0.1);
141 pset_vxAssocQualityCuts.addOptional<
bool>(
"useTracksInsteadOfPFHadrons");
144 pset_isolationQualityCuts.
add<
double>(
"maxDeltaZ", 0.2);
145 pset_isolationQualityCuts.add<
double>(
"minTrackPt", 1.0);
146 pset_isolationQualityCuts.add<
double>(
"minTrackVertexWeight", -1.0);
147 pset_isolationQualityCuts.add<
double>(
"maxTrackChi2", 100.0);
148 pset_isolationQualityCuts.add<
unsigned int>(
"minTrackPixelHits", 0);
149 pset_isolationQualityCuts.add<
double>(
"minGammaEt", 1.5);
150 pset_isolationQualityCuts.add<
unsigned int>(
"minTrackHits", 8);
151 pset_isolationQualityCuts.add<
double>(
"maxTransverseImpactParameter", 0.03);
152 pset_isolationQualityCuts.addOptional<
bool>(
"useTracksInsteadOfPFHadrons");
158 pset_qualityCuts.
add<
std::string>(
"leadingTrkOrPFCandOption",
"leadPFCand");
159 pset_qualityCuts.add<
std::string>(
"pvFindingAlgo",
"closestInDeltaZ");
161 pset_qualityCuts.add<
bool>(
"vertexTrackFiltering",
false);
162 pset_qualityCuts.add<
bool>(
"recoverLeadingTrk",
false);
171 psd1.
add<
double>(
"cut");
178 desc.
add<
bool>(
"UsePVerror",
true);
179 descriptions.add(
"caloRecoTauDiscriminationByFlightPathSignificance", desc);
T getParameter(std::string const &) const
ParameterDescriptionBase * addOptional(U const &iLabel, T const &value)
static Measurement1D computeDist3d(const reco::Vertex &pv, const SV &sv, const GlobalVector &direction, bool withPVError)
#define DEFINE_FWK_MODULE(type)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
double significance() const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
size_type size() const
Size of the RefVector.
T const * product() const