]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
30-nov-2002 NvE Vertex position errors based on fResolution introduced in AliCollider...
authornick <nick@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 2 Dec 2002 15:10:38 +0000 (15:10 +0000)
committernick <nick@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 2 Dec 2002 15:10:38 +0000 (15:10 +0000)
02-dec-2002 NvE Facility for user defined projectile and target particle ID introduced in
                AliEvent and projectile/target information provided in the AliCollider created
                event structure.

RALICE/AliCollider.cxx
RALICE/AliCollider.h
RALICE/AliEvent.cxx
RALICE/AliEvent.h
RALICE/history.txt

index 6882859ed513c1814ce4430eaa287c4ee50f002b..b3d8ccda3ba4fed4273f285e56554039b7a29424 100644 (file)
@@ -1,4 +1,4 @@
-// $Id: AliCollider.cxx,v 1.1 2002/11/27 21:25:52 nick Exp $
+// $Id: AliCollider.cxx,v 1.2 2002/11/29 13:54:52 nick Exp $
 
 ///////////////////////////////////////////////////////////////////////////
 // Class AliCollider
@@ -89,7 +89,7 @@
 //
 //
 //--- Author: Nick van Eijndhoven 22-nov-2002 Utrecht University
-//- Modified: NvE $Date: 2002/11/27 21:25:52 $ Utrecht University
+//- Modified: NvE $Date: 2002/11/29 13:54:52 $ Utrecht University
 ///////////////////////////////////////////////////////////////////////////
 
 #include "AliCollider.h"
@@ -289,8 +289,11 @@ void AliCollider::Init(char* frame,Int_t zp,Int_t ap,Int_t zt,Int_t at,Float_t w
 // Initialisation of the underlying Pythia generator package for the generation
 // of nucleus-nucleus interactions.
 // In addition to the Pythia standard arguments 'frame' and 'win', the user
-// can specify here (Z,A) values of the projectile and target nuclei and the number
-// 'npart' of the participant nucleons for this collision.
+// can specify here (Z,A) values of the projectile and target nuclei.
+//
+// Note : The 'win' value denotes either the cms energy per nucleon-nucleon collision
+//        (i.e. frame="cms") or the momentum per nucleon in all other cases.
+//
 // The event number is reset to 0.
  fEventnum=0;
  fNucl=1;
@@ -351,10 +354,22 @@ void AliCollider::MakeEvent(Int_t npt,Int_t mlist,Int_t medit)
 // the number of participant nucleons.
 // In case of a standard Pythia run for 'elementary' particle interactions,
 // the value of npt is totally irrelevant.
+//
 // The argument 'medit' denotes the edit mode used for Pyedit().
+// Note : medit<0 suppresses the invokation of Pyedit().
 // By default, only 'stable' final particles are kept (i.e. medit=1). 
+//
 // The argument 'mlist' denotes the list mode used for Pylist().
-// By default, no listing is produced (i.e. mlist=0).
+// Note : mlist<0 suppresses the invokation of Pylist().
+// By default, no listing is produced (i.e. mlist=-1).
+//
+// In the case of a standard Pythia run concerning 'elementary' particle
+// interactions, the projectile and target particle ID's for the created
+// event structure are set to the corresponding Pythia KF codes.
+// All the A and Z values are in that case set to zero.
+// In case of a nucleus-nucleus interaction, the proper A and Z values for 
+// the projectile and target particles are set in the event structure.
+// However, in this case both particle ID's are set to zero.
 
  fEventnum++; 
 
@@ -464,21 +479,31 @@ void AliCollider::MakeEvent(Int_t npt,Int_t mlist,Int_t medit)
  fEvent->SetRunNumber(fRunnum);
  fEvent->SetEventNumber(fEventnum);
 
+ AliTrack t;
+ Ali3Vector p;
+ AliPosition r,rx;
+ Float_t v[3];
  AliVertex vert;
+
  if (fVertexmode)
  {
   // Make sure the primary vertex gets correct location and Id=1
+  v[0]=0;
+  v[1]=0;
+  v[2]=0;
+  r.SetPosition(v,"car");
+  v[0]=fResolution;
+  v[1]=fResolution;
+  v[2]=fResolution;
+  r.SetPositionErrors(v,"car");
+
   vert.SetId(1);
   vert.SetTrackCopy(0);
   vert.SetVertexCopy(0);
+  vert.SetPosition(r);
   fEvent->AddVertex(vert,0);
  }
 
- AliTrack t;
- Ali3Vector p;
- AliPosition r,rx;
- Float_t v[3];
-
  Int_t kf=0,kc=0;
  Float_t charge=0,mass=0;
 
@@ -494,6 +519,8 @@ void AliCollider::MakeEvent(Int_t npt,Int_t mlist,Int_t medit)
  }
 
  // Generate all the various collisions
