CMS 3D CMS Logo

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<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache 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
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

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::EDGetTokenT< std::vector< IPTI > > token_trackIPTagInfo
 
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 97 of file TemplatedSecondaryVertexProducer.cc.

Member Typedef Documentation

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

Definition at line 104 of file TemplatedSecondaryVertexProducer.cc.

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

Definition at line 105 of file TemplatedSecondaryVertexProducer.cc.

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

Definition at line 102 of file TemplatedSecondaryVertexProducer.cc.

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

Definition at line 103 of file TemplatedSecondaryVertexProducer.cc.

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

Definition at line 106 of file TemplatedSecondaryVertexProducer.cc.

Member Enumeration Documentation

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

Constructor & Destructor Documentation

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

Definition at line 237 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, edm::ParameterSet::exists(), edm::ParameterSet::existsAs(), TemplatedSecondaryVertexProducer< IPTI, VTX >::extSVDeltaRToJet, TemplatedSecondaryVertexProducer< IPTI, VTX >::fjJetDefinition, edm::ParameterSet::getParameter(), TemplatedSecondaryVertexProducer< IPTI, VTX >::ghostRescaling, TemplatedSecondaryVertexProducer< IPTI, VTX >::jetAlgorithm, TemplatedSecondaryVertexProducer< IPTI, VTX >::jetPtMin, TemplatedSecondaryVertexProducer< IPTI, VTX >::relPtTolerance, TemplatedSecondaryVertexProducer< IPTI, VTX >::rParam, 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_trackIPTagInfo, TemplatedSecondaryVertexProducer< IPTI, VTX >::useExternalSV, TemplatedSecondaryVertexProducer< IPTI, VTX >::useFatJets, TemplatedSecondaryVertexProducer< IPTI, VTX >::useGroomedFatJets, TemplatedSecondaryVertexProducer< IPTI, VTX >::useSVClustering, and TemplatedSecondaryVertexProducer< IPTI, VTX >::useSVMomentum.

239  trackSelector(params.getParameter<edm::ParameterSet>("trackSelection")),
240  constraint(getConstraintType(params.getParameter<std::string>("constraint"))),
241  constraintScaling(1.0),
242  vtxRecoPSet(params.getParameter<edm::ParameterSet>("vertexReco")),
243  useGhostTrack(vtxRecoPSet.getParameter<std::string>("finder") == "gtvr"),
244  withPVError(params.getParameter<bool>("usePVError")),
245  minTrackWeight(params.getParameter<double>("minimumTrackWeight")),
246  vertexFilter(params.getParameter<edm::ParameterSet>("vertexCuts")),
247  vertexSorting(params.getParameter<edm::ParameterSet>("vertexSelection")) {
248  token_trackIPTagInfo = consumes<std::vector<IPTI> >(params.getParameter<edm::InputTag>("trackIPTagInfos"));
250  constraintScaling = params.getParameter<double>("pvErrorScaling");
251 
254  token_BeamSpot = consumes<reco::BeamSpot>(params.getParameter<edm::InputTag>("beamSpotTag"));
255  useExternalSV = false;
256  if (params.existsAs<bool>("useExternalSV"))
257  useExternalSV = params.getParameter<bool>("useExternalSV");
258  if (useExternalSV) {
259  token_extSVCollection = consumes<edm::View<VTX> >(params.getParameter<edm::InputTag>("extSVCollection"));
260  extSVDeltaRToJet = params.getParameter<double>("extSVDeltaRToJet");
261  }
262  useSVClustering = (params.existsAs<bool>("useSVClustering") ? params.getParameter<bool>("useSVClustering") : false);
263  useSVMomentum = (params.existsAs<bool>("useSVMomentum") ? params.getParameter<bool>("useSVMomentum") : false);
264  useFatJets = (useExternalSV && params.exists("fatJets"));
265  useGroomedFatJets = (useExternalSV && params.exists("groomedFatJets"));
266  if (useSVClustering) {
267  jetAlgorithm = params.getParameter<std::string>("jetAlgorithm");
268  rParam = params.getParameter<double>("rParam");
269  jetPtMin =
270  0.; // hardcoded to 0. since we simply want to recluster all input jets which already had some PtMin applied
272  (params.existsAs<double>("ghostRescaling") ? params.getParameter<double>("ghostRescaling") : 1e-18);
274  (params.existsAs<double>("relPtTolerance")
275  ? params.getParameter<double>("relPtTolerance")
276  : 1e-03); // 0.1% relative difference in Pt should be sufficient to detect possible misconfigurations
277 
278  // set jet algorithm
279  if (jetAlgorithm == "Kt")
280  fjJetDefinition = std::make_shared<fastjet::JetDefinition>(fastjet::kt_algorithm, rParam);
281  else if (jetAlgorithm == "CambridgeAachen")
282  fjJetDefinition = std::make_shared<fastjet::JetDefinition>(fastjet::cambridge_algorithm, rParam);
283  else if (jetAlgorithm == "AntiKt")
284  fjJetDefinition = std::make_shared<fastjet::JetDefinition>(fastjet::antikt_algorithm, rParam);
285  else
286  throw cms::Exception("InvalidJetAlgorithm") << "Jet clustering algorithm is invalid: " << jetAlgorithm
287  << ", use CambridgeAachen | Kt | AntiKt" << std::endl;
288  }
289  if (useFatJets)
290  token_fatJets = consumes<edm::View<reco::Jet> >(params.getParameter<edm::InputTag>("fatJets"));
291  if (useGroomedFatJets)
292  token_groomedFatJets = consumes<edm::View<reco::Jet> >(params.getParameter<edm::InputTag>("groomedFatJets"));
293  if (useFatJets && !useSVClustering)
294  rParam = params.getParameter<double>("rParam"); // will be used later as a dR cut
295 
296  produces<Product>();
297 }
T getParameter(std::string const &) const
edm::EDGetTokenT< edm::View< reco::Jet > > token_fatJets
reco::btag::SortCriteria getCriterium(const std::string &name)
Definition: TrackSorting.cc:11
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:160
edm::EDGetTokenT< reco::BeamSpot > token_BeamSpot
bool exists(std::string const &parameterName) const
checks if a parameter exists
edm::EDGetTokenT< std::vector< IPTI > > token_trackIPTagInfo
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
template<class IPTI , class VTX >
TemplatedSecondaryVertexProducer< IPTI, VTX >::~TemplatedSecondaryVertexProducer ( )
override

