CMS 3D CMS Logo

EmbeddingLHEProducer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: test/EmbeddingLHEProducer
4 // Class: EmbeddingLHEProducer
5 //
13 //
14 // Original Author: Stefan Wayand
15 // Created: Wed, 13 Jan 2016 08:15:01 GMT
16 //
17 //
18 
19 
20 // system include files
21 #include <algorithm>
22 #include <iostream>
23 #include <iterator>
24 #include <fstream>
25 #include <string>
26 #include <memory>
27 #include "TLorentzVector.h"
28 
29 // user include files
32 
35 
37 
42 
48 
52 
57 #include "CLHEP/Random/RandExponential.h"
58 
59 
60 
61 //
62 // class declaration
63 //
64 
65 namespace CLHEP{
66  class HepRandomEngine;
67 }
68 
69 
70 
71 
72 class EmbeddingLHEProducer : public edm::one::EDProducer<edm::BeginRunProducer,
73  edm::EndRunProducer> {
74  public:
75  explicit EmbeddingLHEProducer(const edm::ParameterSet&);
77 
78  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
79 
80  private:
81  virtual void beginJob() override;
82  virtual void produce(edm::Event&, const edm::EventSetup&) override;
83  virtual void endJob() override;
84 
85  virtual void beginRunProduce(edm::Run& run, edm::EventSetup const& es) override;
86  virtual void endRunProduce(edm::Run&, edm::EventSetup const&) override;
87 
88  void fill_lhe_from_mumu(TLorentzVector &positiveLepton, TLorentzVector &negativeLepton, lhef::HEPEUP &outlhe, CLHEP::HepRandomEngine* engine);
89  void fill_lhe_with_particle(lhef::HEPEUP &outlhe, TLorentzVector &particle, int pdgid, double spin, double ctau);
90 
91  void transform_mumu_to_tautau(TLorentzVector &positiveLepton, TLorentzVector &negativeLepton);
92  const reco::Candidate* find_original_muon(const reco::Candidate* muon);
93  void assign_4vector(TLorentzVector &Lepton, const pat::Muon* muon, std::string FSRmode);
94  void mirror(TLorentzVector &positiveLepton, TLorentzVector &negativeLepton);
95  void rotate180(TLorentzVector &positiveLepton, TLorentzVector &negativeLepton);
96 
97  LHERunInfoProduct::Header give_slha();
98 
102  bool mirror_,rotate180_;
103  const double tauMass_ = 1.77682;
104 
105  std::ofstream file;
107 
108  // instead of reconstruted 4vectors of muons generated are taken to study FSR. Possible modes:
109  // afterFSR - muons without FSR photons taken into account
110  // beforeFSR - muons with FSR photons taken into account
112 };
113 
114 //
115 // constructors and destructor
116 //
118 {
119  //register your products
120  produces<LHEEventProduct>();
121  produces<LHERunInfoProduct, edm::InRun>();
122  produces<math::XYZTLorentzVectorD>("vertexPosition");
123 
124  muonsCollection_ = consumes<edm::View<pat::Muon>>(iConfig.getParameter<edm::InputTag>("src"));
125  vertexCollection_ = consumes<reco::VertexCollection>(iConfig.getParameter<edm::InputTag>("vertices"));
126  switchToMuonEmbedding_ = iConfig.getParameter<bool>("switchToMuonEmbedding");
127  mirror_ = iConfig.getParameter<bool>("mirror");
128  rotate180_ = iConfig.getParameter<bool>("rotate180");
129  studyFSRmode_ = iConfig.getUntrackedParameter<std::string>("studyFSRmode","");
130 
131  write_lheout=false;
132  std::string lhe_ouputfile = iConfig.getUntrackedParameter<std::string>("lhe_outputfilename","");
133  if (lhe_ouputfile !=""){
134  write_lheout=true;
135  file.open(lhe_ouputfile, std::fstream::out | std::fstream::trunc);
136  }
137 
138 
140  if ( ! rng.isAvailable()) {
141  throw cms::Exception("Configuration")
142  << "The EmbeddingLHEProducer requires the RandomNumberGeneratorService\n"
143  "which is not present in the configuration file. \n"
144  "You must add the service\n"
145  "in the configuration file or remove the modules that require it.";
146  }
147 
148 
149 }
150 
151 
153 {
154 }
155 
156 
157 //
158 // member functions
159 //
160 
161 // ------------ method called to produce the data ------------
162 void
164 {
165  using namespace edm;
166 
168  CLHEP::HepRandomEngine* engine = &rng->getEngine(iEvent.streamID());
169 
170 
172  iEvent.getByToken(muonsCollection_, muonHandle);
173  edm::View<pat::Muon> coll_muons = *muonHandle;
174 
175  Handle<std::vector<reco::Vertex>> coll_vertices;
176  iEvent.getByToken(vertexCollection_ , coll_vertices);
177 
178  TLorentzVector positiveLepton, negativeLepton;
179  bool mu_plus_found = false;
180  bool mu_minus_found = false;
181  lhef::HEPEUP hepeup;
182  hepeup.IDPRUP = 0;
183  hepeup.XWGTUP = 1;
184  hepeup.SCALUP = -1;
185  hepeup.AQEDUP = -1;
186  hepeup.AQCDUP = -1;
187  // Assuming Pt-Order
188  for (edm::View<pat::Muon>::const_iterator muon= coll_muons.begin(); muon!= coll_muons.end(); ++muon)
189  {
190  if (muon->charge() == 1 && !mu_plus_found)
191  {
192  assign_4vector(positiveLepton, &(*muon), studyFSRmode_);
193  mu_plus_found = true;
194  }
195  else if (muon->charge() == -1 && !mu_minus_found)
196  {
197  assign_4vector(negativeLepton, &(*muon), studyFSRmode_);
198  mu_minus_found = true;
199  }
200  else if (mu_minus_found && mu_plus_found) break;
201  }
202  mirror(positiveLepton,negativeLepton); // if no mirror, function does nothing.
203  rotate180(positiveLepton,negativeLepton); // if no rotate180, function does nothing
204  transform_mumu_to_tautau(positiveLepton,negativeLepton); // if MuonEmbedding, function does nothing.
205  fill_lhe_from_mumu(positiveLepton,negativeLepton,hepeup,engine);
206 
207  double originalXWGTUP_ = 1.;
208  std::unique_ptr<LHEEventProduct> product( new LHEEventProduct(hepeup,originalXWGTUP_) );
209 
210  if (write_lheout) std::copy(product->begin(), product->end(), std::ostream_iterator<std::string>(file));
211 
212  iEvent.put(std::move(product));
213  // Saving vertex position
214  std::unique_ptr<math::XYZTLorentzVectorD> vertex_position (new math::XYZTLorentzVectorD(coll_vertices->at(0).x(),coll_vertices->at(0).y(),coll_vertices->at(0).z(),0.0));
215  iEvent.put(std::move(vertex_position), "vertexPosition");
216 
217 }
218 
219 // ------------ method called once each job just before starting event loop ------------
220 void
222 {
223 }
224 
225 // ------------ method called once each job just after ending the event loop ------------
226 void
228 }
229 
230 // ------------ method called when starting to processes a run ------------
231 
232 void
234 {
235  // fill HEPRUP common block and store in edm::Run
236  lhef::HEPRUP heprup;
237 
238  // set number of processes: 1 for Z to tau tau
239  heprup.resize(1);
240 
241  //Process independent information
242 
243  //beam particles ID (two protons)
244  //heprup.IDBMUP.first = 2212;
245  //heprup.IDBMUP.second = 2212;
246 
247  //beam particles energies (both 6.5 GeV)
248  //heprup.EBMUP.first = 6500.;
249  //heprup.EBMUP.second = 6500.;
250 
251  //take default pdf group for both beamparticles
252  //heprup.PDFGUP.first = -1;
253  //heprup.PDFGUP.second = -1;
254 
255  //take certan pdf set ID (same as in officially produced DYJets LHE files)
256  //heprup.PDFSUP.first = -1;
257  //heprup.PDFSUP.second = -1;
258 
259  //master switch for event weight iterpretation (same as in officially produced DYJets LHE files)
260  heprup.IDWTUP = 3;
261 
262  //Information for first process (Z to tau tau), for now only placeholder:
263  heprup.XSECUP[0] = 1.;
264  heprup.XERRUP[0] = 0;
265  heprup.XMAXUP[0] = 1;
266  heprup.LPRUP[0]= 1;
267 
268 
269  std::unique_ptr<LHERunInfoProduct> runInfo(new LHERunInfoProduct(heprup));
270  runInfo->addHeader(give_slha());
271 
272 
273  if (write_lheout)std::copy(runInfo->begin(), runInfo->end(),std::ostream_iterator<std::string>(file));
274  run.put(std::move(runInfo));
275 
276 
277 }
278 
279 
280 void
282 {
283  if (write_lheout) {
285  file.close();
286  }
287 }
288 
289 void
290 EmbeddingLHEProducer::fill_lhe_from_mumu(TLorentzVector &positiveLepton, TLorentzVector &negativeLepton, lhef::HEPEUP &outlhe, CLHEP::HepRandomEngine* engine)
291 {
292 
293  TLorentzVector Z = positiveLepton + negativeLepton;
294  int leptonPDGID = switchToMuonEmbedding_ ? 13 : 15;
295 
296  // double tau_ctau = 0.00871100; //cm
297  double tau_ctau0 = 8.71100e-02; // mm (for Pythia)
298  double tau_ctau_p = tau_ctau0 * CLHEP::RandExponential::shoot(engine); // return -std::log(HepRandom::getTheEngine()->flat());
299  // replaces tau = process[iNow].tau0() * rndmPtr->exp(); from pythia8212/src/ProcessContainer.cc which is not initialized for ProcessLevel:all = off mode (no beam particle mode)
300  double tau_ctau_n = tau_ctau0 * CLHEP::RandExponential::shoot(engine);
301  //std::cout<<"tau_ctau P: "<<tau_ctau_p<<" tau_ctau N: "<<tau_ctau_n<<std::endl;
302 
303  fill_lhe_with_particle(outlhe, Z,23,9.0, 0);
304  fill_lhe_with_particle(outlhe, positiveLepton,-leptonPDGID,1.0, tau_ctau_p);
305  fill_lhe_with_particle(outlhe, negativeLepton,leptonPDGID,-1.0, tau_ctau_n);
306 
307  return;
308 }
309 
310 void EmbeddingLHEProducer::fill_lhe_with_particle(lhef::HEPEUP &outlhe, TLorentzVector &particle, int pdgid, double spin, double ctau)
311 {
312  // Pay attention to different index conventions:
313  // 'particleindex' follows usual C++ index conventions starting at 0 for a list.
314  // 'motherindex' follows the LHE index conventions: 0 is for 'not defined', so the listing starts at 1.
315  // That means: LHE index 1 == C++ index 0.
316  int particleindex = outlhe.NUP;
317  outlhe.resize(outlhe.NUP+1);
318 
319  outlhe.PUP[particleindex][0] = particle.Px();
320  outlhe.PUP[particleindex][1] = particle.Py();
321  outlhe.PUP[particleindex][2] = particle.Pz();
322  outlhe.PUP[particleindex][3] = particle.E();
323  outlhe.PUP[particleindex][4] = particle.M();
324  outlhe.IDUP[particleindex] = pdgid;
325  outlhe.SPINUP[particleindex] = spin;
326  outlhe.VTIMUP[particleindex] = ctau;
327 
328  outlhe.ICOLUP[particleindex].first = 0;
329  outlhe.ICOLUP[particleindex].second = 0;
330 
331 
332  if (std::abs(pdgid) == 23){
333  outlhe.MOTHUP[particleindex].first = 0; // No Mother
334  outlhe.MOTHUP[particleindex].second = 0;
335  outlhe.ISTUP[particleindex] = 2; // status
336 
337  }
338 
339  if (std::abs(pdgid) == 15){
340  outlhe.MOTHUP[particleindex].first = 1; // Mother is the Z (first partile)
341  outlhe.MOTHUP[particleindex].second = 1; // Mother is the Z (first partile)
342 
343  outlhe.ISTUP[particleindex] = 1;//status
344 
345  }
346 
347 
348 
349  return;
350 }
351 
352 
353 
354 
355 void EmbeddingLHEProducer::transform_mumu_to_tautau(TLorentzVector &positiveLepton, TLorentzVector &negativeLepton)
356 {
357  // No corrections applied for muon embedding
358  if (switchToMuonEmbedding_) return;
359 
360  TLorentzVector Z = positiveLepton + negativeLepton;
361 
362  TVector3 boost_from_Z_to_LAB = Z.BoostVector();
363  TVector3 boost_from_LAB_to_Z = -Z.BoostVector();
364 
365  // Boosting the two leptons to Z restframe, then both are back to back. This means, same 3-momentum squared
366  positiveLepton.Boost(boost_from_LAB_to_Z);
367  negativeLepton.Boost(boost_from_LAB_to_Z);
368 
369  // Energy of tau = 0.5*Z-mass
370  double tau_mass_squared = tauMass_*tauMass_;
371  double tau_energy_squared = 0.25*Z.M2();
372  double tau_3momentum_squared = tau_energy_squared - tau_mass_squared;
373  if (tau_3momentum_squared < 0)
374  {
375  edm::LogWarning("TauEmbedding") << "3-Momentum squared is negative";
376  return;
377  }
378 
379  //Computing scale, applying it on the 3-momenta and building new 4 momenta of the taus
380  double scale = std::sqrt(tau_3momentum_squared/positiveLepton.Vect().Mag2());
381  positiveLepton.SetPxPyPzE(scale*positiveLepton.Px(),scale*positiveLepton.Py(),scale*positiveLepton.Pz(),std::sqrt(tau_energy_squared));
382  negativeLepton.SetPxPyPzE(scale*negativeLepton.Px(),scale*negativeLepton.Py(),scale*negativeLepton.Pz(),std::sqrt(tau_energy_squared));
383 
384  //Boosting the new taus back to LAB frame
385  positiveLepton.Boost(boost_from_Z_to_LAB);
386  negativeLepton.Boost(boost_from_Z_to_LAB);
387 
388  return;
389 }
390 
392 {
393  if("afterFSR" == FSRmode && muon->genParticle() != 0)
394  {
395  const reco::GenParticle* afterFSRMuon = muon->genParticle();
396  Lepton.SetPxPyPzE(afterFSRMuon->p4().px(),afterFSRMuon->p4().py(),afterFSRMuon->p4().pz(), afterFSRMuon->p4().e());
397  }
398  else if ("beforeFSR" == FSRmode && muon->genParticle() != 0)
399  {
400  const reco::Candidate* beforeFSRMuon = find_original_muon(muon->genParticle());
401  Lepton.SetPxPyPzE(beforeFSRMuon->p4().px(),beforeFSRMuon->p4().py(),beforeFSRMuon->p4().pz(), beforeFSRMuon->p4().e());
402  }
403  else
404  {
405  Lepton.SetPxPyPzE(muon->p4().px(),muon->p4().py(),muon->p4().pz(), muon->p4().e());
406  }
407  return;
408 }
409 
411 {
412  if(muon->mother(0) == 0) return muon;
413  if(muon->pdgId() == muon->mother(0)->pdgId()) return find_original_muon(muon->mother(0));
414  else return muon;
415 }
416 
417 void EmbeddingLHEProducer::rotate180(TLorentzVector &positiveLepton, TLorentzVector &negativeLepton)
418 {
419  if (!rotate180_) return;
420  edm::LogInfo("TauEmbedding") << "Applying 180<C2><B0> rotation" ;
421  // By construction, the 3-momenta of mu-, mu+ and Z are in one plane.
422  // That means, one vector for perpendicular projection can be used for both leptons.
423  TLorentzVector Z = positiveLepton + negativeLepton;
424 
425  edm::LogInfo("TauEmbedding") << "MuMinus before. Pt: " << negativeLepton.Pt() << " Eta: " << negativeLepton.Eta() << " Phi: " << negativeLepton.Phi() << " Mass: " << negativeLepton.M();
426 
427  TVector3 Z3 = Z.Vect();
428  TVector3 positiveLepton3 = positiveLepton.Vect();
429  TVector3 negativeLepton3 = negativeLepton.Vect();
430 
431  TVector3 p3_perp = positiveLepton3 - positiveLepton3.Dot(Z3)/Z3.Dot(Z3)*Z3;
432  p3_perp = p3_perp.Unit();
433 
434  positiveLepton3 -= 2*positiveLepton3.Dot(p3_perp)*p3_perp;
435  negativeLepton3 -= 2*negativeLepton3.Dot(p3_perp)*p3_perp;
436 
437  positiveLepton.SetVect(positiveLepton3);
438  negativeLepton.SetVect(negativeLepton3);
439 
440  edm::LogInfo("TauEmbedding") << "MuMinus after. Pt: " << negativeLepton.Pt() << " Eta: " << negativeLepton.Eta() << " Phi: " << negativeLepton.Phi() << " Mass: " << negativeLepton.M();
441 
442  return;
443 }
444 
445 void EmbeddingLHEProducer::mirror(TLorentzVector &positiveLepton, TLorentzVector &negativeLepton)
446 {
447  if(!mirror_) return;
448  edm::LogInfo("TauEmbedding")<< "Applying mirroring" ;
449  TLorentzVector Z = positiveLepton + negativeLepton;
450 
451  edm::LogInfo("TauEmbedding") << "MuMinus before. Pt: " << negativeLepton.Pt() << " Eta: " << negativeLepton.Eta() << " Phi: " << negativeLepton.Phi() << " Mass: " << negativeLepton.M() ;
452 
453  TVector3 Z3 = Z.Vect();
454  TVector3 positiveLepton3 = positiveLepton.Vect();
455  TVector3 negativeLepton3 = negativeLepton.Vect();
456 
457  TVector3 beam(0.,0.,1.);
458  TVector3 perpToZandBeam = Z3.Cross(beam).Unit();
459 
460  positiveLepton3 -= 2*positiveLepton3.Dot(perpToZandBeam)*perpToZandBeam;
461  negativeLepton3 -= 2*negativeLepton3.Dot(perpToZandBeam)*perpToZandBeam;
462 
463  positiveLepton.SetVect(positiveLepton3);
464  negativeLepton.SetVect(negativeLepton3);
465 
466  edm::LogInfo("TauEmbedding") << "MuMinus after. Pt: " << negativeLepton.Pt() << " Eta: " << negativeLepton.Eta() << " Phi: " << negativeLepton.Phi() << " Mass: " << negativeLepton.M() ;
467 
468  return;
469 }
470 
471 
473  LHERunInfoProduct::Header slhah("slha");
474 
475  slhah.addLine("######################################################################\n");
476  slhah.addLine("## PARAM_CARD AUTOMATICALY GENERATED BY MG5 FOLLOWING UFO MODEL ####\n");
477  slhah.addLine("######################################################################\n");
478  slhah.addLine("## ##\n");
479  slhah.addLine("## Width set on Auto will be computed following the information ##\n");
480  slhah.addLine("## present in the decay.py files of the model. ##\n");
481  slhah.addLine("## See arXiv:1402.1178 for more details. ##\n");
482  slhah.addLine("## ##\n");
483  slhah.addLine("######################################################################\n");
484  slhah.addLine("\n");
485  slhah.addLine("###################################\n");
486  slhah.addLine("## INFORMATION FOR MASS\n");
487  slhah.addLine("###################################\n");
488  slhah.addLine("Block mass \n");
489  slhah.addLine(" 6 1.730000e+02 # MT \n");
490  slhah.addLine(" 15 1.777000e+00 # MTA \n");
491  slhah.addLine(" 23 9.118800e+01 # MZ \n");
492  slhah.addLine(" 25 1.250000e+02 # MH \n");
493  slhah.addLine("## Dependent parameters, given by model restrictions.\n");
494  slhah.addLine("## Those values should be edited following the \n");
495  slhah.addLine("## analytical expression. MG5 ignores those values \n");
496  slhah.addLine("## but they are important for interfacing the output of MG5\n");
497  slhah.addLine("## to external program such as Pythia.\n");
498  slhah.addLine(" 1 0.000000 # d : 0.0 \n");
499  slhah.addLine(" 2 0.000000 # u : 0.0 \n");
500  slhah.addLine(" 3 0.000000 # s : 0.0 \n");
501  slhah.addLine(" 4 0.000000 # c : 0.0 \n");
502  slhah.addLine(" 5 0.000000 # b : 0.0 \n");
503  slhah.addLine(" 11 0.000000 # e- : 0.0 \n");
504  slhah.addLine(" 12 0.000000 # ve : 0.0 \n");
505  slhah.addLine(" 13 0.000000 # mu- : 0.0 \n");
506  slhah.addLine(" 14 0.000000 # vm : 0.0 \n");
507  slhah.addLine(" 16 0.000000 # vt : 0.0 \n");
508  slhah.addLine(" 21 0.000000 # g : 0.0 \n");
509  slhah.addLine(" 22 0.000000 # a : 0.0 \n");
510  slhah.addLine(" 24 80.419002 # w+ : cmath.sqrt(MZ__exp__2/2. + cmath.sqrt(MZ__exp__4/4. - (aEW*cmath.pi*MZ__exp__2)/(Gf*sqrt__2))) \n");
511  slhah.addLine("\n");
512  slhah.addLine("###################################\n");
513  slhah.addLine("## INFORMATION FOR SMINPUTS\n");
514  slhah.addLine("###################################\n");
515  slhah.addLine("Block sminputs \n");
516  slhah.addLine(" 1 1.325070e+02 # aEWM1 \n");
517  slhah.addLine(" 2 1.166390e-05 # Gf \n");
518  slhah.addLine(" 3 1.180000e-01 # aS \n");
519  slhah.addLine("\n");
520  slhah.addLine("###################################\n");
521  slhah.addLine("## INFORMATION FOR WOLFENSTEIN\n");
522  slhah.addLine("###################################\n");
523  slhah.addLine("Block wolfenstein \n");
524  slhah.addLine(" 1 2.253000e-01 # lamWS \n");
525  slhah.addLine(" 2 8.080000e-01 # AWS \n");
526  slhah.addLine(" 3 1.320000e-01 # rhoWS \n");
527  slhah.addLine(" 4 3.410000e-01 # etaWS \n");
528  slhah.addLine("\n");
529  slhah.addLine("###################################\n");
530  slhah.addLine("## INFORMATION FOR YUKAWA\n");
531  slhah.addLine("###################################\n");
532  slhah.addLine("Block yukawa \n");
533  slhah.addLine(" 6 1.730000e+02 # ymt \n");
534  slhah.addLine(" 15 1.777000e+00 # ymtau \n");
535  slhah.addLine("\n");
536  slhah.addLine("###################################\n");
537  slhah.addLine("## INFORMATION FOR DECAY\n");
538  slhah.addLine("###################################\n");
539  slhah.addLine("DECAY 6 1.491500e+00 # WT \n");
540  slhah.addLine("DECAY 15 2.270000e-12 # WTau \n");
541  slhah.addLine("DECAY 23 2.441404e+00 # WZ \n");
542  slhah.addLine("DECAY 24 2.047600e+00 # WW \n");
543  slhah.addLine("DECAY 25 6.382339e-03 # WH \n");
544  slhah.addLine("## Dependent parameters, given by model restrictions.\n");
545  slhah.addLine("## Those values should be edited following the \n");
546  slhah.addLine("## analytical expression. MG5 ignores those values \n");
547  slhah.addLine("## but they are important for interfacing the output of MG5\n");
548  slhah.addLine("## to external program such as Pythia.\n");
549  slhah.addLine("DECAY 1 0.000000 # d : 0.0 \n");
550  slhah.addLine("DECAY 2 0.000000 # u : 0.0 \n");
551  slhah.addLine("DECAY 3 0.000000 # s : 0.0 \n");
552  slhah.addLine("DECAY 4 0.000000 # c : 0.0 \n");
553  slhah.addLine("DECAY 5 0.000000 # b : 0.0 \n");
554  slhah.addLine("DECAY 11 0.000000 # e- : 0.0 \n");
555  slhah.addLine("DECAY 12 0.000000 # ve : 0.0 \n");
556  slhah.addLine("DECAY 13 0.000000 # mu- : 0.0 \n");
557  slhah.addLine("DECAY 14 0.000000 # vm : 0.0 \n");
558  slhah.addLine("DECAY 16 0.000000 # vt : 0.0 \n");
559  slhah.addLine("DECAY 21 0.000000 # g : 0.0 \n");
560  slhah.addLine("DECAY 22 0.000000 # a : 0.0\n");
561 
562  return slhah;
563 }
564 
565 
566 
567 // ------------ method fills 'descriptions' with the allowed parameters for the module ------------
568 void
570  //The following says we do not know what parameters are allowed so do no validation
571  // Please change this to state exactly what you do use, even if it is no parameters
573  desc.setUnknown();
574  descriptions.addDefault(desc);
575 }
576 
577 //define this as a plug-in
const double Z[kNumberCalorimeter]
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:122
void resize(int nrup)
Definition: LesHouches.h:52
void mirror(TLorentzVector &positiveLepton, TLorentzVector &negativeLepton)
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:14
const reco::GenParticle * genParticle(size_t idx=0) const
Definition: PATObject.h:244
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
virtual const Candidate * mother(size_type i=0) const =0
return pointer to mother
std::vector< double > VTIMUP
Definition: LesHouches.h:254
void transform_mumu_to_tautau(TLorentzVector &positiveLepton, TLorentzVector &negativeLepton)
virtual void beginJob() override
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
void beginJob()
Definition: Breakpoints.cc:15
void fill_lhe_with_particle(lhef::HEPEUP &outlhe, TLorentzVector &particle, int pdgid, double spin, double ctau)
virtual void beginRunProduce(edm::Run &run, edm::EventSetup const &es) override
LHERunInfoProduct::Header give_slha()
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::vector< std::pair< int, int > > MOTHUP
Definition: LesHouches.h:236
int iEvent
Definition: GenABIO.cc:230
void addDefault(ParameterSetDescription const &psetDescription)
const_iterator begin() const
virtual void endJob() override
void resize(int nup)
Definition: LesHouches.h:161
virtual const LorentzVector & p4() const =0
four-momentum Lorentz vector
virtual int pdgId() const =0
PDG identifier.
void assign_4vector(TLorentzVector &Lepton, const pat::Muon *muon, std::string FSRmode)
T sqrt(T t)
Definition: SSEVec.h:18
std::vector< FiveVector > PUP
Definition: LesHouches.h:248
std::vector< double > SPINUP
Definition: LesHouches.h:261
void addLine(const std::string &line)
bool isAvailable() const
Definition: Service.h:46
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< int > ISTUP
Definition: LesHouches.h:230
virtual void endRunProduce(edm::Run &, edm::EventSetup const &) override
std::vector< int > IDUP
Definition: LesHouches.h:225
std::vector< double > XERRUP
Definition: LesHouches.h:114
std::vector< double > XMAXUP
Definition: LesHouches.h:119
double AQCDUP
Definition: LesHouches.h:220
void put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Run.h:111
void rotate180(TLorentzVector &positiveLepton, TLorentzVector &negativeLepton)
edm::EDGetTokenT< edm::View< pat::Muon > > muonsCollection_
virtual void produce(edm::Event &, const edm::EventSetup &) override
const reco::Candidate * find_original_muon(const reco::Candidate *muon)
HLT enums.
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:81
StreamID streamID() const
Definition: Event.h:81
edm::EDGetTokenT< reco::VertexCollection > vertexCollection_
static const std::string & endOfFile()
double AQEDUP
Definition: LesHouches.h:215
const_iterator end() const
void fill_lhe_from_mumu(TLorentzVector &positiveLepton, TLorentzVector &negativeLepton, lhef::HEPEUP &outlhe, CLHEP::HepRandomEngine *engine)
Definition: Lepton.py:1
std::vector< double > XSECUP
Definition: LesHouches.h:108
virtual const LorentzVector & p4() const final
four-momentum Lorentz vector
Definition: LeafCandidate.h:99
double XWGTUP
Definition: LesHouches.h:196
Analysis-level muon class.
Definition: Muon.h:49
std::vector< std::pair< int, int > > ICOLUP
Definition: LesHouches.h:242
def move(src, dest)
Definition: eostools.py:510
float spin(float ph)
Definition: Run.h:42
EmbeddingLHEProducer(const edm::ParameterSet &)
std::vector< int > LPRUP
Definition: LesHouches.h:124
double SCALUP
Definition: LesHouches.h:210