+ Int_t first=1; // Flag to indicate the first collision process
+ Double_t pnucl;
  Int_t npart=0,ntk=0;
  Double_t dist=0;
  for (Int_t itype=0; itype<ntypes; itype++)
@@ -509,9 +536,42 @@ void AliCollider::MakeEvent(Int_t npt,Int_t mlist,Int_t medit)
   {
    GenerateEvent();
 
-   Pyedit(medit); // Define which particles are to be kept
+   if (first) // Store projectile and target information in the event structure
+   {
+    if (fNucl)
+    {
+     v[0]=GetP(1,1);
+     v[1]=GetP(1,2);
+     v[2]=GetP(1,3);
+     pnucl=sqrt(v[0]*v[0]+v[1]*v[1]+v[2]*v[2]);
+     fEvent->SetProjectile(fAproj,fZproj,pnucl);
+     v[0]=GetP(2,1);
+     v[1]=GetP(2,2);
+     v[2]=GetP(2,3);
+     pnucl=sqrt(v[0]*v[0]+v[1]*v[1]+v[2]*v[2]);
+     fEvent->SetTarget(fAtarg,fZtarg,pnucl);
+    }
+    else
+    {
+     v[0]=GetP(1,1);
+     v[1]=GetP(1,2);
+     v[2]=GetP(1,3);
+     pnucl=sqrt(v[0]*v[0]+v[1]*v[1]+v[2]*v[2]);
+     kf=GetK(1,2);
+     fEvent->SetProjectile(0,0,pnucl,kf);
+     v[0]=GetP(2,1);
+     v[1]=GetP(2,2);
+     v[2]=GetP(2,3);
+     pnucl=sqrt(v[0]*v[0]+v[1]*v[1]+v[2]*v[2]);
+     kf=GetK(2,2);
+     fEvent->SetTarget(0,0,pnucl,kf);
+    }
+    first=0;
+   }
+
+   if (medit >= 0) Pyedit(medit); // Define which particles are to be kept
 
-   if (mlist) Pylist(mlist);
+   if (mlist >= 0) Pylist(mlist);
 
    ImportParticles();
    npart=0;
@@ -539,7 +599,7 @@ void AliCollider::MakeEvent(Int_t npt,Int_t mlist,Int_t medit)
     v[0]=(part->GetVx())/10;
     v[1]=(part->GetVy())/10;
     v[2]=(part->GetVz())/10;
-    r.SetVector(v,"car");
+    r.SetPosition(v,"car");
 
     ntk++;
 
@@ -585,6 +645,10 @@ void AliCollider::MakeEvent(Int_t npt,Int_t mlist,Int_t medit)
       AliTrack* tx=fEvent->GetIdTrack(ntk);
       if (tx)
       {
+       v[0]=fResolution;
+       v[1]=fResolution;
+       v[2]=fResolution;
+       r.SetPositionErrors(v,"car");
        vert.Reset();
        vert.SetTrackCopy(0);
        vert.SetVertexCopy(0);
index 112ff5734a92fc8ae20cb90d23948f66522bba7f..b4fc5d72d122fbe0a30e0f7bab9c113bdfe7b8d2 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef ALICOLLIDER_H
 #define ALICOLLIDER_H
 
-// $Id$
+// $Id: AliCollider.h,v 1.1 2002/11/27 21:25:52 nick Exp $
 
 #include "Riostream.h"
 #include "TPythia6.h"
@@ -29,7 +29,7 @@ class AliCollider : public TPythia6
   Int_t GetPrintFreq();                                 // Provide the print frequency
   void Init(char* frame,char* beam,char* target,Float_t win); // Standard Pythia initialisation
   void Init(char* frame,Int_t zp,Int_t ap,Int_t zt,Int_t at,Float_t win); // Nucl-Nucl initialisation
-  void MakeEvent(Int_t npt,Int_t mlist=0,Int_t medit=1);// Generate a single event with npt participant nucleons
+  void MakeEvent(Int_t npt,Int_t mlist=-1,Int_t medit=1);// Generate a single event with npt participant nucleons
   void EndRun();                                        // Properly close all buffers and output file
   AliEvent* GetEvent();                                 // Provide pointer to the generated event structure
 
@@ -58,6 +58,6 @@ class AliCollider : public TPythia6
 
   void GetFractions(Float_t zp,Float_t ap,Float_t zt,Float_t at); // Determine various N-N collision fractions
 
- ClassDef(AliCollider,1) // Pythia based universal physics event generator
+ ClassDef(AliCollider,2) // Pythia based universal physics event generator
 };
 #endif
index 8335b9241ba3b89e56499c24af04f77e9677768b..2190570c24348d9ce14053666a10720717c74449 100644 (file)
@@ -13,7 +13,7 @@
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-// $Id: AliEvent.cxx,v 1.6 2002/04/26 11:23:37 nick Exp $
+// $Id: AliEvent.cxx,v 1.7 2002/06/25 09:38:28 nick Exp $
 
 ///////////////////////////////////////////////////////////////////////////
 // Class AliEvent
 // Note : All quantities are in GeV, GeV/c or GeV/c**2
 //
 //--- Author: Nick van Eijndhoven 27-may-2001 UU-SAP Utrecht
-//- Modified: NvE $Date: 2002/04/26 11:23:37 $ UU-SAP Utrecht
+//- Modified: NvE $Date: 2002/06/25 09:38:28 $ UU-SAP Utrecht
 ///////////////////////////////////////////////////////////////////////////
 
 #include "AliEvent.h"
@@ -206,9 +206,11 @@ AliEvent::AliEvent()
  fAproj=0;
  fZproj=0;
  fPnucProj=0;
+ fIdProj=0;
  fAtarg=0;
  fZtarg=0;
  fPnucTarg=0;
+ fIdTarg=0;
  fNcals=0;
  fCalorimeters=0;
  fCalCopy=0;
@@ -225,9 +227,11 @@ AliEvent::AliEvent(Int_t n): AliVertex(n)
  fAproj=0;
  fZproj=0;
  fPnucProj=0;
+ fIdProj=0;
  fAtarg=0;
  fZtarg=0;
  fPnucTarg=0;
+ fIdTarg=0;
  fNcals=0;
  fCalorimeters=0;
  fCalCopy=0;
@@ -255,9 +259,11 @@ void AliEvent::Reset()
  fAproj=0;
  fZproj=0;
  fPnucProj=0;
+ fIdProj=0;
  fAtarg=0;
  fZtarg=0;
  fPnucTarg=0;
+ fIdTarg=0;
 
  fNcals=0;
  if (fCalorimeters)
@@ -334,12 +340,14 @@ Int_t AliEvent::GetEventNumber()
  return fEvent;
 }
 ///////////////////////////////////////////////////////////////////////////