Definition at line 299 of file TemplatedSecondaryVertexProducer.cc.

299 {}

Member Function Documentation

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

Definition at line 1181 of file TemplatedSecondaryVertexProducer.cc.

References edm::ParameterSetDescription::add(), edm::ConfigurationDescriptions::addDefault(), edm::ParameterSetDescription::addOptional(), edm::ParameterSetDescription::addOptionalNode(), MillePedeFileConverter_cfg::e, HLT_2018_cff::InputTag, AlCaHLTBitMon_QueryRunRegistry::string, HLT_2018_cff::trackSelection, HLT_2018_cff::v0Filter, HLT_2018_cff::vertexCuts, HLT_2018_cff::vertexReco, and HiggsMonitoring_cfi::vertexSelection.

1181  {
1183  desc.add<double>("extSVDeltaRToJet", 0.3);
1184  desc.add<edm::InputTag>("beamSpotTag", edm::InputTag("offlineBeamSpot"));
1185  {
1187  vertexReco.add<double>("primcut", 1.8);
1188  vertexReco.add<double>("seccut", 6.0);
1189  vertexReco.add<std::string>("finder", "avr");
1190  vertexReco.addOptionalNode(edm::ParameterDescription<double>("minweight", 0.5, true) and
1191  edm::ParameterDescription<double>("weightthreshold", 0.001, true) and
1192  edm::ParameterDescription<bool>("smoothing", false, true),
1193  true);
1194  vertexReco.addOptionalNode(
1195  edm::ParameterDescription<double>("maxFitChi2", 10.0, true) and
1196  edm::ParameterDescription<double>("mergeThreshold", 3.0, true) and
1197  edm::ParameterDescription<std::string>("fitType", "RefitGhostTrackWithVertices", true),
1198  true);
1199  desc.add<edm::ParameterSetDescription>("vertexReco", vertexReco);
1200  }
1201  {
1203  vertexSelection.add<std::string>("sortCriterium", "dist3dError");
1204  desc.add<edm::ParameterSetDescription>("vertexSelection", vertexSelection);
1205  }
1206  desc.add<std::string>("constraint", "BeamSpot");
1207  desc.add<edm::InputTag>("trackIPTagInfos", edm::InputTag("impactParameterTagInfos"));
1208  {
1210  vertexCuts.add<double>("distSig3dMax", 99999.9);
1211  vertexCuts.add<double>("fracPV", 0.65);
1212  vertexCuts.add<double>("distVal2dMax", 2.5);
1213  vertexCuts.add<bool>("useTrackWeights", true);
1214  vertexCuts.add<double>("maxDeltaRToJetAxis", 0.4);
1215  {
1217  v0Filter.add<double>("k0sMassWindow", 0.05);
1219  }
1220  vertexCuts.add<double>("distSig2dMin", 3.0);
1221  vertexCuts.add<unsigned int>("multiplicityMin", 2);
1222  vertexCuts.add<double>("distVal2dMin", 0.01);
1223  vertexCuts.add<double>("distSig2dMax", 99999.9);
1224  vertexCuts.add<double>("distVal3dMax", 99999.9);
1225  vertexCuts.add<double>("minimumTrackWeight", 0.5);
1226  vertexCuts.add<double>("distVal3dMin", -99999.9);
1227  vertexCuts.add<double>("massMax", 6.5);
1228  vertexCuts.add<double>("distSig3dMin", -99999.9);
1229  desc.add<edm::ParameterSetDescription>("vertexCuts", vertexCuts);
1230  }
1231  desc.add<bool>("useExternalSV", false);
1232  desc.add<double>("minimumTrackWeight", 0.5);
1233  desc.add<bool>("usePVError", true);
1234  {
1236  trackSelection.add<double>("b_pT", 0.3684);
1237  trackSelection.add<double>("max_pT", 500);
1238  trackSelection.add<bool>("useVariableJTA", false);
1239  trackSelection.add<double>("maxDecayLen", 99999.9);
1240  trackSelection.add<double>("sip3dValMin", -99999.9);
1241  trackSelection.add<double>("max_pT_dRcut", 0.1);
1242  trackSelection.add<double>("a_pT", 0.005263);
1243  trackSelection.add<unsigned int>("totalHitsMin", 8);
1244  trackSelection.add<double>("jetDeltaRMax", 0.3);
1245  trackSelection.add<double>("a_dR", -0.001053);
1246  trackSelection.add<double>("maxDistToAxis", 0.2);
1247  trackSelection.add<double>("ptMin", 1.0);
1248  trackSelection.add<std::string>("qualityClass", "any");
1249  trackSelection.add<unsigned int>("pixelHitsMin", 2);
1250  trackSelection.add<double>("sip2dValMax", 99999.9);
1251  trackSelection.add<double>("max_pT_trackPTcut", 3);
1252  trackSelection.add<double>("sip2dValMin", -99999.9);
1253  trackSelection.add<double>("normChi2Max", 99999.9);
1254  trackSelection.add<double>("sip3dValMax", 99999.9);
1255  trackSelection.add<double>("sip3dSigMin", -99999.9);
1256  trackSelection.add<double>("min_pT", 120);
1257  trackSelection.add<double>("min_pT_dRcut", 0.5);
1258  trackSelection.add<double>("sip2dSigMax", 99999.9);
1259  trackSelection.add<double>("sip3dSigMax", 99999.9);
1260  trackSelection.add<double>("sip2dSigMin", -99999.9);
1261  trackSelection.add<double>("b_dR", 0.6263);
1262  desc.add<edm::ParameterSetDescription>("trackSelection", trackSelection);
1263  }
1264  desc.add<std::string>("trackSort", "sip3dSig");
1265  desc.add<edm::InputTag>("extSVCollection", edm::InputTag("secondaryVertices"));
1266  desc.addOptionalNode(edm::ParameterDescription<bool>("useSVClustering", false, true) and
1267  edm::ParameterDescription<std::string>("jetAlgorithm", true) and
1268  edm::ParameterDescription<double>("rParam", true),
1269  true);
1270  desc.addOptional<bool>("useSVMomentum", false);
1271  desc.addOptional<double>("ghostRescaling", 1e-18);
1272  desc.addOptional<double>("relPtTolerance", 1e-03);
1273  desc.addOptional<edm::InputTag>("fatJets");
1274  desc.addOptional<edm::InputTag>("groomedFatJets");
1275  descriptions.addDefault(desc);
1276 }
void addDefault(ParameterSetDescription const &psetDescription)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
template<class IPTI , class VTX >
TemplatedSecondaryVertexProducer< IPTI, VTX >::ConstraintType TemplatedSecondaryVertexProducer< IPTI, VTX >::getConstraintType ( const std::string &  name)
staticprivate

