CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
TtSemiEvtSolutionMaker Class Reference

#include <TtSemiEvtSolutionMaker.h>

Inheritance diagram for TtSemiEvtSolutionMaker:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

TtSemiLepKinFitter::Constraint constraint (unsigned)
 
std::vector< TtSemiLepKinFitter::Constraintconstraints (std::vector< unsigned > &)
 
TtSemiLepKinFitter::Param param (unsigned)
 
void produce (edm::Event &iEvent, const edm::EventSetup &iSetup) override
 
 TtSemiEvtSolutionMaker (const edm::ParameterSet &iConfig)
 constructor More...
 
 ~TtSemiEvtSolutionMaker () override
 destructor More...
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducer () override
 
- Public Member Functions inherited from edm::ProducerBase
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
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () 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
 
EDConsumerBaseoperator= (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)
 

Private Attributes

bool addLRJetComb_
 
bool addLRSignalSel_
 
std::vector< unsigned > constraints_
 
bool doKinFit_
 
edm::EDGetTokenT< std::vector< pat::Electron > > electronSrcToken_
 
edm::EDGetTokenT< TtGenEventgenEvtToken_
 
int jetCorrScheme_
 
int jetParam_
 
edm::EDGetTokenT< std::vector< pat::Jet > > jetSrcToken_
 
int lepParam_
 
std::string leptonFlavour_
 
std::string lrJetCombFile_
 
std::vector< int > lrJetCombObs_
 
std::string lrSignalSelFile_
 
std::vector< int > lrSignalSelObs_
 
int matchingAlgo_
 
bool matchToGenEvt_
 
double maxDeltaS_
 
double maxDist_
 
double maxF_
 
int maxNrIter_
 
int metParam_
 
edm::EDGetTokenT< std::vector< pat::MET > > metSrcToken_
 
edm::EDGetTokenT< std::vector< pat::Muon > > muonSrcToken_
 
TtSemiLepKinFittermyKinFitter
 
TtSemiLRJetCombCalcmyLRJetCombCalc
 
TtSemiLRJetCombObservablesmyLRJetCombObservables
 
TtSemiLRSignalSelCalcmyLRSignalSelCalc
 
TtSemiLRSignalSelObservablesmyLRSignalSelObservables
 
TtSemiSimpleBestJetCombmySimpleBestJetComb
 
unsigned int nrCombJets_
 
bool useDeltaR_
 
bool useMaxDist_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDProducer
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 ()
 
- Protected Member Functions inherited from edm::ProducerBase
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 ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
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)
 

Detailed Description

Definition at line 23 of file TtSemiEvtSolutionMaker.h.

Constructor & Destructor Documentation

◆ TtSemiEvtSolutionMaker()

TtSemiEvtSolutionMaker::TtSemiEvtSolutionMaker ( const edm::ParameterSet iConfig)
explicit

constructor

Definition at line 21 of file TtSemiEvtSolutionMaker.cc.

21  {
22  // configurables
23  electronSrcToken_ = mayConsume<std::vector<pat::Electron> >(iConfig.getParameter<edm::InputTag>("electronSource"));
24  muonSrcToken_ = mayConsume<std::vector<pat::Muon> >(iConfig.getParameter<edm::InputTag>("muonSource"));
25  metSrcToken_ = consumes<std::vector<pat::MET> >(iConfig.getParameter<edm::InputTag>("metSource"));
26  jetSrcToken_ = consumes<std::vector<pat::Jet> >(iConfig.getParameter<edm::InputTag>("jetSource"));
27  leptonFlavour_ = iConfig.getParameter<std::string>("leptonFlavour");
28  jetCorrScheme_ = iConfig.getParameter<int>("jetCorrectionScheme");
29  nrCombJets_ = iConfig.getParameter<unsigned int>("nrCombJets");
30  doKinFit_ = iConfig.getParameter<bool>("doKinFit");
31  addLRSignalSel_ = iConfig.getParameter<bool>("addLRSignalSel");
32  lrSignalSelObs_ = iConfig.getParameter<std::vector<int> >("lrSignalSelObs");
33  lrSignalSelFile_ = iConfig.getParameter<std::string>("lrSignalSelFile");
34  addLRJetComb_ = iConfig.getParameter<bool>("addLRJetComb");
35  lrJetCombObs_ = iConfig.getParameter<std::vector<int> >("lrJetCombObs");
36  lrJetCombFile_ = iConfig.getParameter<std::string>("lrJetCombFile");
37  maxNrIter_ = iConfig.getParameter<int>("maxNrIter");
38  maxDeltaS_ = iConfig.getParameter<double>("maxDeltaS");
39  maxF_ = iConfig.getParameter<double>("maxF");
40  jetParam_ = iConfig.getParameter<int>("jetParametrisation");
41  lepParam_ = iConfig.getParameter<int>("lepParametrisation");
42  metParam_ = iConfig.getParameter<int>("metParametrisation");
43  constraints_ = iConfig.getParameter<std::vector<unsigned> >("constraints");
44  matchToGenEvt_ = iConfig.getParameter<bool>("matchToGenEvt");
45  matchingAlgo_ = iConfig.getParameter<int>("matchingAlgorithm");
46  useMaxDist_ = iConfig.getParameter<bool>("useMaximalDistance");
47  useDeltaR_ = iConfig.getParameter<bool>("useDeltaR");
48  maxDist_ = iConfig.getParameter<double>("maximalDistance");
49  genEvtToken_ = mayConsume<TtGenEvent>(edm::InputTag("genEvt"));
50 
51  // define kinfitter
52  if (doKinFit_) {
55  }
56 
57  // define jet combinations related calculators
61  if (addLRJetComb_)
63 
64  // instantiate signal selection calculator
65  if (addLRSignalSel_)
67 
68  // define what will be produced
69  produces<std::vector<TtSemiEvtSolution> >();
70 }