-void AliEvent::SetProjectile(Int_t a,Int_t z,Double_t pnuc)
+void AliEvent::SetProjectile(Int_t a,Int_t z,Double_t pnuc,Int_t id)
 {
-// Set the projectile A, Z and momentum value per nucleon.
+// Set the projectile A, Z, momentum per nucleon and user defined particle ID.
+// By default the particle ID is set to zero.
  fAproj=a;
  fZproj=z;
  fPnucProj=pnuc;
+ fIdProj=id;
 }
 ///////////////////////////////////////////////////////////////////////////
 Int_t AliEvent::GetProjectileA()
@@ -360,12 +368,20 @@ Double_t AliEvent::GetProjectilePnuc()
  return fPnucProj;
 }
 ///////////////////////////////////////////////////////////////////////////
-void AliEvent::SetTarget(Int_t a,Int_t z,Double_t pnuc)
+Int_t AliEvent::GetProjectileId()
 {
-// Set the target A, Z and momentum value per nucleon.
+// Provide the user defined particle ID of the projectile.
+ return fIdProj;
+}
+///////////////////////////////////////////////////////////////////////////
+void AliEvent::SetTarget(Int_t a,Int_t z,Double_t pnuc,Int_t id)
+{
+// Set the target A, Z, momentum per nucleon and user defined particle ID.
+// By default the particle ID is set to zero.
  fAtarg=a;
  fZtarg=z;
  fPnucTarg=pnuc;
+ fIdTarg=id;
 }
 ///////////////////////////////////////////////////////////////////////////
 Int_t AliEvent::GetTargetA()
