CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes
l1tVertexFinder::VertexNTupler Class Reference
Inheritance diagram for l1tVertexFinder::VertexNTupler:
edm::one::EDAnalyzer< edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Classes

struct  EmulationVerticesBranchData
 
struct  GenJetsBranchData
 
struct  GenParticlesBranchData
 
struct  RecoTracksBranchData
 
struct  RecoVerticesBranchData
 
struct  TrueTracksBranchData
 

Public Member Functions

 VertexNTupler (const edm::ParameterSet &)
 
 ~VertexNTupler () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::SharedResources >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const noexcept final
 
bool wantsGlobalRuns () const noexcept final
 
bool wantsInputProcessBlocks () const noexcept final
 
bool wantsProcessBlocks () const noexcept final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const noexcept
 
bool wantsStreamRuns () const noexcept
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Types

typedef TTTrackAssociationMap< Ref_Phase2TrackerDigi_TTTrackAssMap
 
typedef edm::View< TTTrack< Ref_Phase2TrackerDigi_ > > TTTrackCollectionView
 

Private Member Functions

void analyze (const edm::Event &evt, const edm::EventSetup &setup) override
 
void beginJob () override
 
void endJob () override
 

Private Attributes

const edm::EDGetTokenT< std::vector< l1tVertexFinder::TP > > allMatchedTPsToken_
 
GenJetsBranchData genJetsBranchData_
 
const edm::EDGetTokenT< std::vector< reco::GenJet > > genJetsToken_
 
GenParticlesBranchData genParticlesHardOutgoingBranchData_
 
const edm::EDGetTokenT< edm::View< reco::GenParticle > > genParticlesToken_
 
float genVtxZ0_
 
float hepMCVtxZ0_
 
const edm::EDGetTokenT< l1tVertexFinder::InputDatainputDataToken_
 
std::map< std::string, RecoTracksBranchDatal1TracksBranchData_
 
std::map< std::string, edm::EDGetTokenT< TTTrackAssociationMap< Ref_Phase2TrackerDigi_ > > > l1TracksMapTokenMap_
 
std::map< std::string, edm::EDGetTokenT< TTTrackCollectionView > > l1TracksTokenMap_
 
std::vector< std::vector< unsigned > > l1Vertices_extra_numTracks_
 
std::vector< std::vector< float > > l1Vertices_extra_sumPt_
 
std::vector< std::vector< float > > l1Vertices_extra_z0_
 
std::vector< std::vector< float > > l1Vertices_extra_z0_etaWeighted_
 
std::map< std::string, RecoVerticesBranchDatal1VerticesBranchData_
 
std::map< std::string, EmulationVerticesBranchDatal1VerticesEmulationBranchData_
 
std::map< std::string, edm::EDGetTokenT< std::vector< l1t::VertexWord > > > l1VerticesEmulationTokenMap_
 
std::vector< edm::EDGetTokenT< std::vector< l1t::Vertex > > > l1VerticesExtraTokens_
 
std::map< std::string, std::string > l1VerticesInputMap_
 
std::map< std::string, edm::EDGetTokenT< std::vector< l1t::Vertex > > > l1VerticesTokenMap_
 
int numPileupVertices_
 
float numTrueInteractions_
 
TTree * outputTree_
 
const edm::EDGetTokenT< std::vector< PileupSummaryInfo > > pileupSummaryToken_
 
const bool printResults_
 
AnalysisSettings settings_
 
std::vector< float > truePileUpVtxZ0_
 
TrueTracksBranchData trueTracksBranchData_
 
const edm::EDGetTokenT< edm::ValueMap< l1tVertexFinder::TP > > vTPsToken_
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 43 of file VertexNTupler.cc.

Member Typedef Documentation

◆ TTTrackAssMap

Definition at line 165 of file VertexNTupler.cc.

◆ TTTrackCollectionView

Definition at line 166 of file VertexNTupler.cc.

Constructor & Destructor Documentation

◆ VertexNTupler()

l1tVertexFinder::VertexNTupler::VertexNTupler ( const edm::ParameterSet iConfig)
explicit

Definition at line 209 of file VertexNTupler.cc.

References l1tVertexFinder::VertexNTupler::RecoTracksBranchData::chi2dof, edm::EDConsumerBase::consumes(), makeListRunsInFiles::description, l1tVertexNTupler_cfi::emulationVertexBranchNames, l1tVertexNTupler_cfi::emulationVertexInputTags, l1tVertexFinder::VertexNTupler::GenJetsBranchData::energy, l1tVertexFinder::VertexNTupler::GenParticlesBranchData::energy, l1tVertexFinder::VertexNTupler::GenJetsBranchData::eta, l1tVertexFinder::VertexNTupler::GenParticlesBranchData::eta, l1tVertexFinder::VertexNTupler::RecoTracksBranchData::eta, l1tVertexFinder::VertexNTupler::TrueTracksBranchData::eta, make_classfiles::fs, genJetsBranchData_, genParticlesHardOutgoingBranchData_, genVtxZ0_, edm::ParameterSet::getParameter(), hepMCVtxZ0_, ALCARECOSiStripCalZeroBias_cff::inputTag, TFileService::kSharedResource, l1TracksBranchData_, l1TracksMapTokenMap_, l1TracksTokenMap_, l1Vertices_extra_numTracks_, l1Vertices_extra_sumPt_, l1Vertices_extra_z0_, l1Vertices_extra_z0_etaWeighted_, l1VerticesBranchData_, l1VerticesEmulationBranchData_, l1VerticesEmulationTokenMap_, l1VerticesExtraTokens_, l1VerticesInputMap_, l1VerticesTokenMap_, numPileupVertices_, l1tVertexFinder::VertexNTupler::RecoTracksBranchData::numStubs, l1tVertexFinder::VertexNTupler::EmulationVerticesBranchData::numTracks, numTrueInteractions_, outputTree_, l1tVertexFinder::VertexNTupler::GenParticlesBranchData::pdgId, l1tVertexFinder::VertexNTupler::TrueTracksBranchData::pdgId, l1tVertexFinder::VertexNTupler::GenJetsBranchData::phi, l1tVertexFinder::VertexNTupler::GenParticlesBranchData::phi, l1tVertexFinder::VertexNTupler::RecoTracksBranchData::phi, l1tVertexFinder::VertexNTupler::TrueTracksBranchData::phi, l1tVertexFinder::VertexNTupler::TrueTracksBranchData::physCollision, l1tVertexFinder::VertexNTupler::GenJetsBranchData::pt, l1tVertexFinder::VertexNTupler::GenParticlesBranchData::pt, l1tVertexFinder::VertexNTupler::RecoTracksBranchData::pt, l1tVertexFinder::VertexNTupler::TrueTracksBranchData::pt, l1tVertexFinder::VertexNTupler::GenParticlesBranchData::status, l1tVertexFinder::VertexNTupler::EmulationVerticesBranchData::sumPt, to_string(), l1tVertexFinder::VertexNTupler::RecoVerticesBranchData::trackIdxs, l1tVertexFinder::VertexNTupler::RecoTracksBranchData::trueMatchIdx, truePileUpVtxZ0_, trueTracksBranchData_, l1tVertexFinder::VertexNTupler::RecoTracksBranchData::truthMapIsCombinatoric, l1tVertexFinder::VertexNTupler::RecoTracksBranchData::truthMapIsGenuine, l1tVertexFinder::VertexNTupler::RecoTracksBranchData::truthMapIsLooselyGenuine, l1tVertexFinder::VertexNTupler::RecoTracksBranchData::truthMapIsUnknown, l1tVertexFinder::VertexNTupler::RecoTracksBranchData::truthMapMatchIdx, l1tVertexFinder::VertexNTupler::TrueTracksBranchData::use, l1tVertexFinder::VertexNTupler::TrueTracksBranchData::useForAlgEff, l1tVertexFinder::VertexNTupler::TrueTracksBranchData::useForEff, l1tVertexFinder::VertexNTupler::TrueTracksBranchData::useForVertexReco, l1tVertexFinder::VertexNTupler::EmulationVerticesBranchData::z0, l1tVertexFinder::VertexNTupler::RecoTracksBranchData::z0, and l1tVertexFinder::VertexNTupler::TrueTracksBranchData::z0.