Definition at line 200 of file TemplatedSecondaryVertexProducer.cc.

References Exception.

200  {
201  if (name == "None")
202  return CONSTRAINT_NONE;
203  else if (name == "BeamSpot")
204  return CONSTRAINT_BEAMSPOT;
205  else if (name == "BeamSpot+PVPosition")
207  else if (name == "BeamSpotZ+PVErrorScaledXY")
209  else if (name == "PVErrorScaled")
211  else if (name == "BeamSpot+PVTracksInFit")
213  else
214  throw cms::Exception("InvalidArgument") << "TemplatedSecondaryVertexProducer: ``constraint'' parameter "
215  "value \""
216  << name << "\" not understood." << std::endl;
217 }
template<class IPTI, class VTX>
void TemplatedSecondaryVertexProducer< IPTI, VTX >::markUsedTracks ( TrackDataVector trackData,
const input_container trackRefs,
const SecondaryVertex sv,
size_t  idx 
)
private
template<>
void TemplatedSecondaryVertexProducer< TrackIPTagInfo, reco::Vertex >::markUsedTracks ( TrackDataVector trackData,
const input_container trackRefs,
const SecondaryVertex sv,
size_t  idx 
)
private

Definition at line 897 of file TemplatedSecondaryVertexProducer.cc.