@@ -386,6 +402,12 @@ Double_t AliEvent::GetTargetPnuc()
  return fPnucTarg;
 }
 ///////////////////////////////////////////////////////////////////////////
+Int_t AliEvent::GetTargetId()
+{
+// Provide the user defined particle ID of the target.
+ return fIdTarg;
+}
+///////////////////////////////////////////////////////////////////////////
 void AliEvent::HeaderInfo()
 {
 // Provide event header information
index a8993ada690254276c60570af8d39b8d17465f54..33ec029691d182b39233aa95b6b8bedcc3ac0c1b 100644 (file)
@@ -3,7 +3,7 @@
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
-// $Id: AliEvent.h,v 1.4 2002/06/25 09:38:28 nick Exp $
+// $Id: AliEvent.h,v 1.5 2002/10/28 14:41:34 nick Exp $
 
 #include "Riostream.h"
 #include <math.h>
@@ -25,14 +25,16 @@ class AliEvent : public AliVertex
   void SetDayTime(TDatime& stamp);        // Set the date and time stamp
   void SetRunNumber(Int_t run);           // Set the run number
   void SetEventNumber(Int_t evt);         // Set the event number
-  void SetProjectile(Int_t a,Int_t z,Double_t pnuc); // Set projectile A, Z and momentum value per nucleon
+  void SetProjectile(Int_t a,Int_t z,Double_t pnuc,Int_t id=0); // Set projectile A, Z, p per nucleon and id
   Int_t GetProjectileA();                 // Provide A value of the projectile
   Int_t GetProjectileZ();                 // Provide Z value of the projectile
   Double_t GetProjectilePnuc();           // Provide the projectile momentum value per nucleon
-  void SetTarget(Int_t a,Int_t z,Double_t pnuc); // Set target A, Z and momentum value per nucleon
+  Int_t GetProjectileId();                // Provide the user defined particle ID of the projectile
+  void SetTarget(Int_t a,Int_t z,Double_t pnuc,Int_t id=0); // Set target A, Z, p per nucleon and id
   Int_t GetTargetA();                     // Provide A value of the target
   Int_t GetTargetZ();                     // Provide Z value of the target
   Double_t GetTargetPnuc();               // Provide the target momentum value per nucleon
+  Int_t GetTargetId();                    // Provide the user defined particle ID of the target
   void Reset();                           // Reset all values
   TDatime GetDayTime();                   // Provide the date and time stamp
   Int_t GetRunNumber();                   // Provide the run number
@@ -54,13 +56,15 @@ class AliEvent : public AliVertex
   Int_t fAproj;             // The projectile A value
   Int_t fZproj;             // The projectile Z value
   Double_t fPnucProj;       // The projectile momentum per nucleon
+  Int_t fIdProj;            // User defined projectile particle ID
   Int_t fAtarg;             // The target A value
   Int_t fZtarg;             // The target Z value
   Double_t fPnucTarg;       // The target momentum per nucleon
+  Int_t fIdTarg;            // User defined target particle ID
   Int_t fNcals;             // The number of calorimeter systems 
   TObjArray* fCalorimeters; // Array to hold the pointers to the calorimeter systems
   Int_t fCalCopy;           // Flag to denote creation of private copies in fCalorimeters
 
- ClassDef(AliEvent,3) // Creation and investigation of an Alice physics event.
+ ClassDef(AliEvent,4) // Creation and investigation of an Alice physics event.
 };
 #endif
index ad7463708001e47084c1f399b05529cf2d5b790a..04fd09b3afbfbdcdfbb29d3adb0682900713ff71 100644 (file)
 27-nov-2002 NvE New class AliCollider introduced and RALICEHeaders.h and RALICELinkdef.h
                 updated accordingly.
 29-nov-2002 NvE Typo corrected in AliCollider.cxx.
+30-nov-2002 NvE Vertex position errors based on fResolution introduced in AliCollider.cxx.
+02-dec-2002 NvE Facility for user defined projectile and target particle ID introduced in
+                AliEvent and projectile/target information provided in the AliCollider created
+                event structure.