210  : inputDataToken_(consumes<l1tVertexFinder::InputData>(iConfig.getParameter<edm::InputTag>("inputDataInputTag"))),
211  pileupSummaryToken_(consumes<std::vector<PileupSummaryInfo>>(edm::InputTag("addPileupInfo"))),
213  consumes<edm::View<reco::GenParticle>>(iConfig.getParameter<edm::InputTag>("genParticleInputTag"))),
214  genJetsToken_(consumes<std::vector<reco::GenJet>>(iConfig.getParameter<edm::InputTag>("genJetsInputTag"))),
216  consumes<std::vector<l1tVertexFinder::TP>>(iConfig.getParameter<edm::InputTag>("l1TracksTPInputTags"))),
218  iConfig.getParameter<edm::InputTag>("l1TracksTPValueMapInputTags"))),
219  printResults_(iConfig.getParameter<bool>("printResults")),
220  settings_(iConfig) {
221  const std::vector<std::string> trackBranchNames(
222  iConfig.getParameter<std::vector<std::string>>("l1TracksBranchNames"));
223  const std::vector<edm::InputTag> trackInputTags(
224  iConfig.getParameter<std::vector<edm::InputTag>>("l1TracksInputTags"));
225  const std::vector<edm::InputTag> trackMapInputTags(
226  iConfig.getParameter<std::vector<edm::InputTag>>("l1TracksTruthMapInputTags"));
227 
228  if (trackBranchNames.size() != trackInputTags.size())
229  throw cms::Exception("The number of track branch names (" + std::to_string(trackBranchNames.size()) +
230  ") specified in the config does not match the number of input tags (" +
231  std::to_string(trackInputTags.size()) + ")");
232  if (trackBranchNames.size() != trackMapInputTags.size())
233  throw cms::Exception("The number of track branch names (" + std::to_string(trackBranchNames.size()) +
234  ") specified in the config does not match the number of track map input tags (" +
235  std::to_string(trackMapInputTags.size()) + ")");
236 
237  const std::vector<std::string> vertexBranchNames(
238  iConfig.getParameter<std::vector<std::string>>("l1VertexBranchNames"));
239  const std::vector<edm::InputTag> vertexInputTags(
240  iConfig.getParameter<std::vector<edm::InputTag>>("l1VertexInputTags"));
241  const std::vector<std::string> vertexTrackNames(
242  iConfig.getParameter<std::vector<std::string>>("l1VertexTrackInputs"));
243 
244  if (vertexBranchNames.size() != vertexInputTags.size())
245  throw cms::Exception("The number of vertex branch names (" + std::to_string(vertexBranchNames.size()) +
246  ") specified in the config does not match the number of input tags (" +
247  std::to_string(vertexInputTags.size()) + ")");
248  if (vertexBranchNames.size() != vertexTrackNames.size())
249  throw cms::Exception(
250  "The number of vertex branch names (" + std::to_string(vertexBranchNames.size()) +
251  ") specified in the config does not match the number of associated input track collection names (" +
252  std::to_string(vertexTrackNames.size()) + ")");
253 
254  const std::vector<std::string> emulationVertexBranchNames(
255  iConfig.getParameter<std::vector<std::string>>("emulationVertexBranchNames"));
256  const std::vector<edm::InputTag> emulationVertexInputTags(
257  iConfig.getParameter<std::vector<edm::InputTag>>("emulationVertexInputTags"));
258 
259  const std::vector<edm::InputTag> extraVertexInputTags(
260  iConfig.getParameter<std::vector<edm::InputTag>>("extraL1VertexInputTags"));
261  const std::vector<std::string> extraVertexDescriptions(
262  iConfig.getParameter<std::vector<std::string>>("extraL1VertexDescriptions"));
263 
264  usesResource(TFileService::kSharedResource);
266  outputTree_ = fs->make<TTree>("l1VertexReco", "L1 vertex-related info");
267 
268  std::vector<std::string>::const_iterator branchNameIt = emulationVertexBranchNames.begin();
269  std::vector<edm::InputTag>::const_iterator inputTagIt = emulationVertexInputTags.begin();
270  for (; branchNameIt != emulationVertexBranchNames.end(); branchNameIt++, inputTagIt++) {
271  l1VerticesEmulationTokenMap_[*branchNameIt] = consumes<std::vector<l1t::VertexWord>>(*inputTagIt);
272  l1VerticesEmulationBranchData_[*branchNameIt] = EmulationVerticesBranchData();
273  EmulationVerticesBranchData& branchData = l1VerticesEmulationBranchData_.at(*branchNameIt);
274 
275  outputTree_->Branch(("emulationVertices_" + *branchNameIt + "_numTracks").c_str(), &branchData.numTracks);
276  outputTree_->Branch(("emulationVertices_" + *branchNameIt + "_z0").c_str(), &branchData.z0);
277  outputTree_->Branch(("emulationVertices_" + *branchNameIt + "_sumPt").c_str(), &branchData.sumPt);
278  }
279 
280  outputTree_->Branch("genJets_energy", &genJetsBranchData_.energy);
281  outputTree_->Branch("genJets_pt", &genJetsBranchData_.pt);
282  outputTree_->Branch("genJets_eta", &genJetsBranchData_.eta);
283  outputTree_->Branch("genJets_phi", &genJetsBranchData_.phi);
284  outputTree_->Branch("genParticles_hardProcOutgoing_energy", &genParticlesHardOutgoingBranchData_.energy);
285  outputTree_->Branch("genParticles_hardProcOutgoing_pt", &genParticlesHardOutgoingBranchData_.pt);
286  outputTree_->Branch("genParticles_hardProcOutgoing_eta", &genParticlesHardOutgoingBranchData_.eta);
287  outputTree_->Branch("genParticles_hardProcOutgoing_phi", &genParticlesHardOutgoingBranchData_.phi);
288  outputTree_->Branch("genParticles_hardProcOutgoing_pdgId", &genParticlesHardOutgoingBranchData_.pdgId);
289  outputTree_->Branch("genParticles_hardProcOutgoing_status", &genParticlesHardOutgoingBranchData_.status);
290  outputTree_->Branch("genVertex_z0", &genVtxZ0_);
291  outputTree_->Branch("hepMCVertex_z0", &hepMCVtxZ0_);
292  outputTree_->Branch("pileupSummary_trueNumInteractions", &numTrueInteractions_);
293  outputTree_->Branch("pileupSummary_numPileupVertices", &numPileupVertices_);
294 
295  std::vector<std::string>::const_iterator trackBranchNameIt = trackBranchNames.begin();
296  std::vector<edm::InputTag>::const_iterator trackInputTagIt = trackInputTags.begin();
297  std::vector<edm::InputTag>::const_iterator trackMapInputTagIt = trackMapInputTags.begin();
298  for (; trackBranchNameIt != trackBranchNames.end(); trackBranchNameIt++, trackInputTagIt++, trackMapInputTagIt++) {
299  l1TracksTokenMap_[*trackBranchNameIt] = consumes<TTTrackCollectionView>(*trackInputTagIt);
300  l1TracksMapTokenMap_[*trackBranchNameIt] =
301  consumes<TTTrackAssociationMap<Ref_Phase2TrackerDigi_>>(*trackMapInputTagIt);
302 
303  RecoTracksBranchData& branchData = l1TracksBranchData_[*trackBranchNameIt];
304 
305  outputTree_->Branch(("recoTracks_" + *trackBranchNameIt + "_pt").c_str(), &branchData.pt);
306  outputTree_->Branch(("recoTracks_" + *trackBranchNameIt + "_eta").c_str(), &branchData.eta);
307  outputTree_->Branch(("recoTracks_" + *trackBranchNameIt + "_phi").c_str(), &branchData.phi);
308  outputTree_->Branch(("recoTracks_" + *trackBranchNameIt + "_z0").c_str(), &branchData.z0);
309  outputTree_->Branch(("recoTracks_" + *trackBranchNameIt + "_numStubs").c_str(), &branchData.numStubs);
310  outputTree_->Branch(("recoTracks_" + *trackBranchNameIt + "_chi2dof").c_str(), &branchData.chi2dof);
311  outputTree_->Branch(("recoTracks_" + *trackBranchNameIt + "_trueMatchIdx").c_str(), &branchData.trueMatchIdx);
312  outputTree_->Branch(("recoTracks_" + *trackBranchNameIt + "_truthMap_matchIdx").c_str(),
313  &branchData.truthMapMatchIdx);
314  outputTree_->Branch(("recoTracks_" + *trackBranchNameIt + "_truthMap_isGenuine").c_str(),
315  &branchData.truthMapIsGenuine);
316  outputTree_->Branch(("recoTracks_" + *trackBranchNameIt + "_truthMap_isLooselyGenuine").c_str(),
317  &branchData.truthMapIsLooselyGenuine);
318  outputTree_->Branch(("recoTracks_" + *trackBranchNameIt + "_truthMap_isCombinatoric").c_str(),
319  &branchData.truthMapIsCombinatoric);
320  outputTree_->Branch(("recoTracks_" + *trackBranchNameIt + "_truthMap_isUnknown").c_str(),
321  &branchData.truthMapIsUnknown);
322  }
323 
324  branchNameIt = vertexBranchNames.begin();
325  inputTagIt = vertexInputTags.begin();
326  std::vector<std::string>::const_iterator l1VertexTrackNameIt = vertexTrackNames.begin();
327  for (; branchNameIt != vertexBranchNames.end(); branchNameIt++, inputTagIt++, l1VertexTrackNameIt++) {
328  l1VerticesTokenMap_[*branchNameIt] = consumes<std::vector<l1t::Vertex>>(*inputTagIt);
329  l1VerticesBranchData_[*branchNameIt] = RecoVerticesBranchData();
330  RecoVerticesBranchData& branchData = l1VerticesBranchData_.at(*branchNameIt);
331  l1VerticesInputMap_[*branchNameIt] = *l1VertexTrackNameIt;
332 
333  if (l1TracksTokenMap_.count(*l1VertexTrackNameIt) == 0)
334  throw cms::Exception("Invalid track collection name '" + *l1VertexTrackNameIt +
335  "' specified as input to vertex collection '" + *branchNameIt + "'");
336 
337  outputTree_->Branch(("recoVertices_" + *branchNameIt + "_numTracks").c_str(), &branchData.numTracks);
338  outputTree_->Branch(("recoVertices_" + *branchNameIt + "_trackIdxs").c_str(), &branchData.trackIdxs);
339  outputTree_->Branch(("recoVertices_" + *branchNameIt + "_z0").c_str(), &branchData.z0);
340  outputTree_->Branch(("recoVertices_" + *branchNameIt + "_sumPt").c_str(), &branchData.sumPt);
341  }
342 
343  outputTree_->Branch("truePileUpVertices_z0", &truePileUpVtxZ0_);
344  outputTree_->Branch("trueTracks_pt", &trueTracksBranchData_.pt);
345  outputTree_->Branch("trueTracks_eta", &trueTracksBranchData_.eta);
346  outputTree_->Branch("trueTracks_phi", &trueTracksBranchData_.phi);
347  outputTree_->Branch("trueTracks_z0", &trueTracksBranchData_.z0);
348  outputTree_->Branch("trueTracks_pdgId", &trueTracksBranchData_.pdgId);
349  outputTree_->Branch("trueTracks_physCollision", &trueTracksBranchData_.physCollision);
350  outputTree_->Branch("trueTracks_use", &trueTracksBranchData_.use);
351  outputTree_->Branch("trueTracks_useForEff", &trueTracksBranchData_.useForEff);
352  outputTree_->Branch("trueTracks_useForAlgEff", &trueTracksBranchData_.useForAlgEff);
353  outputTree_->Branch("trueTracks_useForVtxReco", &trueTracksBranchData_.useForVertexReco);
354 
355  for (const auto& inputTag : extraVertexInputTags)
356  l1VerticesExtraTokens_.push_back(consumes<std::vector<l1t::Vertex>>(inputTag));
357  TObjArray* descriptionArray = new TObjArray();
358  for (const auto& description : extraVertexDescriptions)
359  descriptionArray->Add(new TObjString(description.c_str()));
360  outputTree_->GetUserInfo()->Add(descriptionArray);
361  outputTree_->Branch("vertices_extra_numTracks", &l1Vertices_extra_numTracks_);
362  outputTree_->Branch("vertices_extra_z0", &l1Vertices_extra_z0_);
363  outputTree_->Branch("vertices_extra_z0_etaWeighted", &l1Vertices_extra_z0_etaWeighted_);
364  outputTree_->Branch("vertices_extra_sumPt", &l1Vertices_extra_sumPt_);
365  }
static const std::string kSharedResource
Definition: TFileService.h:76
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
const edm::EDGetTokenT< edm::View< reco::GenParticle > > genParticlesToken_
std::vector< std::vector< unsigned > > l1Vertices_extra_numTracks_
std::vector< edm::EDGetTokenT< std::vector< l1t::Vertex > > > l1VerticesExtraTokens_
std::vector< std::vector< float > > l1Vertices_extra_z0_
std::vector< std::vector< float > > l1Vertices_extra_sumPt_
std::map< std::string, edm::EDGetTokenT< TTTrackCollectionView > > l1TracksTokenMap_
std::map< std::string, edm::EDGetTokenT< TTTrackAssociationMap< Ref_Phase2TrackerDigi_ > > > l1TracksMapTokenMap_
std::map< std::string, edm::EDGetTokenT< std::vector< l1t::Vertex > > > l1VerticesTokenMap_
std::map< std::string, edm::EDGetTokenT< std::vector< l1t::VertexWord > > > l1VerticesEmulationTokenMap_
std::vector< std::vector< float > > l1Vertices_extra_z0_etaWeighted_
static std::string to_string(const XMLCh *ch)
std::map< std::string, RecoTracksBranchData > l1TracksBranchData_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
std::vector< float > truePileUpVtxZ0_
const edm::EDGetTokenT< std::vector< PileupSummaryInfo > > pileupSummaryToken_
const edm::EDGetTokenT< edm::ValueMap< l1tVertexFinder::TP > > vTPsToken_
std::map< std::string, EmulationVerticesBranchData > l1VerticesEmulationBranchData_
GenJetsBranchData genJetsBranchData_
TrueTracksBranchData trueTracksBranchData_
std::map< std::string, RecoVerticesBranchData > l1VerticesBranchData_
const edm::EDGetTokenT< std::vector< reco::GenJet > > genJetsToken_
const edm::EDGetTokenT< l1tVertexFinder::InputData > inputDataToken_
std::map< std::string, std::string > l1VerticesInputMap_
GenParticlesBranchData genParticlesHardOutgoingBranchData_
const edm::EDGetTokenT< std::vector< l1tVertexFinder::TP > > allMatchedTPsToken_

