|
| ISRWeightProducer (const edm::ParameterSet &) |
|
| ~ISRWeightProducer () |
|
| EDProducer () |
|
ModuleDescription const & | moduleDescription () const |
|
virtual | ~EDProducer () |
|
| ProducerBase () |
|
void | registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &) |
|
std::function< void(BranchDescription
const &)> | registrationCallback () const |
| used by the fwk to register list of products More...
|
|
virtual | ~ProducerBase () |
|
| EDConsumerBase () |
|
ProductHolderIndexAndSkipBit | indexFrom (EDGetToken, BranchType, TypeID const &) const |
|
void | itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const |
|
void | itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const |
|
std::vector
< ProductHolderIndexAndSkipBit >
const & | itemsToGetFromEvent () const |
|
void | labelsForToken (EDGetToken iToken, Labels &oLabels) const |
|
void | modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const |
|
bool | registeredToConsume (ProductHolderIndex, bool, BranchType) const |
|
bool | registeredToConsumeMany (TypeID const &, BranchType) const |
|
void | updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &) |
|
virtual | ~EDConsumerBase () |
|
Definition at line 20 of file ISRWeightProducer.cc.
Implements edm::EDProducer.
Definition at line 68 of file ISRWeightProducer.cc.
References funct::abs(), genParticleCandidates2GenParticles_cfi::genParticles, genToken_, edm::Event::getByToken(), i, isrBinEdges_, edm::EventBase::isRealData(), j, pileupCalc::nbins, reco::LeafCandidate::pdgId(), EnergyCorrector::pt, reco::LeafCandidate::pt(), ptWeights_, edm::Event::put(), reco::LeafCandidate::status(), ntuplemaker::status, and histoStyle::weight.
Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), and HTMLExport.HTMLExportStatic::export().
74 unsigned int gensize = genParticles->size();
76 std::auto_ptr<double>
weight (
new double);
82 for(
unsigned int i = 0;
i<gensize; ++
i) {
84 int id = part.
pdgId();
85 if (
id!=23 &&
abs(
id)!=24)
continue;
87 if (status!=3)
continue;
88 double pt = part.
pt();
90 for (
unsigned int j=1;
j<=
nbins; ++
j) {
virtual int pdgId() const
PDG identifier.
virtual float pt() const
transverse momentum
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual int status() const
status word
std::vector< double > isrBinEdges_
edm::EDGetTokenT< reco::GenParticleCollection > genToken_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Abs< T >::type abs(const T &t)
std::vector< double > ptWeights_