References addLRJetComb_, addLRSignalSel_, constraints(), constraints_, edm::EDConsumerBase::consumesCollector(), doKinFit_, electronSrcToken_, contentValuesFiles::fullPath, genEvtToken_, edm::ParameterSet::getParameter(), jetCorrScheme_, jetParam_, jetSrcToken_, lepParam_, leptonFlavour_, lrJetCombFile_, lrJetCombObs_, lrSignalSelFile_, lrSignalSelObs_, matchingAlgo_, matchToGenEvt_, maxDeltaS_, maxDist_, maxF_, maxNrIter_, metParam_, metSrcToken_, muonSrcToken_, myKinFitter, myLRJetCombCalc, myLRJetCombObservables, myLRSignalSelCalc, myLRSignalSelObservables, mySimpleBestJetComb, nrCombJets_, param(), AlCaHLTBitMon_QueryRunRegistry::string, useDeltaR_, and useMaxDist_.

◆ ~TtSemiEvtSolutionMaker()

TtSemiEvtSolutionMaker::~TtSemiEvtSolutionMaker ( )
override

Member Function Documentation

◆ constraint()

TtSemiLepKinFitter::Constraint TtSemiEvtSolutionMaker::constraint ( unsigned  val)

Definition at line 307 of file TtSemiEvtSolutionMaker.cc.

307  {
309  switch (val) {
312  break;
315  break;
318  break;
321  break;
324  break;
325  default:
326  throw cms::Exception("WrongConfig") << "Chosen fit constraint is not supported: " << val << "\n";
327  break;
328  }
329  return result;
330 }

References Exception, TtSemiLepKinFitter::kNeutrinoMass, TtSemiLepKinFitter::kTopHadMass, TtSemiLepKinFitter::kTopLepMass, TtSemiLepKinFitter::kWHadMass, TtSemiLepKinFitter::kWLepMass, mps_fire::result, and heppy_batch::val.

Referenced by constraints().

◆ constraints()

std::vector< TtSemiLepKinFitter::Constraint > TtSemiEvtSolutionMaker::constraints ( std::vector< unsigned > &  val)

Definition at line 332 of file TtSemiEvtSolutionMaker.cc.

332  {
333  std::vector<TtSemiLepKinFitter::Constraint> result;
334  for (unsigned i = 0; i < val.size(); ++i) {
335  result.push_back(constraint(val[i]));
336  }
337  return result;
338 }

References constraint(), mps_fire::i, mps_fire::result, and heppy_batch::val.

Referenced by TtSemiEvtSolutionMaker().

◆ param()

TtSemiLepKinFitter::Param TtSemiEvtSolutionMaker::param ( unsigned  val)

Definition at line 288 of file TtSemiEvtSolutionMaker.cc.

288  {
290  switch (val) {
293  break;
296  break;
299  break;
300  default:
301  throw cms::Exception("WrongConfig") << "Chosen jet parametrization is not supported: " << val << "\n";
302  break;
303  }
304  return result;
305 }

References Exception, TopKinFitter::kEMom, TopKinFitter::kEtEtaPhi, TopKinFitter::kEtThetaPhi, mps_fire::result, and heppy_batch::val.

Referenced by TtSemiEvtSolutionMaker().

◆ produce()

void TtSemiEvtSolutionMaker::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Implements edm::EDProducer.

Definition at line 85 of file TtSemiEvtSolutionMaker.cc.

