CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes
TemplatedSecondaryVertexProducer< IPTI, VTX > Class Template Reference
Inheritance diagram for TemplatedSecondaryVertexProducer< IPTI, VTX >:
edm::stream::EDProducer<>

Classes

struct  SVBuilder
 
struct  SVFilter
 

Public Types

typedef IPTI::input_container input_container
 
typedef IPTI::input_container::value_type input_item
 
typedef std::vector< TemplatedSecondaryVertexTagInfo< IPTI, VTX > > Product
 
typedef TemplatedSecondaryVertex< VTX > SecondaryVertex
 
typedef std::vector< reco::btag::IndexedTrackDataTrackDataVector
 
- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Public Member Functions

void produce (edm::Event &event, const edm::EventSetup &es) override
 
 TemplatedSecondaryVertexProducer (const edm::ParameterSet &params)
 
 ~TemplatedSecondaryVertexProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Types

enum  ConstraintType {
  CONSTRAINT_NONE = 0, CONSTRAINT_BEAMSPOT, CONSTRAINT_PV_BEAMSPOT_SIZE, CONSTRAINT_PV_BS_Z_ERRORS_SCALED,
  CONSTRAINT_PV_ERROR_SCALED, CONSTRAINT_PV_PRIMARIES_IN_FIT
}
 

Private Member Functions

void markUsedTracks (TrackDataVector &trackData, const input_container &trackRefs, const SecondaryVertex &sv, size_t idx)
 
template<>
void markUsedTracks (TrackDataVector &trackData, const input_container &trackRefs, const SecondaryVertex &sv, size_t idx)
 
template<>
void markUsedTracks (TrackDataVector &trackData, const input_container &trackRefs, const SecondaryVertex &sv, size_t idx)
 
void matchGroomedJets (const edm::Handle< edm::View< reco::Jet > > &jets, const edm::Handle< edm::View< reco::Jet > > &matchedJets, std::vector< int > &matchedIndices)
 
template<class CONTAINER >
void matchReclusteredJets (const edm::Handle< CONTAINER > &jets, const std::vector< fastjet::PseudoJet > &matchedJets, std::vector< int > &matchedIndices, const std::string &jetType="")
 
void matchSubjets (const std::vector< int > &groomedIndices, const edm::Handle< edm::View< reco::Jet > > &groomedJets, const edm::Handle< std::vector< IPTI > > &subjets, std::vector< std::vector< int > > &matchedIndices)
 
void matchSubjets (const edm::Handle< edm::View< reco::Jet > > &fatJets, const edm::Handle< std::vector< IPTI > > &subjets, std::vector< std::vector< int > > &matchedIndices)
 
const reco::JettoJet (const reco::Jet &j)
 
const reco::JettoJet (const IPTI &j)
 

Static Private Member Functions

static ConstraintType getConstraintType (const std::string &name)
 

Private Attributes

ConstraintType constraint
 
double constraintScaling
 
double extSVDeltaRToJet
 
ClusterSequencePtr fjClusterSeq
 
JetDefPtr fjJetDefinition
 
double ghostRescaling
 
std::string jetAlgorithm
 
double jetPtMin
 
double minTrackWeight
 
double relPtTolerance
 
double rParam
 
reco::btag::SortCriteria sortCriterium
 
edm::EDGetTokenT< reco::BeamSpottoken_BeamSpot
 
edm::EDGetTokenT< edm::View< VTX > > token_extSVCollection
 
edm::EDGetTokenT< edm::View< reco::Jet > > token_fatJets
 
edm::EDGetTokenT< edm::View< reco::Jet > > token_groomedFatJets
 
edm::ESGetToken< TransientTrackBuilder, TransientTrackRecordtoken_trackBuilder
 
edm::EDGetTokenT< std::vector< IPTI > > token_trackIPTagInfo
 
edm::EDGetTokenT< edm::ValueMap< float > > token_weights
 
TrackSelector trackSelector
 
bool useExternalSV
 
bool useFatJets
 
bool useGhostTrack
 
bool useGroomedFatJets
 
bool useSVClustering
 
bool useSVMomentum
 
VertexFilter vertexFilter
 
VertexSorting< SecondaryVertexvertexSorting
 
edm::ParameterSet vtxRecoPSet
 
bool withPVError
 

Detailed Description

template<class IPTI, class VTX>
class TemplatedSecondaryVertexProducer< IPTI, VTX >

Definition at line 102 of file TemplatedSecondaryVertexProducer.cc.

Member Typedef Documentation

◆ input_container

template<class IPTI, class VTX>
typedef IPTI::input_container TemplatedSecondaryVertexProducer< IPTI, VTX >::input_container

Definition at line 109 of file TemplatedSecondaryVertexProducer.cc.

◆ input_item

template<class IPTI, class VTX>
typedef IPTI::input_container::value_type TemplatedSecondaryVertexProducer< IPTI, VTX >::input_item

Definition at line 110 of file TemplatedSecondaryVertexProducer.cc.

◆ Product

template<class IPTI, class VTX>
typedef std::vector<TemplatedSecondaryVertexTagInfo<IPTI, VTX> > TemplatedSecondaryVertexProducer< IPTI, VTX >::Product

Definition at line 107 of file TemplatedSecondaryVertexProducer.cc.

◆ SecondaryVertex

template<class IPTI, class VTX>
typedef TemplatedSecondaryVertex<VTX> TemplatedSecondaryVertexProducer< IPTI, VTX >::SecondaryVertex

Definition at line 108 of file TemplatedSecondaryVertexProducer.cc.

◆ TrackDataVector

template<class IPTI, class VTX>
typedef std::vector<reco::btag::IndexedTrackData> TemplatedSecondaryVertexProducer< IPTI, VTX >::TrackDataVector

Definition at line 111 of file TemplatedSecondaryVertexProducer.cc.

Member Enumeration Documentation

◆ ConstraintType

template<class IPTI, class VTX>
enum TemplatedSecondaryVertexProducer::ConstraintType
private

Constructor & Destructor Documentation

◆ TemplatedSecondaryVertexProducer()

template<class IPTI , class VTX >
TemplatedSecondaryVertexProducer< IPTI, VTX >::TemplatedSecondaryVertexProducer ( const edm::ParameterSet params)
explicit

Definition at line 244 of file TemplatedSecondaryVertexProducer.cc.

References TemplatedSecondaryVertexProducer< IPTI, VTX >::constraint, TemplatedSecondaryVertexProducer< IPTI, VTX >::CONSTRAINT_BEAMSPOT, TemplatedSecondaryVertexProducer< IPTI, VTX >::CONSTRAINT_PV_BEAMSPOT_SIZE, TemplatedSecondaryVertexProducer< IPTI, VTX >::CONSTRAINT_PV_BS_Z_ERRORS_SCALED, TemplatedSecondaryVertexProducer< IPTI, VTX >::CONSTRAINT_PV_ERROR_SCALED, TemplatedSecondaryVertexProducer< IPTI, VTX >::CONSTRAINT_PV_PRIMARIES_IN_FIT, TemplatedSecondaryVertexProducer< IPTI, VTX >::constraintScaling, MillePedeFileConverter_cfg::e, Exception, TemplatedSecondaryVertexProducer< IPTI, VTX >::extSVDeltaRToJet, TemplatedSecondaryVertexProducer< IPTI, VTX >::fjJetDefinition, TemplatedSecondaryVertexProducer< IPTI, VTX >::ghostRescaling, TemplatedSecondaryVertexProducer< IPTI, VTX >::jetAlgorithm, TemplatedSecondaryVertexProducer< IPTI, VTX >::jetPtMin, submitPVValidationJobs::params, TemplatedSecondaryVertexProducer< IPTI, VTX >::relPtTolerance, TemplatedSecondaryVertexProducer< IPTI, VTX >::rParam, HLT_2022v12_cff::srcWeights, AlCaHLTBitMon_QueryRunRegistry::string, TemplatedSecondaryVertexProducer< IPTI, VTX >::token_BeamSpot, TemplatedSecondaryVertexProducer< IPTI, VTX >::token_extSVCollection, TemplatedSecondaryVertexProducer< IPTI, VTX >::token_fatJets, TemplatedSecondaryVertexProducer< IPTI, VTX >::token_groomedFatJets, TemplatedSecondaryVertexProducer< IPTI, VTX >::token_trackBuilder, TemplatedSecondaryVertexProducer< IPTI, VTX >::token_trackIPTagInfo, TemplatedSecondaryVertexProducer< IPTI, VTX >::token_weights, TemplatedSecondaryVertexProducer< IPTI, VTX >::useExternalSV, TemplatedSecondaryVertexProducer< IPTI, VTX >::useFatJets, TemplatedSecondaryVertexProducer< IPTI, VTX >::useGroomedFatJets, TemplatedSecondaryVertexProducer< IPTI, VTX >::useSVClustering, and TemplatedSecondaryVertexProducer< IPTI, VTX >::useSVMomentum.