References Exception, spr::find(), training_settings::idx, TemplatedSecondaryVertexProducer< IPTI, VTX >::minTrackWeight, btagGenBb_cfi::Status, and TemplatedSecondaryVertexProducer< IPTI, VTX >::useExternalSV.

900  {
901  for (Vertex::trackRef_iterator iter = sv.tracks_begin(); iter != sv.tracks_end(); ++iter) {
902  if (sv.trackWeight(*iter) < minTrackWeight)
903  continue;
904 
905  typename input_container::const_iterator pos =
906  std::find(trackRefs.begin(), trackRefs.end(), iter->castTo<input_item>());
907 
908  if (pos == trackRefs.end()) {
909  if (!useExternalSV)
910  throw cms::Exception("TrackNotFound") << "Could not find track from secondary "
911  "vertex in original tracks."
912  << std::endl;
913  } else {
914  unsigned int index = pos - trackRefs.begin();
915  trackData[index].second.svStatus =
916  (btag::TrackData::Status)((unsigned int)btag::TrackData::trackAssociatedToVertex + idx);
917  }
918  }
919 }
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:37
template<>
void TemplatedSecondaryVertexProducer< CandIPTagInfo, reco::VertexCompositePtrCandidate >::markUsedTracks ( TrackDataVector trackData,
const input_container trackRefs,
const SecondaryVertex sv,
size_t  idx 
)
private

Definition at line 921 of file TemplatedSecondaryVertexProducer.cc.

References spr::find(), training_settings::idx, and btagGenBb_cfi::Status.

922  {
923  for (typename input_container::const_iterator iter = sv.daughterPtrVector().begin();
924  iter != sv.daughterPtrVector().end();
925  ++iter) {
926  typename input_container::const_iterator pos = std::find(trackRefs.begin(), trackRefs.end(), *iter);
927 
928  if (pos != trackRefs.end()) {
929  unsigned int index = pos - trackRefs.begin();
930  trackData[index].second.svStatus =
931  (btag::TrackData::Status)((unsigned int)btag::TrackData::trackAssociatedToVertex + idx);
932  }
933  }
934 }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
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 1041 of file TemplatedSecondaryVertexProducer.cc.

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

Referenced by TemplatedSecondaryVertexProducer< IPTI, VTX >::produce().