85  {
86  //
87  // TopObject Selection
88  //
89 
90  // select lepton (the TtLepton vectors are, for the moment, sorted on pT)
91  bool leptonFound = false;
93  if (leptonFlavour_ == "muon") {
94  iEvent.getByToken(muonSrcToken_, muons);
95  if (!muons->empty())
96  leptonFound = true;
97  }
99  if (leptonFlavour_ == "electron") {
100  iEvent.getByToken(electronSrcToken_, electrons);
101  if (!electrons->empty())
102  leptonFound = true;
103  }
104 
105  // select MET (TopMET vector is sorted on ET)
106  bool metFound = false;
108  iEvent.getByToken(metSrcToken_, mets);
109  if (!mets->empty())
110  metFound = true;
111 
112  // select Jets
113  bool jetsFound = false;
115  iEvent.getByToken(jetSrcToken_, jets);
116  if (jets->size() >= 4)
117  jetsFound = true;
118 
119  //
120  // Build Event solutions according to the ambiguity in the jet combination
121  //
122  std::vector<TtSemiEvtSolution>* evtsols = new std::vector<TtSemiEvtSolution>();
123  if (leptonFound && metFound && jetsFound) {
124  // protect against reading beyond array boundaries
125  unsigned int nrCombJets = nrCombJets_; // do not overwrite nrCombJets_
126  if (jets->size() < nrCombJets)
127  nrCombJets = jets->size();
128  // loop over all jets
129  for (unsigned int p = 0; p < nrCombJets; p++) {
130  for (unsigned int q = 0; q < nrCombJets; q++) {
131  for (unsigned int bh = 0; bh < nrCombJets; bh++) {
132  if (q > p && !(bh == p || bh == q)) {
133  for (unsigned int bl = 0; bl < nrCombJets; bl++) {
134  if (!(bl == p || bl == q || bl == bh)) {
135  TtSemiEvtSolution asol;
137  if (leptonFlavour_ == "muon")
138  asol.setMuon(muons, 0);
139  if (leptonFlavour_ == "electron")
140  asol.setElectron(electrons, 0);
141  asol.setNeutrino(mets, 0);
142  asol.setHadp(jets, p);
143  asol.setHadq(jets, q);
144  asol.setHadb(jets, bh);
145  asol.setLepb(jets, bl);
146  if (doKinFit_) {
147  asol = myKinFitter->addKinFitInfo(&asol);
148  // just to keep a record in the event (drop? -> present in provenance anyway...)
152  }
153  if (matchToGenEvt_) {
155  iEvent.getByToken(genEvtToken_, genEvt);
156  if (genEvt->numberOfBQuarks() ==
157  2 && // FIXME: in rare cases W->bc decay, resulting in a wrong filled genEvt leading to a segmentation fault
158  genEvt->numberOfLeptons() ==
159  1) { // FIXME: temporary solution to avoid crash in JetPartonMatching for non semi-leptonic events
160  asol.setGenEvt(genEvt);
161  }
162  }
163  // these lines calculate the observables to be used in the TtSemiSignalSelection LR
164  (*myLRSignalSelObservables)(asol, *jets);
165 
166  // if asked for, calculate with these observable values the LRvalue and
167  // (depending on the configuration) probability this event is signal
168  // FIXME: DO WE NEED TO DO THIS FOR EACH SOLUTION??? (S.L.20/8/07)
169  if (addLRSignalSel_)
170  (*myLRSignalSelCalc)(asol);
171 
172  // these lines calculate the observables to be used in the TtSemiJetCombination LR
173  //(*myLRJetCombObservables)(asol);
174 
175  (*myLRJetCombObservables)(asol, iEvent);
176 
177  // if asked for, calculate with these observable values the LRvalue and
178  // (depending on the configuration) probability a jet combination is correct
179  if (addLRJetComb_)
180  (*myLRJetCombCalc)(asol);
181 
182  //std::cout<<"SignalSelLRval = "<<asol.getLRSignalEvtLRval()<<" JetCombProb = "<<asol.getLRSignalEvtProb()<<std::endl;
183  //std::cout<<"JetCombLRval = "<<asol.getLRJetCombLRval()<<" JetCombProb = "<<asol.getLRJetCombProb()<<std::endl;
184 
185  // fill solution to vector
186  asol.setupHyp();
187  evtsols->push_back(asol);
188  }
189  }
190  }
191  }
192  }
193  }
194 
195  // if asked for, match the event solutions to the gen Event
196  if (matchToGenEvt_) {
197  int bestSolution = -999;
198  int bestSolutionChangeWQ = -999;
200  iEvent.getByToken(genEvtToken_, genEvt);
201  if (genEvt->numberOfBQuarks() ==
202  2 && // FIXME: in rare cases W->bc decay, resulting in a wrong filled genEvt leading to a segmentation fault
203  genEvt->numberOfLeptons() ==
204  1) { // FIXME: temporary solution to avoid crash in JetPartonMatching for non semi-leptonic events
205  std::vector<const reco::Candidate*> quarks;
206  const reco::Candidate& genp = *(genEvt->hadronicDecayQuark());
207  const reco::Candidate& genq = *(genEvt->hadronicDecayQuarkBar());
208  const reco::Candidate& genbh = *(genEvt->hadronicDecayB());
209  const reco::Candidate& genbl = *(genEvt->leptonicDecayB());
210  quarks.push_back(&genp);
211  quarks.push_back(&genq);
212  quarks.push_back(&genbh);
213  quarks.push_back(&genbl);
214  std::vector<const reco::Candidate*> recjets;
215  for (size_t s = 0; s < evtsols->size(); s++) {
216  recjets.clear();
217  const reco::Candidate& jetp = (*evtsols)[s].getRecHadp();
218  const reco::Candidate& jetq = (*evtsols)[s].getRecHadq();
219  const reco::Candidate& jetbh = (*evtsols)[s].getRecHadb();
220  const reco::Candidate& jetbl = (*evtsols)[s].getRecLepb();
221  recjets.push_back(&jetp);
222  recjets.push_back(&jetq);
223  recjets.push_back(&jetbh);
224  recjets.push_back(&jetbl);
225  JetPartonMatching aMatch(quarks, recjets, matchingAlgo_, useMaxDist_, useDeltaR_, maxDist_);
226  (*evtsols)[s].setGenEvt(genEvt);
227  (*evtsols)[s].setMCBestSumAngles(aMatch.getSumDistances());
228  (*evtsols)[s].setMCBestAngleHadp(aMatch.getDistanceForParton(0));
229  (*evtsols)[s].setMCBestAngleHadq(aMatch.getDistanceForParton(1));
230  (*evtsols)[s].setMCBestAngleHadb(aMatch.getDistanceForParton(2));
231  (*evtsols)[s].setMCBestAngleLepb(aMatch.getDistanceForParton(3));
232  if (aMatch.getMatchForParton(2) == 2 && aMatch.getMatchForParton(3) == 3) {
233  if (aMatch.getMatchForParton(0) == 0 && aMatch.getMatchForParton(1) == 1) {
234  bestSolution = s;
235  bestSolutionChangeWQ = 0;
236  } else if (aMatch.getMatchForParton(0) == 1 && aMatch.getMatchForParton(1) == 0) {
237  bestSolution = s;
238  bestSolutionChangeWQ = 1;
239  }
240  }
241  }
242  }
243  for (size_t s = 0; s < evtsols->size(); s++) {
244  (*evtsols)[s].setMCBestJetComb(bestSolution);
245  (*evtsols)[s].setMCChangeWQ(bestSolutionChangeWQ);
246  }
247  }
248 
249  // add TtSemiSimpleBestJetComb to solutions
250  int simpleBestJetComb = (*mySimpleBestJetComb)(*evtsols);
251  for (size_t s = 0; s < evtsols->size(); s++)
252  (*evtsols)[s].setSimpleBestJetComb(simpleBestJetComb);
253 
254  // choose the best jet combination according to LR value
255  if (addLRJetComb_ && !evtsols->empty()) {
256  float bestLRVal = -1000000;
257  int bestSol = (*evtsols)[0].getLRBestJetComb(); // duplicate the default
258  for (size_t s = 0; s < evtsols->size(); s++) {
259  if ((*evtsols)[s].getLRJetCombLRval() > bestLRVal) {
260  bestLRVal = (*evtsols)[s].getLRJetCombLRval();
261  bestSol = s;
262  }
263  }
264  for (size_t s = 0; s < evtsols->size(); s++) {
265  (*evtsols)[s].setLRBestJetComb(bestSol);
266  }
267  }
268 
269  //store the vector of solutions to the event
270  std::unique_ptr<std::vector<TtSemiEvtSolution> > pOut(evtsols);
271  iEvent.put(std::move(pOut));
272 
273  } else {
274  /*
275  std::cout<<"No calibrated solutions built, because: ";
276  if(jets->size()<4) std::cout<<"nr sel jets < 4"<<std::endl;
277  if(leptonFlavour_ == "muon" && muons->size() == 0) std::cout<<"no good muon candidate"<<std::endl;
278  if(leptonFlavour_ == "electron" && electrons->size() == 0) std::cout<<"no good electron candidate"<<std::endl;
279  if(mets->size() == 0) std::cout<<"no MET reconstruction"<<std::endl;
280  */
281  // TtSemiEvtSolution asol;
282  // evtsols->push_back(asol);
283  std::unique_ptr<std::vector<TtSemiEvtSolution> > pOut(evtsols);
284  iEvent.put(std::move(pOut));
285  }
286 }

