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::EDAnalyzer edm::EDConsumerBase

Classes

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::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () 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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > 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
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, 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::ESRecordsToProxyIndices 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_
 
bool available_
 
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::unordered_map< std::string, std::vector< unsigned > > l1Vertices_branchMap_numTracks_
 
std::unordered_map< std::string, std::vector< float > > l1Vertices_branchMap_sumPt_
 
std::unordered_map< std::string, std::vector< float > > l1Vertices_branchMap_z0_
 
std::unordered_map< std::string, std::vector< float > > l1Vertices_branchMap_z0_etaWeighted_
 
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, edm::EDGetTokenT< std::vector< l1t::Vertex > > > l1VerticesExtraTokenMap_
 
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::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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 ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 43 of file VertexNTupler.cc.

Member Typedef Documentation

◆ TTTrackAssMap

Definition at line 156 of file VertexNTupler.cc.

◆ TTTrackCollectionView

Definition at line 157 of file VertexNTupler.cc.

Constructor & Destructor Documentation

◆ VertexNTupler()

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

Definition at line 208 of file VertexNTupler.cc.

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

References available_, l1tVertexFinder::VertexNTupler::RecoTracksBranchData::chi2dof, edm::EDConsumerBase::consumes(), edmLumisInFiles::description, l1tVertexFinder::VertexNTupler::GenJetsBranchData::energy, l1tVertexFinder::VertexNTupler::GenParticlesBranchData::energy, l1tVertexFinder::VertexNTupler::GenJetsBranchData::eta, l1tVertexFinder::VertexNTupler::GenParticlesBranchData::eta, l1tVertexFinder::VertexNTupler::RecoTracksBranchData::eta, l1tVertexFinder::VertexNTupler::TrueTracksBranchData::eta, genJetsBranchData_, genParticlesHardOutgoingBranchData_, genVtxZ0_, edm::ParameterSet::getParameter(), hepMCVtxZ0_, SimL1EmulatorRepack_Full_cff::inputTag, edm::Service< T >::isAvailable(), l1TracksBranchData_, l1TracksMapTokenMap_, l1TracksTokenMap_, l1Vertices_extra_numTracks_, l1Vertices_extra_sumPt_, l1Vertices_extra_z0_, l1Vertices_extra_z0_etaWeighted_, l1VerticesBranchData_, l1VerticesExtraTokens_, l1VerticesInputMap_, l1VerticesTokenMap_, TFileService::make(), numPileupVertices_, l1tVertexFinder::VertexNTupler::RecoTracksBranchData::numStubs, l1tVertexFinder::VertexNTupler::RecoVerticesBranchData::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::RecoVerticesBranchData::sumPt, 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::RecoVerticesBranchData::z0, l1tVertexFinder::VertexNTupler::RecoTracksBranchData::z0, and l1tVertexFinder::VertexNTupler::TrueTracksBranchData::z0.

◆ ~VertexNTupler()

l1tVertexFinder::VertexNTupler::~VertexNTupler ( )
override

Definition at line 630 of file VertexNTupler.cc.

630 {}

Member Function Documentation

◆ analyze()

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

Implements edm::EDAnalyzer.

Definition at line 399 of file VertexNTupler.cc.