245  : sortCriterium(TrackSorting::getCriterium(params.getParameter<std::string>("trackSort"))),
246  trackSelector(params.getParameter<edm::ParameterSet>("trackSelection")),
247  constraint(getConstraintType(params.getParameter<std::string>("constraint"))),
248  constraintScaling(1.0),
249  vtxRecoPSet(params.getParameter<edm::ParameterSet>("vertexReco")),
250  useGhostTrack(vtxRecoPSet.getParameter<std::string>("finder") == "gtvr"),
251  withPVError(params.getParameter<bool>("usePVError")),
252  minTrackWeight(params.getParameter<double>("minimumTrackWeight")),
253  vertexFilter(params.getParameter<edm::ParameterSet>("vertexCuts")),
254  vertexSorting(params.getParameter<edm::ParameterSet>("vertexSelection")) {
255  token_trackIPTagInfo = consumes<std::vector<IPTI> >(params.getParameter<edm::InputTag>("trackIPTagInfos"));
257  constraintScaling = params.getParameter<double>("pvErrorScaling");
258 
261  token_BeamSpot = consumes<reco::BeamSpot>(params.getParameter<edm::InputTag>("beamSpotTag"));
262  useExternalSV = params.getParameter<bool>("useExternalSV");
263  if (useExternalSV) {
264  token_extSVCollection = consumes<edm::View<VTX> >(params.getParameter<edm::InputTag>("extSVCollection"));
265  extSVDeltaRToJet = params.getParameter<double>("extSVDeltaRToJet");
266  }
267  useSVClustering = (params.existsAs<bool>("useSVClustering") ? params.getParameter<bool>("useSVClustering") : false);
268  useSVMomentum = (params.existsAs<bool>("useSVMomentum") ? params.getParameter<bool>("useSVMomentum") : false);
269  useFatJets = (useExternalSV && params.exists("fatJets"));
270  useGroomedFatJets = (useExternalSV && params.exists("groomedFatJets"));
271  if (useSVClustering) {
272  jetAlgorithm = params.getParameter<std::string>("jetAlgorithm");
273  rParam = params.getParameter<double>("rParam");
274  jetPtMin =
275  0.; // hardcoded to 0. since we simply want to recluster all input jets which already had some PtMin applied
277  (params.existsAs<double>("ghostRescaling") ? params.getParameter<double>("ghostRescaling") : 1e-18);
279  (params.existsAs<double>("relPtTolerance")
280  ? params.getParameter<double>("relPtTolerance")
281  : 1e-03); // 0.1% relative difference in Pt should be sufficient to detect possible misconfigurations
282 
283  // set jet algorithm
284  if (jetAlgorithm == "Kt")
285  fjJetDefinition = std::make_shared<fastjet::JetDefinition>(fastjet::kt_algorithm, rParam);
286  else if (jetAlgorithm == "CambridgeAachen")
287  fjJetDefinition = std::make_shared<fastjet::JetDefinition>(fastjet::cambridge_algorithm, rParam);
288  else if (jetAlgorithm == "AntiKt")
289  fjJetDefinition = std::make_shared<fastjet::JetDefinition>(fastjet::antikt_algorithm, rParam);
290  else
291  throw cms::Exception("InvalidJetAlgorithm") << "Jet clustering algorithm is invalid: " << jetAlgorithm
292  << ", use CambridgeAachen | Kt | AntiKt" << std::endl;
293  }
295  esConsumes<TransientTrackBuilder, TransientTrackRecord>(edm::ESInputTag("", "TransientTrackBuilder"));
296  if (useFatJets) {
297  token_fatJets = consumes<edm::View<reco::Jet> >(params.getParameter<edm::InputTag>("fatJets"));
298  }
299  edm::InputTag srcWeights = params.getParameter<edm::InputTag>("weights");
300  if (!srcWeights.label().empty())
302  if (useGroomedFatJets) {
303  token_groomedFatJets = consumes<edm::View<reco::Jet> >(params.getParameter<edm::InputTag>("groomedFatJets"));
304  }
305  if (useFatJets && !useSVClustering)
306  rParam = params.getParameter<double>("rParam"); // will be used later as a dR cut
307 
308  produces<Product>();
309 }
edm::EDGetTokenT< edm::View< reco::Jet > > token_fatJets
edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > token_trackBuilder
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
reco::btag::SortCriteria getCriterium(const std::string &name)
Definition: TrackSorting.cc:11
edm::EDGetTokenT< reco::BeamSpot > token_BeamSpot
edm::EDGetTokenT< std::vector< IPTI > > token_trackIPTagInfo
edm::EDGetTokenT< edm::ValueMap< float > > token_weights
VertexSorting< SecondaryVertex > vertexSorting
static ConstraintType getConstraintType(const std::string &name)
edm::EDGetTokenT< edm::View< VTX > > token_extSVCollection
edm::EDGetTokenT< edm::View< reco::Jet > > token_groomedFatJets

◆ ~TemplatedSecondaryVertexProducer()

template<class IPTI , class VTX >
TemplatedSecondaryVertexProducer< IPTI, VTX >::~TemplatedSecondaryVertexProducer ( )
override

Definition at line 311 of file TemplatedSecondaryVertexProducer.cc.

311 {}

Member Function Documentation

◆ fillDescriptions()

template<class IPTI , class VTX >
void TemplatedSecondaryVertexProducer< IPTI, VTX >::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 1212 of file TemplatedSecondaryVertexProducer.cc.

References edm::ConfigurationDescriptions::addDefault(), submitPVResolutionJobs::desc, MillePedeFileConverter_cfg::e, HLT_2022v12_cff::InputTag, AlCaHLTBitMon_QueryRunRegistry::string, HLT_2022v12_cff::trackSelection, HLT_2022v12_cff::v0Filter, HLT_2022v12_cff::vertexCuts, HLT_2022v12_cff::vertexReco, and HiggsMonitoring_cfi::vertexSelection.

1212  {
1214  desc.add<double>("extSVDeltaRToJet", 0.3);
1215  desc.add<edm::InputTag>("beamSpotTag", edm::InputTag("offlineBeamSpot"));
1216  {
1218  vertexReco.add<double>("primcut", 1.8);
1219  vertexReco.add<double>("seccut", 6.0);
1220  vertexReco.add<std::string>("finder", "avr");
1221  vertexReco.addOptionalNode(edm::ParameterDescription<double>("minweight", 0.5, true) and
1222  edm::ParameterDescription<double>("weightthreshold", 0.001, true) and
1223  edm::ParameterDescription<bool>("smoothing", false, true),
1224  true);
1225  vertexReco.addOptionalNode(
1226  edm::ParameterDescription<double>("maxFitChi2", 10.0, true) and
1227  edm::ParameterDescription<double>("mergeThreshold", 3.0, true) and
1228  edm::ParameterDescription<std::string>("fitType", "RefitGhostTrackWithVertices", true),
1229  true);
1230  desc.add<edm::ParameterSetDescription>("vertexReco", vertexReco);
1231  }
1232  {
1234  vertexSelection.add<std::string>("sortCriterium", "dist3dError");
1235  desc.add<edm::ParameterSetDescription>("vertexSelection", vertexSelection);
1236  }
1237  desc.add<std::string>("constraint", "BeamSpot");
1238  desc.add<edm::InputTag>("trackIPTagInfos", edm::InputTag("impactParameterTagInfos"));
1239  {
1241  vertexCuts.add<double>("distSig3dMax", 99999.9);
1242  vertexCuts.add<double>("fracPV", 0.65);
1243  vertexCuts.add<double>("distVal2dMax", 2.5);
1244  vertexCuts.add<bool>("useTrackWeights", true);
1245  vertexCuts.add<double>("maxDeltaRToJetAxis", 0.4);
1246  {
1248  v0Filter.add<double>("k0sMassWindow", 0.05);
1250  }
1251  vertexCuts.add<double>("distSig2dMin", 3.0);
1252  vertexCuts.add<unsigned int>("multiplicityMin", 2);
1253  vertexCuts.add<double>("distVal2dMin", 0.01);
1254  vertexCuts.add<double>("distSig2dMax", 99999.9);
1255  vertexCuts.add<double>("distVal3dMax", 99999.9);
1256  vertexCuts.add<double>("minimumTrackWeight", 0.5);
1257  vertexCuts.add<double>("distVal3dMin", -99999.9);
1258  vertexCuts.add<double>("massMax", 6.5);
1259  vertexCuts.add<double>("distSig3dMin", -99999.9);
1260  desc.add<edm::ParameterSetDescription>("vertexCuts", vertexCuts);
1261  }
1262  desc.add<bool>("useExternalSV", false);
1263  desc.add<double>("minimumTrackWeight", 0.5);
1264  desc.add<bool>("usePVError", true);
1265  {
1267  trackSelection.add<double>("b_pT", 0.3684);
1268  trackSelection.add<double>("max_pT", 500);
1269  trackSelection.add<bool>("useVariableJTA", false);
1270  trackSelection.add<double>("maxDecayLen", 99999.9);
1271  trackSelection.add<double>("sip3dValMin", -99999.9);
1272  trackSelection.add<double>("max_pT_dRcut", 0.1);
1273  trackSelection.add<double>("a_pT", 0.005263);
1274  trackSelection.add<unsigned int>("totalHitsMin", 8);
1275  trackSelection.add<double>("jetDeltaRMax", 0.3);
1276  trackSelection.add<double>("a_dR", -0.001053);
1277  trackSelection.add<double>("maxDistToAxis", 0.2);
1278  trackSelection.add<double>("ptMin", 1.0);
1279  trackSelection.add<std::string>("qualityClass", "any");
1280  trackSelection.add<unsigned int>("pixelHitsMin", 2);
1281  trackSelection.add<double>("sip2dValMax", 99999.9);
1282  trackSelection.add<double>("max_pT_trackPTcut", 3);
1283  trackSelection.add<double>("sip2dValMin", -99999.9);
1284  trackSelection.add<double>("normChi2Max", 99999.9);
1285  trackSelection.add<double>("sip3dValMax", 99999.9);
1286  trackSelection.add<double>("sip3dSigMin", -99999.9);
1287  trackSelection.add<double>("min_pT", 120);
1288  trackSelection.add<double>("min_pT_dRcut", 0.5);
1289  trackSelection.add<double>("sip2dSigMax", 99999.9);
1290  trackSelection.add<double>("sip3dSigMax", 99999.9);
1291  trackSelection.add<double>("sip2dSigMin", -99999.9);
1292  trackSelection.add<double>("b_dR", 0.6263);
1293  desc.add<edm::ParameterSetDescription>("trackSelection", trackSelection);
1294  }
1295  desc.add<std::string>("trackSort", "sip3dSig");
1296  desc.add<edm::InputTag>("extSVCollection", edm::InputTag("secondaryVertices"));
1297  desc.addOptionalNode(edm::ParameterDescription<bool>("useSVClustering", false, true) and
1298  edm::ParameterDescription<std::string>("jetAlgorithm", true) and
1299  edm::ParameterDescription<double>("rParam", true),
1300  true);
1301  desc.addOptional<bool>("useSVMomentum", false);
1302  desc.addOptional<double>("ghostRescaling", 1e-18);
1303  desc.addOptional<double>("relPtTolerance", 1e-03);
1304  desc.addOptional<edm::InputTag>("fatJets");
1305  desc.addOptional<edm::InputTag>("groomedFatJets");
1306  desc.add<edm::InputTag>("weights", edm::InputTag(""));
1307  descriptions.addDefault(desc);
1308 }
void addDefault(ParameterSetDescription const &psetDescription)

