CMS 3D CMS Logo

Functions
InputGenJetsParticleSelector.cc File Reference
#include "InputGenJetsParticleSelector.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include <memory>
#include "CommonTools/CandUtils/interface/pdgIdUtils.h"

Go to the source code of this file.

Functions

static void invalidateTree (InputGenJetsParticleSelector::ParticleBitmap &invalid, const InputGenJetsParticleSelector::ParticleVector &p, const reco::Candidate *particle)
 
static unsigned int partIdx (const InputGenJetsParticleSelector::ParticleVector &p, const reco::Candidate *particle)
 
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker< edm::ParameterSetDescriptionFiller< InputGenJetsParticleSelector > > s_filler__LINE__ ("InputGenJetsParticleSelector")
 
static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< InputGenJetsParticleSelector > > s_maker__LINE__ ("InputGenJetsParticleSelector")
 

Function Documentation

◆ invalidateTree()

static void invalidateTree ( InputGenJetsParticleSelector::ParticleBitmap invalid,
const InputGenJetsParticleSelector::ParticleVector p,
const reco::Candidate particle 
)
static

Definition at line 130 of file InputGenJetsParticleSelector.cc.

132  {
133  unsigned int npart = particle->numberOfDaughters();
134  if (!npart)
135  return;
136 
137  for (unsigned int i = 0; i < npart; ++i) {
138  unsigned int idx = partIdx(p, particle->daughter(i));
139  if (invalid[idx])
140  continue;
141  invalid[idx] = true;
142  //cout<<"Invalidated: ["<<setw(4)<<idx<<"] With pt:"<<particle->daughter(i)->pt()<<endl;
143  invalidateTree(invalid, p, particle->daughter(i));
144  }
145 }

References reco::Candidate::daughter(), mps_fire::i, heavyIonCSV_trainingSettings::idx, npart, reco::Candidate::numberOfDaughters(), AlCaHLTBitMon_ParallelJobs::p, and partIdx().

Referenced by InputGenJetsParticleSelector::produce().

◆ partIdx()

static unsigned int partIdx ( const InputGenJetsParticleSelector::ParticleVector p,
const reco::Candidate particle 
)
static

Definition at line 120 of file InputGenJetsParticleSelector.cc.

120  {
121  InputGenJetsParticleSelector::ParticleVector::const_iterator pos = std::lower_bound(p.begin(), p.end(), particle);
122  if (pos == p.end() || *pos != particle)
123  throw cms::Exception("CorruptedData") << "reco::GenEvent corrupted: Unlisted particles"
124  " in decay tree."
125  << std::endl;
126 
127  return pos - p.begin();
128 }

References pfDeepBoostedJetPreprocessParams_cfi::lower_bound, and AlCaHLTBitMon_ParallelJobs::p.

Referenced by InputGenJetsParticleSelector::fromResonance(), ME0ReDigiProducer::TemporaryGeometry::getCentralTOF(), ME0ReDigiProducer::getCustomStripProperties(), ME0ReDigiProducer::TemporaryGeometry::getPartCenter(), ME0ReDigiProducer::TemporaryGeometry::getTopo(), invalidateTree(), edm::CloseByParticleGunProducer::produce(), and InputGenJetsParticleSelector::testPartonChildren().

◆ s_filler__LINE__()

static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::ParameterSetDescriptionFiller< InputGenJetsParticleSelector > > s_filler__LINE__ ( "InputGenJetsParticleSelector"  )
static

◆ s_maker__LINE__()

static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< InputGenJetsParticleSelector > > s_maker__LINE__ ( "InputGenJetsParticleSelector"  )
static
reco::Candidate::daughter
virtual const Candidate * daughter(size_type i) const =0
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode)
mps_fire.i
i
Definition: mps_fire.py:428
pos
Definition: PixelAliasList.h:18
npart
double npart
Definition: HydjetWrapper.h:46
invalidateTree
static void invalidateTree(InputGenJetsParticleSelector::ParticleBitmap &invalid, const InputGenJetsParticleSelector::ParticleVector &p, const reco::Candidate *particle)
Definition: InputGenJetsParticleSelector.cc:130
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
partIdx
static unsigned int partIdx(const InputGenJetsParticleSelector::ParticleVector &p, const reco::Candidate *particle)
Definition: InputGenJetsParticleSelector.cc:120
reco::Candidate::numberOfDaughters
virtual size_type numberOfDaughters() const =0
number of daughters
pfDeepBoostedJetPreprocessParams_cfi.lower_bound
lower_bound
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:15
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
align::invalid
Definition: StructureType.h:18
cms::Exception
Definition: Exception.h:70