399  {
400  // Note useful info about MC truth particles and about reconstructed stubs
402  iEvent.getByToken(inputDataToken_, inputDataHandle);
403  InputData inputData = *inputDataHandle;
404 
405  edm::Handle<edm::ValueMap<TP>> tpValueMapHandle;
406  iEvent.getByToken(vTPsToken_, tpValueMapHandle);
407  edm::ValueMap<TP> tpValueMap = *tpValueMapHandle;
408 
409  // Create collections to hold the desired objects
410  std::map<std::string, std::vector<L1TrackTruthMatched>> l1TrackCollections;
411  std::map<std::string, edm::Handle<TTTrackAssMap>> truthAssocMapHandles;
412 
413  // Create iterators for the maps
414  auto tokenMapEntry = l1TracksTokenMap_.begin(), tokenMapEntryEnd = l1TracksTokenMap_.end();
415  auto mapTokenMapEntry = l1TracksMapTokenMap_.begin(), mapTokenMapEntryEnd = l1TracksMapTokenMap_.end();
416 
417  // Iterate over the maps
418  for (; (tokenMapEntry != tokenMapEntryEnd) && (mapTokenMapEntry != mapTokenMapEntryEnd);
419  ++tokenMapEntry, ++mapTokenMapEntry) {
420  edm::Handle<TTTrackCollectionView> l1TracksHandle;
421  edm::Handle<TTTrackAssMap>& mcTruthTTTrackHandle = truthAssocMapHandles[mapTokenMapEntry->first];
422  iEvent.getByToken(tokenMapEntry->second, l1TracksHandle);
423  iEvent.getByToken(l1TracksMapTokenMap_.at(mapTokenMapEntry->first), mcTruthTTTrackHandle);
424 
425  std::vector<L1TrackTruthMatched>& l1Tracks = l1TrackCollections[tokenMapEntry->first];
426  l1Tracks.reserve(l1TracksHandle->size());
427  for (const auto& track : l1TracksHandle->ptrs()) {
428  l1Tracks.push_back(L1TrackTruthMatched(track, inputData.getTPPtrToRefMap(), tpValueMap, mcTruthTTTrackHandle));
429  }
430  }
431 
432  // create a map for associating fat reco tracks with their underlying
433  // TTTrack pointers
434  std::map<std::string, std::map<const edm::Ptr<TTTrack<Ref_Phase2TrackerDigi_>>, const L1TrackTruthMatched*>>
435  edmL1TrackMaps;
436 
437  // get a list of reconstructed tracks with references to their TPs
438  for (const auto& entry : l1TrackCollections) {
439  auto& edmL1Map = edmL1TrackMaps[entry.first];
440  for (const auto& track : entry.second) {
441  edmL1Map.insert(std::pair<const edm::Ptr<TTTrack<Ref_Phase2TrackerDigi_>>, const L1TrackTruthMatched*>(
442  track.getTTTrackPtr(), &track));
443  }
444  }
445 
447 
448  // Pile-up summary info
450  iEvent.getByToken(pileupSummaryToken_, pileupHandle);
451 
452  for (auto bxIt = pileupHandle->begin(); bxIt != pileupHandle->end(); bxIt++) {
453  if (bxIt->getBunchCrossing() == 0) {
454  numTrueInteractions_ = bxIt->getTrueNumInteractions();
455  numPileupVertices_ = bxIt->getPU_NumInteractions();
456  }
457  }
458 
459  // True track info
462  iEvent.getByToken(allMatchedTPsToken_, allMatchedTPsHandle);
463 
464  for (const auto& tp : *allMatchedTPsHandle) {
465  trueTracksBranchData_.pt.push_back(tp->pt());
466  trueTracksBranchData_.eta.push_back(tp->eta());
467  trueTracksBranchData_.phi.push_back(tp->phi());
468  trueTracksBranchData_.z0.push_back(tp->z0());
469  trueTracksBranchData_.pdgId.push_back(tp->pdgId());
470  trueTracksBranchData_.physCollision.push_back(tp.physicsCollision() ? 1.0 : 0.0);
471  trueTracksBranchData_.use.push_back(tp.use() ? 1.0 : 0.0);
472  trueTracksBranchData_.useForEff.push_back(tp.useForEff() ? 1.0 : 0.0);
473  trueTracksBranchData_.useForAlgEff.push_back(tp.useForAlgEff() ? 1.0 : 0.0);
474  trueTracksBranchData_.useForVertexReco.push_back(tp.useForVertexReco() ? 1.0 : 0.0);
475  }
476 
477  // True pile-up vertex info
478  truePileUpVtxZ0_.clear();
479  for (const Vertex& vtx : inputData.getPileUpVertices())
480  truePileUpVtxZ0_.push_back(vtx.z0());
481 
482  // Generator level vertex info
483  hepMCVtxZ0_ = inputData.getHepMCVertex().vz();
484  genVtxZ0_ = inputData.getGenVertex().vz();
485 
486  // Gen particles
490  for (const auto& p : *genParticlesH) {
491  genParticlesHardOutgoingBranchData_.energy.push_back(p.energy());
492  genParticlesHardOutgoingBranchData_.pt.push_back(p.pt());
493  genParticlesHardOutgoingBranchData_.eta.push_back(p.eta());
494  genParticlesHardOutgoingBranchData_.phi.push_back(p.phi());
495  genParticlesHardOutgoingBranchData_.pdgId.push_back(p.pdgId());
496  genParticlesHardOutgoingBranchData_.status.push_back(p.status());
497  }
498 
499  // Gen jet (AK4) branches
502  iEvent.getByToken(genJetsToken_, genJetsHandle);
503  for (const auto& genJet : *genJetsHandle) {
504  genJetsBranchData_.energy.push_back(genJet.energy());
505  genJetsBranchData_.pt.push_back(genJet.pt());
506  genJetsBranchData_.eta.push_back(genJet.eta());
507  genJetsBranchData_.phi.push_back(genJet.phi());
508  }
509 
510  for (const auto& entry : l1TrackCollections) {
511  const auto& l1Tracks = entry.second;
512  RecoTracksBranchData& branchData = l1TracksBranchData_.at(entry.first);
513 
514  const TTTrackAssociationMap<Ref_Phase2TrackerDigi_>& truthAssocMap = *truthAssocMapHandles.at(entry.first);
515 
516  // Reco track branches
517  branchData.clear();
518  for (const L1TrackTruthMatched& track : l1Tracks) {
519  branchData.pt.push_back(track.pt());
520  branchData.eta.push_back(track.eta());
521  branchData.phi.push_back(track.phi0());
522  branchData.z0.push_back(track.z0());
523  branchData.numStubs.push_back(track.getNumStubs());
524  branchData.chi2dof.push_back(track.chi2dof());
525  branchData.trueMatchIdx.push_back(track.getMatchedTPidx());
526 
527  edm::Ptr<TrackingParticle> matchedTP = truthAssocMap.findTrackingParticlePtr(track.getTTTrackPtr());
528  if (matchedTP.isNull())
529  branchData.truthMapMatchIdx.push_back(-1);
530  else {
531  auto it = std::find_if(allMatchedTPsHandle->begin(),
532  allMatchedTPsHandle->end(),
533  [&matchedTP](auto const& tp) { return tp.getTrackingParticle() == matchedTP; });
534  assert(it != allMatchedTPsHandle->end());
535  branchData.truthMapMatchIdx.push_back(std::distance(allMatchedTPsHandle->begin(), it));
536  }
537  branchData.truthMapIsGenuine.push_back(truthAssocMap.isGenuine(track.getTTTrackPtr()) ? 1.0 : 0.0);
538  branchData.truthMapIsLooselyGenuine.push_back(truthAssocMap.isLooselyGenuine(track.getTTTrackPtr()) ? 1.0
539  : 0.0);
540  branchData.truthMapIsCombinatoric.push_back(truthAssocMap.isCombinatoric(track.getTTTrackPtr()) ? 1.0 : 0.0);
541  branchData.truthMapIsUnknown.push_back(truthAssocMap.isUnknown(track.getTTTrackPtr()) ? 1.0 : 0.0);
542  }
543  }
544 
545  // Reco vertex branches
546  for (const auto& tokenMapEntry : l1VerticesTokenMap_) {
547  RecoVerticesBranchData& branchData = l1VerticesBranchData_.at(tokenMapEntry.first);
548 
550  iEvent.getByToken(tokenMapEntry.second, handle);
551  std::vector<std::shared_ptr<const RecoVertexWithTP>> recoVertices;
552  recoVertices.reserve(handle->size());
553  for (unsigned int i = 0; i < handle->size(); ++i) {
554  recoVertices.push_back(std::shared_ptr<const RecoVertexWithTP>(
555  new RecoVertexWithTP(handle->at(i), edmL1TrackMaps.at(l1VerticesInputMap_.at(tokenMapEntry.first)))));
556  }
557 
558  branchData.clear();
559  std::vector<L1TrackTruthMatched>& l1Tracks = l1TrackCollections.at(l1VerticesInputMap_.at(tokenMapEntry.first));
560  for (const std::shared_ptr<const RecoVertexWithTP>& vtx : recoVertices) {
561  branchData.numTracks.push_back(vtx->numTracks());
562  branchData.trackIdxs.push_back(std::vector<unsigned>());
563  for (const L1TrackTruthMatched* track : vtx->tracks())
564  branchData.trackIdxs.back().push_back(track - l1Tracks.data());
565  branchData.z0.push_back(vtx->z0());
566  branchData.sumPt.push_back(vtx->pt());
567  }
568 
569  if (printResults_) {
570  edm::LogInfo("VertexNTupler") << "analyze::" << recoVertices.size() << " '" << tokenMapEntry.first
571  << "' vertices were found ... ";
572  for (const auto& vtx : recoVertices) {
573  edm::LogInfo("VertexNTupler") << "analyze::"
574  << " * z0 = " << vtx->z0() << "; contains " << vtx->numTracks()
575  << " tracks ...";
576  for (const auto& trackPtr : vtx->tracks())
577  edm::LogInfo("VertexNTupler") << "analyze::"
578  << " - z0 = " << trackPtr->z0() << "; pt = " << trackPtr->pt()
579  << ", eta = " << trackPtr->eta() << ", phi = " << trackPtr->phi0();
580  }
581  }
582  }
583 
588 
589  for (size_t i = 0; i < l1VerticesExtraTokens_.size(); i++) {
591  iEvent.getByToken(l1VerticesExtraTokens_.at(i), vertexHandle);
592 
593  const std::vector<l1t::Vertex>& vertices = *vertexHandle;
594 
595  l1Vertices_extra_numTracks_.at(i).clear();
596  l1Vertices_extra_z0_.at(i).clear();
598  l1Vertices_extra_sumPt_.at(i).clear();
599 
600  for (const auto& vertex : vertices) {
601  l1Vertices_extra_numTracks_.at(i).push_back(vertex.tracks().size());
602  l1Vertices_extra_z0_.at(i).push_back(vertex.z0());
603 
604  float sumPt = 0.0;
605  float etaWeightedSumZ0 = 0.0;
606  float etaWeightSum = 0.0;
607  for (const auto& track : vertex.tracks()) {
608  sumPt += track->momentum().transverse();
609  // const float zRes = 0.133616 * track->momentum().eta() * track->momentum().eta() - 0.0522353 * std::abs(track->momentum().eta()) + 0.109918;
610  const float zRes = 0.223074 * track->momentum().eta() * track->momentum().eta() -
611  0.050231 * abs(track->momentum().eta()) + 0.209719;
612  etaWeightedSumZ0 += track->POCA().z() / (zRes * zRes);
613  etaWeightSum += 1.0 / (zRes * zRes);
614  }
615 
616  l1Vertices_extra_sumPt_.at(i).push_back(sumPt);
617  l1Vertices_extra_z0_etaWeighted_.at(i).push_back(etaWeightedSumZ0 / etaWeightSum);
618  }
619  }
620 
621  outputTree_->Fill();
623 
624  if (settings_.debug() > 2)
625  edm::LogInfo("VertexNTupler") << "analyze::================ End of Event ==============";
626  }

