|
void | fillLHEObjectTable (const LHEEventProduct &lheProd, nanoaod::FlatTable &out) const |
|
| LHETablesProducer (edm::ParameterSet const ¶ms) |
|
void | produce (edm::StreamID id, edm::Event &iEvent, const edm::EventSetup &iSetup) const override |
|
| ~LHETablesProducer () override |
|
| EDProducer ()=default |
|
bool | hasAbilityToProduceInLumis () const final |
|
bool | hasAbilityToProduceInRuns () const final |
|
bool | wantsGlobalLuminosityBlocks () const final |
|
bool | wantsGlobalRuns () const final |
|
bool | wantsStreamLuminosityBlocks () const final |
|
bool | wantsStreamRuns () const final |
|
| EDProducerBase () |
|
ModuleDescription const & | moduleDescription () const |
|
| ~EDProducerBase () override |
|
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
|
std::vector< edm::ProductResolverIndex > const & | indiciesForPutProducts (BranchType iBranchType) const |
|
| ProducerBase () |
|
std::vector< edm::ProductResolverIndex > const & | putTokenIndexToProductResolverIndex () const |
|
void | registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &) |
|
std::function< void(BranchDescription const &)> | registrationCallback () const |
| used by the fwk to register list of products More...
|
|
void | resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel) |
|
| ~ProducerBase () override |
|
std::vector< ConsumesInfo > | consumesInfo () 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 |
|
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::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const |
|
EDConsumerBase const & | operator= (EDConsumerBase const &)=delete |
|
EDConsumerBase & | operator= (EDConsumerBase &&)=default |
|
bool | registeredToConsume (ProductResolverIndex, bool, BranchType) const |
|
bool | registeredToConsumeMany (TypeID const &, BranchType) const |
|
ProductResolverIndexAndSkipBit | uncheckedIndexFrom (EDGetToken) const |
|
void | updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet) |
|
virtual | ~EDConsumerBase () noexcept(false) |
|
|
typedef EDProducerBase | ModuleType |
|
using | ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >> |
|
typedef ProductRegistryHelper::TypeLabelList | TypeLabelList |
|
typedef ProductLabels | Labels |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
|
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 ProductType , BranchType B = InEvent> |
void | consumesMany () |
|
void | consumesMany (const TypeToGet &id) |
|
template<BranchType B> |
void | consumesMany (const TypeToGet &id) |
|
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) |
|
Definition at line 13 of file LHETablesProducer.cc.
Definition at line 34 of file LHETablesProducer.cc.
References funct::abs(), nanoaod::FlatTable::addColumnValue(), nanoaod::FlatTable::FloatColumn, LHEEventProduct::hepeup(), mps_fire::i, SiStripPI::max, gen::n, LHEEventProduct::npLO(), LHEEventProduct::npNLO(), EnergyCorrector::pt, lhef::HEPEUP::PUP, mps_update::status, nanoaod::FlatTable::UInt8Column, and findQualityFiles::v.
Referenced by produce().
35 double lheHT = 0, lheHTIncoming = 0;
36 unsigned int lheNj = 0, lheNb = 0, lheNc = 0, lheNuds = 0, lheNglu = 0;
39 const auto & hepeup = lheProd.
hepeup();
40 const auto & pup = hepeup.
PUP;
41 int lep = -1, lepBar = -1, nu = -1, nuBar = -1;
42 for (
unsigned int i = 0,
n = pup.size();
i <
n; ++
i) {
45 if ( (status == 1) && ( ( idabs == 21 ) || (idabs > 0 && idabs < 7) ) ) {
48 if (idabs==5) lheNb++;
49 else if (idabs==4) lheNc++;
50 else if (idabs <= 3 ) lheNuds++;
51 else if (idabs == 21) lheNglu++;
53 double pt = std::hypot( pup[
i][0], pup[i][1] );
55 int mothIdx =
std::max(hepeup.MOTHUP[
i].first-1,0);
56 int mothIdxTwo =
std::max(hepeup.MOTHUP[
i].second-1,0);
57 int mothStatus = hepeup.ISTUP[mothIdx];
58 int mothStatusTwo = hepeup.ISTUP[mothIdxTwo];
59 bool hasIncomingAsMother = mothStatus<0 || mothStatusTwo<0;
60 if (hasIncomingAsMother) lheHTIncoming +=
pt;
61 }
else if (idabs == 12 || idabs == 14 || idabs == 16) {
62 (hepeup.IDUP[
i] > 0 ? nu : nuBar) =
i;
63 }
else if (idabs == 11 || idabs == 13 || idabs == 15) {
64 (hepeup.IDUP[
i] > 0 ? lep : lepBar) =
i;
67 std::pair<int,int>
v(0,0);
68 if (lep != -1 && lepBar != -1)
v = std::make_pair(lep,lepBar);
69 else if (lep != -1 && nuBar != -1)
v = std::make_pair(lep, nuBar);
70 else if (nu != -1 && lepBar != -1)
v = std::make_pair(nu ,lepBar);
71 else if (nu != -1 && nuBar != -1)
v = std::make_pair(nu , nuBar);
72 if (
v.first != -1 &&
v.second != -1) {
73 lheVpt = std::hypot( pup[
v.first][0] + pup[
v.second][0], pup[
v.first][1] + pup[
v.second][1] );
const lhef::HEPEUP & hepeup() const
std::vector< FiveVector > PUP
Abs< T >::type abs(const T &t)
void addColumnValue(const std::string &name, const C &value, const std::string &docString, ColumnType type=defaultColumnType< T >(), int mantissaBits=-1)