|
| TtSemiLepJetCombMaxSumPtWMass (const edm::ParameterSet &) |
|
| EDProducer ()=default |
|
| EDProducer (const EDProducer &)=delete |
|
bool | hasAbilityToProduceInBeginLumis () const final |
|
bool | hasAbilityToProduceInBeginProcessBlocks () const final |
|
bool | hasAbilityToProduceInBeginRuns () const final |
|
bool | hasAbilityToProduceInEndLumis () const final |
|
bool | hasAbilityToProduceInEndProcessBlocks () const final |
|
bool | hasAbilityToProduceInEndRuns () const final |
|
EDProducer & | operator= (const EDProducer &)=delete |
|
bool | wantsGlobalLuminosityBlocks () const final |
|
bool | wantsGlobalRuns () const final |
|
bool | wantsInputProcessBlocks () const final |
|
bool | wantsProcessBlocks () 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 |
|
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 const &)=delete |
|
| EDConsumerBase (EDConsumerBase &&)=default |
|
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 const & | operator= (EDConsumerBase const &)=delete |
|
EDConsumerBase & | operator= (EDConsumerBase &&)=default |
|
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) |
|
|
typedef EDProducerBase | ModuleType |
|
template<typename T > |
using | BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T > |
|
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) |
|
template<Transition Tr = Transition::Event> |
auto | produces (std::string instanceName) noexcept |
| declare what type of product will make and with which optional label More...
|
|
template<Transition B> |
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) |
|
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 () |
|
template<typename ProductType , BranchType B> |
BranchAliasSetterT< ProductType > | produces (std::string instanceName) |
|
template<typename ProductType , BranchType B> |
BranchAliasSetterT< ProductType > | produces () |
|
template<class ProductType > |
BranchAliasSetterT< ProductType > | produces (std::string instanceName) |
|
template<typename ProductType , Transition B> |
BranchAliasSetterT< ProductType > | produces () |
|
template<Transition Tr = Transition::Event> |
auto | produces () noexcept |
|
ProducesCollector | producesCollector () |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
|
template<BranchType B = InEvent> |
EDConsumerBaseAdaptor< B > | consumes (edm::InputTag tag) noexcept |
|
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes () |
|
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag const &tag) |
|
template<Transition Tr = Transition::Event> |
constexpr auto | esConsumes () |
|
template<Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag tag) |
|
template<Transition Tr = Transition::Event> |
ESGetTokenGeneric | esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey) |
| Used with EventSetupRecord::doGet. More...
|
|
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) |
|
void | resetItemsToGetFrom (BranchType iType) |
|
Implements edm::global::EDProducerBase.
Definition at line 46 of file TtSemiLepJetCombMaxSumPtWMass.cc.
References bTagAlgorithm_, spr::find(), edm::Event::get(), TtSemiLepEvtPartons::HadB, mps_fire::i, heavyIonCSV_trainingSettings::idx, isValid(), PDWG_EXODelayedJetMET_cff::jets, jetsToken_, TtSemiLepEvtPartons::LepB, TtSemiLepHitFitProducer_Electrons_cfi::leps, lepsToken_, TtSemiLepEvtPartons::LightQ, TtSemiLepEvtPartons::LightQBar, match(), maxBDiscLightJets_, SUSYDQMAnalyzer_cfi::maxNJets, maxNJets_, PV_cfg::maxPt, minBDiscBJets_, eostools::move(), edm::Event::put(), useBTagging_, and wMass_.
47 auto pOut = std::make_unique<std::vector<std::vector<int>>>();
48 auto pJetsConsidered = std::make_unique<int>(0);
50 std::vector<int>
match;
51 for (
unsigned int i = 0;
i < 4; ++
i)
61 if (
leps.empty() ||
jets.size() < 4) {
62 pOut->push_back(
match);
64 *pJetsConsidered =
jets.size();
65 evt.
put(
std::move(pJetsConsidered),
"NumberOfConsideredJets");
73 evt.
put(
std::move(pJetsConsidered),
"NumberOfConsideredJets");
75 std::vector<bool> isBJet;
76 std::vector<bool> isLJet;
92 std::vector<int> maxPtIndices;
93 maxPtIndices.push_back(-1);
94 maxPtIndices.push_back(-1);
95 maxPtIndices.push_back(-1);
99 for (
unsigned jdx = (
idx + 1); jdx <
maxNJets; ++jdx) {
100 if (jdx ==
idx || (
useBTagging_ && (!isLJet[jdx] || (cntBJets <= 2 && isBJet[jdx]) ||
101 (cntBJets == 3 && isBJet[
idx] && isBJet[jdx]))))
103 for (
unsigned kdx = 0; kdx <
maxNJets; ++kdx) {
109 maxPtIndices.clear();
110 maxPtIndices.push_back(
idx);
111 maxPtIndices.push_back(jdx);
112 maxPtIndices.push_back(kdx);
123 std::vector<int> closestToWMassIndices;
124 closestToWMassIndices.push_back(-1);
125 closestToWMassIndices.push_back(-1);
127 for (
unsigned idx = 0;
idx < maxPtIndices.size(); ++
idx) {
128 for (
unsigned jdx = 0; jdx < maxPtIndices.size(); ++jdx) {
129 if (jdx ==
idx || maxPtIndices[
idx] > maxPtIndices[jdx] ||
131 (!isLJet[maxPtIndices[
idx]] || !isLJet[maxPtIndices[jdx]] ||
132 (cntBJets <= 2 && isBJet[maxPtIndices[
idx]]) || (cntBJets <= 2 && isBJet[maxPtIndices[jdx]]) ||
133 (cntBJets == 3 && isBJet[maxPtIndices[
idx]] && isBJet[maxPtIndices[jdx]]))))
136 if (wDist < 0. || wDist > fabs(sum.mass() -
wMass_)) {
137 wDist = fabs(sum.mass() -
wMass_);
138 closestToWMassIndices.clear();
139 closestToWMassIndices.push_back(maxPtIndices[
idx]);
140 closestToWMassIndices.push_back(maxPtIndices[jdx]);
146 for (
unsigned idx = 0;
idx < maxPtIndices.size(); ++
idx) {
148 if (
std::find(closestToWMassIndices.begin(), closestToWMassIndices.end(), maxPtIndices[
idx]) ==
149 closestToWMassIndices.end()) {
150 hadB = maxPtIndices[
idx];
166 if (
std::find(maxPtIndices.begin(), maxPtIndices.end(),
idx) == maxPtIndices.end()) {
180 pOut->push_back(
match);
bool isValid(const int &idx, const std::vector< pat::Jet > &jets) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool get(ProductID const &oid, Handle< PROD > &result) const
std::string bTagAlgorithm_
edm::EDGetTokenT< std::vector< pat::Jet > > jetsToken_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
edm::EDGetTokenT< edm::View< reco::RecoCandidate > > lepsToken_
double maxBDiscLightJets_
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
math::XYZTLorentzVector LorentzVector
Lorentz vector.