References TtSemiLepKinFitter::addKinFitInfo(), addLRJetComb_, addLRSignalSel_, doKinFit_, pwdgSkimBPark_cfi::electrons, electronSrcToken_, TtGenEvtProducer_cfi::genEvt, genEvtToken_, EgammaValidation_cff::genp, JetPartonMatching::getDistanceForParton(), JetPartonMatching::getMatchForParton(), JetPartonMatching::getSumDistances(), iEvent, jetCorrScheme_, jetParam_, singleTopDQM_cfi::jets, jetSrcToken_, lepParam_, leptonFlavour_, matchingAlgo_, matchToGenEvt_, maxDist_, metParam_, singleTopDQM_cfi::mets, metSrcToken_, eostools::move(), PDWG_BPHSkim_cff::muons, muonSrcToken_, myKinFitter, TtDilepEvtSolProducer_cfi::nrCombJets, nrCombJets_, AlCaHLTBitMon_ParallelJobs::p, submitPVResolutionJobs::q, alignCSCRings::s, TtSemiEvtSolution::setElectron(), TtSemiEvtSolution::setGenEvt(), TtSemiEvtSolution::setHadb(), TtSemiEvtSolution::setHadp(), TtSemiEvtSolution::setHadq(), TtSemiEvtSolution::setJetCorrectionScheme(), TtSemiEvtSolution::setJetParametrisation(), TtSemiEvtSolution::setLepb(), TtSemiEvtSolution::setLeptonParametrisation(), TtSemiEvtSolution::setMuon(), TtSemiEvtSolution::setNeutrino(), TtSemiEvtSolution::setNeutrinoParametrisation(), useDeltaR_, and useMaxDist_.

