|
| FlavorHistoryProducer (const edm::ParameterSet &) |
| constructor More...
|
|
| ~FlavorHistoryProducer () override |
| destructor More...
|
|
| EDProducer () |
|
SerialTaskQueue * | globalLuminosityBlocksQueue () |
|
SerialTaskQueue * | globalRunsQueue () |
|
ModuleDescription const & | moduleDescription () const |
|
| ~EDProducer () 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 |
|
std::vector< bool > const & | recordProvenanceList () 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) |
|
TypeLabelList const & | typeLabelList () const |
| used by the fwk to register the list of products of this module More...
|
|
| ~ProducerBase () noexcept(false) 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 &&)=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 |
|
EDConsumerBase & | operator= (EDConsumerBase &&)=default |
|
EDConsumerBase const & | operator= (EDConsumerBase const &)=delete |
|
bool | registeredToConsume (ProductResolverIndex, bool, BranchType) const |
|
bool | registeredToConsumeMany (TypeID const &, BranchType) const |
|
ProductResolverIndexAndSkipBit | uncheckedIndexFrom (EDGetToken) const |
|
void | updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet) |
|
void | updateLookup (eventsetup::ESRecordsToProxyIndices const &) |
|
virtual | ~EDConsumerBase () noexcept(false) |
|
|
typedef EDProducer | ModuleType |
|
using | ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > > |
|
typedef ProductRegistryHelper::TypeLabelList | TypeLabelList |
|
typedef ProductLabels | Labels |
|
static const std::string & | baseType () |
|
static void | fillDescriptions (ConfigurationDescriptions &descriptions) |
|
static void | prevalidate (ConfigurationDescriptions &descriptions) |
|
static bool | wantsGlobalLuminosityBlocks () |
|
static bool | wantsGlobalRuns () |
|
static bool | wantsInputProcessBlocks () |
|
static bool | wantsProcessBlocks () |
|
static bool | wantsStreamLuminosityBlocks () |
|
static bool | wantsStreamRuns () |
|
template<class ProductType > |
BranchAliasSetterT< ProductType > | produces () |
| declare what type of product will make and with which optional label More...
|
|
template<typename ProductType , BranchType B> |
BranchAliasSetterT< ProductType > | produces () |
|
template<typename ProductType , Transition B> |
BranchAliasSetterT< ProductType > | produces () |
|
BranchAliasSetter | produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true) |
|
template<BranchType B> |
BranchAliasSetter | produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true) |
|
template<Transition B> |
BranchAliasSetter | produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true) |
|
template<typename ProductType , Transition B> |
BranchAliasSetterT< ProductType > | produces (std::string instanceName) |
|
template<class ProductType > |
BranchAliasSetterT< ProductType > | produces (std::string instanceName) |
|
template<typename ProductType , BranchType B> |
BranchAliasSetterT< ProductType > | produces (std::string instanceName) |
|
ProducesCollector | producesCollector () |
|
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) |
|
class
- Author
- Stephen Mrenna, FNAL
- Version
- $Id: FlavorHistoryProducer.cc,v 1.0
Definition at line 55 of file FlavorHistoryProducer.h.
process one event
Implements edm::EDProducer.
Definition at line 53 of file FlavorHistoryProducer.cc.
55 cout <<
"---------- Hello from FlavorHistoryProducer! -----" << endl;
59 evt.getByToken(
srcToken_, particlesViewH);
71 vector<int> partonIndices;
73 vector<int> progenitorIndices;
75 vector<int> sisterIndices;
77 vector<FlavorHistory::FLAVOR_T> flavorSources;
80 auto flavorHistoryEvent = std::make_unique<FlavorHistoryEvent>();
87 for (
j = 0;
j < j_max; ++
j) {
93 bool foundProgenitor =
false;
97 int nDa = (
p)->numberOfDaughters();
107 cout <<
"--------------------------" << endl;
109 cout <<
"Processing particle " <<
j <<
", status = " <<
p->status() <<
", pdg id = " <<
p->pdgId() << endl;
112 vector<Candidate const *> allParents;
116 cout <<
"Parents : " << endl;
117 vector<Candidate const *>::const_iterator iprint = allParents.begin(), iprintend = allParents.end();
118 for (; iprint != iprintend; ++iprint)
119 cout <<
" status = " << (*iprint)->status() <<
", pdg id = " << (*iprint)->pdgId()
120 <<
", pt = " << (*iprint)->pt() << endl;
160 if (progenitorIndex > 5) {
172 cout <<
"Matrix Element progenitor" << endl;
173 if (flavorSource == FlavorHistory::FLAVOR_NULL)
174 flavorSource = FlavorHistory::FLAVOR_ME;
175 foundProgenitor =
true;
178 else if ((aParentId >
pdgIdToSelect_ && aParentId < FlavorHistory::gluonId) ||
179 aParentId > FlavorHistory::gluonId) {
181 cout <<
"Flavor decay progenitor" << endl;
182 if (flavorSource == FlavorHistory::FLAVOR_NULL)
183 flavorSource = FlavorHistory::FLAVOR_DECAY;
184 foundProgenitor =
true;
191 if (!foundProgenitor) {
192 if (flavorSource == FlavorHistory::FLAVOR_NULL)
193 flavorSource = FlavorHistory::FLAVOR_GS;
202 foundProgenitor =
true;
211 if (!foundProgenitor)
212 progenitorIndex = j_max;
216 partonIndices.push_back(partonIndex);
217 progenitorIndices.push_back(progenitorIndex);
218 flavorSources.push_back(flavorSource);
219 sisterIndices.push_back(-1);
229 cout <<
"Making sisters" << endl;
231 if (partonIndices.size() == progenitorIndices.size() && !partonIndices.empty()) {
233 for (
unsigned int ii = 0;
ii < partonIndices.size(); ++
ii) {
237 cout <<
" Sister candidate particle 1: " <<
ii <<
", pdgid = " << candi->
pdgId()
238 <<
", status = " << candi->
status() << endl;
242 for (
unsigned int jj = 0;
jj < partonIndices.size(); ++
jj) {
246 cout <<
" Sister candidate particle 2: " <<
jj <<
", pdgid = " << candj->
pdgId()
247 <<
", status = " << candj->
status() << endl;
251 sisterIndices[
ii] = partonIndices[
jj];
253 cout <<
"Parton " << partonIndices[
ii] <<
" has sister " << sisterIndices[
ii] << endl;
259 if (sisterIndices[
ii] < 0) {
261 cout <<
"No sister. Classified as flavor excitation" << endl;
262 flavorSources[
ii] = FlavorHistory::FLAVOR_EXC;
266 cout <<
"Getting matched jet" << endl;
273 cout <<
"Getting sister jet" << endl;
276 (sisterIndices[
ii] >= 0 && static_cast<unsigned int>(sisterIndices[
ii]) <
particles.size())
281 cout <<
"Making matched shallow clones : ";
285 cout <<
" found" << endl;
289 cout <<
" NOT found" << endl;
293 cout <<
"Making sister shallow clones : ";
295 if (sister != matchedEnd) {
297 cout <<
" found" << endl;
301 cout <<
" NOT found" << endl;
305 cout <<
"Making history object" << endl;
310 progenitorIndices[
ii],
315 cout <<
"Adding flavor history : " << history << endl;
316 flavorHistoryEvent->push_back(history);
321 if (flavorHistoryEvent->size() > 0) {
324 cout <<
"Caching flavor history event" << endl;
325 flavorHistoryEvent->cache();
328 cout <<
"Outputting pdg id = " <<
pdgIdToSelect_ <<
" with nelements = " << flavorHistoryEvent->size() << endl;
329 vector<FlavorHistory>::const_iterator
i = flavorHistoryEvent->begin(), iend = flavorHistoryEvent->end();
330 for (;
i != iend; ++
i) {
References funct::abs(), edm::View< T >::begin(), gather_cfg::cout, edm::View< T >::end(), PVValHelper::eta, etaMaxShower_, spr::find(), flavorHistoryName_, newFWLiteAna::found, getAncestors(), edm::Event::getByToken(), getClosestJet(), mps_fire::i, cuy::ii, dqmiolumiharvest::j, findQualityFiles::jj, muonTagProbeFilters_cff::matched, matchedSrcToken_, eostools::move(), reco::Candidate::numberOfMothers(), AlCaHLTBitMon_ParallelJobs::p, ecalTrigSettings_cff::particles, EgammaValidation_cff::pdgId, reco::Candidate::pdgId(), pdgIdToSelect_, ptMinShower_, edm::Event::put(), srcToken_, mps_update::status, reco::Candidate::status(), and verbose_.