1043  {
1044  std::vector<bool> jetLocks(jets->size(), false);
1045  std::vector<int> jetIndices;
1046 
1047  for (size_t gj = 0; gj < groomedJets->size(); ++gj) {
1048  double matchedDR2 = 1e9;
1049  int matchedIdx = -1;
1050 
1051  if (groomedJets->at(gj).pt() > 0.) // skip pathological cases of groomed jets with Pt=0
1052  {
1053  for (size_t j = 0; j < jets->size(); ++j) {
1054  if (jetLocks.at(j))
1055  continue; // skip jets that have already been matched
1056 
1057  double tempDR2 = Geom::deltaR2(
1058  jets->at(j).rapidity(), jets->at(j).phi(), groomedJets->at(gj).rapidity(), groomedJets->at(gj).phi());
1059  if (tempDR2 < matchedDR2) {
1060  matchedDR2 = tempDR2;
1061  matchedIdx = j;
1062  }
1063  }
1064  }
1065 
1066  if (matchedIdx >= 0) {
1067  if (matchedDR2 > rParam * rParam) {
1068  edm::LogWarning("MatchedJetsFarApart")
1069  << "Matched groomed jet " << gj << " and original jet " << matchedIdx
1070  << " are separated by dR=" << sqrt(matchedDR2) << " which is greater than the jet size R=" << rParam
1071  << ".\n"
1072  << "This is not expected so the matching of these two jets has been discarded. Please check that the two "
1073  "jet collections belong to each other.";
1074  matchedIdx = -1;
1075  } else
1076  jetLocks.at(matchedIdx) = true;
1077  }
1078  jetIndices.push_back(matchedIdx);
1079  }
1080 
1081  for (size_t j = 0; j < jets->size(); ++j) {
1082  std::vector<int>::iterator matchedIndex = std::find(jetIndices.begin(), jetIndices.end(), j);
1083 
1084  matchedIndices.push_back(matchedIndex != jetIndices.end() ? std::distance(jetIndices.begin(), matchedIndex) : -1);
1085  }
1086 }
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
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 992 of file TemplatedSecondaryVertexProducer.cc.

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

996  {
997  std::string type = (!jetType.empty() ? jetType + " " : jetType);
998 
999  std::vector<bool> matchedLocks(reclusteredJets.size(), false);
1000 
1001  for (size_t j = 0; j < jets->size(); ++j) {
1002  double matchedDR2 = 1e9;
1003  int matchedIdx = -1;
1004 
1005  for (size_t rj = 0; rj < reclusteredJets.size(); ++rj) {
1006  if (matchedLocks.at(rj))
1007  continue; // skip jets that have already been matched
1008 
1009  double tempDR2 = Geom::deltaR2(toJet(jets->at(j))->rapidity(),
1010  toJet(jets->at(j))->phi(),
1011  reclusteredJets.at(rj).rapidity(),
1012  reclusteredJets.at(rj).phi_std());
1013  if (tempDR2 < matchedDR2) {
1014  matchedDR2 = tempDR2;
1015  matchedIdx = rj;
1016  }
1017  }
1018 
1019  if (matchedIdx >= 0) {
1020  if (matchedDR2 > rParam * rParam) {
1021  edm::LogError("JetMatchingFailed") << "Matched reclustered jet " << matchedIdx << " and original " << type
1022  << "jet " << j << " are separated by dR=" << sqrt(matchedDR2)
1023  << " which is greater than the jet size R=" << rParam << ".\n"
1024  << "This is not expected so please check that the jet algorithm and jet "
1025  "size match those used for the original "
1026  << type << "jet collection.";
1027  } else
1028  matchedLocks.at(matchedIdx) = true;
1029  } else
1030  edm::LogError("JetMatchingFailed")
1031  << "Matching reclustered to original " << type
1032  << "jets failed. Please check that the jet algorithm and jet size match those used for the original " << type
1033  << "jet collection.";
1034 
1035  matchedIndices.push_back(matchedIdx);
1036  }
1037 }
type
Definition: HCALResponse.h:21
T sqrt(T t)
Definition: SSEVec.h:19
const reco::Jet * toJet(const reco::Jet &j)
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 1090 of file TemplatedSecondaryVertexProducer.cc.

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

Referenced by TemplatedSecondaryVertexProducer< IPTI, VTX >::produce().