Member Data Documentation

◆ addLRJetComb_

bool TtSemiEvtSolutionMaker::addLRJetComb_
private

◆ addLRSignalSel_

bool TtSemiEvtSolutionMaker::addLRSignalSel_
private

◆ constraints_

std::vector<unsigned> TtSemiEvtSolutionMaker::constraints_
private

Definition at line 55 of file TtSemiEvtSolutionMaker.h.

Referenced by TtSemiEvtSolutionMaker().

◆ doKinFit_

bool TtSemiEvtSolutionMaker::doKinFit_
private

◆ electronSrcToken_

edm::EDGetTokenT<std::vector<pat::Electron> > TtSemiEvtSolutionMaker::electronSrcToken_
private

Definition at line 39 of file TtSemiEvtSolutionMaker.h.

Referenced by produce(), and TtSemiEvtSolutionMaker().

◆ genEvtToken_

edm::EDGetTokenT<TtGenEvent> TtSemiEvtSolutionMaker::genEvtToken_
private

Definition at line 56 of file TtSemiEvtSolutionMaker.h.

Referenced by produce(), and TtSemiEvtSolutionMaker().

◆ jetCorrScheme_

int TtSemiEvtSolutionMaker::jetCorrScheme_
private

Definition at line 44 of file TtSemiEvtSolutionMaker.h.

Referenced by produce(), and TtSemiEvtSolutionMaker().

◆ jetParam_

int TtSemiEvtSolutionMaker::jetParam_
private

Definition at line 53 of file TtSemiEvtSolutionMaker.h.

Referenced by produce(), and TtSemiEvtSolutionMaker().

◆ jetSrcToken_

edm::EDGetTokenT<std::vector<pat::Jet> > TtSemiEvtSolutionMaker::jetSrcToken_
private

Definition at line 42 of file TtSemiEvtSolutionMaker.h.

Referenced by produce(), and TtSemiEvtSolutionMaker().

◆ lepParam_

int TtSemiEvtSolutionMaker::lepParam_
private

Definition at line 53 of file TtSemiEvtSolutionMaker.h.

Referenced by produce(), and TtSemiEvtSolutionMaker().

◆ leptonFlavour_

std::string TtSemiEvtSolutionMaker::leptonFlavour_
private

Definition at line 43 of file TtSemiEvtSolutionMaker.h.

Referenced by produce(), and TtSemiEvtSolutionMaker().

◆ lrJetCombFile_

std::string TtSemiEvtSolutionMaker::lrJetCombFile_
private

Definition at line 46 of file TtSemiEvtSolutionMaker.h.

Referenced by TtSemiEvtSolutionMaker().

◆ lrJetCombObs_

std::vector<int> TtSemiEvtSolutionMaker::lrJetCombObs_
private

Definition at line 54 of file TtSemiEvtSolutionMaker.h.

Referenced by TtSemiEvtSolutionMaker().

◆ lrSignalSelFile_

std::string TtSemiEvtSolutionMaker::lrSignalSelFile_
private

Definition at line 46 of file TtSemiEvtSolutionMaker.h.

Referenced by TtSemiEvtSolutionMaker().

◆ lrSignalSelObs_

std::vector<int> TtSemiEvtSolutionMaker::lrSignalSelObs_
private

Definition at line 54 of file TtSemiEvtSolutionMaker.h.

Referenced by TtSemiEvtSolutionMaker().

◆ matchingAlgo_

int TtSemiEvtSolutionMaker::matchingAlgo_
private

Definition at line 48 of file TtSemiEvtSolutionMaker.h.

Referenced by produce(), and TtSemiEvtSolutionMaker().

◆ matchToGenEvt_

bool TtSemiEvtSolutionMaker::matchToGenEvt_
private

Definition at line 47 of file TtSemiEvtSolutionMaker.h.

Referenced by produce(), and TtSemiEvtSolutionMaker().

◆ maxDeltaS_

double TtSemiEvtSolutionMaker::maxDeltaS_
private

Definition at line 52 of file TtSemiEvtSolutionMaker.h.

Referenced by TtSemiEvtSolutionMaker().

◆ maxDist_

double TtSemiEvtSolutionMaker::maxDist_
private

Definition at line 50 of file TtSemiEvtSolutionMaker.h.

Referenced by produce(), and TtSemiEvtSolutionMaker().

◆ maxF_

double TtSemiEvtSolutionMaker::maxF_
private

Definition at line 52 of file TtSemiEvtSolutionMaker.h.

Referenced by TtSemiEvtSolutionMaker().

◆ maxNrIter_

int TtSemiEvtSolutionMaker::maxNrIter_
private

Definition at line 51 of file TtSemiEvtSolutionMaker.h.

Referenced by TtSemiEvtSolutionMaker().

◆ metParam_

int TtSemiEvtSolutionMaker::metParam_
private

