52 std::vector<edm::EDGetTokenT<std::vector<TtEvent::HypoCombPair> > >
hypTokens_;
56 typedef std::vector<edm::EDGetTokenT<std::vector<TtEvent::HypoCombPair> > >::const_iterator
EventHypoToken;
101 cfg.getParameter<std::vector<edm::InputTag> >(
"hypotheses"),
102 [
this](
edm::InputTag const&
tag) { return consumes<std::vector<TtEvent::HypoCombPair> >(tag); })),
105 return consumes<int>(
106 edm::InputTag(tag.label(),
"NumberOfRealNeutrinoSolutions"));
110 return consumes<int>(edm::InputTag(tag.label(),
"NumberOfConsideredJets"));
117 if (
cfg.exists(
"kinFit")) {
123 if (
cfg.exists(
"hitFit")) {
131 if (
cfg.exists(
"kinSolution")) {
137 if (
cfg.exists(
"genMatch")) {
143 if (
cfg.exists(
"mvaDisc")) {
156 template <
typename C>
167 ttEvent.setGenEvent(genEvt);
180 typedef std::vector<TtEvent::HypoCombPair>::const_iterator HypMatch;
181 for (HypMatch hm = hypMatchVec->begin(); hm != hypMatchVec->end(); ++hm) {
190 ttEvent.setFitChi2(*fitChi2);
194 ttEvent.setFitProb(*fitProb);
201 ttEvent.setHitFitChi2(*hitFitChi2);
205 ttEvent.setHitFitProb(*hitFitProb);
209 ttEvent.setHitFitMT(*hitFitMT);
213 ttEvent.setHitFitSigMT(*hitFitSigMT);
220 ttEvent.setGenMatchSumPt(*sumPt);
224 ttEvent.setGenMatchSumDR(*sumDR);
231 ttEvent.setMvaMethod(*meth);
235 ttEvent.setMvaDiscriminators(*disc);
245 std::unique_ptr<C> pOut(
new C);
272 for (; hKey !=
hypKeyTokens_.end(); ++hKey, ++hNeutr, ++hJet) {
278 evt.
getByToken(*hNeutr, numberOfRealNeutrinoSolutions);
283 evt.
getByToken(*hJet, numberOfConsideredJets);
edm::EDGetTokenT< std::vector< double > > solWeightToken_
void setWrongCharge(const bool &val)
set right or wrong charge combination of kKinSolution hypothesis
T getParameter(std::string const &) const
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
HypoClassKey
supported classes of event hypotheses
bool isHypoAvailable(const std::string &key, const unsigned &cmb=0) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< std::vector< double > > hitFitMTToken_
edm::EDGetTokenT< std::string > methToken_
TtEvtBuilder(const edm::ParameterSet &)
default constructor
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::InputTag genEvt_
TtGenEvent.
void setNumberOfRealNeutrinoSolutions(const HypoClassKey &key, const int &nr)
set number of real neutrino solutions for a given hypo class
Class derived from the TtEvent for the semileptonic decay channel.
std::vector< edm::EDGetTokenT< std::vector< TtEvent::HypoCombPair > > > hypTokens_
std::vector< edm::EDGetTokenT< int > >::const_iterator EventHypoIntToken
static double fitChi2(const CachingVertex< 5 > &vtx)
edm::ParameterSet genMatch_
std::vector< edm::EDGetTokenT< int > > hypNeutrTokens_
edm::EDGetTokenT< std::vector< double > > sumDRToken_
Template class to fill the TtEvent structure.
std::vector< edm::EDGetTokenT< int > > hypKeyTokens_
vector of hypothesis class names
virtual void fillSpecific(C &, const edm::Event &)
fill data members that are decay-channel specific
edm::EDGetTokenT< std::vector< double > > discToken_
std::vector< edm::EDGetTokenT< int > > hypJetTokens_
int verbosity_
vebosity level
edm::EDGetTokenT< std::vector< double > > hitFitSigMTToken_
edm::ParameterSet mvaDisc_
edm::EDGetTokenT< bool > wrongChargeToken_
~TtEvtBuilder() override
default destructor
Class derived from the TtEvent for the full leptonic decay channel.
edm::EDGetTokenT< std::vector< double > > fitChi2Token_
void setSolWeight(const std::vector< double > &val)
set weight of kKinSolution hypothesis
edm::ParameterSet kinFit_
edm::ParameterSet kinSolution_
Class derived from the TtEvent for the full hadronic decay channel.
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
edm::EDGetTokenT< std::vector< double > > hitFitChi2Token_
std::vector< edm::EDGetTokenT< std::vector< TtEvent::HypoCombPair > > >::const_iterator EventHypoToken
void produce(edm::Event &, const edm::EventSetup &) override
edm::ParameterSet hitFit_
edm::EDGetTokenT< std::vector< double > > fitProbToken_
void setNumberOfConsideredJets(const HypoClassKey &key, const unsigned int nJets)
set number of jets considered when building a given hypothesis
edm::EDGetTokenT< std::vector< double > > sumPtToken_
edm::EDGetTokenT< TtGenEvent > genEvtToken_
edm::EDGetTokenT< std::vector< double > > hitFitProbToken_