1093  {
1094  for (size_t g = 0; g < groomedIndices.size(); ++g) {
1095  std::vector<int> subjetIndices;
1096 
1097  if (groomedIndices.at(g) >= 0) {
1098  for (size_t s = 0; s < groomedJets->at(groomedIndices.at(g)).numberOfDaughters(); ++s) {
1099  const edm::Ptr<reco::Candidate> &subjet = groomedJets->at(groomedIndices.at(g)).daughterPtr(s);
1100 
1101  for (size_t sj = 0; sj < subjets->size(); ++sj) {
1102  const edm::RefToBase<reco::Jet> &subjetRef = subjets->at(sj).jet();
1103  if (subjet == edm::Ptr<reco::Candidate>(subjetRef.id(), subjetRef.get(), subjetRef.key())) {
1104  subjetIndices.push_back(sj);
1105  break;
1106  }
1107  }
1108  }
1109 
1110  if (subjetIndices.empty())
1111  edm::LogError("SubjetMatchingFailed") << "Matching subjets to original fat jets failed. Please check that the "
1112  "groomed fat jet and subjet collections belong to each other.";
1113 
1114  matchedIndices.push_back(subjetIndices);
1115  } else
1116  matchedIndices.push_back(subjetIndices);
1117  }
1118 }
value_type const * get() const
Definition: RefToBase.h:209
ProductID id() const
Definition: RefToBase.h:214
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
size_t key() const
Definition: RefToBase.h:219
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 1122 of file TemplatedSecondaryVertexProducer.cc.

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

1124  {
1125  for (size_t fj = 0; fj < fatJets->size(); ++fj) {
1126  std::vector<int> subjetIndices;
1127  size_t nSubjetCollections = 0;
1128  size_t nSubjets = 0;
1129 
1130  const pat::Jet *fatJet = dynamic_cast<const pat::Jet *>(fatJets->ptrAt(fj).get());
1131 
1132  if (!fatJet) {
1133  if (fj == 0)
1134  edm::LogError("WrongJetType")
1135  << "Wrong jet type for input fat jets. Please check that the input fat jets are of the pat::Jet type.";
1136 
1137  matchedIndices.push_back(subjetIndices);
1138  continue;
1139  } else {
1140  nSubjetCollections = fatJet->subjetCollectionNames().size();
1141 
1142  if (nSubjetCollections > 0) {
1143  for (size_t coll = 0; coll < nSubjetCollections; ++coll) {
1144  const pat::JetPtrCollection &fatJetSubjets = fatJet->subjets(coll);
1145 
1146  for (size_t fjsj = 0; fjsj < fatJetSubjets.size(); ++fjsj) {
1147  ++nSubjets;
1148 
1149  for (size_t sj = 0; sj < subjets->size(); ++sj) {
1150  const pat::Jet *subJet = dynamic_cast<const pat::Jet *>(subjets->at(sj).jet().get());
1151 
1152  if (!subJet) {
1153  if (fj == 0 && coll == 0 && fjsj == 0 && sj == 0)
1154  edm::LogError("WrongJetType") << "Wrong jet type for input subjets. Please check that the input "
1155  "subjets are of the pat::Jet type.";
1156 
1157  break;
1158  } else {
1159  if (subJet->originalObjectRef() == fatJetSubjets.at(fjsj)->originalObjectRef()) {
1160  subjetIndices.push_back(sj);
1161  break;
1162  }
1163  }
1164  }
1165  }
1166  }
1167 
1168  if (subjetIndices.empty() && nSubjets > 0)
1169  edm::LogError("SubjetMatchingFailed") << "Matching subjets to fat jets failed. Please check that the fat jet "
1170  "and subjet collections belong to each other.";
1171 
1172  matchedIndices.push_back(subjetIndices);
1173  } else
1174  matchedIndices.push_back(subjetIndices);
1175  }
1176  }
1177 }
std::vector< edm::Ptr< pat::Jet > > JetPtrCollection
Definition: Jet.h:75
std::vector< std::string > const & subjetCollectionNames() const
Subjet collection names.
Definition: Jet.h:566
const edm::Ptr< reco::Candidate > & originalObjectRef() const
reference to original object. Returns a null reference if not available
Definition: PATObject.h:542
JetCorrectorParametersCollection coll
Definition: classes.h:10
Analysis-level calorimeter jet class.
Definition: Jet.h:77
pat::JetPtrCollection const & subjets(unsigned int index=0) const
Access to subjet list.
template<class IPTI , class VTX >
void TemplatedSecondaryVertexProducer< IPTI, VTX >::produce ( edm::Event event,
const edm::EventSetup es 
)
override

Definition at line 302 of file TemplatedSecondaryVertexProducer.cc.