◆ getConstraintType()

template<class IPTI , class VTX >
TemplatedSecondaryVertexProducer< IPTI, VTX >::ConstraintType TemplatedSecondaryVertexProducer< IPTI, VTX >::getConstraintType ( const std::string &  name)
staticprivate

Definition at line 207 of file TemplatedSecondaryVertexProducer.cc.

References Exception, and Skims_PA_cff::name.

207  {
208  if (name == "None")
209  return CONSTRAINT_NONE;
210  else if (name == "BeamSpot")
211  return CONSTRAINT_BEAMSPOT;
212  else if (name == "BeamSpot+PVPosition")
214  else if (name == "BeamSpotZ+PVErrorScaledXY")
216  else if (name == "PVErrorScaled")
218  else if (name == "BeamSpot+PVTracksInFit")
220  else
221  throw cms::Exception("InvalidArgument") << "TemplatedSecondaryVertexProducer: ``constraint'' parameter "
222  "value \""
223  << name << "\" not understood." << std::endl;
224 }

◆ markUsedTracks() [1/3]

template<class IPTI, class VTX>
void TemplatedSecondaryVertexProducer< IPTI, VTX >::markUsedTracks ( TrackDataVector trackData,
const input_container trackRefs,
const SecondaryVertex sv,
size_t  idx 
)
private

◆ markUsedTracks() [2/3]

template<>
void TemplatedSecondaryVertexProducer< TrackIPTagInfo, reco::Vertex >::markUsedTracks ( TrackDataVector trackData,
const input_container trackRefs,
const SecondaryVertex sv,
size_t  idx 
)
private

Definition at line 930 of file TemplatedSecondaryVertexProducer.cc.

References Exception, spr::find(), heavyIonCSV_trainingSettings::idx, pfDeepBoostedJetPreprocessParams_cfi::sv, and HLT_2022v12_cff::useExternalSV.

933  {
934  for (Vertex::trackRef_iterator iter = sv.tracks_begin(); iter != sv.tracks_end(); ++iter) {
935  if (sv.trackWeight(*iter) < minTrackWeight)
936  continue;
937 
938  typename input_container::const_iterator pos =
939  std::find(trackRefs.begin(), trackRefs.end(), iter->castTo<input_item>());
940 
941  if (pos == trackRefs.end()) {
942  if (!useExternalSV)
943  throw cms::Exception("TrackNotFound") << "Could not find track from secondary "
944  "vertex in original tracks."
945  << std::endl;
946  } else {
947  unsigned int index = pos - trackRefs.begin();
948  trackData[index].second.svStatus = (btag::TrackData::trackAssociatedToVertex + idx);
949  }
950  }
951 }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
IPTI::input_container::value_type input_item
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
Definition: Vertex.h:38

◆ markUsedTracks() [3/3]

template<>
void TemplatedSecondaryVertexProducer< CandIPTagInfo, reco::VertexCompositePtrCandidate >::markUsedTracks ( TrackDataVector trackData,
const input_container trackRefs,
const SecondaryVertex sv,
size_t  idx 
)
private

Definition at line 953 of file TemplatedSecondaryVertexProducer.cc.

References spr::find(), heavyIonCSV_trainingSettings::idx, and pfDeepBoostedJetPreprocessParams_cfi::sv.

954  {
955  for (typename input_container::const_iterator iter = sv.daughterPtrVector().begin();
956  iter != sv.daughterPtrVector().end();
957  ++iter) {
958  typename input_container::const_iterator pos = std::find(trackRefs.begin(), trackRefs.end(), *iter);
959 
960  if (pos != trackRefs.end()) {
961  unsigned int index = pos - trackRefs.begin();
962  trackData[index].second.svStatus = (btag::TrackData::trackAssociatedToVertex + idx);
963  }
964  }
965 }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19

◆ matchGroomedJets()

template<class IPTI , class VTX >
void TemplatedSecondaryVertexProducer< IPTI, VTX >::matchGroomedJets ( const edm::Handle< edm::View< reco::Jet > > &  jets,
const edm::Handle< edm::View< reco::Jet > > &  matchedJets,
std::vector< int > &  matchedIndices 
)
private

Definition at line 1072 of file TemplatedSecondaryVertexProducer.cc.

References HLTMuonOfflineAnalyzer_cfi::deltaR2, HLT_2022v12_cff::distance, spr::find(), dqmiolumiharvest::j, PDWG_EXODelayedJetMET_cff::jets, TemplatedSecondaryVertexProducer< IPTI, VTX >::rParam, and mathSSE::sqrt().

1074  {
1075  std::vector<bool> jetLocks(jets->size(), false);
1076  std::vector<int> jetIndices;
1077 
1078  for (size_t gj = 0; gj < groomedJets->size(); ++gj) {
1079  double matchedDR2 = 1e9;
1080  int matchedIdx = -1;
1081 
1082  if (groomedJets->at(gj).pt() > 0.) // skip pathological cases of groomed jets with Pt=0
1083  {
1084  for (size_t j = 0; j < jets->size(); ++j) {
1085  if (jetLocks.at(j))
1086  continue; // skip jets that have already been matched
1087 
1088  double tempDR2 = Geom::deltaR2(
1089  jets->at(j).rapidity(), jets->at(j).phi(), groomedJets->at(gj).rapidity(), groomedJets->at(gj).phi());
1090  if (tempDR2 < matchedDR2) {
1091  matchedDR2 = tempDR2;
1092  matchedIdx = j;
1093  }
1094  }
1095  }
1096 
1097  if (matchedIdx >= 0) {
1098  if (matchedDR2 > rParam * rParam) {
1099  edm::LogWarning("MatchedJetsFarApart")
1100  << "Matched groomed jet " << gj << " and original jet " << matchedIdx
1101  << " are separated by dR=" << sqrt(matchedDR2) << " which is greater than the jet size R=" << rParam
1102  << ".\n"
1103  << "This is not expected so the matching of these two jets has been discarded. Please check that the two "
1104  "jet collections belong to each other.";
1105  matchedIdx = -1;
1106  } else
1107  jetLocks.at(matchedIdx) = true;
1108  }
1109  jetIndices.push_back(matchedIdx);
1110  }
1111 
1112  for (size_t j = 0; j < jets->size(); ++j) {
1113  std::vector<int>::iterator matchedIndex = std::find(jetIndices.begin(), jetIndices.end(), j);
1114 
1115  matchedIndices.push_back(matchedIndex != jetIndices.end() ? std::distance(jetIndices.begin(), matchedIndex) : -1);
1116  }
1117 }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
T sqrt(T t)
Definition: SSEVec.h:19
Log< level::Warning, false > LogWarning

◆ matchReclusteredJets()

template<class IPTI , class VTX >
template<class CONTAINER >
void TemplatedSecondaryVertexProducer< IPTI, VTX >::matchReclusteredJets ( const edm::Handle< CONTAINER > &  jets,
const std::vector< fastjet::PseudoJet > &  matchedJets,
std::vector< int > &  matchedIndices,
const std::string &  jetType = "" 
)
private

Definition at line 1023 of file TemplatedSecondaryVertexProducer.cc.

References HLTMuonOfflineAnalyzer_cfi::deltaR2, dqmiolumiharvest::j, PDWG_EXODelayedJetMET_cff::jets, HLT_2022v12_cff::jetType, phi, TemplatedSecondaryVertexProducer< IPTI, VTX >::rParam, mathSSE::sqrt(), AlCaHLTBitMon_QueryRunRegistry::string, and TemplatedSecondaryVertexProducer< IPTI, VTX >::toJet().