References funct::abs(), allMatchedTPsToken_, cms::cuda::assert(), l1tVertexFinder::VertexNTupler::RecoTracksBranchData::chi2dof, l1tVertexFinder::VertexNTupler::GenJetsBranchData::clear(), l1tVertexFinder::VertexNTupler::GenParticlesBranchData::clear(), l1tVertexFinder::VertexNTupler::RecoVerticesBranchData::clear(), l1tVertexFinder::VertexNTupler::RecoTracksBranchData::clear(), l1tVertexFinder::VertexNTupler::TrueTracksBranchData::clear(), l1tVertexFinder::AlgoSettings::debug(), HLT_FULL_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(), l1TracksBranchData_, l1TracksMapTokenMap_, l1TracksTokenMap_, l1Vertices_extra_numTracks_, l1Vertices_extra_sumPt_, l1Vertices_extra_z0_, l1Vertices_extra_z0_etaWeighted_, l1VerticesBranchData_, l1VerticesExtraTokens_, l1VerticesInputMap_, l1VerticesTokenMap_, numPileupVertices_, l1tVertexFinder::VertexNTupler::RecoTracksBranchData::numStubs, l1tVertexFinder::VertexNTupler::RecoVerticesBranchData::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::RecoVerticesBranchData::sumPt, cmsswSequenceInfo::tp, HLT_FULL_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_, extraflags_cff::vtx, l1tVertexFinder::Vertex::vz(), l1tVertexFinder::VertexNTupler::RecoVerticesBranchData::z0, l1tVertexFinder::VertexNTupler::RecoTracksBranchData::z0, and l1tVertexFinder::VertexNTupler::TrueTracksBranchData::z0.

