52 std::vector<edm::EDGetTokenT<std::vector<TtEvent::HypoCombPair> > >
hypTokens_;
56 typedef std::vector<edm::EDGetTokenT<std::vector<TtEvent::HypoCombPair> > >::const_iterator
EventHypoToken;
96 : verbosity_(
cfg.getParameter<
int>(
"verbosity")),
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"));
113 genEvtToken_(mayConsume<TtGenEvent>(genEvt_)),
114 decayChnTop1_(
cfg.getParameter<
int>(
"decayChannel1")),
115 decayChnTop2_(
cfg.getParameter<
int>(
"decayChannel2")) {
117 if (
cfg.exists(
"kinFit")) {
119 fitChi2Token_ = mayConsume<std::vector<double> >(kinFit_.getParameter<
edm::InputTag>(
"chi2"));
120 fitProbToken_ = mayConsume<std::vector<double> >(kinFit_.getParameter<
edm::InputTag>(
"prob"));
123 if (
cfg.exists(
"hitFit")) {
125 hitFitChi2Token_ = mayConsume<std::vector<double> >(hitFit_.getParameter<
edm::InputTag>(
"chi2"));
126 hitFitProbToken_ = mayConsume<std::vector<double> >(hitFit_.getParameter<
edm::InputTag>(
"prob"));
127 hitFitMTToken_ = mayConsume<std::vector<double> >(hitFit_.getParameter<
edm::InputTag>(
"mt"));
128 hitFitSigMTToken_ = mayConsume<std::vector<double> >(hitFit_.getParameter<
edm::InputTag>(
"sigmt"));
131 if (
cfg.exists(
"kinSolution")) {
133 solWeightToken_ = mayConsume<std::vector<double> >(kinSolution_.getParameter<
edm::InputTag>(
"solWeight"));
134 wrongChargeToken_ = mayConsume<bool>(kinSolution_.getParameter<
edm::InputTag>(
"wrongCharge"));
137 if (
cfg.exists(
"genMatch")) {
139 sumPtToken_ = mayConsume<std::vector<double> >(genMatch_.getParameter<
edm::InputTag>(
"sumPt"));
140 sumDRToken_ = mayConsume<std::vector<double> >(genMatch_.getParameter<
edm::InputTag>(
"sumDR"));
143 if (
cfg.exists(
"mvaDisc")) {
145 methToken_ = mayConsume<std::string>(mvaDisc_.getParameter<
edm::InputTag>(
"meth"));
146 discToken_ = mayConsume<std::vector<double> >(mvaDisc_.getParameter<
edm::InputTag>(
"disc"));
156 template <
typename C>
165 if (!genEvt_.label().empty())
167 ttEvent.setGenEvent(
genEvt);
173 for (; hKey != hypKeyTokens_.end(); ++hKey, ++
h) {
180 typedef std::vector<TtEvent::HypoCombPair>::const_iterator HypMatch;
181 for (HypMatch hm = hypMatchVec->begin(); hm != hypMatchVec->end(); ++hm) {
194 ttEvent.setFitProb(*fitProb);
201 ttEvent.setHitFitChi2(*hitFitChi2);
205 ttEvent.setHitFitProb(*hitFitProb);
209 ttEvent.setHitFitMT(*hitFitMT);
212 evt.
getByToken(hitFitSigMTToken_, hitFitSigMT);
213 ttEvent.setHitFitSigMT(*hitFitSigMT);
220 ttEvent.setGenMatchSumPt(*
sumPt);
224 ttEvent.setGenMatchSumDR(*
sumDR);
231 ttEvent.setMvaMethod(*
meth);
235 ttEvent.setMvaDiscriminators(*
disc);
239 fillSpecific(ttEvent, evt);
242 ttEvent.print(verbosity_);
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);