1027  {
1028  std::string type = (!jetType.empty() ? jetType + " " : jetType);
1029 
1030  std::vector<bool> matchedLocks(reclusteredJets.size(), false);
1031 
1032  for (size_t j = 0; j < jets->size(); ++j) {
1033  double matchedDR2 = 1e9;
1034  int matchedIdx = -1;
1035 
1036  for (size_t rj = 0; rj < reclusteredJets.size(); ++rj) {
1037  if (matchedLocks.at(rj))
1038  continue; // skip jets that have already been matched
1039 
1040  double tempDR2 = Geom::deltaR2(toJet(jets->at(j))->rapidity(),
1041  toJet(jets->at(j))->phi(),
1042  reclusteredJets.at(rj).rapidity(),
1043  reclusteredJets.at(rj).phi_std());
1044  if (tempDR2 < matchedDR2) {
1045  matchedDR2 = tempDR2;
1046  matchedIdx = rj;
1047  }
1048  }
1049 
1050  if (matchedIdx >= 0) {
1051  if (matchedDR2 > rParam * rParam) {
1052  edm::LogError("JetMatchingFailed") << "Matched reclustered jet " << matchedIdx << " and original " << type
1053  << "jet " << j << " are separated by dR=" << sqrt(matchedDR2)
1054  << " which is greater than the jet size R=" << rParam << ".\n"
1055  << "This is not expected so please check that the jet algorithm and jet "
1056  "size match those used for the original "
1057  << type << "jet collection.";
1058  } else
1059  matchedLocks.at(matchedIdx) = true;
1060  } else
1061  edm::LogError("JetMatchingFailed")
1062  << "Matching reclustered to original " << type
1063  << "jets failed. Please check that the jet algorithm and jet size match those used for the original " << type
1064  << "jet collection.";
1065 
1066  matchedIndices.push_back(matchedIdx);
1067  }
1068 }
Log< level::Error, false > LogError
T sqrt(T t)
Definition: SSEVec.h:19
const reco::Jet * toJet(const reco::Jet &j)

◆ matchSubjets() [1/2]

template<class IPTI, class VTX >
void TemplatedSecondaryVertexProducer< IPTI, VTX >::matchSubjets ( const std::vector< int > &  groomedIndices,
const edm::Handle< edm::View< reco::Jet > > &  groomedJets,
const edm::Handle< std::vector< IPTI > > &  subjets,
std::vector< std::vector< int > > &  matchedIndices 
)
private

Definition at line 1121 of file TemplatedSecondaryVertexProducer.cc.

References g, edm::RefToBase< T >::get(), edm::RefToBase< T >::id(), edm::RefToBase< T >::key(), and alignCSCRings::s.

1124  {
1125  for (size_t g = 0; g < groomedIndices.size(); ++g) {
1126  std::vector<int> subjetIndices;
1127 
1128  if (groomedIndices.at(g) >= 0) {
1129  for (size_t s = 0; s < groomedJets->at(groomedIndices.at(g)).numberOfDaughters(); ++s) {
1130  const edm::Ptr<reco::Candidate> &subjet = groomedJets->at(groomedIndices.at(g)).daughterPtr(s);
1131 
1132  for (size_t sj = 0; sj < subjets->size(); ++sj) {
1133  const edm::RefToBase<reco::Jet> &subjetRef = subjets->at(sj).jet();
1134  if (subjet == edm::Ptr<reco::Candidate>(subjetRef.id(), subjetRef.get(), subjetRef.key())) {
1135  subjetIndices.push_back(sj);
1136  break;
1137  }
1138  }
1139  }
1140 
1141  if (subjetIndices.empty())
1142  edm::LogError("SubjetMatchingFailed") << "Matching subjets to original fat jets failed. Please check that the "
1143  "groomed fat jet and subjet collections belong to each other.";
1144 
1145  matchedIndices.push_back(subjetIndices);
1146  } else
1147  matchedIndices.push_back(subjetIndices);
1148  }
1149 }
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
ProductID id() const
Definition: RefToBase.h:214
size_t key() const
Definition: RefToBase.h:219
value_type const * get() const
Definition: RefToBase.h:209

◆ matchSubjets() [2/2]

template<class IPTI, class VTX >
void TemplatedSecondaryVertexProducer< IPTI, VTX >::matchSubjets ( const edm::Handle< edm::View< reco::Jet > > &  fatJets,
const edm::Handle< std::vector< IPTI > > &  subjets,
std::vector< std::vector< int > > &  matchedIndices 
)
private

Definition at line 1153 of file TemplatedSecondaryVertexProducer.cc.

References pat::PATObject< ObjectType >::originalObjectRef(), pat::Jet::subjetCollectionNames(), and pat::Jet::subjets().

1155  {
1156  for (size_t fj = 0; fj < fatJets->size(); ++fj) {
1157  std::vector<int> subjetIndices;
1158  size_t nSubjetCollections = 0;
1159  size_t nSubjets = 0;
1160 
1161  const pat::Jet *fatJet = dynamic_cast<const pat::Jet *>(fatJets->ptrAt(fj).get());
1162 
1163  if (!fatJet) {
1164  if (fj == 0)
1165  edm::LogError("WrongJetType")
1166  << "Wrong jet type for input fat jets. Please check that the input fat jets are of the pat::Jet type.";
1167 
1168  matchedIndices.push_back(subjetIndices);
1169  continue;
1170  } else {
1171  nSubjetCollections = fatJet->subjetCollectionNames().size();
1172 
1173  if (nSubjetCollections > 0) {
1174  for (size_t coll = 0; coll < nSubjetCollections; ++coll) {
1175  const pat::JetPtrCollection &fatJetSubjets = fatJet->subjets(coll);
1176 
1177  for (size_t fjsj = 0; fjsj < fatJetSubjets.size(); ++fjsj) {
1178  ++nSubjets;
1179 
1180  for (size_t sj = 0; sj < subjets->size(); ++sj) {
1181  const pat::Jet *subJet = dynamic_cast<const pat::Jet *>(subjets->at(sj).jet().get());
1182 
1183  if (!subJet) {
1184  if (fj == 0 && coll == 0 && fjsj == 0 && sj == 0)
1185  edm::LogError("WrongJetType") << "Wrong jet type for input subjets. Please check that the input "
1186  "subjets are of the pat::Jet type.";
1187 
1188  break;
1189  } else {
1190  if (subJet->originalObjectRef() == fatJetSubjets.at(fjsj)->originalObjectRef()) {
1191  subjetIndices.push_back(sj);
1192  break;
1193  }
1194  }
1195  }
1196  }
1197  }
1198 
1199  if (subjetIndices.empty() && nSubjets > 0)
1200  edm::LogError("SubjetMatchingFailed") << "Matching subjets to fat jets failed. Please check that the fat jet "
1201  "and subjet collections belong to each other.";
1202 
1203  matchedIndices.push_back(subjetIndices);
1204  } else
1205  matchedIndices.push_back(subjetIndices);
1206  }
1207  }
1208 }
pat::JetPtrCollection const & subjets(unsigned int index=0) const
Access to subjet list.
Log< level::Error, false > LogError
std::vector< std::string > const & subjetCollectionNames() const
Subjet collection names.
Definition: Jet.h:566
std::vector< edm::Ptr< pat::Jet > > JetPtrCollection
Definition: Jet.h:75
Analysis-level calorimeter jet class.
Definition: Jet.h:77
const edm::Ptr< reco::Candidate > & originalObjectRef() const
reference to original object. Returns a null reference if not available
Definition: PATObject.h:537

◆ produce()

template<class IPTI , class VTX >
void TemplatedSecondaryVertexProducer< IPTI, VTX >::produce ( edm::Event event,
const edm::EventSetup es 
)
override

Definition at line 314 of file TemplatedSecondaryVertexProducer.cc.

References funct::abs(), pwdgSkimBPark_cfi::beamSpot, cms::cuda::bs, TransientTrackBuilder::build(), HLT_2022v12_cff::constraint, RecoVertex::convertError(), RecoVertex::convertPos(), HLTMuonOfflineAnalyzer_cfi::deltaR2, DeadROC_duringRun::dir, HLT_2022v12_cff::distance, reco::Candidate::energy(), HLT_2022v12_cff::extSVDeltaRToJet, flightDirection(), getGhostTrackFitType(), edm::EventSetup::getHandle(), AK4PFJetsMCFlavourInfos_cfi::ghostRescaling, mps_fire::i, heavyIonCSV_trainingSettings::idx, dqmdumpme::indices, dqmiolumiharvest::j, metsig::jet, boostedTaus_cff::jetIdx, pdwgLeptonRecoSkim_cfi::jetPtMin, reco::GhostTrackState::linearize(), visualization-live-secondInstance_cfg::m, eostools::move(), AlCaHLTBitMon_ParallelJobs::p, position(), DiDispStaMuonMonitor_cfi::pt, reco::Candidate::pt(), push_back(), MetAnalyzer::pv(), reco::Candidate::px(), reco::Candidate::py(), reco::Candidate::pz(), HLT_2022v12_cff::rParam, reco::GhostTrackState::setWeight(), BeamSpotPI::sigmaZ, HLT_2022v12_cff::sortCriterium, AlCaHLTBitMon_QueryRunRegistry::string, pfDeepBoostedJetPreprocessParams_cfi::sv, HLT_2022v12_cff::tagInfos, reco::btag::toTrack(), HLT_2022v12_cff::track, HLT_2022v12_cff::trackIPTagInfos, MinBiasPDSkim_cfg::trackSelector, reco::Unknown, HLT_2022v12_cff::useExternalSV, findQualityFiles::v, bVertexFilter_cfi::vertexFilter, HLT_2022v12_cff::vertexReco, and w().

