26 algorithm_(iConfig.getParameter<
int>(
"Algorithm")),
27 qualityCutsPSet_(iConfig.getParameter<
edm::
ParameterSet>(
"qualityCuts")),
28 useBeamSpot_(iConfig.getParameter<
bool>(
"useBeamSpot")),
29 useSelectedTaus_(iConfig.getParameter<
bool>(
"useSelectedTaus")),
30 removeMuonTracks_(iConfig.getParameter<
bool>(
"RemoveMuonTracks")),
31 removeElectronTracks_(iConfig.getParameter<
bool>(
"RemoveElectronTracks")) {
34 iConfig.
getParameter<std::vector<edm::ParameterSet>>(
"discriminators");
43 newCut->
cut_ =
pset.getParameter<
double>(
"selectionCut");
50 produces<edm::AssociationVector<reco::PFTauRefProd, std::vector<reco::VertexRef>>>();
51 produces<reco::VertexCollection>(
"PFTauPrimaryVertices");
104 auto avPFTauPV = std::make_unique<edm::AssociationVector<reco::PFTauRefProd, std::vector<reco::VertexRef>>>(
106 auto vertexCollection_out = std::make_unique<reco::VertexCollection>();
113 disc->discr_ = &(*discr);
136 bool passedDisc =
true;
137 if (
disc->cutFormula_)
138 passedDisc = (
disc->cutFormula_->Eval((*
disc->discr_)[
tau]) > 0.5);
156 for (
const auto&
pfcand : pfTauRef->signalChargedHadrCands()) {
167 if (
muons.isValid()) {
169 if (
muon.track().isNonnull())
180 if (
electron.gsfTrack().isNonnull())
187 std::vector<const reco::Track*> nonTauTracks;
193 std::vector<reco::TransientTrack> transTracks;
194 for (
const auto track : nonTauTracks) {
195 transTracks.push_back(transTrackBuilder->
build(*
track));
198 if (transTracks.size() >= 2) {
202 transVtx = avf.
vertex(transTracks);
212 vertexCollection_out->push_back(thePV);
213 avPFTauPV->setValue(iPFTau, vtxRef);
227 vpsd1.
add<
double>(
"selectionCut");
228 desc.
addVPSet(
"discriminators", vpsd1);
233 pset_signalQualityCuts.
add<
double>(
"maxDeltaZ", 0.4);
234 pset_signalQualityCuts.
add<
double>(
"minTrackPt", 0.5);
235 pset_signalQualityCuts.
add<
double>(
"minTrackVertexWeight", -1.0);
236 pset_signalQualityCuts.
add<
double>(
"maxTrackChi2", 100.0);
237 pset_signalQualityCuts.
add<
unsigned int>(
"minTrackPixelHits", 0);
238 pset_signalQualityCuts.
add<
double>(
"minGammaEt", 1.0);
239 pset_signalQualityCuts.
add<
unsigned int>(
"minTrackHits", 3);
240 pset_signalQualityCuts.
add<
double>(
"minNeutralHadronEt", 30.0);
241 pset_signalQualityCuts.
add<
double>(
"maxTransverseImpactParameter", 0.1);
242 pset_signalQualityCuts.
addOptional<
bool>(
"useTracksInsteadOfPFHadrons");
245 pset_vxAssocQualityCuts.
add<
double>(
"minTrackPt", 0.5);
246 pset_vxAssocQualityCuts.add<
double>(
"minTrackVertexWeight", -1.0);
247 pset_vxAssocQualityCuts.add<
double>(
"maxTrackChi2", 100.0);
248 pset_vxAssocQualityCuts.add<
unsigned int>(
"minTrackPixelHits", 0);
249 pset_vxAssocQualityCuts.add<
double>(
"minGammaEt", 1.0);
250 pset_vxAssocQualityCuts.add<
unsigned int>(
"minTrackHits", 3);
251 pset_vxAssocQualityCuts.add<
double>(
"maxTransverseImpactParameter", 0.1);
252 pset_vxAssocQualityCuts.addOptional<
bool>(
"useTracksInsteadOfPFHadrons");
255 pset_isolationQualityCuts.
add<
double>(
"maxDeltaZ", 0.2);
256 pset_isolationQualityCuts.add<
double>(
"minTrackPt", 1.0);
257 pset_isolationQualityCuts.add<
double>(
"minTrackVertexWeight", -1.0);
258 pset_isolationQualityCuts.add<
double>(
"maxTrackChi2", 100.0);
259 pset_isolationQualityCuts.add<
unsigned int>(
"minTrackPixelHits", 0);
260 pset_isolationQualityCuts.add<
double>(
"minGammaEt", 1.5);
261 pset_isolationQualityCuts.add<
unsigned int>(
"minTrackHits", 8);
262 pset_isolationQualityCuts.add<
double>(
"maxTransverseImpactParameter", 0.03);
263 pset_isolationQualityCuts.addOptional<
bool>(
"useTracksInsteadOfPFHadrons");
269 pset_qualityCuts.
add<
std::string>(
"leadingTrkOrPFCandOption",
"leadPFCand");
270 pset_qualityCuts.add<
std::string>(
"pvFindingAlgo",
"closestInDeltaZ");
272 pset_qualityCuts.add<
bool>(
"vertexTrackFiltering",
false);
273 pset_qualityCuts.add<
bool>(
"recoverLeadingTrk",
false);
279 desc.
add<
int>(
"Algorithm", 0);
280 desc.
add<
bool>(
"RemoveElectronTracks",
false);
281 desc.
add<
bool>(
"RemoveMuonTracks",
false);
282 desc.
add<
bool>(
"useBeamSpot",
true);
283 desc.
add<
bool>(
"useSelectedTaus",
false);