Class Reference for E1039 Core & Analysis Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SQPrimaryParticleGen.C
Go to the documentation of this file.
1 /*====================================================================
2 Author: Abinash Pun, Kun Liu
3 Nov, 2019
4 Goal: Import the physics generator of E906 experiment (DPPrimaryGeneratorAction)
5 from Kun to E1039 experiment in Fun4All framework
6 =========================================================================*/
7 #include <fstream>
8 #include <string>
9 #include <TRandom3.h>
10 #include <iostream>
11 #include <cassert>
12 #include <cstdlib>
13 
15 #include <phool/PHCompositeNode.h>
16 #include <phool/PHIODataNode.h>
17 #include <phool/PHRandomSeed.h>
18 #include <phool/getClass.h>
19 #include <Pythia8/Pythia.h>
20 #include <Pythia8Plugins/HepMC2.h>
21 #include <phgeom/PHGeomUtility.h>
22 #include <boost/format.hpp>
24 #include <g4main/PHG4InEvent.h>
25 #include <g4main/PHG4Particlev1.h>
26 #include <g4main/PHG4Particlev2.h>
27 #include <g4main/PHG4VtxPoint.h>
29 #include <gsl/gsl_randist.h>
30 #include <Geant4/G4ParticleTable.hh>
34 #include <UtilAna/UtilDimuon.h>
35 
36 #include "SQPrimaryParticleGen.h"
37 #include "SQPrimaryVertexGen.h"
38 
39  namespace DPGEN
40  {
41  // global parameters
42  const double pi = TMath::Pi();
43  const double twopi = 2.*pi;
44  const double sqrt2pi = TMath::Sqrt(twopi);
45 
46  // masses
47  const double mp = 0.93827;
48  const double mmu = 0.10566;
49  const double mjpsi = 3.097;
50  const double mpsip = 3.686;
51 
52  // 4-vectors
53  const double ebeam = 120.;
54  const TLorentzVector p_beam(0., 0., TMath::Sqrt(ebeam*ebeam - mp*mp), ebeam);
55  const TLorentzVector p_target(0., 0., 0., mp);
56  const TLorentzVector p_cms = p_beam + p_target;
57  const TVector3 bv_cms = p_cms.BoostVector();
58  const double s = p_cms.M2();
59  const double sqrts = p_cms.M();
60 
61  //distribution-wise constants
62  const double pT0DY = 2.8;
63  const double pTpowDY = 1./(6. - 1.);
64  const double pT0JPsi = 3.0;
65  const double pTpowJPsi = 1./(6. - 1.);
66 
67  //charmonium generation constants Ref: Schub et al Phys Rev D 52, 1307 (1995)
68  const double sigmajpsi = 0.2398; //Jpsi xf gaussian width
69  const double brjpsi = 0.0594; //Br(Jpsi -> mumu)
70  const double ajpsi = 0.001464*TMath::Exp(-16.66*mjpsi/sqrts);
71  const double bjpsi = 2.*sigmajpsi*sigmajpsi;
72 
73  const double psipscale = 0.019; //psip relative to jpsi
74  }
75 
76 
79  _Pythia(false),
80  _CustomDimuon(false),
81  _DrellYanGen(false),
82  drellyanMode(false),
83  _JPsiGen(false),
84  _PsipGen(false),
85  ineve(NULL),
86  _dim_gen(new SQDimuon_v1())
87 {
88 
89  _vertexGen = new SQPrimaryVertexGen();
90  pdf = LHAPDF::mkPDF("CT10nlo", 0);
91 
92 }
93 
94 
96 {
97  delete _dim_gen;
98  delete _vertexGen;
99  //delete pdf;
100 
101 }
102 
104 {
105 
106  // ppGen.readFile("pythia8_DY.cfg");
107  // pnGen.readFile("pythia8_DY.cfg");
108  //can't read the configuration file..hard coded for now ..change it back to reading from configuration file
109  if(_Pythia){
110  ppGen.readString("PDF:pSet = 7 ");// CTEQ6L
111  ppGen.readString("ParticleDecays:limitTau = on"); //Only decays the unstable particles
112  ppGen.readString("WeakSingleBoson:ffbar2ffbar(s:gm) = on");// ffbar -> gamma* -> ffbar
113  ppGen.readString("Beams:frameType = 2");
114  ppGen.readString("Beams:idA = 2212");
115  ppGen.readString("Beams:eA = 120.");
116  ppGen.readString("Beams:eB = 0.");
117  ppGen.readString("Beams:allowVertexSpread = on");
118 
119 
120  pnGen.readString("PDF:pSet = 7 ");
121  pnGen.readString("ParticleDecays:limitTau = on");
122  pnGen.readString("WeakSingleBoson:ffbar2ffbar(s:gm) = on");
123  pnGen.readString("Beams:frameType = 2");
124  pnGen.readString("Beams:idA = 2212");
125  pnGen.readString("Beams:eA = 120.");
126  pnGen.readString("Beams:eB = 0.");
127  pnGen.readString("Beams:allowVertexSpread = on");
128 
129 
130 
131  ppGen.readString("Beams:idB = 2212");
132  pnGen.readString("Beams:idB = 2112");
133 
134 
135  unsigned int seed = PHRandomSeed();
136  if (seed > 900000000)
137  {
138  seed = seed % 900000000;
139  }
140 
141  if ((seed > 0) && (seed <= 900000000))
142  {
143  ppGen.readString("Random:setSeed = on");
144  ppGen.readString(str(boost::format("Random:seed = %1%") % seed));
145 
146  pnGen.readString("Random:setSeed = on");
147  pnGen.readString(str(boost::format("Random:seed = %1%") % seed));
148 
149  }
150 
151  ppGen.init();
152  pnGen.init();
153 
154  }
155 
157 }
158 
160 {
161  gRandom->SetSeed(PHRandomSeed());
162  ineve = findNode::getClass<PHG4InEvent>(topNode,"PHG4INEVENT");
163  if (!ineve) {
164  PHNodeIterator iter( topNode );
165  PHCompositeNode *dstNode;
166  dstNode = dynamic_cast<PHCompositeNode*>(iter.findFirst("PHCompositeNode", "DST"));
167 
168  ineve = new PHG4InEvent();
169  PHDataNode<PHObject> *newNode = new PHDataNode<PHObject>(ineve, "PHG4INEVENT", "PHObject");
170  dstNode->addNode(newNode);
171 
172  _mcevt = findNode::getClass<SQMCEvent>(topNode, "SQMCEvent");
173  if (! _mcevt) {
174  _mcevt = new SQMCEvent_v1();
175  dstNode->addNode(new PHIODataNode<PHObject>(_mcevt, "SQMCEvent", "PHObject"));
176  }
177 
178  _vec_dim = findNode::getClass<SQDimuonVector>(topNode, "SQTruthDimuonVector");
179  if (! _vec_dim) {
180  _vec_dim = new SQDimuonVector_v1();
181  dstNode->addNode(new PHIODataNode<PHObject>(_vec_dim, "SQTruthDimuonVector", "PHObject"));
182  }
183  }
184 
185  return 0;
186 }
187 
189 {
190 
191  _vertexGen->InitRun(topNode);
192  TGeoManager* geoManager = PHGeomUtility::GetTGeoManager(topNode);
193  double x_vtx,y_vtx,z_vtx;
194  x_vtx=0.;
195  y_vtx=0.;
196  z_vtx=0.;
197  _vertexGen->traverse(geoManager->GetTopNode(),x_vtx,y_vtx, z_vtx);
198  Double_t pARatio = _vertexGen->getPARatio();
199  Double_t luminosity = _vertexGen->getLuminosity();
200  TVector3 vtx;
201  vtx.SetXYZ(x_vtx,y_vtx,z_vtx);
202 
203  if (_DrellYanGen) generateDrellYan(topNode,vtx, pARatio, luminosity);
204  if (_Pythia) generatePythia(topNode,vtx, pARatio);
205  if (_JPsiGen) generateJPsi(topNode,vtx, pARatio, luminosity);
206  if (_PsipGen) generatePsip(topNode,vtx, pARatio, luminosity);
207 
209 }
210 
211 //=====================DrellYan=====================================
212 
213 int SQPrimaryParticleGen::generateDrellYan(PHCompositeNode *topNode,TVector3 vtx, const double pARatio, double luminosity)
214 {
215  drellyanMode = true;
216  //sets invaraint mass and xF = x1-x2 for virtual photon
217  double mass = gRandom->Uniform(0,1)*(massMax - massMin) + massMin;
218  double xF = gRandom->Uniform(0,1)*(xfMax - xfMin) + xfMin;
219 
220  if(!generateDimuon(mass, xF, true)) return Fun4AllReturnCodes::ABORTEVENT; // return
221 
222  InsertMuonPair(vtx);
223 
224  double dim_mass, dim_pT, dim_x1, dim_x2, dim_xF, dim_costh, dim_phi;
225  UtilDimuon::CalcVar(_dim_gen, dim_mass, dim_pT, dim_x1, dim_x2, dim_xF, dim_costh, dim_phi);
226 
227  // Calculate the cross section
228  //@cross_section
229  // PDF-related cross-section
231  double zOverA = pARatio;
232  double nOverA = 1. - zOverA;
233 
234  double dbar1 = pdf->xfxQ(-1, dim_x1, dim_mass)/dim_x1;
235  double ubar1 = pdf->xfxQ(-2, dim_x1, dim_mass)/dim_x1;
236  double d1 = pdf->xfxQ( 1, dim_x1, dim_mass)/dim_x1;
237  double u1 = pdf->xfxQ( 2, dim_x1, dim_mass)/dim_x1;
238  double s1 = pdf->xfxQ( 3, dim_x1, dim_mass)/dim_x1;
239  double c1 = pdf->xfxQ( 4, dim_x1, dim_mass)/dim_x1;
240 
241  double dbar2 = pdf->xfxQ(-1, dim_x2, dim_mass)/dim_x2;
242  double ubar2 = pdf->xfxQ(-2, dim_x2, dim_mass)/dim_x2;
243  double d2 = pdf->xfxQ( 1, dim_x2, dim_mass)/dim_x2;
244  double u2 = pdf->xfxQ( 2, dim_x2, dim_mass)/dim_x2;
245  double s2 = pdf->xfxQ( 3, dim_x2, dim_mass)/dim_x2;
246  double c2 = pdf->xfxQ( 4, dim_x2, dim_mass)/dim_x2;
247 
248  double xsec_pdf = 4./9.*(u1*(zOverA*ubar2 + nOverA*dbar2) + ubar1*(zOverA*u2 + nOverA*d2) + 2*c1*c2) +
249  1./9.*(d1*(zOverA*dbar2 + nOverA*ubar2) + dbar1*(zOverA*d2 + nOverA*u2) + 2*s1*s2);
251 
252  //KFactor related
254  double xsec_kfactor = 1.;
255  if(dim_mass < 2.5)
256  {
257  xsec_kfactor = 1.25;
258  }
259  else if(dim_mass < 7.5)
260  {
261  xsec_kfactor = 1.25 + (1.82 - 1.25)*(dim_mass - 2.5)/5.;
262  }
263  else
264  {
265  xsec_kfactor = 1.82;
266  }
268 
269  //phase space
270  double xsec_phsp = dim_x1*dim_x2/(dim_x1 + dim_x2)/dim_mass/dim_mass/dim_mass;
271 
272  //generation limitation
273  double xsec_limit = (massMax - massMin)*(xfMax - xfMin)*(cosThetaMax*cosThetaMax*cosThetaMax/3.
274  +cosThetaMax - cosThetaMin*cosThetaMin*cosThetaMin/3.
275  - cosThetaMin)*4./3.;
276 
277  //Total cross-section
278  double xsec = xsec_pdf*xsec_kfactor*xsec_phsp*xsec_limit*luminosity;
279  //@cross_section
280 
281  InsertEventInfo(xsec, vtx);
282 }
283 
284 //====================generateJPsi===================================================
285 int SQPrimaryParticleGen::generateJPsi(PHCompositeNode *topNode,TVector3 vtx, const double pARatio, double luminosity)
286 {
287  //sets invaraint mass and xF = x1-x2 for virtual photon
288  double mass = gRandom->Uniform(0,1)*(massMax - massMin) + massMin;
289  double xF = gRandom->Uniform(0,1)*(xfMax - xfMin) + xfMin;
290 
292 
293  InsertMuonPair(vtx);
294 
295  double dim_mass, dim_pT, dim_x1, dim_x2, dim_xF, dim_costh, dim_phi;
296  UtilDimuon::CalcVar(_dim_gen, dim_mass, dim_pT, dim_x1, dim_x2, dim_xF, dim_costh, dim_phi);
297 
298  // Calculate the cross section for J/Psi
299  //@cross_section{
300  //xf distribution
301  double xsec_xf = DPGEN::ajpsi*TMath::Exp(-pow(dim_xF, 2)/DPGEN::bjpsi)/(DPGEN::sigmajpsi*DPGEN::sqrt2pi);
302 
303  //generation limitation
304  double xsec_limit = xfMax - xfMin;
305 
306  double xsec = DPGEN::brjpsi*xsec_xf*xsec_limit*luminosity;
307  //@cross_section}
308 
309  InsertEventInfo(xsec, vtx);
310 }
311 
312 //======================Psi-prime====================
313 int SQPrimaryParticleGen::generatePsip(PHCompositeNode *topNode,TVector3 vtx, const double pARatio, double luminosity)
314 {
315  //sets invaraint mass and xF = x1-x2 for virtual photon
316  double mass = gRandom->Uniform(0,1)*(massMax - massMin) + massMin;
317  double xF = gRandom->Uniform(0,1)*(xfMax - xfMin) + xfMin;
318 
319  if(!generateDimuon(DPGEN::mpsip, xF)) return Fun4AllReturnCodes::ABORTEVENT; // return; //1;//return 0;
320 
321  InsertMuonPair(vtx);
322 
323  double dim_mass, dim_pT, dim_x1, dim_x2, dim_xF, dim_costh, dim_phi;
324  UtilDimuon::CalcVar(_dim_gen, dim_mass, dim_pT, dim_x1, dim_x2, dim_xF, dim_costh, dim_phi);
325 
326  // Calculate the cross section for J/Psi
327  //@cross_section{
328  //xf distribution
329  double xsec_xf = DPGEN::ajpsi*TMath::Exp(-pow(dim_xF, 2)/DPGEN::bjpsi)/(DPGEN::sigmajpsi*DPGEN::sqrt2pi);
330 
331  //generation limitation
332  double xsec_limit = xfMax - xfMin;
333 
334  double xsec = DPGEN::psipscale*DPGEN::brjpsi*xsec_xf*xsec_limit*luminosity;
336 
337  InsertEventInfo(xsec, vtx);
338 }
339 
340 
341 //==========Pythia Generator====================================================================
342 int SQPrimaryParticleGen::generatePythia(PHCompositeNode *topNode,TVector3 vtx, const double pARatio)
343 {
344 
345  Pythia8::Pythia* p_pythia =gRandom->Uniform(0,1) < pARatio ? &ppGen : &pnGen ;
346 
347  int vtxindex = -1;
348  int trackid = -1;
349  while(!p_pythia->next()) {}
350 
351 
352  for(int i = 1; i < p_pythia->event.size(); ++i)
353  {
354  int pParID = 0;
355  Pythia8::Particle par = p_pythia->event[i];
356  if(par.status() <= 0 && par.id() == 22) continue; // ignore photons with non-positive status (i.e. unstable)
357 
358  ++trackid;
359 
360  if(par.mother1() == 0 && par.mother2()==0) continue; // don't store mother particle i.e. colliding protons
361  if(par.pz()<5.0) continue; // momentum cut
362  // if(!(fabs(par.id())==13)) continue;
363  // pParID++;
364  //if (pParID>2) continue;
365  vtxindex = ineve->AddVtx(vtx.X()+(par.xProd()*CLHEP::mm),vtx.Y()+(par.yProd()*CLHEP::mm),vtx.Z()+(par.zProd()*CLHEP::mm),0.);
366 
367  PHG4Particle *particle = new PHG4Particlev2();
368  particle->set_track_id(trackid);
369  particle->set_vtx_id(vtxindex);
370  particle->set_name(par.name());
371  particle->set_pid(par.id());
372  particle->set_px(par.px());
373  particle->set_py(par.py());
374  particle->set_pz(par.pz());
375  particle->set_e(par.e());
376  ineve->AddParticle(vtxindex, particle);
377 
378  }
379 
380  return 0;
381 
382 
383 }
384 
385 
386 //============Main function to generate dimuon====================
387 //Reference: G. Moerno et.al. Phys. Rev D43:2815-2836, 1991
388 // Note: Kenichi, 2020-11-19: The 4th argument, "angular", seems not meaningful because it is always overwritten in the while loop. We had better remove it once another person(s) confirms this note.
389 bool SQPrimaryParticleGen::generateDimuon(double mass, double xF, bool angular)
390 {
391  double pz = xF*(DPGEN::sqrts - mass*mass/DPGEN::sqrts)/2.;
392 
393  double pTmaxSq = (DPGEN::s*DPGEN::s*(1. - xF*xF) - 2.*DPGEN::s*mass*mass + mass*mass*mass*mass)/DPGEN::s/4.;
394 
395  if(pTmaxSq < 0.) return false;
396 
397  double pTmax = sqrt(pTmaxSq);
398  double pT = 10.;
399 
400  if(pTmax < 0.3)
401  {
402  pT = pTmax*sqrt(gRandom->Uniform(0,1));
403  }
404  else if(drellyanMode)
405  {
406  while(pT > pTmax) pT = DPGEN::pT0DY*TMath::Sqrt(1./TMath::Power(gRandom->Uniform(0,1), DPGEN::pTpowDY) - 1.);
407  }
408  else
409  {
410  while(pT > pTmax) pT = DPGEN::pT0JPsi*TMath::Sqrt(1./TMath::Power(gRandom->Uniform(0,1), DPGEN::pTpowJPsi) - 1.);
411  }
412 
413  double phi = gRandom->Uniform(0,1)*DPGEN::twopi;
414  double px = pT*TMath::Cos(phi);
415  double py = pT*TMath::Sin(phi);
416 
417  //configure phase space generator
418  TLorentzVector p_dimuon;
419  p_dimuon.SetXYZM(px, py, pz, mass);
420  p_dimuon.Boost(DPGEN::bv_cms);
421  double masses[2] = {0.105658,0.105658};// Mass of muons
422  phaseGen.SetDecay(p_dimuon, 2, masses);
423 
424  bool firstTry = true;
425  double dim_mass, dim_pT, dim_x1, dim_x2, dim_xF, dim_costh, dim_phi;
426 
427  // while loop to generate dimuons with 1+cos^2theta distribution
428  while(firstTry || angular)
429  {
430  firstTry = false;
431 
432  phaseGen.Generate();
433  _dim_gen->set_mom_pos(*(phaseGen.GetDecay(0)));
434  _dim_gen->set_mom_neg(*(phaseGen.GetDecay(1)));
435  UtilDimuon::CalcVar(_dim_gen, dim_mass, dim_pT, dim_x1, dim_x2, dim_xF, dim_costh, dim_phi);
436  angular = 2.*gRandom->Uniform(0,1) > 1. + pow(dim_costh, 2);
437  }
438 
439  if(dim_x1 < x1Min || dim_x1 > x1Max) return false;
440  if(dim_x2 < x2Min || dim_x2 > x2Max) return false;
441  if(dim_costh < cosThetaMin || dim_costh >cosThetaMax) return false;
442  return true;
443 }
444 
446 
451 void SQPrimaryParticleGen::InsertMuonPair(TVector3& vtx)
452 {
453  int vtxindex = ineve->AddVtx(vtx.X(),vtx.Y(),vtx.Z(),0.);
454 
455  PHG4Particle *particle_muNeg = new PHG4Particlev2();
456  particle_muNeg->set_track_id(12);
457  particle_muNeg->set_vtx_id(vtxindex);
458  particle_muNeg->set_name("mu-");
459  particle_muNeg->set_pid(13);
460  particle_muNeg->set_px(_dim_gen->get_mom_neg().Px());
461  particle_muNeg->set_py(_dim_gen->get_mom_neg().Py());
462  particle_muNeg->set_pz(_dim_gen->get_mom_neg().Pz());
463  particle_muNeg->set_e (_dim_gen->get_mom_neg().E ());
464  ineve->AddParticle(vtxindex, particle_muNeg);
465 
466  PHG4Particle *particle_muplus = new PHG4Particlev2();
467  particle_muplus->set_track_id(2);
468  particle_muplus->set_vtx_id(vtxindex);
469  particle_muplus->set_name("mu+");
470  particle_muplus->set_pid(-13);
471  particle_muplus->set_px(_dim_gen->get_mom_pos().Px());
472  particle_muplus->set_py(_dim_gen->get_mom_pos().Py());
473  particle_muplus->set_pz(_dim_gen->get_mom_pos().Pz());
474  particle_muplus->set_e (_dim_gen->get_mom_pos().E ());
475  ineve->AddParticle(vtxindex, particle_muplus);
476 }
477 
479 
482 void SQPrimaryParticleGen::InsertEventInfo(double xsec, TVector3& vtx)
483 {
484  static int dim_id = 0;
485 
486  _mcevt->set_cross_section(xsec);
487  _mcevt->set_weight (xsec);
488 
489  _vec_dim->clear();
490  _dim_gen->set_dimuon_id (++dim_id);
491  _dim_gen->set_pos (vtx);
492  _dim_gen->set_mom (_dim_gen->get_mom_pos() + _dim_gen->get_mom_neg());
493  _dim_gen->set_track_id_pos( 2); // Given in InsertMuonPair().
494  _dim_gen->set_track_id_neg(12); // Given in InsertMuonPair().
495  _vec_dim->push_back(_dim_gen);
496 }
void traverse(TGeoNode *node, double &xvertex, double &yvertex, double &zvertex)
int process_event(PHCompositeNode *topNode)
const double pi
int generateDrellYan(PHCompositeNode *topNode, TVector3 vtx, const double pARatio, double luminosity)
Various generators.
PHNode * findFirst(const std::string &, const std::string &)
const double s
virtual void set_cross_section(const double a)=0
int InitRun(PHCompositeNode *topNode)
virtual void set_pz(const double x)
Definition: PHG4Particle.h:36
virtual void set_pos(const TVector3 a)=0
virtual void set_dimuon_id(const int a)=0
PHBoolean addNode(PHNode *)
int AddParticle(const int vtxid, PHG4Particle *particle)
Definition: PHG4InEvent.cc:63
virtual void set_mom_pos(const TLorentzVector a)=0
const double ebeam
void CalcVar(const SQDimuon *dim, double &mass, double &pT, double &x1, double &x2, double &xF, double &costh, double &phi)
Calculate the key kinematic variables of dimuon.
Definition: UtilDimuon.cc:52
virtual void set_px(const double x)
Definition: PHG4Particle.h:34
const double psipscale
const double mpsip
virtual void set_py(const double x)
Definition: PHG4Particle.h:35
const double ajpsi
const double mp
virtual TLorentzVector get_mom_neg() const =0
Return the momentum of the negative track at vertex.
virtual void set_e(const double e)
Definition: PHG4Particle.h:37
#define NULL
Definition: Pdb.h:9
virtual void set_weight(const double a)=0
const double pT0JPsi
const double sqrts
const double pTpowJPsi
const TLorentzVector p_beam(0., 0., TMath::Sqrt(ebeam *ebeam-mp *mp), ebeam)
bool generateDimuon(double mass, double xF, bool angular=false)
Dimuon phase space generator.
const double bjpsi
int generatePythia(PHCompositeNode *topNode, TVector3 vtx, const double pARatio)
const double brjpsi
virtual void set_track_id_neg(const int a)=0
virtual void set_mom(const TLorentzVector a)=0
const double mjpsi
virtual void set_mom_neg(const TLorentzVector a)=0
const double pTpowDY
virtual TLorentzVector get_mom_pos() const =0
Return the momentum of the positive track at vertex.
void InitRun(PHCompositeNode *topNode)
const double pT0DY
virtual void clear()=0
virtual void set_track_id_pos(const int a)=0
static TGeoManager * GetTGeoManager(PHCompositeNode *topNode)
Main user interface: DST node -&gt; TGeoManager for downstream use.
virtual void set_pid(const int i)
Definition: PHG4Particle.h:33
int AddVtx(const double x, const double y, const double z, const double t)
Definition: PHG4InEvent.cc:38
const TLorentzVector p_cms
const TLorentzVector p_target(0., 0., 0., mp)
virtual void set_track_id(const int i)
Definition: PHG4Particle.h:28
virtual void set_name(const std::string &name)
Definition: PHG4Particle.h:32
int Init(PHCompositeNode *topNode)
const double sigmajpsi
const double twopi
const double mmu
int generatePsip(PHCompositeNode *topNode, TVector3 vtx, const double pARatio, double luminosity)
virtual void set_vtx_id(const int i)
Definition: PHG4Particle.h:29
virtual void push_back(const SQDimuon *dim)=0
int generateJPsi(PHCompositeNode *topNode, TVector3 vtx, const double pARatio, double luminosity)
const double sqrt2pi
const TVector3 bv_cms
TCanvas * c1
Definition: Fun4SimTree.C:5