314  {
315  // typedef std::map<TrackBaseRef, TransientTrack,
316  // RefToBaseLess<Track> > TransientTrackMap;
317  //How about good old pointers?
318  typedef std::map<const Track *, TransientTrack> TransientTrackMap;
319 
321 
323  event.getByToken(token_trackIPTagInfo, trackIPTagInfos);
324 
325  // External Sec Vertex collection (e.g. for IVF usage)
326  edm::Handle<edm::View<VTX> > extSecVertex;
327  if (useExternalSV)
328  event.getByToken(token_extSVCollection, extSecVertex);
329 
330  edm::Handle<edm::View<reco::Jet> > fatJetsHandle;
331  edm::Handle<edm::View<reco::Jet> > groomedFatJetsHandle;
332  if (useFatJets) {
333  event.getByToken(token_fatJets, fatJetsHandle);
334  if (useGroomedFatJets) {
335  event.getByToken(token_groomedFatJets, groomedFatJetsHandle);
336 
337  if (groomedFatJetsHandle->size() > fatJetsHandle->size())
338  edm::LogError("TooManyGroomedJets")
339  << "There are more groomed (" << groomedFatJetsHandle->size() << ") than original fat jets ("
340  << fatJetsHandle->size() << "). Please check that the two jet collections belong to each other.";
341  }
342  }
343  edm::Handle<edm::ValueMap<float> > weightsHandle;
345  event.getByToken(token_weights, weightsHandle);
346 
348  unsigned int bsCovSrc[7] = {
349  0,
350  };
351  double sigmaZ = 0.0, beamWidth = 0.0;
352  switch (constraint) {
354  event.getByToken(token_BeamSpot, beamSpot);
355  bsCovSrc[3] = bsCovSrc[4] = bsCovSrc[5] = bsCovSrc[6] = 1;
356  sigmaZ = beamSpot->sigmaZ();
357  beamWidth = beamSpot->BeamWidthX();
358  break;
359 
361  event.getByToken(token_BeamSpot, beamSpot);
362  bsCovSrc[0] = bsCovSrc[1] = 2;
363  bsCovSrc[3] = bsCovSrc[4] = bsCovSrc[5] = 1;
364  sigmaZ = beamSpot->sigmaZ();
365  break;
366 
368  bsCovSrc[0] = bsCovSrc[1] = bsCovSrc[2] = 2;
369  break;
370 
371  case CONSTRAINT_BEAMSPOT:
373  event.getByToken(token_BeamSpot, beamSpot);
374  break;
375 
376  default:
377  /* nothing */;
378  }
379 
380  // ------------------------------------ SV clustering START --------------------------------------------
381  std::vector<std::vector<int> > clusteredSVs(trackIPTagInfos->size(), std::vector<int>());
382  if (useExternalSV && useSVClustering && !trackIPTagInfos->empty()) {
383  // vector of constituents for reclustering jets and "ghost" SVs
384  std::vector<fastjet::PseudoJet> fjInputs;
385  // loop over all input jets and collect all their constituents
386  if (useFatJets) {
387  for (edm::View<reco::Jet>::const_iterator it = fatJetsHandle->begin(); it != fatJetsHandle->end(); ++it) {
388  std::vector<edm::Ptr<reco::Candidate> > constituents = it->getJetConstituents();
389  std::vector<edm::Ptr<reco::Candidate> >::const_iterator m;
390  for (m = constituents.begin(); m != constituents.end(); ++m) {
391  reco::CandidatePtr constit = *m;
392  if (constit->pt() == 0) {
393  edm::LogWarning("NullTransverseMomentum") << "dropping input candidate with pt=0";
394  continue;
395  }
396  if (it->isWeighted()) {
398  throw cms::Exception("MissingConstituentWeight")
399  << "TemplatedSecondaryVertexProducer: No weights (e.g. PUPPI) given for weighted jet collection"
400  << std::endl;
401  float w = (*weightsHandle)[constit];
402  fjInputs.push_back(
403  fastjet::PseudoJet(constit->px() * w, constit->py() * w, constit->pz() * w, constit->energy() * w));
404  } else {
405  fjInputs.push_back(fastjet::PseudoJet(constit->px(), constit->py(), constit->pz(), constit->energy()));
406  }
407  }
408  }
409  } else {
410  for (typename std::vector<IPTI>::const_iterator it = trackIPTagInfos->begin(); it != trackIPTagInfos->end();
411  ++it) {
412  std::vector<edm::Ptr<reco::Candidate> > constituents = it->jet()->getJetConstituents();
413  std::vector<edm::Ptr<reco::Candidate> >::const_iterator m;
414  for (m = constituents.begin(); m != constituents.end(); ++m) {
415  reco::CandidatePtr constit = *m;
416  if (constit->pt() == 0) {
417  edm::LogWarning("NullTransverseMomentum") << "dropping input candidate with pt=0";
418  continue;
419  }
420  if (it->jet()->isWeighted()) {
422  throw cms::Exception("MissingConstituentWeight")
423  << "TemplatedSecondaryVertexProducer: No weights (e.g. PUPPI) given for weighted jet collection"
424  << std::endl;
425  float w = (*weightsHandle)[constit];
426  fjInputs.push_back(
427  fastjet::PseudoJet(constit->px() * w, constit->py() * w, constit->pz() * w, constit->energy() * w));
428  } else {
429  fjInputs.push_back(fastjet::PseudoJet(constit->px(), constit->py(), constit->pz(), constit->energy()));
430  }
431  }
432  }
433  }
434  // insert "ghost" SVs in the vector of constituents
435  for (typename edm::View<VTX>::const_iterator it = extSecVertex->begin(); it != extSecVertex->end(); ++it) {
436  const reco::Vertex &pv = *(trackIPTagInfos->front().primaryVertex());
438  dir = dir.unit();
439  fastjet::PseudoJet p(
440  dir.x(), dir.y(), dir.z(), dir.mag()); // using SV flight direction so treating SV as massless
441  if (useSVMomentum)
442  p = fastjet::PseudoJet(it->p4().px(), it->p4().py(), it->p4().pz(), it->p4().energy());
443  p *= ghostRescaling; // rescale SV direction/momentum
444  p.set_user_info(new VertexInfo(it - extSecVertex->begin()));
445  fjInputs.push_back(p);
446  }
447 
448  // define jet clustering sequence
449  fjClusterSeq = std::make_shared<fastjet::ClusterSequence>(fjInputs, *fjJetDefinition);
450  // recluster jet constituents and inserted "ghosts"
451  std::vector<fastjet::PseudoJet> inclusiveJets = fastjet::sorted_by_pt(fjClusterSeq->inclusive_jets(jetPtMin));
452 
453  if (useFatJets) {
454  if (inclusiveJets.size() < fatJetsHandle->size())
455  edm::LogError("TooFewReclusteredJets")
456  << "There are fewer reclustered (" << inclusiveJets.size() << ") than original fat jets ("
457  << fatJetsHandle->size()
458  << "). Please check that the jet algorithm and jet size match those used for the original jet collection.";
459 
460  // match reclustered and original fat jets
461  std::vector<int> reclusteredIndices;
462  matchReclusteredJets<edm::View<reco::Jet> >(fatJetsHandle, inclusiveJets, reclusteredIndices, "fat");
463 
464  // match groomed and original fat jets
465  std::vector<int> groomedIndices;
466  if (useGroomedFatJets)
467  matchGroomedJets(fatJetsHandle, groomedFatJetsHandle, groomedIndices);
468 
469  // match subjets and original fat jets
470  std::vector<std::vector<int> > subjetIndices;
471  if (useGroomedFatJets)
472  matchSubjets(groomedIndices, groomedFatJetsHandle, trackIPTagInfos, subjetIndices);
473  else
474  matchSubjets(fatJetsHandle, trackIPTagInfos, subjetIndices);
475 
476  // collect clustered SVs
477  for (size_t i = 0; i < fatJetsHandle->size(); ++i) {
478  if (reclusteredIndices.at(i) < 0)
479  continue; // continue if matching reclustered to original jets failed
480 
481  if (fatJetsHandle->at(i).pt() == 0) // continue if the original jet has Pt=0
482  {
483  edm::LogWarning("NullTransverseMomentum")
484  << "The original fat jet " << i << " has Pt=0. This is not expected so the jet will be skipped.";
485  continue;
486  }
487 
488  if (subjetIndices.at(i).empty())
489  continue; // continue if the original jet does not have subjets assigned
490 
491  // since the "ghosts" are extremely soft, the configuration and ordering of the reclustered and original fat jets should in principle stay the same
492  if ((std::abs(inclusiveJets.at(reclusteredIndices.at(i)).pt() - fatJetsHandle->at(i).pt()) /
493  fatJetsHandle->at(i).pt()) > relPtTolerance) {
494  if (fatJetsHandle->at(i).pt() < 10.) // special handling for low-Pt jets (Pt<10 GeV)
495  edm::LogWarning("JetPtMismatchAtLowPt")
496  << "The reclustered and original fat jet " << i << " have different Pt's ("
497  << inclusiveJets.at(reclusteredIndices.at(i)).pt() << " vs " << fatJetsHandle->at(i).pt()
498  << " GeV, respectively).\n"
499  << "Please check that the jet algorithm and jet size match those used for the original fat jet "
500  "collection and also make sure the original fat jets are uncorrected. In addition, make sure you "
501  "are not using CaloJets which are presently not supported.\n"
502  << "Since the mismatch is at low Pt, it is ignored and only a warning is issued.\n"
503  << "\nIn extremely rare instances the mismatch could be caused by a difference in the machine "
504  "precision in which case make sure the original jet collection is produced and reclustering is "
505  "performed in the same job.";
506  else
507  edm::LogError("JetPtMismatch")
508  << "The reclustered and original fat jet " << i << " have different Pt's ("
509  << inclusiveJets.at(reclusteredIndices.at(i)).pt() << " vs " << fatJetsHandle->at(i).pt()
510  << " GeV, respectively).\n"
511  << "Please check that the jet algorithm and jet size match those used for the original fat jet "
512  "collection and also make sure the original fat jets are uncorrected. In addition, make sure you "
513  "are not using CaloJets which are presently not supported.\n"
514  << "\nIn extremely rare instances the mismatch could be caused by a difference in the machine "
515  "precision in which case make sure the original jet collection is produced and reclustering is "
516  "performed in the same job.";
517  }
518 
519  // get jet constituents
520  std::vector<fastjet::PseudoJet> constituents = inclusiveJets.at(reclusteredIndices.at(i)).constituents();
521 
522  std::vector<int> svIndices;
523  // loop over jet constituents and try to find "ghosts"
524  for (std::vector<fastjet::PseudoJet>::const_iterator it = constituents.begin(); it != constituents.end();
525  ++it) {
526  if (!it->has_user_info())
527  continue; // skip if not a "ghost"
528 
529  svIndices.push_back(it->user_info<VertexInfo>().vertexIndex());
530  }
531 
532  // loop over clustered SVs and assign them to different subjets based on smallest dR
533  for (size_t sv = 0; sv < svIndices.size(); ++sv) {
534  const reco::Vertex &pv = *(trackIPTagInfos->front().primaryVertex());
535  const VTX &extSV = (*extSecVertex)[svIndices.at(sv)];
537  dir = dir.unit();
538  fastjet::PseudoJet p(
539  dir.x(), dir.y(), dir.z(), dir.mag()); // using SV flight direction so treating SV as massless
540  if (useSVMomentum)
541  p = fastjet::PseudoJet(extSV.p4().px(), extSV.p4().py(), extSV.p4().pz(), extSV.p4().energy());
542 
543  std::vector<double> dR2toSubjets;
544 
545  for (size_t sj = 0; sj < subjetIndices.at(i).size(); ++sj)
546  dR2toSubjets.push_back(Geom::deltaR2(p.rapidity(),
547  p.phi_std(),
548  trackIPTagInfos->at(subjetIndices.at(i).at(sj)).jet()->rapidity(),
549  trackIPTagInfos->at(subjetIndices.at(i).at(sj)).jet()->phi()));
550 
551  // find the closest subjet
552  int closestSubjetIdx =
553  std::distance(dR2toSubjets.begin(), std::min_element(dR2toSubjets.begin(), dR2toSubjets.end()));
554 
555  clusteredSVs.at(subjetIndices.at(i).at(closestSubjetIdx)).push_back(svIndices.at(sv));
556  }
557  }
558  } else {
559  if (inclusiveJets.size() < trackIPTagInfos->size())
560  edm::LogError("TooFewReclusteredJets")
561  << "There are fewer reclustered (" << inclusiveJets.size() << ") than original jets ("
562  << trackIPTagInfos->size()
563  << "). Please check that the jet algorithm and jet size match those used for the original jet collection.";
564 
565  // match reclustered and original jets
566  std::vector<int> reclusteredIndices;
567  matchReclusteredJets<std::vector<IPTI> >(trackIPTagInfos, inclusiveJets, reclusteredIndices);
568 
569  // collect clustered SVs
570  for (size_t i = 0; i < trackIPTagInfos->size(); ++i) {
571  if (reclusteredIndices.at(i) < 0)
572  continue; // continue if matching reclustered to original jets failed
573 
574  if (trackIPTagInfos->at(i).jet()->pt() == 0) // continue if the original jet has Pt=0
575  {
576  edm::LogWarning("NullTransverseMomentum")
577  << "The original jet " << i << " has Pt=0. This is not expected so the jet will be skipped.";
578  continue;
579  }
580 
581  // since the "ghosts" are extremely soft, the configuration and ordering of the reclustered and original jets should in principle stay the same
582  if ((std::abs(inclusiveJets.at(reclusteredIndices.at(i)).pt() - trackIPTagInfos->at(i).jet()->pt()) /
583  trackIPTagInfos->at(i).jet()->pt()) > relPtTolerance) {
584  if (trackIPTagInfos->at(i).jet()->pt() < 10.) // special handling for low-Pt jets (Pt<10 GeV)
585  edm::LogWarning("JetPtMismatchAtLowPt")
586  << "The reclustered and original jet " << i << " have different Pt's ("
587  << inclusiveJets.at(reclusteredIndices.at(i)).pt() << " vs " << trackIPTagInfos->at(i).jet()->pt()
588  << " GeV, respectively).\n"
589  << "Please check that the jet algorithm and jet size match those used for the original jet collection "
590  "and also make sure the original jets are uncorrected. In addition, make sure you are not using "
591  "CaloJets which are presently not supported.\n"
592  << "Since the mismatch is at low Pt, it is ignored and only a warning is issued.\n"
593  << "\nIn extremely rare instances the mismatch could be caused by a difference in the machine "
594  "precision in which case make sure the original jet collection is produced and reclustering is "
595  "performed in the same job.";
596  else
597  edm::LogError("JetPtMismatch")
598  << "The reclustered and original jet " << i << " have different Pt's ("
599  << inclusiveJets.at(reclusteredIndices.at(i)).pt() << " vs " << trackIPTagInfos->at(i).jet()->pt()
600  << " GeV, respectively).\n"
601  << "Please check that the jet algorithm and jet size match those used for the original jet collection "
602  "and also make sure the original jets are uncorrected. In addition, make sure you are not using "
603  "CaloJets which are presently not supported.\n"
604  << "\nIn extremely rare instances the mismatch could be caused by a difference in the machine "
605  "precision in which case make sure the original jet collection is produced and reclustering is "
606  "performed in the same job.";
607  }
608 
609  // get jet constituents
610  std::vector<fastjet::PseudoJet> constituents = inclusiveJets.at(reclusteredIndices.at(i)).constituents();
611 
612  // loop over jet constituents and try to find "ghosts"
613  for (std::vector<fastjet::PseudoJet>::const_iterator it = constituents.begin(); it != constituents.end();
614  ++it) {
615  if (!it->has_user_info())
616  continue; // skip if not a "ghost"
617  // push back clustered SV indices
618  clusteredSVs.at(i).push_back(it->user_info<VertexInfo>().vertexIndex());
619  }
620  }
621  }
622  }
623  // case where fat jets are used to associate SVs to subjets but no SV clustering is performed
624  else if (useExternalSV && !useSVClustering && !trackIPTagInfos->empty() && useFatJets) {
625  // match groomed and original fat jets
626  std::vector<int> groomedIndices;
627  if (useGroomedFatJets)
628  matchGroomedJets(fatJetsHandle, groomedFatJetsHandle, groomedIndices);
629 
630  // match subjets and original fat jets
631  std::vector<std::vector<int> > subjetIndices;
632  if (useGroomedFatJets)
633  matchSubjets(groomedIndices, groomedFatJetsHandle, trackIPTagInfos, subjetIndices);
634  else
635  matchSubjets(fatJetsHandle, trackIPTagInfos, subjetIndices);
636 
637  // loop over fat jets
638  for (size_t i = 0; i < fatJetsHandle->size(); ++i) {
639  if (fatJetsHandle->at(i).pt() == 0) // continue if the original jet has Pt=0
640  {
641  edm::LogWarning("NullTransverseMomentum")
642  << "The original fat jet " << i << " has Pt=0. This is not expected so the jet will be skipped.";
643  continue;
644  }
645 
646  if (subjetIndices.at(i).empty())
647  continue; // continue if the original jet does not have subjets assigned
648 
649  // loop over SVs, associate them to fat jets based on dR cone and
650  // then assign them to the closets subjet in dR
651  for (typename edm::View<VTX>::const_iterator it = extSecVertex->begin(); it != extSecVertex->end(); ++it) {
652  size_t sv = (it - extSecVertex->begin());
653 
654  const reco::Vertex &pv = *(trackIPTagInfos->front().primaryVertex());
655  const VTX &extSV = (*extSecVertex)[sv];
657  GlobalVector jetDir(fatJetsHandle->at(i).px(), fatJetsHandle->at(i).py(), fatJetsHandle->at(i).pz());
658  // skip SVs outside the dR cone
659  if (Geom::deltaR2(dir, jetDir) > rParam * rParam) // here using the jet clustering rParam as a dR cut
660  continue;
661 
662  dir = dir.unit();
663  fastjet::PseudoJet p(
664  dir.x(), dir.y(), dir.z(), dir.mag()); // using SV flight direction so treating SV as massless
665  if (useSVMomentum)
666  p = fastjet::PseudoJet(extSV.p4().px(), extSV.p4().py(), extSV.p4().pz(), extSV.p4().energy());
667 
668  std::vector<double> dR2toSubjets;
669 
670  for (size_t sj = 0; sj < subjetIndices.at(i).size(); ++sj)
671  dR2toSubjets.push_back(Geom::deltaR2(p.rapidity(),
672  p.phi_std(),
673  trackIPTagInfos->at(subjetIndices.at(i).at(sj)).jet()->rapidity(),
674  trackIPTagInfos->at(subjetIndices.at(i).at(sj)).jet()->phi()));
675 
676  // find the closest subjet
677  int closestSubjetIdx =
678  std::distance(dR2toSubjets.begin(), std::min_element(dR2toSubjets.begin(), dR2toSubjets.end()));
679 
680  clusteredSVs.at(subjetIndices.at(i).at(closestSubjetIdx)).push_back(sv);
681  }
682  }
683  }
684  // ------------------------------------ SV clustering END ----------------------------------------------
685 
686  std::unique_ptr<ConfigurableVertexReconstructor> vertexReco;
687  std::unique_ptr<GhostTrackVertexFinder> vertexRecoGT;
688  if (useGhostTrack)
689  vertexRecoGT = std::make_unique<GhostTrackVertexFinder>(
690  vtxRecoPSet.getParameter<double>("maxFitChi2"),
691  vtxRecoPSet.getParameter<double>("mergeThreshold"),
692  vtxRecoPSet.getParameter<double>("primcut"),
693  vtxRecoPSet.getParameter<double>("seccut"),
695  else
696  vertexReco = std::make_unique<ConfigurableVertexReconstructor>(vtxRecoPSet);
697 
698  TransientTrackMap primariesMap;
699 
700  // result secondary vertices
701 
702  auto tagInfos = std::make_unique<Product>();
703 
704  for (typename std::vector<IPTI>::const_iterator iterJets = trackIPTagInfos->begin();
705  iterJets != trackIPTagInfos->end();
706  ++iterJets) {
707  TrackDataVector trackData;
708  // std::cout << "Jet " << iterJets-trackIPTagInfos->begin() << std::endl;
709 
710  const Vertex &pv = *iterJets->primaryVertex();
711 
712  std::set<TransientTrack> primaries;
714  for (Vertex::trackRef_iterator iter = pv.tracks_begin(); iter != pv.tracks_end(); ++iter) {
715  TransientTrackMap::iterator pos = primariesMap.lower_bound(iter->get());
716 
717  if (pos != primariesMap.end() && pos->first == iter->get())
718  primaries.insert(pos->second);
719  else {
720  TransientTrack track = trackBuilder->build(iter->castTo<TrackRef>());
721  primariesMap.insert(pos, std::make_pair(iter->get(), track));
722  primaries.insert(track);
723  }
724  }
725  }
726 
727  edm::RefToBase<Jet> jetRef = iterJets->jet();
728 
729  GlobalVector jetDir(jetRef->momentum().x(), jetRef->momentum().y(), jetRef->momentum().z());
730 
731  std::vector<std::size_t> indices = iterJets->sortedIndexes(sortCriterium);
732 
733  input_container trackRefs = iterJets->sortedTracks(indices);
734 
735  const std::vector<reco::btag::TrackIPData> &ipData = iterJets->impactParameterData();
736 
737  // build transient tracks used for vertex reconstruction
738 
739  std::vector<TransientTrack> fitTracks;
740  std::vector<GhostTrackState> gtStates;
741  std::unique_ptr<GhostTrackPrediction> gtPred;
742  if (useGhostTrack)
743  gtPred = std::make_unique<GhostTrackPrediction>(*iterJets->ghostTrack());
744 
745  for (unsigned int i = 0; i < indices.size(); i++) {
747 
748  const input_item &trackRef = trackRefs[i];
749 
750  trackData.push_back(IndexedTrackData());
751  trackData.back().first = indices[i];
752 
753  // select tracks for SV finder
754 
755  if (!trackSelector(
756  *reco::btag::toTrack(trackRef), ipData[indices[i]], *jetRef, RecoVertex::convertPos(pv.position()))) {
758  continue;
759  }
760 
761  TransientTrackMap::const_iterator pos = primariesMap.find(reco::btag::toTrack((trackRef)));
762  TransientTrack fitTrack;
763  if (pos != primariesMap.end()) {
764  primaries.erase(pos->second);
765  fitTrack = pos->second;
766  } else
767  fitTrack = trackBuilder->build(trackRef);
768  fitTracks.push_back(fitTrack);
769 
771 
772  if (useGhostTrack) {
773  GhostTrackState gtState(fitTrack);
774  GlobalPoint pos = ipData[indices[i]].closestToGhostTrack;
775  gtState.linearize(*gtPred, true, gtPred->lambda(pos));
776  gtState.setWeight(ipData[indices[i]].ghostTrackWeight);
777  gtStates.push_back(gtState);
778  }
779  }
780 
781  std::unique_ptr<GhostTrack> ghostTrack;
782  if (useGhostTrack)
783  ghostTrack = std::make_unique<GhostTrack>(
785  RecoVertex::convertPos(pv.position()),
786  RecoVertex::convertError(pv.error()),
787  GlobalVector(iterJets->ghostTrack()->px(), iterJets->ghostTrack()->py(), iterJets->ghostTrack()->pz()),
788  0.05),
789  *gtPred,
790  gtStates,
791  iterJets->ghostTrack()->chi2(),
792  iterJets->ghostTrack()->ndof());
793 
794  // perform actual vertex finding
795 
796  std::vector<VTX> extAssoCollection;
797  std::vector<TransientVertex> fittedSVs;
798  std::vector<SecondaryVertex> SVs;
799  if (!useExternalSV) {
800  switch (constraint) {
801  case CONSTRAINT_NONE:
802  if (useGhostTrack)
803  fittedSVs = vertexRecoGT->vertices(pv, *ghostTrack);
804  else
805  fittedSVs = vertexReco->vertices(fitTracks);
806  break;
807 
808  case CONSTRAINT_BEAMSPOT:
809  if (useGhostTrack)
810  fittedSVs = vertexRecoGT->vertices(pv, *beamSpot, *ghostTrack);
811  else
812  fittedSVs = vertexReco->vertices(fitTracks, *beamSpot);
813  break;
814 
819  for (unsigned int i = 0; i < 7; i++) {
820  unsigned int covSrc = bsCovSrc[i];
821  for (unsigned int j = 0; j < 7; j++) {
822  double v = 0.0;
823  if (!covSrc || bsCovSrc[j] != covSrc)
824  v = 0.0;
825  else if (covSrc == 1)
826  v = beamSpot->covariance(i, j);
827  else if (j < 3 && i < 3)
828  v = pv.covariance(i, j) * constraintScaling;
829  cov(i, j) = v;
830  }
831  }
832 
833  BeamSpot bs(pv.position(),
834  sigmaZ,
835  beamSpot.isValid() ? beamSpot->dxdz() : 0.,
836  beamSpot.isValid() ? beamSpot->dydz() : 0.,
837  beamWidth,
838  cov,
840 
841  if (useGhostTrack)
842  fittedSVs = vertexRecoGT->vertices(pv, bs, *ghostTrack);
843  else
844  fittedSVs = vertexReco->vertices(fitTracks, bs);
845  } break;
846 
848  std::vector<TransientTrack> primaries_(primaries.begin(), primaries.end());
849  if (useGhostTrack)
850  fittedSVs = vertexRecoGT->vertices(pv, *beamSpot, primaries_, *ghostTrack);
851  else
852  fittedSVs = vertexReco->vertices(primaries_, fitTracks, *beamSpot);
853  } break;
854  }
855  // build combined SV information and filter
856  SVBuilder svBuilder(pv, jetDir, withPVError, minTrackWeight);
857  std::remove_copy_if(boost::make_transform_iterator(fittedSVs.begin(), svBuilder),
858  boost::make_transform_iterator(fittedSVs.end(), svBuilder),
859  std::back_inserter(SVs),
860  SVFilter(vertexFilter, pv, jetDir));
861 
862  } else {
863  if (useSVClustering || useFatJets) {
864  size_t jetIdx = (iterJets - trackIPTagInfos->begin());
865 
866  for (size_t iExtSv = 0; iExtSv < clusteredSVs.at(jetIdx).size(); iExtSv++) {
867  const VTX &extVertex = (*extSecVertex)[clusteredSVs.at(jetIdx).at(iExtSv)];
868  if (extVertex.p4().M() < 0.3)
869  continue;
870  extAssoCollection.push_back(extVertex);
871  }
872  } else {
873  for (size_t iExtSv = 0; iExtSv < extSecVertex->size(); iExtSv++) {
874  const VTX &extVertex = (*extSecVertex)[iExtSv];
875  if (Geom::deltaR2((position(extVertex) - pv.position()), (extSVDeltaRToJet > 0) ? jetDir : -jetDir) >
877  extVertex.p4().M() < 0.3)
878  continue;
879  extAssoCollection.push_back(extVertex);
880  }
881  }
882  // build combined SV information and filter
883  SVBuilder svBuilder(pv, jetDir, withPVError, minTrackWeight);
884  std::remove_copy_if(boost::make_transform_iterator(extAssoCollection.begin(), svBuilder),
885  boost::make_transform_iterator(extAssoCollection.end(), svBuilder),
886  std::back_inserter(SVs),
887  SVFilter(vertexFilter, pv, jetDir));
888  }
889  // clean up now unneeded collections
890  gtPred.reset();
891  ghostTrack.reset();
892  gtStates.clear();
893  fitTracks.clear();
894  fittedSVs.clear();
895  extAssoCollection.clear();
896 
897  // sort SVs by importance
898 
899  std::vector<unsigned int> vtxIndices = vertexSorting(SVs);
900 
901  std::vector<typename TemplatedSecondaryVertexTagInfo<IPTI, VTX>::VertexData> svData;
902 
903  svData.resize(vtxIndices.size());
904  for (unsigned int idx = 0; idx < vtxIndices.size(); idx++) {
905  const SecondaryVertex &sv = SVs[vtxIndices[idx]];
906 
907  svData[idx].vertex = sv;
908  svData[idx].dist1d = sv.dist1d();
909  svData[idx].dist2d = sv.dist2d();
910  svData[idx].dist3d = sv.dist3d();
911  svData[idx].direction = flightDirection(pv, sv);
912  // mark tracks successfully used in vertex fit
913  markUsedTracks(trackData, trackRefs, sv, idx);
914  }
915 
916  // fill result into tag infos
917 
919  trackData,
920  svData,
921  SVs.size(),
923  }
924 
925  event.put(std::move(tagInfos));
926 }
math::Error< dimension >::type CovarianceMatrix
Definition: BeamSpot.h:29
reco::Vertex::Point convertPos(const GlobalPoint &p)
edm::EDGetTokenT< edm::View< reco::Jet > > token_fatJets
edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > token_trackBuilder
const math::XYZPoint & position(const reco::Vertex &sv)
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
virtual double energy() const =0
energy
T w() const
virtual double pt() const =0
transverse momentum
edm::EDGetTokenT< reco::BeamSpot > token_BeamSpot
virtual double pz() const =0
z coordinate of momentum vector
reco::Vertex::Error convertError(const GlobalError &ge)
Definition: ConvertError.h:8
constexpr bool isUninitialized() const noexcept
Definition: EDGetToken.h:99
Log< level::Error, false > LogError
const reco::Track * toTrack(const reco::TrackBaseRef &t)
Definition: IPTagInfo.h:24
static GhostTrackVertexFinder::FitType getGhostTrackFitType(const std::string &name)
reco::TransientTrack build(const reco::Track *p) const
edm::EDGetTokenT< std::vector< IPTI > > token_trackIPTagInfo
IPTI::input_container::value_type input_item
GlobalVector flightDirection(const reco::Vertex &pv, const reco::Vertex &sv)
edm::EDGetTokenT< edm::ValueMap< float > > token_weights
def pv(vc)
Definition: MetAnalyzer.py:7
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
VertexSorting< SecondaryVertex > vertexSorting
virtual double py() const =0
y coordinate of momentum vector
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:151
void matchGroomedJets(const edm::Handle< edm::View< reco::Jet > > &jets, const edm::Handle< edm::View< reco::Jet > > &matchedJets, std::vector< int > &matchedIndices)
void matchSubjets(const std::vector< int > &groomedIndices, const edm::Handle< edm::View< reco::Jet > > &groomedJets, const edm::Handle< std::vector< IPTI > > &subjets, std::vector< std::vector< int > > &matchedIndices)
void markUsedTracks(TrackDataVector &trackData, const input_container &trackRefs, const SecondaryVertex &sv, size_t idx)
edm::EDGetTokenT< edm::View< VTX > > token_extSVCollection
virtual double px() const =0
x coordinate of momentum vector
edm::EDGetTokenT< edm::View< reco::Jet > > token_groomedFatJets
deadvectors [0] push_back({0.0175431, 0.538005, 6.80997, 13.29})
std::vector< reco::btag::IndexedTrackData > TrackDataVector
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
Log< level::Warning, false > LogWarning
def move(src, dest)
Definition: eostools.py:511
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
Definition: Vertex.h:38
std::pair< unsigned int, TrackData > IndexedTrackData
Definition: event.py:1
Global3DVector GlobalVector
Definition: GlobalVector.h:10