◆ beginJob()

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

Reimplemented from edm::EDAnalyzer.

Definition at line 353 of file VertexNTupler.cc.

353 {}

◆ endJob()

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

Reimplemented from edm::EDAnalyzer.

Definition at line 628 of file VertexNTupler.cc.

628 {}

Member Data Documentation

◆ allMatchedTPsToken_

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

Definition at line 164 of file VertexNTupler.cc.

Referenced by analyze().

◆ available_

bool l1tVertexFinder::VertexNTupler::available_
private

Definition at line 205 of file VertexNTupler.cc.

Referenced by VertexNTupler().

◆ genJetsBranchData_

GenJetsBranchData l1tVertexFinder::VertexNTupler::genJetsBranchData_
private

Definition at line 186 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ genJetsToken_

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

Definition at line 163 of file VertexNTupler.cc.

Referenced by analyze().

◆ genParticlesHardOutgoingBranchData_

GenParticlesBranchData l1tVertexFinder::VertexNTupler::genParticlesHardOutgoingBranchData_
private

Definition at line 189 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ genParticlesToken_

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

Definition at line 162 of file VertexNTupler.cc.

Referenced by analyze().

◆ genVtxZ0_

float l1tVertexFinder::VertexNTupler::genVtxZ0_
private

Definition at line 183 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ hepMCVtxZ0_

