56 std::vector<edm::EDGetTokenT<std::vector<TtEvent::HypoCombPair> > >
hypTokens_;
60 typedef std::vector<edm::EDGetTokenT<std::vector<TtEvent::HypoCombPair> > >::const_iterator
EventHypoToken;
111 if(
cfg.exists(
"kinFit") ) {
117 if(
cfg.exists(
"hitFit") ) {
125 if(
cfg.exists(
"kinSolution") ) {
131 if(
cfg.exists(
"genMatch") ) {
137 if(
cfg.exists(
"mvaDisc") ) {
150 template <
typename C>
163 ttEvent.setGenEvent(genEvt);
176 typedef std::vector<TtEvent::HypoCombPair>::const_iterator HypMatch;
177 for(HypMatch hm=hypMatchVec->begin(); hm != hypMatchVec->end(); ++hm){
186 ttEvent.setFitChi2( *fitChi2 );
190 ttEvent.setFitProb( *fitProb );
197 ttEvent.setHitFitChi2( *hitFitChi2 );
201 ttEvent.setHitFitProb( *hitFitProb );
205 ttEvent.setHitFitMT( *hitFitMT );
209 ttEvent.setHitFitSigMT( *hitFitSigMT );
216 ttEvent.setGenMatchSumPt( *sumPt );
220 ttEvent.setGenMatchSumDR( *sumDR );
227 ttEvent.setMvaMethod( *meth );
231 ttEvent.setMvaDiscriminators( *disc );
241 std::unique_ptr<C> pOut(
new C);
275 for( ; hKey !=
hypKeyTokens_.end(); ++hKey, ++hNeutr, ++hJet){
281 evt.
getByToken(*hNeutr, numberOfRealNeutrinoSolutions);
286 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
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.
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
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_
def setup(process, global_tag, zero_tesla=False)
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_