◆ toJet() [1/2]

template<class IPTI, class VTX>
const reco::Jet* TemplatedSecondaryVertexProducer< IPTI, VTX >::toJet ( const reco::Jet j)
inlineprivate

◆ toJet() [2/2]

template<class IPTI, class VTX>
const reco::Jet* TemplatedSecondaryVertexProducer< IPTI, VTX >::toJet ( const IPTI &  j)
inlineprivate

Definition at line 132 of file TemplatedSecondaryVertexProducer.cc.

References dqmiolumiharvest::j.

132 { return &(*(j.jet())); }

Member Data Documentation

◆ constraint

template<class IPTI, class VTX>
ConstraintType TemplatedSecondaryVertexProducer< IPTI, VTX >::constraint
private

◆ constraintScaling

template<class IPTI, class VTX>
double TemplatedSecondaryVertexProducer< IPTI, VTX >::constraintScaling
private

◆ extSVDeltaRToJet

template<class IPTI, class VTX>
double TemplatedSecondaryVertexProducer< IPTI, VTX >::extSVDeltaRToJet
private

◆ fjClusterSeq

template<class IPTI, class VTX>
ClusterSequencePtr TemplatedSecondaryVertexProducer< IPTI, VTX >::fjClusterSeq
private

Definition at line 173 of file TemplatedSecondaryVertexProducer.cc.

