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.
-// $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
//
//
//--- 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"
// 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;
// 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++;
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;
}
// 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++)
{
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;
v[0]=(part->GetVx())/10;
v[1]=(part->GetVy())/10;
v[2]=(part->GetVz())/10;
- r.SetVector(v,"car");
+ r.SetPosition(v,"car");
ntk++;
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);
#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"
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
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
* 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"
fAproj=0;
fZproj=0;
fPnucProj=0;
+ fIdProj=0;
fAtarg=0;
fZtarg=0;
fPnucTarg=0;
+ fIdTarg=0;
fNcals=0;
fCalorimeters=0;
fCalCopy=0;
fAproj=0;
fZproj=0;
fPnucProj=0;
+ fIdProj=0;
fAtarg=0;
fZtarg=0;
fPnucTarg=0;
+ fIdTarg=0;
fNcals=0;
fCalorimeters=0;
fCalCopy=0;
fAproj=0;
fZproj=0;
fPnucProj=0;
+ fIdProj=0;
fAtarg=0;
fZtarg=0;
fPnucTarg=0;
+ fIdTarg=0;
fNcals=0;
if (fCalorimeters)
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()
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()
return fPnucTarg;
}
///////////////////////////////////////////////////////////////////////////
+Int_t AliEvent::GetTargetId()
+{
+// Provide the user defined particle ID of the target.
+ return fIdTarg;
+}
+///////////////////////////////////////////////////////////////////////////
void AliEvent::HeaderInfo()
{
// Provide event header information
/* 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>
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
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
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.