References funct::abs(), pwdgSkimBPark_cfi::beamSpot, reco::BeamSpot::BeamWidthX(), TransientTrackBuilder::build(), TemplatedSecondaryVertexProducer< IPTI, VTX >::constraint, TemplatedSecondaryVertexProducer< IPTI, VTX >::CONSTRAINT_BEAMSPOT, TemplatedSecondaryVertexProducer< IPTI, VTX >::CONSTRAINT_NONE, 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, RecoVertex::convertError(), RecoVertex::convertPos(), reco::BeamSpot::covariance(), reco::Vertex::covariance(), HLTMuonOfflineAnalyzer_cfi::deltaR2, DeadROC_duringRun::dir, reco::TemplatedSecondaryVertex< SV >::dist1d(), reco::TemplatedSecondaryVertex< SV >::dist2d(), reco::TemplatedSecondaryVertex< SV >::dist3d(), HLT_2018_cff::distance, reco::BeamSpot::dxdz(), reco::BeamSpot::dydz(), reco::Candidate::energy(), reco::Vertex::error(), TemplatedSecondaryVertexProducer< IPTI, VTX >::extSVDeltaRToJet, TemplatedSecondaryVertexProducer< IPTI, VTX >::fjClusterSeq, TemplatedSecondaryVertexProducer< IPTI, VTX >::fjJetDefinition, flightDirection(), edm::EventSetup::get(), getGhostTrackFitType(), edm::ParameterSet::getParameter(), TemplatedSecondaryVertexProducer< IPTI, VTX >::ghostRescaling, mps_fire::i, training_settings::idx, bTagCombinedSVVariables_cff::indices, edm::HandleBase::isValid(), dqmiolumiharvest::j, metsig::jet, electrons_cff::jetIdx, TemplatedSecondaryVertexProducer< IPTI, VTX >::jetPtMin, reco::GhostTrackState::linearize(), visualization-live-secondInstance_cfg::m, PV3DBase< T, PVType, FrameType >::mag(), TemplatedSecondaryVertexProducer< IPTI, VTX >::markUsedTracks(), TemplatedSecondaryVertexProducer< IPTI, VTX >::matchGroomedJets(), TemplatedSecondaryVertexProducer< IPTI, VTX >::matchSubjets(), TemplatedSecondaryVertexProducer< IPTI, VTX >::minTrackWeight, eostools::move(), AlCaHLTBitMon_ParallelJobs::p, position(), reco::Vertex::position(), DiDispStaMuonMonitor_cfi::pt, reco::Candidate::pt(), MetAnalyzer::pv(), reco::Candidate::px(), reco::Candidate::py(), reco::Candidate::pz(), TemplatedSecondaryVertexProducer< IPTI, VTX >::relPtTolerance, TemplatedSecondaryVertexProducer< IPTI, VTX >::rParam, reco::GhostTrackState::setWeight(), fftjetvertexadder_cfi::sigmaZ, reco::BeamSpot::sigmaZ(), TemplatedSecondaryVertexProducer< IPTI, VTX >::sortCriterium, AlCaHLTBitMon_QueryRunRegistry::string, pfDeepBoostedJetPreprocessParams_cfi::sv, HLT_2018_cff::tagInfos, TemplatedSecondaryVertexProducer< IPTI, VTX >::token_BeamSpot, TemplatedSecondaryVertexProducer< IPTI, VTX >::token_extSVCollection, TemplatedSecondaryVertexProducer< IPTI, VTX >::token_fatJets, TemplatedSecondaryVertexProducer< IPTI, VTX >::token_groomedFatJets, TemplatedSecondaryVertexProducer< IPTI, VTX >::token_trackIPTagInfo, reco::btag::toTrack(), HLT_2018_cff::track, HLT_2018_cff::trackIPTagInfos, reco::Vertex::tracks_begin(), reco::Vertex::tracks_end(), TemplatedSecondaryVertexProducer< IPTI, VTX >::trackSelector, Vector3DBase< T, FrameTag >::unit(), reco::Unknown, TemplatedSecondaryVertexProducer< IPTI, VTX >::useExternalSV, TemplatedSecondaryVertexProducer< IPTI, VTX >::useFatJets, TemplatedSecondaryVertexProducer< IPTI, VTX >::useGhostTrack, TemplatedSecondaryVertexProducer< IPTI, VTX >::useGroomedFatJets, TemplatedSecondaryVertexProducer< IPTI, VTX >::useSVClustering, TemplatedSecondaryVertexProducer< IPTI, VTX >::useSVMomentum, findQualityFiles::v, TemplatedSecondaryVertexProducer< IPTI, VTX >::vertexFilter, HLT_2018_cff::vertexReco, TemplatedSecondaryVertexProducer< IPTI, VTX >::vertexSorting, TemplatedSecondaryVertexProducer< IPTI, VTX >::vtxRecoPSet, TemplatedSecondaryVertexProducer< IPTI, VTX >::withPVError, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

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