◆ fjJetDefinition

template<class IPTI, class VTX>
JetDefPtr TemplatedSecondaryVertexProducer< IPTI, VTX >::fjJetDefinition
private

◆ ghostRescaling

template<class IPTI, class VTX>
double TemplatedSecondaryVertexProducer< IPTI, VTX >::ghostRescaling
private

◆ jetAlgorithm

template<class IPTI, class VTX>
std::string TemplatedSecondaryVertexProducer< IPTI, VTX >::jetAlgorithm
private

◆ jetPtMin

template<class IPTI, class VTX>
double TemplatedSecondaryVertexProducer< IPTI, VTX >::jetPtMin
private

◆ minTrackWeight

template<class IPTI, class VTX>
double TemplatedSecondaryVertexProducer< IPTI, VTX >::minTrackWeight
private

◆ relPtTolerance

template<class IPTI, class VTX>
double TemplatedSecondaryVertexProducer< IPTI, VTX >::relPtTolerance
private

◆ rParam

template<class IPTI, class VTX>
double TemplatedSecondaryVertexProducer< IPTI, VTX >::rParam
private

◆ sortCriterium

template<class IPTI, class VTX>
reco::btag::SortCriteria TemplatedSecondaryVertexProducer< IPTI, VTX >::sortCriterium
private

