Event generator for e+e- pair production (Yu.Kharlov)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 6 Nov 2002 10:26:45 +0000 (10:26 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 6 Nov 2002 10:26:45 +0000 (10:26 +0000)
EVGEN/AliGenEpEmv1.cxx [new file with mode: 0644]
EVGEN/AliGenEpEmv1.h [new file with mode: 0644]
EVGEN/EVGENLinkDef.h
EVGEN/libEVGEN.pkg

diff --git a/EVGEN/AliGenEpEmv1.cxx b/EVGEN/AliGenEpEmv1.cxx
new file mode 100644 (file)
index 0000000..86fbcaa
--- /dev/null
@@ -0,0 +1,193 @@
+/**************************************************************************
+ * Copyright(c) 1998-2002, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ *                                                                        *
+ *                                                                        *
+ * Copyright(c) 1997, 1998, 2002, Adrian Alscher and Kai Hencken          *
+ * See $ALICE_ROOT/EpEmGen/diffcross.f for full Copyright notice          *
+ *                                                                        *
+ *                                                                        *
+ * Copyright(c) 2002 Kai Hencken, Yuri Kharlov, Serguei Sadovsky          *
+ * See $ALICE_ROOT/EpEmGen/epemgen.f for full Copyright notice            *
+ *                                                                        *
+ **************************************************************************/
+
+/*
+$Log$
+*/
+
+// Event generator of single e+e- pair production in ultraperipheral PbPb collisions
+// at 5.5 TeV/nucleon.
+// The generator is based on 5-dimentional differential cross section of the process.
+//%
+// References:
+// [1] "Multiple electromagnetic electron positron pair production in
+//      relativistic heavy ion collisions".
+//      Adrian Alscher, Kai Hencken, Dirk Trautmann, and Gerhard Baur,
+//      Phys. Rev. A55 (1997) 396.
+// [2] K.Hencken, Yu.Kharlov, S.Sadovsky, Internal ALICE Note 2002-27.
+//%
+// Usage:
+// Initialization:
+//    AliGenEpEmv1 *gener = new AliGenEpEmv1();
+//    gener->SetXXXRange(); // Set kinematics range
+//    gener->Init();
+// Event generation:
+//    gener->Generate(); // Produce one e+e- pair with the event weight assigned 
+//                       // to each track. The sum of event weights, divided by 
+//                       // the total number of generated events, gives the 
+//                       // integral cross section of the process of e+e- pair 
+//                       // production in the above mentioned kinematics range.
+//                       // Sum of the selected event weights, divided by the total 
+//                       // number of generated events, gives the integral cross 
+//                       // section corresponded to the set of selected events
+//%
+// The generator consists of several modules:
+// 1) $ALICE_ROOT/EpEmGen/diffcross.f:
+//    Exact calculation of the total differential e+ e- -pair production
+//    in Relativistic Heavy Ion Collisions for a point particle in an
+//    external field approach. See full comments in the mentioned file.
+// 2) $ALICE_ROOT/EpEmGen/epemgen.f:
+//    Generator of e+e- pairs produced in PbPb collisions at LHC
+//    it generates events according to the parametrization of the
+//    differential cross section. Produces events have weights calculated
+//    by the exact differential cross section calculation (diffcross.f).
+//    See full comments in the mentioned file.
+// 3) Class TEpEmGen:
+//    Interface from the fortran event generator to ALIROOT
+// 4) Class AliGenEpEmv1:
+//    The event generator to call within ALIROOT
+//%
+// Author of this module: Yuri.Kharlov@cern.ch
+// 9 October 2002
+
+#include "AliGenEpEmv1.h"
+#include <TParticle.h>
+#include <TParticlePDG.h>
+#include <TDatabasePDG.h>
+#include <TEpEmGen.h>
+
+ClassImp(AliGenEpEmv1)
+
+//------------------------------------------------------------
+
+AliGenEpEmv1::AliGenEpEmv1()
+{
+  // Default constructor
+  // Avoid zero pt
+  if (fPtMin == 0) fPtMin = 1.E-04;
+}
+
+//____________________________________________________________
+AliGenEpEmv1::AliGenEpEmv1(const AliGenEpEmv1 & gen)
+{
+  // copy constructor
+  gen.Copy(*this);
+}
+
+//____________________________________________________________
+AliGenEpEmv1::~AliGenEpEmv1()
+{
+  // Destructor
+}
+
+//____________________________________________________________
+void AliGenEpEmv1::Init()
+{
+  // Initialisation:
+  // 1) define a generator
+  // 2) initialize the generator of e+e- pair production
+
+  fMass = TDatabasePDG::Instance()->GetParticle(11)->Mass();
+
+  SetMC(new TEpEmGen());
+  fEpEmGen = (TEpEmGen*) fgMCEvGen;
+  fEpEmGen ->Initialize(fYMin,fYMax,fPtMin,fPtMax);
+  fEvent = 0;
+}
+
+//____________________________________________________________
+void AliGenEpEmv1::Generate()
+{
+  //
+  // Generate one e+e- pair
+  // Gaussian smearing on the vertex is done if selected. 
+  //%
+  // Each produced e+e- pair is defined by the following variables:
+  // rapidities of e-, e+ (yElectron,yPositron)
+  // log10(pt in MeV/c) of e-, e+ (xElectron,xPositron)
+  // azymuth angles between e- and e+ (phi12)
+  //%
+  // On output an event weight is given (weight) which is assigned to each track.
+  // The sum of event weights, divided by the total number of generated events, 
+  // gives the integral cross section of the e+e- pair production in the   
+  // selected kinematics range.          
+  //
+
+  Float_t polar[3]= {0,0,0};
+  Float_t origin[3];
+  Float_t p[3];
+
+  Double_t ptElectron,ptPositron, phiElectron,phiPositron, mt;
+  Double_t phi12=0,xElectron=0,xPositron=0,yElectron=0,yPositron=0,weight=0;
+  Int_t   j, nt, id;
+  Float_t random[6];
+
+  fEpEmGen->GenerateEvent(fYMin,fYMax,fPtMin,fPtMax,
+          yElectron,yPositron,xElectron,xPositron,phi12,weight);
+  if (fDebug == 1)
+    printf("AliGenEpEmv1::Generate(): y=(%f,%f), x=(%f,%f), phi=%f\n",
+          yElectron,yPositron,xElectron,xPositron,phi12);
+
+  for (j=0;j<3;j++) origin[j]=fOrigin[j];
+  if(fVertexSmear==kPerEvent) {
+    Rndm(random,6);
+    for (j=0;j<3;j++) {
+      origin[j]+=fOsigma[j]*TMath::Cos(2*random[2*j]*TMath::Pi())*
+       TMath::Sqrt(-2*TMath::Log(random[2*j+1]));
+    }
+  }
+
+  Rndm(random,1);
+  ptElectron  = TMath::Power(10,xElectron) * 1.e-03;;
+  ptPositron  = TMath::Power(10,xPositron) * 1.e-03;;
+  phiElectron = fPhiMin + random[0] * (fPhiMax-fPhiMin);
+  phiPositron = phiElectron + phi12;
+
+  // Produce electron
+  mt = TMath::Sqrt(ptElectron*ptElectron + fMass*fMass);
+  p[0] = ptElectron*TMath::Cos(phiElectron);
+  p[1] = ptElectron*TMath::Sin(phiElectron);
+  p[2] = mt*TMath::SinH(yElectron);
+  id =  11;
+  if (fDebug == 2)
+    printf("id=%+3d, p = (%+11.4e,%+11.4e,%+11.4e) GeV\n",id,p[0],p[1],p[2]);
+  SetTrack(fTrackIt,-1, id,p,origin,polar,0,kPPrimary,nt,weight);
+
+  // Produce positron
+  mt = TMath::Sqrt(ptPositron*ptPositron + fMass*fMass);
+  p[0] = ptPositron*TMath::Cos(phiPositron);
+  p[1] = ptPositron*TMath::Sin(phiPositron);
+  p[2] = mt*TMath::SinH(yPositron);
+  id = -11;
+  if (fDebug == 2)
+    printf("id=%+3d, p = (%+11.4e,%+11.4e,%+11.4e) GeV\n",id,p[0],p[1],p[2]);
+  SetTrack(fTrackIt,-1, id,p,origin,polar,0,kPPrimary,nt,weight);
+  
+  fEvent++;
+  if (fEvent%1000 == 0) {
+    printf("=====> AliGenEpEmv1::Generate(): \n   Event %d, sigma=%f +- %f kb\n",
+          fEvent,fEpEmGen->GetXsection(),fEpEmGen->GetDsection());
+  }
+}
+
diff --git a/EVGEN/AliGenEpEmv1.h b/EVGEN/AliGenEpEmv1.h
new file mode 100644 (file)
index 0000000..59e9c28
--- /dev/null
@@ -0,0 +1,36 @@
+#ifndef ALIGENEPEMV1_H
+#define ALIGENEPEMV1_H
+/* Copyright(c) 1998-2002, ALICE Experiment at CERN, All rights reserved. *
+ * Copyright(c) 1997, 1998, 2002, Adrian Alscher and Kai Hencken          *
+ * Copyright(c) 2002 Kai Hencken, Yuri Kharlov, Serguei Sadovsky          *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+// Event generator of single e+e- pair production in ultraperipheral PbPb collisions
+// at 5.5 TeV/nucleon.
+// Author: Yuri.Kharlov@cern.ch
+// 9 October 2002
+
+#include "AliGenMC.h"
+class TEpEmGen;
+
+//-------------------------------------------------------------
+class AliGenEpEmv1 : public AliGenMC
+{
+public:
+  AliGenEpEmv1();
+  
+  virtual ~AliGenEpEmv1();
+  void Generate();
+  void Init();
+  void SetDebug(Int_t debug) {fDebug=debug;}
+  
+  AliGenEpEmv1(const AliGenEpEmv1 & gen);
+protected:
+  Float_t    fMass;    // electron mass
+  TEpEmGen * fEpEmGen; // e+e- generator
+  Int_t      fDebug;   // debug level
+  Int_t      fEvent;   // internal event number
+ClassDef(AliGenEpEmv1,1) // Generator of single e+e- pair production in PbPb ultra-peripheral collisions
+};
+#endif
index 26af9b7a991991f2aeb810d86da108a665467318..3f9634e24ada885620fd3094186f206d1b20b2f9 100644 (file)
@@ -61,6 +61,7 @@
 #pragma link C++ class  AliPartonicEnergyLoss+;
 #pragma link C++ class  AliStructFuncType+;
 #pragma link C++ class  AliGenGrayParticles+;
+#pragma link C++ class  AliGenEpEmv1+;
 #endif
 
 
index 17402cd848270c1b76d124313667157907673f5c..33280b1cf14af210e79844b84ee01c027f1ef76c 100644 (file)
@@ -21,7 +21,7 @@ SRCS          = AliGenHIJINGpara.cxx AliGenBox.cxx AliGenFixed.cxx \
                AliGenAfterBurnerFlow.cxx \
                AliPartonicEnergyLoss.cxx AliGenHerwig.cxx \
                AliStructFuncType.cxx AliGenGrayParticles.cxx \
-               AliGenGeVSimEventHeader.cxx
+        AliGenGeVSimEventHeader.cxx AliGenEpEmv1.cxx
 
 # Headerfiles for this particular package (Path respect to own directory)
 HDRS= $(SRCS:.cxx=.h) 
@@ -34,6 +34,7 @@ $(ALICE_ROOT)/include/TMevSimConverter.h\
 $(ALICE_ROOT)/include/THBTprocessor.h\
 $(ALICE_ROOT)/include/MevSimCommon.h\
 $(ALICE_ROOT)/include/HBTprocCOMMON.h\
+$(ALICE_ROOT)/include/TEpEmGen.h\
 $(ROOTSYS)/include/TF1.h\
 $(ROOTSYS)/include/TChain.h\
 $(ROOTSYS)/include/TParticle.h