|
|
#include <TtSemiLepHitFitProducer.h>
|
| TtSemiLepHitFitProducer (const edm::ParameterSet &) |
|
| ~TtSemiLepHitFitProducer () override |
|
| 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::vector< ModuleDescription const * > &modules, 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) |
|
template<typename LeptonCollection>
class TtSemiLepHitFitProducer< LeptonCollection >
Definition at line 20 of file TtSemiLepHitFitProducer.h.
◆ PatHitFit
template<typename LeptonCollection >
◆ TtSemiLepHitFitProducer()
template<typename LeptonCollection >
Definition at line 99 of file TtSemiLepHitFitProducer.h.
109 mW_(
cfg.getParameter<
double>(
"mW")),
110 mTop_(
cfg.getParameter<
double>(
"mTop")),
112 jes_(
cfg.getParameter<
double>(
"jes")),
113 jesB_(
cfg.getParameter<
double>(
"jesB")),
154 <<
"+++++++++++ TtSemiLepHitFitProducer ++++++++++++ \n"
155 <<
" Due to the eta ranges for which resolutions \n"
156 <<
" are provided in \n"
157 <<
" TopQuarkAnalysis/TopHitFit/data/resolution/ \n"
158 <<
" so far, the following cuts are currently \n"
159 <<
" implemented in the TtSemiLepHitFitProducer: \n"
160 <<
" |eta(muons )| <= " <<
maxEtaMu_ <<
" \n"
161 <<
" |eta(electrons)| <= " <<
maxEtaEle_ <<
" \n"
163 <<
"++++++++++++++++++++++++++++++++++++++++++++++++ \n";
165 produces<std::vector<pat::Particle> >(
"PartonsHadP");
166 produces<std::vector<pat::Particle> >(
"PartonsHadQ");
167 produces<std::vector<pat::Particle> >(
"PartonsHadB");
168 produces<std::vector<pat::Particle> >(
"PartonsLepB");
169 produces<std::vector<pat::Particle> >(
"Leptons");
170 produces<std::vector<pat::Particle> >(
"Neutrinos");
172 produces<std::vector<std::vector<int> > >();
173 produces<std::vector<double> >(
"Chi2");
174 produces<std::vector<double> >(
"Prob");
175 produces<std::vector<double> >(
"MT");
176 produces<std::vector<double> >(
"SigMT");
177 produces<std::vector<int> >(
"Status");
178 produces<int>(
"NumberOfConsideredJets");
References TtSemiLepHitFitProducer< LeptonCollection >::electronTranslator_, edm::FileInPath::fullPath(), TtSemiLepHitFitProducer< LeptonCollection >::HitFit, TtSemiLepHitFitProducer< LeptonCollection >::hitfitDefault_, TtSemiLepHitFitProducer< LeptonCollection >::jetTranslator_, TtSemiLepHitFitProducer< LeptonCollection >::maxEtaEle_, TtSemiLepHitFitProducer< LeptonCollection >::maxEtaJet_, TtSemiLepHitFitProducer< LeptonCollection >::maxEtaMu_, TtSemiLepHitFitProducer< LeptonCollection >::metTranslator_, TtSemiLepHitFitProducer< LeptonCollection >::mTop_, TtSemiLepHitFitProducer< LeptonCollection >::muonTranslator_, and TtSemiLepHitFitProducer< LeptonCollection >::mW_.
◆ ~TtSemiLepHitFitProducer()
template<typename LeptonCollection >
◆ produce()
template<typename LeptonCollection >
Implements edm::EDProducer.
Definition at line 187 of file TtSemiLepHitFitProducer.h.
188 std::unique_ptr<std::vector<pat::Particle> > pPartonsHadP(
new std::vector<pat::Particle>);
189 std::unique_ptr<std::vector<pat::Particle> > pPartonsHadQ(
new std::vector<pat::Particle>);
190 std::unique_ptr<std::vector<pat::Particle> > pPartonsHadB(
new std::vector<pat::Particle>);
191 std::unique_ptr<std::vector<pat::Particle> > pPartonsLepB(
new std::vector<pat::Particle>);
192 std::unique_ptr<std::vector<pat::Particle> > pLeptons(
new std::vector<pat::Particle>);
193 std::unique_ptr<std::vector<pat::Particle> > pNeutrinos(
new std::vector<pat::Particle>);
195 std::unique_ptr<std::vector<std::vector<int> > > pCombi(
new std::vector<std::vector<int> >);
196 std::unique_ptr<std::vector<double> > pChi2(
new std::vector<double>);
197 std::unique_ptr<std::vector<double> > pProb(
new std::vector<double>);
198 std::unique_ptr<std::vector<double> > pMT(
new std::vector<double>);
199 std::unique_ptr<std::vector<double> > pSigMT(
new std::vector<double>);
200 std::unique_ptr<std::vector<int> > pStatus(
new std::vector<int>);
201 std::unique_ptr<int> pJetsConsidered(
new int);
223 bool foundLepton =
false;
224 if (!
leps->empty()) {
226 if (!dynamic_cast<const reco::Muon*>(&((*
leps)[0])))
228 for (
unsigned iLep = 0; iLep < (*leps).size() && !foundLepton; ++iLep) {
237 unsigned int nJetsFound = 0;
238 for (
unsigned iJet = 0; iJet < (*jets).size() && (
int)nJetsFound !=
maxNJets_; ++iJet) {
239 double jet_eta = (*jets)[iJet].eta();
240 if ((*
jets)[iJet].isCaloJet()) {
241 jet_eta = ((
reco::CaloJet*)((*
jets)[iJet]).originalObject())->detectorP4().eta();
248 *pJetsConsidered = nJetsFound;
254 if (!foundLepton ||
mets->empty() || nJetsFound <
nPartons) {
263 std::vector<int> invalidCombi;
265 invalidCombi.push_back(-1);
266 pCombi->push_back(invalidCombi);
268 pChi2->push_back(-1.);
270 pProb->push_back(-1.);
273 pSigMT->push_back(-1.);
275 pStatus->push_back(-1);
289 evt.
put(
std::move(pJetsConsidered),
"NumberOfConsideredJets");
293 std::list<FitResult> FitResultList;
306 size_t nHitFitJet = 0;
309 std::vector<hitfit::Fit_Result> hitFitResult;
330 for (
size_t fit = 0;
fit != nHitFit; ++
fit) {
341 std::vector<int> hitCombi(4);
342 for (
size_t jet = 0;
jet != nHitFitJet; ++
jet) {
380 if (hitFitResult[
fit].chisq() > 0
390 result.Prob =
exp(-1.0 * (hitFitResult[
fit].chisq()) / 2.0);
392 result.SigMT = hitFitResult[
fit].sigmt();
406 fittedEvent.
met().x(), fittedEvent.
met().y(), fittedEvent.
met().z(), fittedEvent.
met().t()),
408 result.JetCombi = hitCombi;
410 FitResultList.push_back(
result);
415 FitResultList.sort();
422 if (((
unsigned)FitResultList.size()) < 1) {
430 std::vector<int> invalidCombi;
432 invalidCombi.push_back(-1);
433 pCombi->push_back(invalidCombi);
435 pChi2->push_back(-1.);
437 pProb->push_back(-1.);
440 pSigMT->push_back(-1.);
442 pStatus->push_back(-1);
444 unsigned int iComb = 0;
445 for (
typename std::list<FitResult>::const_iterator
result = FitResultList.begin();
result != FitResultList.end();
451 pPartonsHadP->push_back(
result->HadP);
452 pPartonsHadQ->push_back(
result->HadQ);
453 pPartonsHadB->push_back(
result->HadB);
454 pPartonsLepB->push_back(
result->LepB);
456 pLeptons->push_back(
result->LepL);
458 pNeutrinos->push_back(
result->LepN);
460 pCombi->push_back(
result->JetCombi);
462 pChi2->push_back(
result->Chi2);
464 pProb->push_back(
result->Prob);
466 pMT->push_back(
result->MT);
467 pSigMT->push_back(
result->SigMT);
469 pStatus->push_back(
result->Status);
484 evt.
put(
std::move(pJetsConsidered),
"NumberOfConsideredJets");
References funct::abs(), PVValHelper::eta, JetChargeProducer_cfi::exp, L1TowerCalibrationProducer_cfi::fit, edm::Event::getByToken(), TtSemiLepEvtPartons::HadB, mps_fire::i, createfilelist::int, metsig::jet, hitfit::Lepjets_Event::jet(), singleTopDQM_cfi::jets, hitfit::Lepjets_Event::lep(), TtSemiLepEvtPartons::LepB, TtSemiLepHitFitProducer_Electrons_cfi::leps, TtSemiLepEvtPartons::LightQ, TtSemiLepEvtPartons::LightQBar, hitfit::Lepjets_Event::met(), singleTopDQM_cfi::mets, eostools::move(), nPartons, hitfit::Lepjets_Event_Lep::p(), edm::Event::put(), mps_fire::result, hitfit::Lepjets_Event_Lep::type(), and trackerHitRTTI::vector.
◆ bTagAlgo_
template<typename LeptonCollection >
◆ electronTranslator_
template<typename LeptonCollection >
◆ HitFit
template<typename LeptonCollection >
◆ hitfitBJetResolution_
template<typename LeptonCollection >
◆ hitfitDefault_
template<typename LeptonCollection >
◆ hitfitElectronResolution_
template<typename LeptonCollection >
◆ hitfitMETResolution_
template<typename LeptonCollection >
◆ hitfitMuonResolution_
template<typename LeptonCollection >
◆ hitfitUdscJetResolution_
template<typename LeptonCollection >
◆ jes_
template<typename LeptonCollection >
◆ jesB_
template<typename LeptonCollection >
◆ jetCorrectionLevel_
template<typename LeptonCollection >
◆ jetsToken_
template<typename LeptonCollection >
◆ jetTranslator_
template<typename LeptonCollection >
◆ lepsToken_
template<typename LeptonCollection >
◆ maxBTagValueNonBJet_
template<typename LeptonCollection >
◆ maxEtaEle_
template<typename LeptonCollection >
◆ maxEtaJet_
template<typename LeptonCollection >
◆ maxEtaMu_
template<typename LeptonCollection >
◆ maxNComb_
template<typename LeptonCollection >
◆ maxNJets_
template<typename LeptonCollection >
◆ metsToken_
template<typename LeptonCollection >
◆ metTranslator_
template<typename LeptonCollection >
◆ minBTagValueBJet_
template<typename LeptonCollection >
◆ mTop_
template<typename LeptonCollection >
◆ muonTranslator_
template<typename LeptonCollection >
◆ mW_
template<typename LeptonCollection >
◆ useBTag_
template<typename LeptonCollection >
double jes_
jet energy scale
Jets made from CaloTowers.
void clear()
Clear the internal event, fit results, and jets.
hitfit::LeptonTranslatorBase< pat::Electron > electronTranslator_
edm::FileInPath hitfitMETResolution_
Lepjets_Event_Lep & lep(std::vector< Lepjets_Event_Lep >::size_type i)
Return a reference to lepton at index position i.
edm::EDGetTokenT< std::vector< pat::MET > > metsToken_
void AddJet(const AJet &jet, bool useObjRes=false)
Add one jet into the internal event. This function will do nothing if the internal event has already ...
hitfit::LeptonTranslatorBase< pat::Muon > muonTranslator_
std::vector< Fit_Result > GetFitAllPermutation()
Return the results of fitting all permutations of the internal event.
double maxEtaJet_
maximum eta value for jets, needed to limited range in which resolutions are provided
edm::FileInPath hitfitUdscJetResolution_
Fourvec & met()
Return a reference to the missing transverse energy.
Represent a simple event consisting of lepton(s) and jet(s). An instance of this class holds a list o...
A class to represent a jet in an instance of Lepjets_Event class. The class is derived from the Lepje...
bool useBTag_
switch to tell whether to use b-tagging or not
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void SetMet(const AMet &met, bool useObjRes=false)
Set the missing transverse energy of the internal event.
edm::FileInPath hitfitMuonResolution_
edm::EDGetTokenT< std::vector< pat::Jet > > jetsToken_
hitfit::METTranslatorBase< pat::MET > metTranslator_
XYZPointD XYZPoint
point in space with cartesian internal representation
edm::FileInPath hitfitBJetResolution_
Fourvec & p()
Return a reference to the four-momentum.
int maxNJets_
maximal number of jets (-1 possible to indicate 'all')
static const unsigned int nPartons
int & type()
Return a reference to the type code.
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< LeptonCollection > lepsToken_
edm::FileInPath hitfitElectronResolution_
std::string jetCorrectionLevel_
jet correction level
void AddLepton(const AElectron &electron, bool useObjRes=false)
Add one electron into the internal event.
Lepjets_Event_Jet & jet(std::vector< Lepjets_Event_Jet >::size_type i)
Return a reference to jet at index position i.
std::vector< Lepjets_Event > GetUnfittedEvent()
Return the unfitted events for all permutations.
Log< level::Info, true > LogVerbatim
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
double maxEtaMu_
maximum eta value for muons, needed to limited range in which resolutions are provided
hitfit::RunHitFit< pat::Electron, pat::Muon, pat::Jet, pat::MET > PatHitFit
double minBTagValueBJet_
min value of bTag for a b-jet
Abs< T >::type abs(const T &t)
edm::FileInPath hitfitDefault_
std::string bTagAlgo_
input tag for b-tagging algorithm
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Analysis-level particle class.
std::string fullPath() const
int maxNComb_
maximal number of combinations to be written to the event
std::vector< Fit_Result >::size_type FitAllPermutation()
Fit all permutations of the internal event. Returns the number of permutations.
double maxEtaEle_
maximum eta value for electrons, needed to limited range in which resolutions are provided
Represent a lepton in an instance of Lepjets_Event class. This class hold the following information:
double maxBTagValueNonBJet_
max value of bTag for a non-b-jet
hitfit::JetTranslatorBase< pat::Jet > jetTranslator_