◆ ~VertexNTupler()

l1tVertexFinder::VertexNTupler::~VertexNTupler ( )
override

Definition at line 669 of file VertexNTupler.cc.

669 {}

Member Function Documentation

◆ analyze()

void l1tVertexFinder::VertexNTupler::analyze ( const edm::Event evt,
const edm::EventSetup setup 
)
overrideprivatevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 413 of file VertexNTupler.cc.

References funct::abs(), allMatchedTPsToken_, cms::cuda::assert(), l1tVertexFinder::VertexNTupler::RecoTracksBranchData::chi2dof, l1tVertexFinder::VertexNTupler::EmulationVerticesBranchData::clear(), l1tVertexFinder::VertexNTupler::GenJetsBranchData::clear(), l1tVertexFinder::VertexNTupler::GenParticlesBranchData::clear(), l1tVertexFinder::VertexNTupler::RecoVerticesBranchData::clear(), l1tVertexFinder::VertexNTupler::RecoTracksBranchData::clear(), l1tVertexFinder::VertexNTupler::TrueTracksBranchData::clear(), l1tVertexFinder::AlgoSettings::debug(), HLT_2024v14_cff::distance, l1tVertexFinder::VertexNTupler::GenJetsBranchData::energy, l1tVertexFinder::VertexNTupler::GenParticlesBranchData::energy, mps_splice::entry, l1tVertexFinder::VertexNTupler::GenJetsBranchData::eta, l1tVertexFinder::VertexNTupler::GenParticlesBranchData::eta, l1tVertexFinder::VertexNTupler::RecoTracksBranchData::eta, l1tVertexFinder::VertexNTupler::TrueTracksBranchData::eta, TTTrackAssociationMap< T >::findTrackingParticlePtr(), genJetsBranchData_, genJetsToken_, runTauDisplay::genParticlesH, genParticlesHardOutgoingBranchData_, genParticlesToken_, genVtxZ0_, l1tVertexFinder::InputData::getGenVertex(), l1tVertexFinder::InputData::getHepMCVertex(), l1tVertexFinder::InputData::getPileUpVertices(), l1tVertexFinder::InputData::getTPPtrToRefMap(), patZpeak::handle, hepMCVtxZ0_, mps_fire::i, iEvent, inputDataToken_, TTTrackAssociationMap< T >::isCombinatoric(), TTTrackAssociationMap< T >::isGenuine(), TTTrackAssociationMap< T >::isLooselyGenuine(), edm::Ptr< T >::isNull(), TTTrackAssociationMap< T >::isUnknown(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, hltEgammaEleL1TrkIsoL1Seeded_cfi::l1Tracks, l1TracksBranchData_, l1TracksMapTokenMap_, l1TracksTokenMap_, l1Vertices_extra_numTracks_, l1Vertices_extra_sumPt_, l1Vertices_extra_z0_, l1Vertices_extra_z0_etaWeighted_, l1VerticesBranchData_, l1VerticesEmulationBranchData_, l1VerticesEmulationTokenMap_, l1VerticesExtraTokens_, l1VerticesInputMap_, l1VerticesTokenMap_, numPileupVertices_, l1tVertexFinder::VertexNTupler::RecoTracksBranchData::numStubs, l1tVertexFinder::VertexNTupler::EmulationVerticesBranchData::numTracks, numTrueInteractions_, outputTree_, AlCaHLTBitMon_ParallelJobs::p, l1tVertexFinder::VertexNTupler::GenParticlesBranchData::pdgId, l1tVertexFinder::VertexNTupler::TrueTracksBranchData::pdgId, l1tVertexFinder::VertexNTupler::GenJetsBranchData::phi, l1tVertexFinder::VertexNTupler::GenParticlesBranchData::phi, l1tVertexFinder::VertexNTupler::RecoTracksBranchData::phi, l1tVertexFinder::VertexNTupler::TrueTracksBranchData::phi, l1tVertexFinder::VertexNTupler::TrueTracksBranchData::physCollision, pileupSummaryToken_, printResults_, l1tVertexFinder::VertexNTupler::GenJetsBranchData::pt, l1tVertexFinder::VertexNTupler::GenParticlesBranchData::pt, l1tVertexFinder::VertexNTupler::RecoTracksBranchData::pt, l1tVertexFinder::VertexNTupler::TrueTracksBranchData::pt, edm::View< T >::ptrs(), settings_, edm::View< T >::size(), l1tVertexFinder::VertexNTupler::GenParticlesBranchData::status, TtFullHadEvtBuilder_cfi::sumPt, l1tVertexFinder::VertexNTupler::EmulationVerticesBranchData::sumPt, cmsswSequenceInfo::tp, HLT_2024v14_cff::track, l1tVertexFinder::VertexNTupler::RecoVerticesBranchData::trackIdxs, l1tVertexFinder::VertexNTupler::RecoTracksBranchData::trueMatchIdx, truePileUpVtxZ0_, trueTracksBranchData_, l1tVertexFinder::VertexNTupler::RecoTracksBranchData::truthMapIsCombinatoric, l1tVertexFinder::VertexNTupler::RecoTracksBranchData::truthMapIsGenuine, l1tVertexFinder::VertexNTupler::RecoTracksBranchData::truthMapIsLooselyGenuine, l1tVertexFinder::VertexNTupler::RecoTracksBranchData::truthMapIsUnknown, l1tVertexFinder::VertexNTupler::RecoTracksBranchData::truthMapMatchIdx, l1tVertexFinder::VertexNTupler::TrueTracksBranchData::use, l1tVertexFinder::VertexNTupler::TrueTracksBranchData::useForAlgEff, l1tVertexFinder::VertexNTupler::TrueTracksBranchData::useForEff, l1tVertexFinder::VertexNTupler::TrueTracksBranchData::useForVertexReco, bphysicsOniaDQM_cfi::vertex, AlignmentTracksFromVertexSelector_cfi::vertices, vTPsToken_, L1BJetProducer_cff::vtx, l1tVertexFinder::Vertex::vz(), l1tVertexFinder::VertexNTupler::EmulationVerticesBranchData::z0, l1tVertexFinder::VertexNTupler::RecoTracksBranchData::z0, and l1tVertexFinder::VertexNTupler::TrueTracksBranchData::z0.

413  {
414  // Note useful info about MC truth particles and about reconstructed stubs
416  iEvent.getByToken(inputDataToken_, inputDataHandle);
417  InputData inputData = *inputDataHandle;
418 
419  edm::Handle<edm::ValueMap<TP>> tpValueMapHandle;
420  iEvent.getByToken(vTPsToken_, tpValueMapHandle);
421  edm::ValueMap<TP> tpValueMap = *tpValueMapHandle;
422 
423  // Create collections to hold the desired objects
424  std::map<std::string, std::vector<L1TrackTruthMatched>> l1TrackCollections;
425  std::map<std::string, edm::Handle<TTTrackAssMap>> truthAssocMapHandles;
426 
427  // Create iterators for the maps
428  auto tokenMapEntry = l1TracksTokenMap_.begin(), tokenMapEntryEnd = l1TracksTokenMap_.end();
429  auto mapTokenMapEntry = l1TracksMapTokenMap_.begin(), mapTokenMapEntryEnd = l1TracksMapTokenMap_.end();
430 
431  // Iterate over the maps
432  for (; (tokenMapEntry != tokenMapEntryEnd) && (mapTokenMapEntry != mapTokenMapEntryEnd);
433  ++tokenMapEntry, ++mapTokenMapEntry) {
434  edm::Handle<TTTrackCollectionView> l1TracksHandle;
435  edm::Handle<TTTrackAssMap>& mcTruthTTTrackHandle = truthAssocMapHandles[mapTokenMapEntry->first];
436  iEvent.getByToken(tokenMapEntry->second, l1TracksHandle);
437  iEvent.getByToken(l1TracksMapTokenMap_.at(mapTokenMapEntry->first), mcTruthTTTrackHandle);
438 
439  std::vector<L1TrackTruthMatched>& l1Tracks = l1TrackCollections[tokenMapEntry->first];
440  l1Tracks.reserve(l1TracksHandle->size());
441  for (const auto& track : l1TracksHandle->ptrs()) {
442  l1Tracks.push_back(L1TrackTruthMatched(track, inputData.getTPPtrToRefMap(), tpValueMap, mcTruthTTTrackHandle));
443  }
444  }
445 
446  // create a map for associating fat reco tracks with their underlying
447  // TTTrack pointers
448  std::map<std::string, std::map<const edm::Ptr<TTTrack<Ref_Phase2TrackerDigi_>>, const L1TrackTruthMatched*>>
449  edmL1TrackMaps;
450 
451  // get a list of reconstructed tracks with references to their TPs
452  for (const auto& entry : l1TrackCollections) {
453  auto& edmL1Map = edmL1TrackMaps[entry.first];
454  for (const auto& track : entry.second) {
455  edmL1Map.insert(std::pair<const edm::Ptr<TTTrack<Ref_Phase2TrackerDigi_>>, const L1TrackTruthMatched*>(
456  track.getTTTrackPtr(), &track));
457  }
458  }
459 
461 
462  // Pile-up summary info
464  iEvent.getByToken(pileupSummaryToken_, pileupHandle);
465 
466  for (auto bxIt = pileupHandle->begin(); bxIt != pileupHandle->end(); bxIt++) {
467  if (bxIt->getBunchCrossing() == 0) {
468  numTrueInteractions_ = bxIt->getTrueNumInteractions();
469  numPileupVertices_ = bxIt->getPU_NumInteractions();
470  }
471  }
472 
473  // True track info
476  iEvent.getByToken(allMatchedTPsToken_, allMatchedTPsHandle);
477 
478  for (const auto& tp : *allMatchedTPsHandle) {
479  trueTracksBranchData_.pt.push_back(tp->pt());
480  trueTracksBranchData_.eta.push_back(tp->eta());
481  trueTracksBranchData_.phi.push_back(tp->phi());
482  trueTracksBranchData_.z0.push_back(tp->z0());
483  trueTracksBranchData_.pdgId.push_back(tp->pdgId());
484  trueTracksBranchData_.physCollision.push_back(tp.physicsCollision() ? 1.0 : 0.0);
485  trueTracksBranchData_.use.push_back(tp.use() ? 1.0 : 0.0);
486  trueTracksBranchData_.useForEff.push_back(tp.useForEff() ? 1.0 : 0.0);
487  trueTracksBranchData_.useForAlgEff.push_back(tp.useForAlgEff() ? 1.0 : 0.0);
488  trueTracksBranchData_.useForVertexReco.push_back(tp.useForVertexReco() ? 1.0 : 0.0);
489  }
490 
491  // True pile-up vertex info
492  truePileUpVtxZ0_.clear();
493  for (const Vertex& vtx : inputData.getPileUpVertices())
494  truePileUpVtxZ0_.push_back(vtx.z0());
495 
496  // Generator level vertex info
497  hepMCVtxZ0_ = inputData.getHepMCVertex().vz();
498  genVtxZ0_ = inputData.getGenVertex().vz();
499 
500  // Gen particles
504  for (const auto& p : *genParticlesH) {
505  genParticlesHardOutgoingBranchData_.energy.push_back(p.energy());
506  genParticlesHardOutgoingBranchData_.pt.push_back(p.pt());
507  genParticlesHardOutgoingBranchData_.eta.push_back(p.eta());
508  genParticlesHardOutgoingBranchData_.phi.push_back(p.phi());
509  genParticlesHardOutgoingBranchData_.pdgId.push_back(p.pdgId());
510  genParticlesHardOutgoingBranchData_.status.push_back(p.status());
511  }
512 
513  // Gen jet (AK4) branches
516  iEvent.getByToken(genJetsToken_, genJetsHandle);
517  for (const auto& genJet : *genJetsHandle) {
518  genJetsBranchData_.energy.push_back(genJet.energy());
519  genJetsBranchData_.pt.push_back(genJet.pt());
520  genJetsBranchData_.eta.push_back(genJet.eta());
521  genJetsBranchData_.phi.push_back(genJet.phi());
522  }
523 
524  for (const auto& entry : l1TrackCollections) {
525  const auto& l1Tracks = entry.second;
526  RecoTracksBranchData& branchData = l1TracksBranchData_.at(entry.first);
527 
528  const TTTrackAssociationMap<Ref_Phase2TrackerDigi_>& truthAssocMap = *truthAssocMapHandles.at(entry.first);
529 
530  // Reco track branches
531  branchData.clear();
532  for (const L1TrackTruthMatched& track : l1Tracks) {
533  branchData.pt.push_back(track.pt());
534  branchData.eta.push_back(track.eta());
535  branchData.phi.push_back(track.phi0());
536  branchData.z0.push_back(track.z0());
537  branchData.numStubs.push_back(track.getNumStubs());
538  branchData.chi2dof.push_back(track.chi2dof());
539  branchData.trueMatchIdx.push_back(track.getMatchedTPidx());
540 
541  edm::Ptr<TrackingParticle> matchedTP = truthAssocMap.findTrackingParticlePtr(track.getTTTrackPtr());
542  if (matchedTP.isNull())
543  branchData.truthMapMatchIdx.push_back(-1);
544  else {
545  auto it = std::find_if(allMatchedTPsHandle->begin(),
546  allMatchedTPsHandle->end(),
547  [&matchedTP](auto const& tp) { return tp.getTrackingParticle() == matchedTP; });
548  assert(it != allMatchedTPsHandle->end());
549  branchData.truthMapMatchIdx.push_back(std::distance(allMatchedTPsHandle->begin(), it));
550  }
551  branchData.truthMapIsGenuine.push_back(truthAssocMap.isGenuine(track.getTTTrackPtr()) ? 1.0 : 0.0);
552  branchData.truthMapIsLooselyGenuine.push_back(truthAssocMap.isLooselyGenuine(track.getTTTrackPtr()) ? 1.0
553  : 0.0);
554  branchData.truthMapIsCombinatoric.push_back(truthAssocMap.isCombinatoric(track.getTTTrackPtr()) ? 1.0 : 0.0);
555  branchData.truthMapIsUnknown.push_back(truthAssocMap.isUnknown(track.getTTTrackPtr()) ? 1.0 : 0.0);
556  }
557  }
558 
559  // Reco vertex branches
560  for (const auto& tokenMapEntry : l1VerticesTokenMap_) {
561  RecoVerticesBranchData& branchData = l1VerticesBranchData_.at(tokenMapEntry.first);
562 
564  iEvent.getByToken(tokenMapEntry.second, handle);
565  std::vector<std::shared_ptr<const RecoVertexWithTP>> recoVertices;
566  recoVertices.reserve(handle->size());
567  for (unsigned int i = 0; i < handle->size(); ++i) {
568  recoVertices.push_back(std::shared_ptr<const RecoVertexWithTP>(
569  new RecoVertexWithTP(handle->at(i), edmL1TrackMaps.at(l1VerticesInputMap_.at(tokenMapEntry.first)))));
570  }
571 
572  branchData.clear();
573  std::vector<L1TrackTruthMatched>& l1Tracks = l1TrackCollections.at(l1VerticesInputMap_.at(tokenMapEntry.first));
574  for (const std::shared_ptr<const RecoVertexWithTP>& vtx : recoVertices) {
575  branchData.numTracks.push_back(vtx->numTracks());
576  branchData.trackIdxs.push_back(std::vector<unsigned>());
577  for (const L1TrackTruthMatched* track : vtx->tracks())
578  branchData.trackIdxs.back().push_back(track - l1Tracks.data());
579  branchData.z0.push_back(vtx->z0());
580  branchData.sumPt.push_back(vtx->pt());
581  }
582 
583  if (printResults_) {
584  edm::LogInfo("VertexNTupler") << "analyze::" << recoVertices.size() << " '" << tokenMapEntry.first
585  << "' vertices were found ... ";
586  for (const auto& vtx : recoVertices) {
587  edm::LogInfo("VertexNTupler") << "analyze::"
588  << " * z0 = " << vtx->z0() << "; contains " << vtx->numTracks()
589  << " tracks ...";
590  for (const auto& trackPtr : vtx->tracks())
591  edm::LogInfo("VertexNTupler") << "analyze::"
592  << " - z0 = " << trackPtr->z0() << "; pt = " << trackPtr->pt()
593  << ", eta = " << trackPtr->eta() << ", phi = " << trackPtr->phi0();
594  }
595  }
596  }
597 
598  // Emulation vertex branches
599  for (const auto& tokenMapEntry : l1VerticesEmulationTokenMap_) {
600  EmulationVerticesBranchData& branchData = l1VerticesEmulationBranchData_.at(tokenMapEntry.first);
601  branchData.clear();
602 
604  iEvent.getByToken(tokenMapEntry.second, handle);
605  for (const auto& vtx : *handle) {
606  branchData.numTracks.push_back(vtx.multiplicity());
607  branchData.z0.push_back(vtx.z0());
608  branchData.sumPt.push_back(vtx.pt());
609  }
610 
611  if (printResults_) {
612  edm::LogInfo("VertexNTupler") << "analyze::" << handle->size() << " '" << tokenMapEntry.first
613  << "' vertices were found ... ";
614  for (const auto& vtx : *handle) {
615  edm::LogInfo("VertexNTupler") << "analyze::"
616  << " * z0 = " << vtx.z0() << "; contains " << vtx.multiplicity()
617  << " tracks ...";
618  }
619  }
620  }
621 
622  // Extra vertex collections
627 
628  for (size_t i = 0; i < l1VerticesExtraTokens_.size(); i++) {
630  iEvent.getByToken(l1VerticesExtraTokens_.at(i), vertexHandle);
631 
632  const std::vector<l1t::Vertex>& vertices = *vertexHandle;
633 
634  l1Vertices_extra_numTracks_.at(i).clear();
635  l1Vertices_extra_z0_.at(i).clear();
637  l1Vertices_extra_sumPt_.at(i).clear();
638 
639  for (const auto& vertex : vertices) {
640  l1Vertices_extra_numTracks_.at(i).push_back(vertex.tracks().size());
641  l1Vertices_extra_z0_.at(i).push_back(vertex.z0());
642 
643  float sumPt = 0.0;
644  float etaWeightedSumZ0 = 0.0;
645  float etaWeightSum = 0.0;
646  for (const auto& track : vertex.tracks()) {
647  sumPt += track->momentum().transverse();
648  // const float zRes = 0.133616 * track->momentum().eta() * track->momentum().eta() - 0.0522353 * std::abs(track->momentum().eta()) + 0.109918;
649  const float zRes = 0.223074 * track->momentum().eta() * track->momentum().eta() -
650  0.050231 * abs(track->momentum().eta()) + 0.209719;
651  etaWeightedSumZ0 += track->POCA().z() / (zRes * zRes);
652  etaWeightSum += 1.0 / (zRes * zRes);
653  }
654 
655  l1Vertices_extra_sumPt_.at(i).push_back(sumPt);
656  l1Vertices_extra_z0_etaWeighted_.at(i).push_back(etaWeightedSumZ0 / etaWeightSum);
657  }
658  }
659 
660  outputTree_->Fill();
662 
663  if (settings_.debug() > 2)
664  edm::LogInfo("VertexNTupler") << "analyze::================ End of Event ==============";
665  }
const TrackingParticlePtr & findTrackingParticlePtr(TTTrackPtrT< T > aTrack) const
const edm::EDGetTokenT< edm::View< reco::GenParticle > > genParticlesToken_
std::vector< std::vector< unsigned > > l1Vertices_extra_numTracks_
std::vector< edm::EDGetTokenT< std::vector< l1t::Vertex > > > l1VerticesExtraTokens_
std::vector< std::vector< float > > l1Vertices_extra_z0_
std::vector< Ptr< value_type > > const & ptrs() const
double vz() const
Vertex z position [cm].
Definition: Vertex.h:38
std::vector< std::vector< float > > l1Vertices_extra_sumPt_
bool isUnknown(TTTrackPtrT< T > aTrack) const
More than one stub on track is "unknown".
const std::vector< Vertex > & getPileUpVertices() const
Get pile-up vertices information.
Definition: InputData.h:67
std::map< std::string, edm::EDGetTokenT< TTTrackCollectionView > > l1TracksTokenMap_
std::map< std::string, edm::EDGetTokenT< TTTrackAssociationMap< Ref_Phase2TrackerDigi_ > > > l1TracksMapTokenMap_
std::map< std::string, edm::EDGetTokenT< std::vector< l1t::Vertex > > > l1VerticesTokenMap_
bool isCombinatoric(TTTrackPtrT< T > aTrack) const
Both isLooselyGenuine() & isUnknown() are false.
assert(be >=bs)
std::map< std::string, edm::EDGetTokenT< std::vector< l1t::VertexWord > > > l1VerticesEmulationTokenMap_
std::vector< std::vector< float > > l1Vertices_extra_z0_etaWeighted_
std::map< std::string, RecoTracksBranchData > l1TracksBranchData_
size_type size() const
Stores association of Truth Particles (TP) to L1 Track-Trigger Tracks.
RecoVertex< L1TrackTruthMatched > RecoVertexWithTP
Definition: RecoVertex.h:91
unsigned int debug() const
Definition: AlgoSettings.h:86
int iEvent
Definition: GenABIO.cc:224
bool isNull() const
Checks for null.
Definition: Ptr.h:144
std::vector< float > truePileUpVtxZ0_
Simple wrapper class for TTTrack, with match to a tracking particle.
bool isGenuine(TTTrackPtrT< T > aTrack) const
const Vertex & getGenVertex() const
Get primary vertex information (vertex from gen particles)
Definition: InputData.h:63
const edm::EDGetTokenT< std::vector< PileupSummaryInfo > > pileupSummaryToken_
const Vertex & getHepMCVertex() const
Get primary vertex information (vertex from HepMCProduct)
Definition: InputData.h:61
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const edm::EDGetTokenT< edm::ValueMap< l1tVertexFinder::TP > > vTPsToken_
bool isLooselyGenuine(TTTrackPtrT< T > aTrack) const
std::map< std::string, EmulationVerticesBranchData > l1VerticesEmulationBranchData_
Log< level::Info, false > LogInfo
Class to store the L1 Track Trigger tracks.
Definition: TTTrack.h:29
GenJetsBranchData genJetsBranchData_
TrueTracksBranchData trueTracksBranchData_
const TPPtrToRefMap & getTPPtrToRefMap() const
Get the TrackingParticle to TP translation map.
Definition: InputData.h:59
std::map< std::string, RecoVerticesBranchData > l1VerticesBranchData_
const edm::EDGetTokenT< std::vector< reco::GenJet > > genJetsToken_
const edm::EDGetTokenT< l1tVertexFinder::InputData > inputDataToken_
std::map< std::string, std::string > l1VerticesInputMap_
GenParticlesBranchData genParticlesHardOutgoingBranchData_
const edm::EDGetTokenT< std::vector< l1tVertexFinder::TP > > allMatchedTPsToken_

◆ beginJob()

void l1tVertexFinder::VertexNTupler::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 367 of file VertexNTupler.cc.

367 {}

◆ endJob()

void l1tVertexFinder::VertexNTupler::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 667 of file VertexNTupler.cc.

667 {}

Member Data Documentation

◆ allMatchedTPsToken_

const edm::EDGetTokenT<std::vector<l1tVertexFinder::TP> > l1tVertexFinder::VertexNTupler::allMatchedTPsToken_
private

Definition at line 173 of file VertexNTupler.cc.

Referenced by analyze().

◆ genJetsBranchData_

GenJetsBranchData l1tVertexFinder::VertexNTupler::genJetsBranchData_
private

Definition at line 193 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ genJetsToken_

const edm::EDGetTokenT<std::vector<reco::GenJet> > l1tVertexFinder::VertexNTupler::genJetsToken_
private

Definition at line 172 of file VertexNTupler.cc.

Referenced by analyze().

◆ genParticlesHardOutgoingBranchData_

GenParticlesBranchData l1tVertexFinder::VertexNTupler::genParticlesHardOutgoingBranchData_
private

Definition at line 196 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ genParticlesToken_

const edm::EDGetTokenT<edm::View<reco::GenParticle> > l1tVertexFinder::VertexNTupler::genParticlesToken_
private

Definition at line 171 of file VertexNTupler.cc.

Referenced by analyze().

◆ genVtxZ0_

float l1tVertexFinder::VertexNTupler::genVtxZ0_
private

Definition at line 190 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ hepMCVtxZ0_

float l1tVertexFinder::VertexNTupler::hepMCVtxZ0_
private

Definition at line 190 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ inputDataToken_

const edm::EDGetTokenT<l1tVertexFinder::InputData> l1tVertexFinder::VertexNTupler::inputDataToken_
private

Definition at line 169 of file VertexNTupler.cc.

Referenced by analyze().

◆ l1TracksBranchData_

std::map<std::string, RecoTracksBranchData> l1tVertexFinder::VertexNTupler::l1TracksBranchData_
private

Definition at line 198 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ l1TracksMapTokenMap_

std::map<std::string, edm::EDGetTokenT<TTTrackAssociationMap<Ref_Phase2TrackerDigi_> > > l1tVertexFinder::VertexNTupler::l1TracksMapTokenMap_
private

Definition at line 176 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ l1TracksTokenMap_

std::map<std::string, edm::EDGetTokenT<TTTrackCollectionView> > l1tVertexFinder::VertexNTupler::l1TracksTokenMap_
private

Definition at line 175 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ l1Vertices_extra_numTracks_

std::vector<std::vector<unsigned> > l1tVertexFinder::VertexNTupler::l1Vertices_extra_numTracks_
private

Definition at line 203 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ l1Vertices_extra_sumPt_

std::vector<std::vector<float> > l1tVertexFinder::VertexNTupler::l1Vertices_extra_sumPt_
private

Definition at line 206 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ l1Vertices_extra_z0_

std::vector<std::vector<float> > l1tVertexFinder::VertexNTupler::l1Vertices_extra_z0_
private

Definition at line 204 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ l1Vertices_extra_z0_etaWeighted_

std::vector<std::vector<float> > l1tVertexFinder::VertexNTupler::l1Vertices_extra_z0_etaWeighted_
private

Definition at line 205 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ l1VerticesBranchData_

std::map<std::string, RecoVerticesBranchData> l1tVertexFinder::VertexNTupler::l1VerticesBranchData_
private

Definition at line 199 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ l1VerticesEmulationBranchData_

std::map<std::string, EmulationVerticesBranchData> l1tVertexFinder::VertexNTupler::l1VerticesEmulationBranchData_
private

Definition at line 201 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ l1VerticesEmulationTokenMap_

std::map<std::string, edm::EDGetTokenT<std::vector<l1t::VertexWord> > > l1tVertexFinder::VertexNTupler::l1VerticesEmulationTokenMap_
private

Definition at line 178 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ l1VerticesExtraTokens_

std::vector<edm::EDGetTokenT<std::vector<l1t::Vertex> > > l1tVertexFinder::VertexNTupler::l1VerticesExtraTokens_
private

Definition at line 179 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ l1VerticesInputMap_

std::map<std::string, std::string> l1tVertexFinder::VertexNTupler::l1VerticesInputMap_
private

Definition at line 200 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ l1VerticesTokenMap_

std::map<std::string, edm::EDGetTokenT<std::vector<l1t::Vertex> > > l1tVertexFinder::VertexNTupler::l1VerticesTokenMap_
private

Definition at line 177 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ numPileupVertices_

int l1tVertexFinder::VertexNTupler::numPileupVertices_
private

Definition at line 191 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ numTrueInteractions_

float l1tVertexFinder::VertexNTupler::numTrueInteractions_
private

Definition at line 190 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ outputTree_

TTree* l1tVertexFinder::VertexNTupler::outputTree_
private

Definition at line 181 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ pileupSummaryToken_

const edm::EDGetTokenT<std::vector<PileupSummaryInfo> > l1tVertexFinder::VertexNTupler::pileupSummaryToken_
private

Definition at line 170 of file VertexNTupler.cc.

Referenced by analyze().

◆ printResults_

const bool l1tVertexFinder::VertexNTupler::printResults_
private

Definition at line 183 of file VertexNTupler.cc.

Referenced by analyze().

◆ settings_

AnalysisSettings l1tVertexFinder::VertexNTupler::settings_
private

Definition at line 186 of file VertexNTupler.cc.

Referenced by analyze().

◆ truePileUpVtxZ0_

std::vector<float> l1tVertexFinder::VertexNTupler::truePileUpVtxZ0_
private

Definition at line 195 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ trueTracksBranchData_

TrueTracksBranchData l1tVertexFinder::VertexNTupler::trueTracksBranchData_
private

Definition at line 194 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ vTPsToken_

const edm::EDGetTokenT<edm::ValueMap<l1tVertexFinder::TP> > l1tVertexFinder::VertexNTupler::vTPsToken_
private

Definition at line 174 of file VertexNTupler.cc.

Referenced by analyze().