float l1tVertexFinder::VertexNTupler::hepMCVtxZ0_
private

Definition at line 183 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ inputDataToken_

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

Definition at line 160 of file VertexNTupler.cc.

Referenced by analyze().

◆ l1TracksBranchData_

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

Definition at line 191 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 167 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ l1TracksTokenMap_

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

Definition at line 166 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ l1Vertices_branchMap_numTracks_

std::unordered_map<std::string, std::vector<unsigned> > l1tVertexFinder::VertexNTupler::l1Vertices_branchMap_numTracks_
private

Definition at line 195 of file VertexNTupler.cc.

◆ l1Vertices_branchMap_sumPt_

std::unordered_map<std::string, std::vector<float> > l1tVertexFinder::VertexNTupler::l1Vertices_branchMap_sumPt_
private

Definition at line 198 of file VertexNTupler.cc.

◆ l1Vertices_branchMap_z0_

std::unordered_map<std::string, std::vector<float> > l1tVertexFinder::VertexNTupler::l1Vertices_branchMap_z0_
private

Definition at line 196 of file VertexNTupler.cc.

◆ l1Vertices_branchMap_z0_etaWeighted_

std::unordered_map<std::string, std::vector<float> > l1tVertexFinder::VertexNTupler::l1Vertices_branchMap_z0_etaWeighted_
private

Definition at line 197 of file VertexNTupler.cc.

◆ l1Vertices_extra_numTracks_

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

Definition at line 200 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 203 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 201 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 202 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ l1VerticesBranchData_

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

Definition at line 192 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ l1VerticesExtraTokenMap_

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

Definition at line 169 of file VertexNTupler.cc.

◆ l1VerticesExtraTokens_

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

Definition at line 170 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ l1VerticesInputMap_

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

Definition at line 193 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 168 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ numPileupVertices_

int l1tVertexFinder::VertexNTupler::numPileupVertices_
private

Definition at line 184 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ numTrueInteractions_

float l1tVertexFinder::VertexNTupler::numTrueInteractions_
private

Definition at line 183 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ outputTree_

TTree* l1tVertexFinder::VertexNTupler::outputTree_
private

Definition at line 172 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ pileupSummaryToken_

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

Definition at line 161 of file VertexNTupler.cc.

Referenced by analyze().

◆ printResults_

const bool l1tVertexFinder::VertexNTupler::printResults_
private

Definition at line 174 of file VertexNTupler.cc.

Referenced by analyze().

◆ settings_

AnalysisSettings l1tVertexFinder::VertexNTupler::settings_
private

Definition at line 177 of file VertexNTupler.cc.

Referenced by analyze().

◆ truePileUpVtxZ0_

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

Definition at line 188 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ trueTracksBranchData_

TrueTracksBranchData l1tVertexFinder::VertexNTupler::trueTracksBranchData_
private

Definition at line 187 of file VertexNTupler.cc.

Referenced by analyze(), and VertexNTupler().

◆ vTPsToken_

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

Definition at line 165 of file VertexNTupler.cc.

Referenced by analyze().

