CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Typedefs | Functions
TtEvtBuilder.cc File Reference
#include <vector>
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/global/EDProducer.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Utilities/interface/transform.h"
#include "AnalysisDataFormats/TopObjects/interface/TtEvent.h"
#include "AnalysisDataFormats/TopObjects/interface/TtGenEvent.h"
#include "AnalysisDataFormats/TopObjects/interface/TtFullHadronicEvent.h"
#include "AnalysisDataFormats/TopObjects/interface/TtSemiLeptonicEvent.h"
#include "AnalysisDataFormats/TopObjects/interface/TtFullLeptonicEvent.h"
#include "FWCore/Framework/interface/MakerMacros.h"

Go to the source code of this file.

Classes

class  TtEvtBuilder< C >
 Template class to fill the TtEvent structure. More...
 

Typedefs

using TtFullHadEvtBuilder = TtEvtBuilder< TtFullHadronicEvent >
 
using TtFullLepEvtBuilder = TtEvtBuilder< TtFullLeptonicEvent >
 
using TtSemiLepEvtBuilder = TtEvtBuilder< TtSemiLeptonicEvent >
 

Functions

 decayChnTop1_ (cfg.getParameter< int >("decayChannel1"))
 
 decayChnTop2_ (cfg.getParameter< int >("decayChannel2"))
 
 genEvt_ (cfg.getParameter< edm::InputTag >("genEvent"))
 
 genEvtToken_ (mayConsume< TtGenEvent >(genEvt_))
 
 hypJetTokens_ (edm::vector_transform(cfg.getParameter< std::vector< edm::InputTag > >("hypotheses"), [this](edm::InputTag const &tag){return consumes< int >(edm::InputTag(tag.label(),"NumberOfConsideredJets"));}))
 
 hypNeutrTokens_ (edm::vector_transform(cfg.getParameter< std::vector< edm::InputTag > >("hypotheses"), [this](edm::InputTag const &tag){return consumes< int >(edm::InputTag(tag.label(),"NumberOfRealNeutrinoSolutions"));}))
 
 hypTokens_ (edm::vector_transform(cfg.getParameter< std::vector< edm::InputTag > >("hypotheses"), [this](edm::InputTag const &tag){return consumes< std::vector< TtEvent::HypoCombPair > >(tag);}))
 
static const
edm::ParameterSetDescriptionFillerPluginFactory::PMaker
< edm::ParameterSetDescriptionFiller
< TtFullHadEvtBuilder > > 
s_filler__LINE__ ("TtFullHadEvtBuilder")
 
static const
edm::ParameterSetDescriptionFillerPluginFactory::PMaker
< edm::ParameterSetDescriptionFiller
< TtFullLepEvtBuilder > > 
s_filler__LINE__ ("TtFullLepEvtBuilder")
 
static const
edm::ParameterSetDescriptionFillerPluginFactory::PMaker
< edm::ParameterSetDescriptionFiller
< TtSemiLepEvtBuilder > > 
s_filler__LINE__ ("TtSemiLepEvtBuilder")
 
static const
edm::MakerPluginFactory::PMaker
< edm::WorkerMaker
< TtFullHadEvtBuilder > > 
s_maker__LINE__ ("TtFullHadEvtBuilder")
 
static const
edm::MakerPluginFactory::PMaker
< edm::WorkerMaker
< TtFullLepEvtBuilder > > 
s_maker__LINE__ ("TtFullLepEvtBuilder")
 
static const
edm::MakerPluginFactory::PMaker
< edm::WorkerMaker
< TtSemiLepEvtBuilder > > 
s_maker__LINE__ ("TtSemiLepEvtBuilder")
 

Typedef Documentation

Definition at line 251 of file TtEvtBuilder.cc.

Definition at line 252 of file TtEvtBuilder.cc.

Definition at line 253 of file TtEvtBuilder.cc.

Function Documentation

decayChnTop1_ ( cfg.getParameter< int >  "decayChannel1")
decayChnTop2_ ( cfg.getParameter< int >  "decayChannel2")

Definition at line 113 of file TtEvtBuilder.cc.

References looper::cfg.

Referenced by TtEvtBuilder< C >::produce().