Definition at line 53 of file TtSemiEvtSolutionMaker.h.

Referenced by produce(), and TtSemiEvtSolutionMaker().

◆ metSrcToken_

edm::EDGetTokenT<std::vector<pat::MET> > TtSemiEvtSolutionMaker::metSrcToken_
private

Definition at line 41 of file TtSemiEvtSolutionMaker.h.

Referenced by produce(), and TtSemiEvtSolutionMaker().

◆ muonSrcToken_

edm::EDGetTokenT<std::vector<pat::Muon> > TtSemiEvtSolutionMaker::muonSrcToken_
private

Definition at line 40 of file TtSemiEvtSolutionMaker.h.

Referenced by produce(), and TtSemiEvtSolutionMaker().

◆ myKinFitter

TtSemiLepKinFitter* TtSemiEvtSolutionMaker::myKinFitter
private

◆ myLRJetCombCalc

TtSemiLRJetCombCalc* TtSemiEvtSolutionMaker::myLRJetCombCalc
private

Definition at line 61 of file TtSemiEvtSolutionMaker.h.

Referenced by TtSemiEvtSolutionMaker(), and ~TtSemiEvtSolutionMaker().

◆ myLRJetCombObservables

TtSemiLRJetCombObservables* TtSemiEvtSolutionMaker::myLRJetCombObservables
private

Definition at line 60 of file TtSemiEvtSolutionMaker.h.

Referenced by TtSemiEvtSolutionMaker(), and ~TtSemiEvtSolutionMaker().

◆ myLRSignalSelCalc

TtSemiLRSignalSelCalc* TtSemiEvtSolutionMaker::myLRSignalSelCalc
private

Definition at line 63 of file TtSemiEvtSolutionMaker.h.

Referenced by TtSemiEvtSolutionMaker(), and ~TtSemiEvtSolutionMaker().

◆ myLRSignalSelObservables

TtSemiLRSignalSelObservables* TtSemiEvtSolutionMaker::myLRSignalSelObservables
private

Definition at line 62 of file TtSemiEvtSolutionMaker.h.

Referenced by TtSemiEvtSolutionMaker(), and ~TtSemiEvtSolutionMaker().

◆ mySimpleBestJetComb

TtSemiSimpleBestJetComb* TtSemiEvtSolutionMaker::mySimpleBestJetComb
private

Definition at line 59 of file TtSemiEvtSolutionMaker.h.

Referenced by TtSemiEvtSolutionMaker(), and ~TtSemiEvtSolutionMaker().

◆ nrCombJets_

unsigned int TtSemiEvtSolutionMaker::nrCombJets_
private

Definition at line 45 of file TtSemiEvtSolutionMaker.h.

Referenced by produce(), and TtSemiEvtSolutionMaker().

◆ useDeltaR_

bool TtSemiEvtSolutionMaker::useDeltaR_
private

Definition at line 49 of file TtSemiEvtSolutionMaker.h.

Referenced by produce(), and TtSemiEvtSolutionMaker().

◆ useMaxDist_

bool TtSemiEvtSolutionMaker::useMaxDist_
private

Definition at line 49 of file TtSemiEvtSolutionMaker.h.

Referenced by produce(), and TtSemiEvtSolutionMaker().

