]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliGenParam.cxx
Merging the VirtualMC branch to the main development branch (HEAD)
[u/mrichter/AliRoot.git] / EVGEN / AliGenParam.cxx
index 84340ba899994268f9457a24c27771a20e3f6417..45d628b0363b5b670d67cbcfd7315043f4e9d0dd 100644 (file)
 
 /*
 $Log$
+Revision 1.36.6.3  2002/10/10 16:40:08  hristov
+Updating VirtualMC to v3-09-02
+
+Revision 1.39  2002/09/16 08:21:16  morsch
+Use TDatabasePDG::Instance();
+
+Revision 1.38  2002/05/30 14:59:12  morsch
+Check geometrical acceptance. (G. Martinez)
+
+Revision 1.37  2002/04/17 10:20:44  morsch
+Coding Rule violations corrected.
+
+Revision 1.36  2002/02/08 16:50:50  morsch
+Add name and title in constructor.
+
 Revision 1.35  2002/01/21 10:02:40  morsch
 ty is Double_t
 Abort if too high rapidity causes numerical paroblem. User has to specify
@@ -105,6 +120,14 @@ Introduction of the Copyright and cvs Log
 
 */
 
+
+
+// Class to generate particles from using paramtrized pT and y distributions.
+// Distributions are obtained from pointer to object of type AliGenLib.
+// (For example AliGenMUONlib)
+// Decays are performed using Pythia.
+// andreas.morsch@cern.ch
+
 #include "AliGenParam.h"
 #include "AliDecayerPythia.h"
 #include "AliGenMUONlib.h"
@@ -226,9 +249,10 @@ AliGenParam::AliGenParam(Int_t npart, Int_t param,
 }
 
 
-AliGenParam::AliGenParam(const AliGenParam & Paramd)
+AliGenParam::AliGenParam(const AliGenParam & Param)
 {
 // copy constructor
+    Param.Copy(*this);
 }
 
 //____________________________________________________________
@@ -322,8 +346,7 @@ void AliGenParam::Generate()
   //
   if(!particles) particles = new TClonesArray("TParticle",1000);
   
-  static TDatabasePDG *pDataBase = new TDatabasePDG();
-  if(!pDataBase) pDataBase = new TDatabasePDG();
+  TDatabasePDG *pDataBase = TDatabasePDG::Instance();
   //
   Float_t random[6];
  
@@ -408,6 +431,10 @@ void AliGenParam::Generate()
 //
 // select decay particles
              Int_t np=fDecayer->ImportParticles(particles);
+
+             //  Selecting  GeometryAcceptance for particles fPdgCodeParticleforAcceptanceCut;
+             if (fGeometryAcceptance) 
+               if (!CheckAcceptanceGeometry(np,particles)) continue;
              Int_t ncsel=0;
              Int_t* pFlag      = new Int_t[np];
              Int_t* pParent    = new Int_t[np];
@@ -508,6 +535,7 @@ void AliGenParam::Generate()
                          } else {
                              iparent = -1;
                          }
+                        
                          SetTrack(fTrackIt*trackIt[i], iparent, kf,
                                           pc, och, polar,
                                           0, kPDecay, nt, wgtch);