113  {
114  // parameter subsets for kKinFit
115  if (cfg.exists("kinFit")) {
116  kinFit_ = cfg.getParameter<edm::ParameterSet>("kinFit");
117  fitChi2Token_ = mayConsume<std::vector<double> >(kinFit_.getParameter<edm::InputTag>("chi2"));
118  fitProbToken_ = mayConsume<std::vector<double> >(kinFit_.getParameter<edm::InputTag>("prob"));
119  }
120  // parameter subsets for kHitFit
121  if (cfg.exists("hitFit")) {
122  hitFit_ = cfg.getParameter<edm::ParameterSet>("hitFit");
123  hitFitChi2Token_ = mayConsume<std::vector<double> >(hitFit_.getParameter<edm::InputTag>("chi2"));
124  hitFitProbToken_ = mayConsume<std::vector<double> >(hitFit_.getParameter<edm::InputTag>("prob"));
125  hitFitMTToken_ = mayConsume<std::vector<double> >(hitFit_.getParameter<edm::InputTag>("mt"));
126  hitFitSigMTToken_ = mayConsume<std::vector<double> >(hitFit_.getParameter<edm::InputTag>("sigmt"));
127  }
128  // parameter subsets for kKinSolution
129  if (cfg.exists("kinSolution")) {
130  kinSolution_ = cfg.getParameter<edm::ParameterSet>("kinSolution");
131  solWeightToken_ = mayConsume<std::vector<double> >(kinSolution_.getParameter<edm::InputTag>("solWeight"));
132  wrongChargeToken_ = mayConsume<bool>(kinSolution_.getParameter<edm::InputTag>("wrongCharge"));
133  }
134  // parameter subsets for kGenMatch
135  if (cfg.exists("genMatch")) {
136  genMatch_ = cfg.getParameter<edm::ParameterSet>("genMatch");
137  sumPtToken_ = mayConsume<std::vector<double> >(genMatch_.getParameter<edm::InputTag>("sumPt"));
138  sumDRToken_ = mayConsume<std::vector<double> >(genMatch_.getParameter<edm::InputTag>("sumDR"));
139  }
140  // parameter subsets for kMvaDisc
141  if (cfg.exists("mvaDisc")) {
142  mvaDisc_ = cfg.getParameter<edm::ParameterSet>("mvaDisc");
143  methToken_ = mayConsume<std::string>(mvaDisc_.getParameter<edm::InputTag>("meth"));
144  discToken_ = mayConsume<std::vector<double> >(mvaDisc_.getParameter<edm::InputTag>("disc"));
145  }
146  // produces a TtEventEvent for:
147  // * TtSemiLeptonicEvent
148  // * TtFullLeptonicEvent
149  // * TtFullHadronicEvent
150  // from hypotheses and associated extra information
151  putToken_ = produces<C>();
152 }
tuple cfg
Definition: looper.py:296
genEvt_ ( cfg.getParameter< edm::InputTag "genEvent")
genEvtToken_ ( mayConsume< TtGenEvent genEvt_)
hypJetTokens_ ( edm::  vector_transformcfg.getParameter< std::vector< edm::InputTag > >("hypotheses"),[this](edm::InputTag const &tag){return consumes< int >(edm::InputTag(tag.label(),"NumberOfConsideredJets"));})
hypNeutrTokens_ ( edm::  vector_transformcfg.getParameter< std::vector< edm::InputTag > >("hypotheses"),[this](edm::InputTag const &tag){return consumes< int >(edm::InputTag(tag.label(),"NumberOfRealNeutrinoSolutions"));})
hypTokens_ ( edm::  vector_transformcfg.getParameter< std::vector< edm::InputTag > >("hypotheses"),[this](edm::InputTag const &tag){return consumes< std::vector< TtEvent::HypoCombPair > >(tag);})
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::ParameterSetDescriptionFiller< TtFullHadEvtBuilder > > s_filler__LINE__ ( "TtFullHadEvtBuilder"  )
static
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::ParameterSetDescriptionFiller< TtFullLepEvtBuilder > > s_filler__LINE__ ( "TtFullLepEvtBuilder"  )
static
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::ParameterSetDescriptionFiller< TtSemiLepEvtBuilder > > s_filler__LINE__ ( "TtSemiLepEvtBuilder"  )
static
static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< TtFullHadEvtBuilder > > s_maker__LINE__ ( "TtFullHadEvtBuilder"  )
static
static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< TtFullLepEvtBuilder > > s_maker__LINE__ ( "TtFullLepEvtBuilder"  )
static
static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< TtSemiLepEvtBuilder > > s_maker__LINE__ ( "TtSemiLepEvtBuilder"  )
static