l1tVertexFinder::VertexNTupler::l1Vertices_extra_z0_
std::vector< std::vector< float > > l1Vertices_extra_z0_
Definition: VertexNTupler.cc:201
l1tVertexFinder::VertexNTupler::l1VerticesBranchData_
std::map< std::string, RecoVerticesBranchData > l1VerticesBranchData_
Definition: VertexNTupler.cc:192
l1tVertexFinder::VertexNTupler::TrueTracksBranchData::z0
std::vector< float > z0
Definition: VertexNTupler.cc:129
l1tVertexFinder::InputData::getHepMCVertex
const Vertex & getHepMCVertex() const
Get primary vertex information (vertex from HepMCProduct)
Definition: InputData.h:64
mps_fire.i
i
Definition: mps_fire.py:428
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11724
l1tVertexFinder::VertexNTupler::GenJetsBranchData::pt
std::vector< float > pt
Definition: VertexNTupler.cc:51
l1tVertexFinder::VertexNTupler::settings_
AnalysisSettings settings_
Definition: VertexNTupler.cc:177
l1tVertexFinder::VertexNTupler::GenJetsBranchData::clear
void clear()
Definition: VertexNTupler.cc:55
l1tVertexFinder::VertexNTupler::TrueTracksBranchData::pt
std::vector< float > pt
Definition: VertexNTupler.cc:126
l1tVertexFinder::VertexNTupler::inputDataToken_
const edm::EDGetTokenT< l1tVertexFinder::InputData > inputDataToken_
Definition: VertexNTupler.cc:160
patZpeak.handle
handle
Definition: patZpeak.py:23
mps_splice.entry
entry
Definition: mps_splice.py:68
edm::View::ptrs
std::vector< Ptr< value_type > > const & ptrs() const
edmLumisInFiles.description
description
Definition: edmLumisInFiles.py:11
l1tVertexFinder::RecoVertexWithTP
RecoVertex< L1TrackTruthMatched > RecoVertexWithTP
Definition: RecoVertex.h:89
l1tVertexFinder::VertexNTupler::TrueTracksBranchData::physCollision
std::vector< float > physCollision
Definition: VertexNTupler.cc:131
runTauDisplay.genParticlesH
genParticlesH
Definition: runTauDisplay.py:30
l1tVertexFinder::VertexNTupler::genVtxZ0_
float genVtxZ0_
Definition: VertexNTupler.cc:183
cms::cuda::assert
assert(be >=bs)
TTTrack
Class to store the L1 Track Trigger tracks.
Definition: TTTrack.h:29
l1tVertexFinder::InputData::getTPPtrToRefMap
const TPPtrToRefMap & getTPPtrToRefMap() const
Get the TrackingParticle to TP translation map.
Definition: InputData.h:62
l1tVertexFinder::VertexNTupler::l1Vertices_extra_z0_etaWeighted_
std::vector< std::vector< float > > l1Vertices_extra_z0_etaWeighted_
Definition: VertexNTupler.cc:202
l1tVertexFinder::VertexNTupler::genParticlesToken_
const edm::EDGetTokenT< edm::View< reco::GenParticle > > genParticlesToken_
Definition: VertexNTupler.cc:162
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
l1tVertexFinder::VertexNTupler::l1Vertices_extra_numTracks_
std::vector< std::vector< unsigned > > l1Vertices_extra_numTracks_
Definition: VertexNTupler.cc:200
l1tVertexFinder::VertexNTupler::l1TracksBranchData_
std::map< std::string, RecoTracksBranchData > l1TracksBranchData_
Definition: VertexNTupler.cc:191
edm::Handle
Definition: AssociativeIterator.h:50
edm::Service::isAvailable
bool isAvailable() const
Definition: Service.h:40
l1tVertexFinder::VertexNTupler::TrueTracksBranchData::useForEff
std::vector< float > useForEff
Definition: VertexNTupler.cc:133
AlignmentTracksFromVertexSelector_cfi.vertices
vertices
Definition: AlignmentTracksFromVertexSelector_cfi.py:5
l1tVertexFinder::VertexNTupler::numTrueInteractions_
float numTrueInteractions_
Definition: VertexNTupler.cc:183
TtFullHadEvtBuilder_cfi.sumPt
sumPt
Definition: TtFullHadEvtBuilder_cfi.py:38
l1tVertexFinder::VertexNTupler::l1Vertices_extra_sumPt_
std::vector< std::vector< float > > l1Vertices_extra_sumPt_
Definition: VertexNTupler.cc:203
l1tVertexFinder::VertexNTupler::TrueTracksBranchData::clear
void clear()
Definition: VertexNTupler.cc:137
l1tVertexFinder::VertexNTupler::printResults_
const bool printResults_
Definition: VertexNTupler.cc:174
l1tVertexFinder::VertexNTupler::l1TracksMapTokenMap_
std::map< std::string, edm::EDGetTokenT< TTTrackAssociationMap< Ref_Phase2TrackerDigi_ > > > l1TracksMapTokenMap_
Definition: VertexNTupler.cc:167
l1tVertexFinder::VertexNTupler::l1VerticesTokenMap_
std::map< std::string, edm::EDGetTokenT< std::vector< l1t::Vertex > > > l1VerticesTokenMap_
Definition: VertexNTupler.cc:168
l1tVertexFinder::VertexNTupler::GenJetsBranchData::eta
std::vector< float > eta
Definition: VertexNTupler.cc:52
cmsswSequenceInfo.tp
tp
Definition: cmsswSequenceInfo.py:17
TTTrackAssociationMap::isGenuine
bool isGenuine(TTTrackPtrT< T > aTrack) const
edm::View::size
size_type size() const
l1tVertexFinder::VertexNTupler::GenJetsBranchData::phi
std::vector< float > phi
Definition: VertexNTupler.cc:53
l1tVertexFinder::VertexNTupler::TrueTracksBranchData::phi
std::vector< float > phi
Definition: VertexNTupler.cc:128
l1tVertexFinder::VertexNTupler::numPileupVertices_
int numPileupVertices_
Definition: VertexNTupler.cc:184
TTTrackAssociationMap
Stores association of Truth Particles (TP) to L1 Track-Trigger Tracks.
Definition: TTTrackAssociationMap.h:46
l1tVertexFinder::InputData
Definition: InputData.h:35
edm::View
Definition: CaloClusterFwd.h:14
l1tVertexFinder::VertexNTupler::l1TracksTokenMap_
std::map< std::string, edm::EDGetTokenT< TTTrackCollectionView > > l1TracksTokenMap_
Definition: VertexNTupler.cc:166
bphysicsOniaDQM_cfi.vertex
vertex
Definition: bphysicsOniaDQM_cfi.py:7
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
l1tVertexFinder::VertexNTupler::pileupSummaryToken_
const edm::EDGetTokenT< std::vector< PileupSummaryInfo > > pileupSummaryToken_
Definition: VertexNTupler.cc:161
l1tVertexFinder::VertexNTupler::GenParticlesBranchData::status
std::vector< int > status
Definition: VertexNTupler.cc:69
l1tVertexFinder::Vertex::vz
double vz() const
Vertex z position [cm].
Definition: Vertex.h:38
edm::Service< TFileService >
iEvent
int iEvent
Definition: GenABIO.cc:224
l1tVertexFinder::VertexNTupler::truePileUpVtxZ0_
std::vector< float > truePileUpVtxZ0_
Definition: VertexNTupler.cc:188
TTTrackAssociationMap::findTrackingParticlePtr
const TrackingParticlePtr & findTrackingParticlePtr(TTTrackPtrT< T > aTrack) const
l1tVertexFinder::VertexNTupler::trueTracksBranchData_
TrueTracksBranchData trueTracksBranchData_
Definition: VertexNTupler.cc:187
l1tVertexFinder::VertexNTupler::GenParticlesBranchData::pdgId
std::vector< int > pdgId
Definition: VertexNTupler.cc:68
l1tVertexFinder::VertexNTupler::available_
bool available_
Definition: VertexNTupler.cc:205
l1tVertexFinder::VertexNTupler::outputTree_
TTree * outputTree_
Definition: VertexNTupler.cc:172
TFileService::make
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
l1tVertexFinder::VertexNTupler::GenParticlesBranchData::pt
std::vector< float > pt
Definition: VertexNTupler.cc:65
l1tVertexFinder::VertexNTupler::hepMCVtxZ0_
float hepMCVtxZ0_
Definition: VertexNTupler.cc:183
edm::Ptr
Definition: AssociationVector.h:31
l1tVertexFinder::VertexNTupler::genJetsBranchData_
GenJetsBranchData genJetsBranchData_
Definition: VertexNTupler.cc:186
l1tVertexFinder::VertexNTupler::GenParticlesBranchData::eta
std::vector< float > eta
Definition: VertexNTupler.cc:66
l1tVertexFinder::InputData::getPileUpVertices
const std::vector< Vertex > & getPileUpVertices() const
Get pile-up vertices information.
Definition: InputData.h:70
l1tVertexFinder::VertexNTupler::allMatchedTPsToken_
const edm::EDGetTokenT< std::vector< l1tVertexFinder::TP > > allMatchedTPsToken_
Definition: VertexNTupler.cc:164
extraflags_cff.vtx
vtx
Definition: extraflags_cff.py:19
l1tVertexFinder::VertexNTupler::TrueTracksBranchData::useForVertexReco
std::vector< float > useForVertexReco
Definition: VertexNTupler.cc:135
l1tVertexFinder::VertexNTupler::TrueTracksBranchData::use
std::vector< float > use
Definition: VertexNTupler.cc:132
l1tVertexFinder::VertexNTupler::l1VerticesInputMap_
std::map< std::string, std::string > l1VerticesInputMap_
Definition: VertexNTupler.cc:193
edm::ValueMap
Definition: ValueMap.h:107
l1tVertexFinder::VertexNTupler::GenParticlesBranchData::phi
std::vector< float > phi
Definition: VertexNTupler.cc:67
l1tVertexFinder::VertexNTupler::vTPsToken_
const edm::EDGetTokenT< edm::ValueMap< l1tVertexFinder::TP > > vTPsToken_
Definition: VertexNTupler.cc:165
l1tVertexFinder::Vertex
Definition: Vertex.h:10
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
l1tVertexFinder::VertexNTupler::TrueTracksBranchData::useForAlgEff
std::vector< float > useForAlgEff
Definition: VertexNTupler.cc:134
l1tVertexFinder::VertexNTupler::GenJetsBranchData::energy
std::vector< float > energy
Definition: VertexNTupler.cc:50
l1tVertexFinder::VertexNTupler::l1VerticesExtraTokens_
std::vector< edm::EDGetTokenT< std::vector< l1t::Vertex > > > l1VerticesExtraTokens_
Definition: VertexNTupler.cc:170
cms::Exception
Definition: Exception.h:70
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
l1tVertexFinder::VertexNTupler::genParticlesHardOutgoingBranchData_
GenParticlesBranchData genParticlesHardOutgoingBranchData_
Definition: VertexNTupler.cc:189
l1tVertexFinder::AlgoSettings::debug
unsigned int debug() const
Definition: AlgoSettings.h:71
edm::EDConsumerBase::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: EDConsumerBase.h:159
l1tVertexFinder::VertexNTupler::GenParticlesBranchData::clear
void clear()
Definition: VertexNTupler.cc:71
l1tVertexFinder::VertexNTupler::TrueTracksBranchData::pdgId
std::vector< int > pdgId
Definition: VertexNTupler.cc:130
SimL1EmulatorRepack_Full_cff.inputTag
inputTag
Definition: SimL1EmulatorRepack_Full_cff.py:56
l1tVertexFinder::InputData::getGenVertex
const Vertex & getGenVertex() const
Get primary vertex information (vertex from gen particles)
Definition: InputData.h:66
HLT_FULL_cff.distance
distance
Definition: HLT_FULL_cff.py:7746
edm::Log
Definition: MessageLogger.h:70
l1tVertexFinder::VertexNTupler::GenParticlesBranchData::energy
std::vector< float > energy
Definition: VertexNTupler.cc:64
edm::Ptr::isNull
bool isNull() const
Checks for null.
Definition: Ptr.h:142
edm::InputTag
Definition: InputTag.h:15
l1tVertexFinder::VertexNTupler::TrueTracksBranchData::eta
std::vector< float > eta
Definition: VertexNTupler.cc:127
TTTrackAssociationMap::isCombinatoric
bool isCombinatoric(TTTrackPtrT< T > aTrack) const
Both isLooselyGenuine() & isUnknown() are false.
l1tVertexFinder::L1TrackTruthMatched
Simple wrapper class for TTTrack, with match to a tracking particle.
Definition: L1TrackTruthMatched.h:25
l1tVertexFinder::VertexNTupler::genJetsToken_
const edm::EDGetTokenT< std::vector< reco::GenJet > > genJetsToken_
Definition: VertexNTupler.cc:163
TTTrackAssociationMap::isLooselyGenuine
bool isLooselyGenuine(TTTrackPtrT< T > aTrack) const
TTTrackAssociationMap::isUnknown
bool isUnknown(TTTrackPtrT< T > aTrack) const
More than one stub on track is "unknown".