Definition at line 127 of file TemplatedSecondaryVertexProducer.cc.

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

Member Data Documentation

template<class IPTI, class VTX>
ConstraintType TemplatedSecondaryVertexProducer< IPTI, VTX >::constraint
private
template<class IPTI, class VTX>
double TemplatedSecondaryVertexProducer< IPTI, VTX >::constraintScaling
private
template<class IPTI, class VTX>
double TemplatedSecondaryVertexProducer< IPTI, VTX >::extSVDeltaRToJet
private
template<class IPTI, class VTX>
ClusterSequencePtr TemplatedSecondaryVertexProducer< IPTI, VTX >::fjClusterSeq
private
template<class IPTI, class VTX>
JetDefPtr TemplatedSecondaryVertexProducer< IPTI, VTX >::fjJetDefinition
private
template<class IPTI, class VTX>
double TemplatedSecondaryVertexProducer< IPTI, VTX >::ghostRescaling
private
template<class IPTI, class VTX>
std::string TemplatedSecondaryVertexProducer< IPTI, VTX >::jetAlgorithm
private
template<class IPTI, class VTX>
double TemplatedSecondaryVertexProducer< IPTI, VTX >::jetPtMin
private
template<class IPTI, class VTX>
double TemplatedSecondaryVertexProducer< IPTI, VTX >::minTrackWeight
private
template<class IPTI, class VTX>
double TemplatedSecondaryVertexProducer< IPTI, VTX >::relPtTolerance
private
template<class IPTI, class VTX>
double TemplatedSecondaryVertexProducer< IPTI, VTX >::rParam
private
template<class IPTI, class VTX>
reco::btag::SortCriteria TemplatedSecondaryVertexProducer< IPTI, VTX >::sortCriterium
private
template<class IPTI, class VTX>
edm::EDGetTokenT<reco::BeamSpot> TemplatedSecondaryVertexProducer< IPTI, VTX >::token_BeamSpot
private
template<class IPTI, class VTX>
edm::EDGetTokenT<edm::View<VTX> > TemplatedSecondaryVertexProducer< IPTI, VTX >::token_extSVCollection
private
template<class IPTI, class VTX>
edm::EDGetTokenT<edm::View<reco::Jet> > TemplatedSecondaryVertexProducer< IPTI, VTX >::token_fatJets
private
template<class IPTI, class VTX>
edm::EDGetTokenT<edm::View<reco::Jet> > TemplatedSecondaryVertexProducer< IPTI, VTX >::token_groomedFatJets
private
template<class IPTI, class VTX>
edm::EDGetTokenT<std::vector<IPTI> > TemplatedSecondaryVertexProducer< IPTI, VTX >::token_trackIPTagInfo
private
template<class IPTI, class VTX>
TrackSelector TemplatedSecondaryVertexProducer< IPTI, VTX >::trackSelector
private
template<class IPTI, class VTX>
bool TemplatedSecondaryVertexProducer< IPTI, VTX >::useExternalSV
private
template<class IPTI, class VTX>
bool TemplatedSecondaryVertexProducer< IPTI, VTX >::useFatJets
private
template<class IPTI, class VTX>
bool TemplatedSecondaryVertexProducer< IPTI, VTX >::useGhostTrack
private
template<class IPTI, class VTX>
bool TemplatedSecondaryVertexProducer< IPTI, VTX >::useGroomedFatJets
private
template<class IPTI, class VTX>
bool TemplatedSecondaryVertexProducer< IPTI, VTX >::useSVClustering
private
template<class IPTI, class VTX>
bool TemplatedSecondaryVertexProducer< IPTI, VTX >::useSVMomentum
private
template<class IPTI, class VTX>
VertexFilter TemplatedSecondaryVertexProducer< IPTI, VTX >::vertexFilter
private
template<class IPTI, class VTX>
VertexSorting<SecondaryVertex> TemplatedSecondaryVertexProducer< IPTI, VTX >::vertexSorting
private
template<class IPTI, class VTX>
edm::ParameterSet TemplatedSecondaryVertexProducer< IPTI, VTX >::vtxRecoPSet
private
template<class IPTI, class VTX>
bool TemplatedSecondaryVertexProducer< IPTI, VTX >::withPVError
private