Definition at line 146 of file TemplatedSecondaryVertexProducer.cc.

◆ token_BeamSpot

template<class IPTI, class VTX>
edm::EDGetTokenT<reco::BeamSpot> TemplatedSecondaryVertexProducer< IPTI, VTX >::token_BeamSpot
private

◆ token_extSVCollection

template<class IPTI, class VTX>
edm::EDGetTokenT<edm::View<VTX> > TemplatedSecondaryVertexProducer< IPTI, VTX >::token_extSVCollection
private

◆ token_fatJets

template<class IPTI, class VTX>
edm::EDGetTokenT<edm::View<reco::Jet> > TemplatedSecondaryVertexProducer< IPTI, VTX >::token_fatJets
private

◆ token_groomedFatJets

template<class IPTI, class VTX>
edm::EDGetTokenT<edm::View<reco::Jet> > TemplatedSecondaryVertexProducer< IPTI, VTX >::token_groomedFatJets
private

◆ token_trackBuilder

template<class IPTI, class VTX>
edm::ESGetToken<TransientTrackBuilder, TransientTrackRecord> TemplatedSecondaryVertexProducer< IPTI, VTX >::token_trackBuilder
private

◆ token_trackIPTagInfo

template<class IPTI, class VTX>
edm::EDGetTokenT<std::vector<IPTI> > TemplatedSecondaryVertexProducer< IPTI, VTX >::token_trackIPTagInfo
private

◆ token_weights

template<class IPTI, class VTX>
edm::EDGetTokenT<edm::ValueMap<float> > TemplatedSecondaryVertexProducer< IPTI, VTX >::token_weights
private

◆ trackSelector

template<class IPTI, class VTX>
TrackSelector TemplatedSecondaryVertexProducer< IPTI, VTX >::trackSelector
private

Definition at line 147 of file TemplatedSecondaryVertexProducer.cc.

◆ useExternalSV

template<class IPTI, class VTX>
bool TemplatedSecondaryVertexProducer< IPTI, VTX >::useExternalSV
private

◆ useFatJets

template<class IPTI, class VTX>
bool TemplatedSecondaryVertexProducer< IPTI, VTX >::useFatJets
private

◆ useGhostTrack

template<class IPTI, class VTX>
bool TemplatedSecondaryVertexProducer< IPTI, VTX >::useGhostTrack
private

Definition at line 151 of file TemplatedSecondaryVertexProducer.cc.

◆ useGroomedFatJets

template<class IPTI, class VTX>
bool TemplatedSecondaryVertexProducer< IPTI, VTX >::useGroomedFatJets
private

◆ useSVClustering

template<class IPTI, class VTX>
bool TemplatedSecondaryVertexProducer< IPTI, VTX >::useSVClustering
private

◆ useSVMomentum

template<class IPTI, class VTX>
bool TemplatedSecondaryVertexProducer< IPTI, VTX >::useSVMomentum
private

◆ vertexFilter

template<class IPTI, class VTX>
VertexFilter TemplatedSecondaryVertexProducer< IPTI, VTX >::vertexFilter
private

Definition at line 154 of file TemplatedSecondaryVertexProducer.cc.

◆ vertexSorting

template<class IPTI, class VTX>
VertexSorting<SecondaryVertex> TemplatedSecondaryVertexProducer< IPTI, VTX >::vertexSorting
private

Definition at line 155 of file TemplatedSecondaryVertexProducer.cc.

◆ vtxRecoPSet

template<class IPTI, class VTX>
edm::ParameterSet TemplatedSecondaryVertexProducer< IPTI, VTX >::vtxRecoPSet
private

Definition at line 150 of file TemplatedSecondaryVertexProducer.cc.

◆ withPVError

template<class IPTI, class VTX>
bool TemplatedSecondaryVertexProducer< IPTI, VTX >::withPVError
private