TtSemiEvtSolutionMaker::addLRSignalSel_
bool addLRSignalSel_
Definition: TtSemiEvtSolutionMaker.h:47
TopKinFitter::kEtEtaPhi
Definition: TopKinFitter.h:20
PDWG_BPHSkim_cff.muons
muons
Definition: PDWG_BPHSkim_cff.py:47
TtSemiEvtSolutionMaker::muonSrcToken_
edm::EDGetTokenT< std::vector< pat::Muon > > muonSrcToken_
Definition: TtSemiEvtSolutionMaker.h:40
mps_fire.i
i
Definition: mps_fire.py:428
TtSemiLRJetCombObservables
Steering class for the overall top-lepton likelihood.
Definition: TtSemiLRJetCombObservables.h:39
TtSemiEvtSolutionMaker::constraint
TtSemiLepKinFitter::Constraint constraint(unsigned)
Definition: TtSemiEvtSolutionMaker.cc:307
TtSemiEvtSolution::setHadb
void setHadb(const edm::Handle< std::vector< pat::Jet > > &jet, int i)
Definition: TtSemiEvtSolution.h:229
EgammaValidation_cff.genp
genp
produce generated paricles in acceptance #
Definition: EgammaValidation_cff.py:115
contentValuesFiles.fullPath
fullPath
Definition: contentValuesFiles.py:64
TtSemiEvtSolutionMaker::lrSignalSelObs_
std::vector< int > lrSignalSelObs_
Definition: TtSemiEvtSolutionMaker.h:54
TtSemiEvtSolutionMaker::maxNrIter_
int maxNrIter_
Definition: TtSemiEvtSolutionMaker.h:51
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
TtSemiEvtSolutionMaker::myLRSignalSelObservables
TtSemiLRSignalSelObservables * myLRSignalSelObservables
Definition: TtSemiEvtSolutionMaker.h:62
TtSemiEvtSolution::setGenEvt
void setGenEvt(const edm::Handle< TtGenEvent > &aGenEvt)
Definition: TtSemiEvtSolution.cc:190
TtSemiEvtSolutionMaker::jetParam_
int jetParam_
Definition: TtSemiEvtSolutionMaker.h:53
TtSemiLepKinFitter::addKinFitInfo
TtSemiEvtSolution addKinFitInfo(TtSemiEvtSolution *asol)
add kin fit information to the old event solution (in for legacy reasons)
Definition: TtSemiLepKinFitter.cc:351
edm::EDConsumerBase::consumesCollector
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
Definition: EDConsumerBase.cc:46
TtSemiEvtSolutionMaker::leptonFlavour_
std::string leptonFlavour_
Definition: TtSemiEvtSolutionMaker.h:43
TtSemiEvtSolutionMaker::lrJetCombFile_
std::string lrJetCombFile_
Definition: TtSemiEvtSolutionMaker.h:46
singleTopDQM_cfi.jets
jets
Definition: singleTopDQM_cfi.py:42
TtSemiEvtSolutionMaker::lepParam_
int lepParam_
Definition: TtSemiEvtSolutionMaker.h:53
singleTopDQM_cfi.mets
mets
Definition: singleTopDQM_cfi.py:43
TtSemiEvtSolution::setHadp
void setHadp(const edm::Handle< std::vector< pat::Jet > > &jet, int i)
Definition: TtSemiEvtSolution.h:227
edm::Handle
Definition: AssociativeIterator.h:50
TtSemiLRJetCombCalc
Class to calculate the jet combination LR value and purity from a root-file with fit functions.
Definition: TtSemiLRJetCombCalc.h:31
TopKinFitter::kEMom
Definition: TopKinFitter.h:20
edm::FileInPath
Definition: FileInPath.h:64
alignCSCRings.s
s
Definition: alignCSCRings.py:92
TtSemiLepKinFitter
Definition: TtSemiLepKinFitter.h:32
TtSemiEvtSolution::setLeptonParametrisation
void setLeptonParametrisation(int lp)
Definition: TtSemiEvtSolution.h:284
TtSemiEvtSolution::setMuon
void setMuon(const edm::Handle< std::vector< pat::Muon > > &muon, int i)
Definition: TtSemiEvtSolution.h:231
TtSemiEvtSolutionMaker::myKinFitter
TtSemiLepKinFitter * myKinFitter
Definition: TtSemiEvtSolutionMaker.h:58
TtSemiLRSignalSelCalc
Class to calculate the jet combination LR value and purity from a root-file with fit functions.
Definition: TtSemiLRSignalSelCalc.h:31
TtSemiEvtSolutionMaker::doKinFit_
bool doKinFit_
Definition: TtSemiEvtSolutionMaker.h:47
TtSemiEvtSolutionMaker::myLRJetCombCalc
TtSemiLRJetCombCalc * myLRJetCombCalc
Definition: TtSemiEvtSolutionMaker.h:61
TtSemiEvtSolutionMaker::metParam_
int metParam_
Definition: TtSemiEvtSolutionMaker.h:53
TtSemiEvtSolutionMaker::constraints_
std::vector< unsigned > constraints_
Definition: TtSemiEvtSolutionMaker.h:55
TtSemiLRSignalSelObservables
Definition: TtSemiLRSignalSelObservables.h:29
TtSemiEvtSolutionMaker::useDeltaR_
bool useDeltaR_
Definition: TtSemiEvtSolutionMaker.h:49
TtSemiLepKinFitter::kTopHadMass
Definition: TtSemiLepKinFitter.h:35
TtDilepEvtSolProducer_cfi.nrCombJets
nrCombJets
Definition: TtDilepEvtSolProducer_cfi.py:35
TtSemiEvtSolutionMaker::param
TtSemiLepKinFitter::Param param(unsigned)
Definition: TtSemiEvtSolutionMaker.cc:288
TtSemiLepKinFitter::kNeutrinoMass
Definition: TtSemiLepKinFitter.h:35
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TtSemiEvtSolutionMaker::maxF_
double maxF_
Definition: TtSemiEvtSolutionMaker.h:52
TtSemiEvtSolution::setElectron
void setElectron(const edm::Handle< std::vector< pat::Electron > > &elec, int i)
Definition: TtSemiEvtSolution.h:235
TtSemiEvtSolutionMaker::genEvtToken_
edm::EDGetTokenT< TtGenEvent > genEvtToken_
Definition: TtSemiEvtSolutionMaker.h:56
TtSemiEvtSolutionMaker::jetCorrScheme_
int jetCorrScheme_
Definition: TtSemiEvtSolutionMaker.h:44
TtSemiEvtSolutionMaker::maxDist_
double maxDist_
Definition: TtSemiEvtSolutionMaker.h:50
TtSemiEvtSolutionMaker::addLRJetComb_
bool addLRJetComb_
Definition: TtSemiEvtSolutionMaker.h:47
TtSemiLepKinFitter::Constraint
Constraint
supported constraints
Definition: TtSemiLepKinFitter.h:35
TtSemiEvtSolutionMaker::lrJetCombObs_
std::vector< int > lrJetCombObs_
Definition: TtSemiEvtSolutionMaker.h:54
TtSemiEvtSolution::setJetCorrectionScheme
void setJetCorrectionScheme(int scheme)
Definition: TtSemiEvtSolution.h:226
iEvent
int iEvent
Definition: GenABIO.cc:224
TtSemiSimpleBestJetComb
Simple method to get the correct jet combination in semileptonic ttbar events.
Definition: TtSemiSimpleBestJetComb.h:32
TtSemiEvtSolutionMaker::myLRSignalSelCalc
TtSemiLRSignalSelCalc * myLRSignalSelCalc
Definition: TtSemiEvtSolutionMaker.h:63
TtSemiEvtSolutionMaker::constraints
std::vector< TtSemiLepKinFitter::Constraint > constraints(std::vector< unsigned > &)
Definition: TtSemiEvtSolutionMaker.cc:332
submitPVResolutionJobs.q
q
Definition: submitPVResolutionJobs.py:84
TtSemiEvtSolution::setNeutrino
void setNeutrino(const edm::Handle< std::vector< pat::MET > > &met, int i)
Definition: TtSemiEvtSolution.h:239
TtSemiLepKinFitter::kWLepMass
Definition: TtSemiLepKinFitter.h:35
TopKinFitter::kEtThetaPhi
Definition: TopKinFitter.h:20
TtSemiEvtSolutionMaker::electronSrcToken_
edm::EDGetTokenT< std::vector< pat::Electron > > electronSrcToken_
Definition: TtSemiEvtSolutionMaker.h:39
TtSemiEvtSolutionMaker::useMaxDist_
bool useMaxDist_
Definition: TtSemiEvtSolutionMaker.h:49
reco::Candidate
Definition: Candidate.h:27
TtSemiEvtSolution
Definition: TtSemiEvtSolution.h:31
TtSemiEvtSolution::setNeutrinoParametrisation
void setNeutrinoParametrisation(int mp)
Definition: TtSemiEvtSolution.h:285
TtSemiEvtSolution::setJetParametrisation
void setJetParametrisation(int jp)
Definition: TtSemiEvtSolution.h:283
heppy_batch.val
val
Definition: heppy_batch.py:351
eostools.move
def move(src, dest)
Definition: eostools.py:511
pwdgSkimBPark_cfi.electrons
electrons
Definition: pwdgSkimBPark_cfi.py:6
TtSemiEvtSolutionMaker::metSrcToken_
edm::EDGetTokenT< std::vector< pat::MET > > metSrcToken_
Definition: TtSemiEvtSolutionMaker.h:41
TtSemiEvtSolutionMaker::myLRJetCombObservables
TtSemiLRJetCombObservables * myLRJetCombObservables
Definition: TtSemiEvtSolutionMaker.h:60
Exception
Definition: hltDiff.cc:246
TtSemiLepKinFitter::kTopLepMass
Definition: TtSemiLepKinFitter.h:35
TtSemiEvtSolutionMaker::maxDeltaS_
double maxDeltaS_
Definition: TtSemiEvtSolutionMaker.h:52
TtSemiEvtSolutionMaker::mySimpleBestJetComb
TtSemiSimpleBestJetComb * mySimpleBestJetComb
Definition: TtSemiEvtSolutionMaker.h:59
TtSemiEvtSolution::setHadq
void setHadq(const edm::Handle< std::vector< pat::Jet > > &jet, int i)
Definition: TtSemiEvtSolution.h:228
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
TtSemiLepKinFitter::kWHadMass
Definition: TtSemiLepKinFitter.h:35
TtSemiEvtSolutionMaker::lrSignalSelFile_
std::string lrSignalSelFile_
Definition: TtSemiEvtSolutionMaker.h:46
mps_fire.result
result
Definition: mps_fire.py:311
TtSemiEvtSolution::setLepb
void setLepb(const edm::Handle< std::vector< pat::Jet > > &jet, int i)
Definition: TtSemiEvtSolution.h:230
TtSemiEvtSolutionMaker::matchToGenEvt_
bool matchToGenEvt_
Definition: TtSemiEvtSolutionMaker.h:47
TopKinFitter::Param
Param
supported parameterizations
Definition: TopKinFitter.h:20
JetPartonMatching
Definition: JetPartonMatching.h:11
edm::InputTag
Definition: InputTag.h:15
TtSemiEvtSolutionMaker::jetSrcToken_
edm::EDGetTokenT< std::vector< pat::Jet > > jetSrcToken_
Definition: TtSemiEvtSolutionMaker.h:42
TtGenEvtProducer_cfi.genEvt
genEvt
Definition: TtGenEvtProducer_cfi.py:7
TtSemiEvtSolutionMaker::matchingAlgo_
int matchingAlgo_
Definition: TtSemiEvtSolutionMaker.h:48
TtSemiEvtSolutionMaker::nrCombJets_
unsigned int nrCombJets_
Definition: TtSemiEvtSolutionMaker.h:45