-// One can use the configuration macro in compiled mode by
-// root [0] gSystem->Load("libgeant321");
-// root [0] gSystem->SetIncludePath("-I$ROOTSYS/include -I$ALICE_ROOT/include\
-// -I$ALICE_ROOT -I$ALICE/geant3/TGeant3");
-// root [0] .x grun.C(1,"Config.C++")
-
-#if !defined(__CINT__) || defined(__MAKECINT__)
-#include <Riostream.h>
-#include <TRandom.h>
-#include <TSystem.h>
-#include <TVirtualMC.h>
-#include <TGeant3TGeo.h>
-#include "STEER/AliRunLoader.h"
-#include "STEER/AliRun.h"
-#include "STEER/AliConfig.h"
-#include "PYTHIA6/AliDecayerPythia.h"
-#include "EVGEN/AliGenCocktail.h"
-#include "EVGEN/AliGenHIJINGpara.h"
-#include "EVGEN/AliGenFixed.h"
-#include "EVGEN/AliGenBox.h"
-#include "STEER/AliMagFMaps.h"
-#include "STRUCT/AliBODY.h"
-#include "STRUCT/AliMAG.h"
-#include "STRUCT/AliABSOv3.h"
-#include "STRUCT/AliDIPOv3.h"
-#include "STRUCT/AliHALLv3.h"
-#include "STRUCT/AliFRAMEv2.h"
-#include "STRUCT/AliSHILv3.h"
-#include "STRUCT/AliPIPEv3.h"
-#include "ITS/AliITSvPPRasymmFMD.h"
-#include "TPC/AliTPCv2.h"
-#include "TOF/AliTOFv6T0.h"
-#include "HMPID/AliHMPIDv2.h"
-#include "ZDC/AliZDCv2.h"
-#include "TRD/AliTRDv1.h"
-#include "TRD/AliTRDgeometry.h"
-#include "FMD/AliFMDv1.h"
-#include "MUON/AliMUONv1.h"
-#include "PHOS/AliPHOSv1.h"
-#include "PMD/AliPMDv1.h"
-#include "T0/AliT0v1.h"
-#include "EMCAL/AliEMCALv2.h"
-#include "ACORDE/AliACORDEv0.h"
-#include "VZERO/AliVZEROv7.h"
-#endif
+// Configuration of simulation
enum PprTrigConf_t
{
Float_t EtaToTheta(Float_t arg);
+static AliMagF::BeamType_t beamType = AliMagF::kBeamTypeAA;
+static Double_t beamEnergy = 7000.*82./208;
static PprTrigConf_t strig = kDefaultPPTrig;// default PP trigger configuration
void Config()
// Theta range given through pseudorapidity limits 22/6/2001
// Set Random Number seed
- gRandom->SetSeed(123456); // Set 0 to use the currecnt time
+ gRandom->SetSeed(123456); // Set 0 to use the currecnt time
-
- // libraries required by geant321
-#if defined(__CINT__)
- gSystem->Load("libgeant321");
-#endif
+ // The libraries required by Geant3 are loaded in sim.C
new TGeant3TGeo("C++ Interface to Geant3");
gAlice->SetRunLoader(rl);
// Set the trigger configuration
- gAlice->SetTriggerDescriptor(pprTrigConfName[strig]);
+ AliSimulation::Instance()->SetTriggerConfig(pprTrigConfName[strig]);
cout<<"Trigger configuration is set to "<<pprTrigConfName[strig]<<endl;
//
decayer->SetForceDecay(kAll);
decayer->Init();
- gMC->SetExternalDecayer(decayer);
+
+ TVirtualMC * vmc = TVirtualMC::GetMC();
+
+ vmc->SetExternalDecayer(decayer);
//=======================================================================
// ************* STEERING parameters FOR ALICE SIMULATION **************
// --- Specify event type to be tracked through the ALICE setup
// --- All positions are in cm, angles in degrees, and P and E in GeV
- gMC->SetProcess("DCAY",1);
- gMC->SetProcess("PAIR",1);
- gMC->SetProcess("COMP",1);
- gMC->SetProcess("PHOT",1);
- gMC->SetProcess("PFIS",0);
- gMC->SetProcess("DRAY",0);
- gMC->SetProcess("ANNI",1);
- gMC->SetProcess("BREM",1);
- gMC->SetProcess("MUNU",1);
- gMC->SetProcess("CKOV",1);
- gMC->SetProcess("HADR",1);
- gMC->SetProcess("LOSS",2);
- gMC->SetProcess("MULS",1);
- gMC->SetProcess("RAYL",1);
+ vmc->SetProcess("DCAY",1);
+ vmc->SetProcess("PAIR",1);
+ vmc->SetProcess("COMP",1);
+ vmc->SetProcess("PHOT",1);
+ vmc->SetProcess("PFIS",0);
+ vmc->SetProcess("DRAY",0);
+ vmc->SetProcess("ANNI",1);
+ vmc->SetProcess("BREM",1);
+ vmc->SetProcess("MUNU",1);
+ vmc->SetProcess("CKOV",1);
+ vmc->SetProcess("HADR",1);
+ vmc->SetProcess("LOSS",2);
+ vmc->SetProcess("MULS",1);
+ vmc->SetProcess("RAYL",1);
Float_t cut = 1.e-3; // 1MeV cut by default
Float_t tofmax = 1.e10;
- gMC->SetCut("CUTGAM", cut);
- gMC->SetCut("CUTELE", cut);
- gMC->SetCut("CUTNEU", cut);
- gMC->SetCut("CUTHAD", cut);
- gMC->SetCut("CUTMUO", cut);
- gMC->SetCut("BCUTE", cut);
- gMC->SetCut("BCUTM", cut);
- gMC->SetCut("DCUTE", cut);
- gMC->SetCut("DCUTM", cut);
- gMC->SetCut("PPCUTM", cut);
- gMC->SetCut("TOFMAX", tofmax);
+ vmc->SetCut("CUTGAM", cut);
+ vmc->SetCut("CUTELE", cut);
+ vmc->SetCut("CUTNEU", cut);
+ vmc->SetCut("CUTHAD", cut);
+ vmc->SetCut("CUTMUO", cut);
+ vmc->SetCut("BCUTE", cut);
+ vmc->SetCut("BCUTM", cut);
+ vmc->SetCut("DCUTE", cut);
+ vmc->SetCut("DCUTM", cut);
+ vmc->SetCut("PPCUTM", cut);
+ vmc->SetCut("TOFMAX", tofmax);
// Special generation for Valgrind tests
// Each detector is fired by few particles selected
// to cover specific cases
- // The cocktail iitself
+ // The cocktail itself
AliGenCocktail *gener = new AliGenCocktail();
+ gener->SetEnergyCMS(beamEnergy); // Needed by ZDC
gener->SetPhiRange(0, 360);
// Set pseudorapidity range from -8 to 8.
Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
// Particle guns for the barrel part (taken from RichConfig)
AliGenFixed *pG1=new AliGenFixed(1);
- pG1->SetPart(2212);
+ pG1->SetPart(kProton);
pG1->SetMomentum(2.5);
pG1->SetTheta(109.5-3);
pG1->SetPhi(10);
gener->AddGenerator(pG1,"g1",1);
AliGenFixed *pG2=new AliGenFixed(1);
- pG2->SetPart(211);
+ pG2->SetPart(kPiPlus);
pG2->SetMomentum(1.0);
pG2->SetTheta( 90.0-3);
pG2->SetPhi(10);
gener->AddGenerator(pG2,"g2",1);
AliGenFixed *pG3=new AliGenFixed(1);
- pG3->SetPart(-211);
+ pG3->SetPart(kPiMinus);
pG3->SetMomentum(1.5);
pG3->SetTheta(109.5-3);
pG3->SetPhi(30);
gener->AddGenerator(pG3,"g3",1);
AliGenFixed *pG4=new AliGenFixed(1);
- pG4->SetPart(321);
+ pG4->SetPart(kKPlus);
pG4->SetMomentum(0.7);
pG4->SetTheta( 90.0-3);
pG4->SetPhi(30);
gener->AddGenerator(pG4,"g4",1);
AliGenFixed *pG5=new AliGenFixed(1);
- pG5->SetPart(-321);
+ pG5->SetPart(kKMinus);
pG5->SetMomentum(1.0);
pG5->SetTheta( 70.0-3);
pG5->SetPhi(30);
gener->AddGenerator(pG5,"g5",1);
AliGenFixed *pG6=new AliGenFixed(1);
- pG6->SetPart(-2212);
+ pG6->SetPart(kProtonBar);
pG6->SetMomentum(2.5);
pG6->SetTheta( 90.0-3);
pG6->SetPhi(50);
gener->AddGenerator(pG6,"g6",1);
AliGenFixed *pG7=new AliGenFixed(1);
- pG7->SetPart(-211);
+ pG7->SetPart(kPiMinus);
pG7->SetMomentum(0.7);
pG7->SetTheta( 70.0-3);
pG7->SetPhi(50);
// Electrons for TRD
AliGenFixed *pG8=new AliGenFixed(1);
- pG8->SetPart(11);
+ pG8->SetPart(kElectron);
pG8->SetMomentum(1.2);
pG8->SetTheta( 95.0);
pG8->SetPhi(190);
gener->AddGenerator(pG8,"g8",1);
AliGenFixed *pG9=new AliGenFixed(1);
- pG9->SetPart(-11);
+ pG9->SetPart(kPositron);
pG9->SetMomentum(1.2);
pG9->SetTheta( 85.0);
pG9->SetPhi(190);
gphos->SetMomentumRange(10,11.);
gphos->SetPhiRange(270.5,270.7);
gphos->SetThetaRange(90.5,90.7);
- gphos->SetPart(22);
+ gphos->SetPart(kGamma);
gener->AddGenerator(gphos,"GENBOX GAMMA for PHOS",1);
// EMCAL
gemcal->SetMomentumRange(10,11.);
gemcal->SetPhiRange(90.5,199.5);
gemcal->SetThetaRange(90.5,90.7);
- gemcal->SetPart(22);
+ gemcal->SetPart(kGamma);
gener->AddGenerator(gemcal,"GENBOX GAMMA for EMCAL",1);
// MUON
gmuon1->SetMomentumRange(20.,20.1);
gmuon1->SetPhiRange(0., 360.);
gmuon1->SetThetaRange(171.000,178.001);
- gmuon1->SetPart(13); // Muons
+ gmuon1->SetPart(kMuonMinus); // Muons
gener->AddGenerator(gmuon1,"GENBOX MUON1",1);
AliGenBox * gmuon2 = new AliGenBox(1);
gmuon2->SetMomentumRange(20.,20.1);
gmuon2->SetPhiRange(0., 360.);
gmuon2->SetThetaRange(171.000,178.001);
- gmuon2->SetPart(-13); // Muons
+ gmuon2->SetPart(kMuonPlus); // Muons
gener->AddGenerator(gmuon2,"GENBOX MUON1",1);
//TOF
AliGenFixed *gtof=new AliGenFixed(1);
- gtof->SetPart(2212);
+ gtof->SetPart(kProton);
gtof->SetMomentum(2.5);
gtof->SetTheta(95);
- pG1->SetPhi(340);
+ gtof->SetPhi(340);
gener->AddGenerator(gtof,"Proton for TOF",1);
+
+ //FMD1
+ AliGenFixed *gfmd1=new AliGenFixed(1);
+ gfmd1->SetPart(kGamma);
+ gfmd1->SetMomentum(25);
+ gfmd1->SetTheta(1.8);
+ gfmd1->SetPhi(10);
+ gener->AddGenerator(gfmd1,"Gamma for FMD1",1);
+
+ //FMD2i
+ AliGenFixed *gfmd2i=new AliGenFixed(1);
+ gfmd2i->SetPart(kPiPlus);
+ gfmd2i->SetMomentum(1.5);
+ gfmd2i->SetTheta(7.3);
+ gfmd2i->SetPhi(20);
+ gener->AddGenerator(gfmd2i,"Pi+ for FMD2i",1);
+
+ //FMD2o
+ AliGenFixed *gfmd2o=new AliGenFixed(1);
+ gfmd2o->SetPart(kPiMinus);
+ gfmd2o->SetMomentum(1.5);
+ gfmd2o->SetTheta(16.1);
+ gfmd2o->SetPhi(30);
+ gener->AddGenerator(gfmd2o,"Pi- for FMD2o",1);
+
+ //FMD3o
+ AliGenFixed *gfmd3o=new AliGenFixed(1);
+ gfmd3o->SetPart(kPiPlus);
+ gfmd3o->SetMomentum(1.5);
+ gfmd3o->SetTheta(163.9);
+ gfmd3o->SetPhi(40);
+ gener->AddGenerator(gfmd3o,"Pi+ for FMD3o",1);
+ //FMD3i
+ AliGenFixed *gfmd3i=new AliGenFixed(1);
+ gfmd3i->SetPart(kPiMinus);
+ gfmd3i->SetMomentum(1.5);
+ gfmd3i->SetTheta(170.5);
+ gfmd3i->SetPhi(50);
+ gener->AddGenerator(gfmd3i,"Pi- for FMD3i",1);
+
+ //VZERO C
+ AliGenFixed *gv0c=new AliGenFixed(1);
+ gv0c->SetPart(kPiPlus);
+ gv0c->SetMomentum(1.5);
+ gv0c->SetTheta(170);
+ gv0c->SetPhi(50);
+ gener->AddGenerator(gv0c,"Pi+ for V0C",1);
+
+ //VZERO A
+ AliGenFixed *gv0a=new AliGenFixed(1);
+ gv0a->SetPart(kPiMinus);
+ gv0a->SetMomentum(1.5);
+ gv0a->SetTheta(1.5);
+ gv0a->SetPhi(70);
+ gener->AddGenerator(gv0a,"Pi- for V0A",1);
+
+
+ //PMD
+ AliGenFixed *gpmd=new AliGenFixed(1);
+ gpmd->SetPart(kGamma);
+ gpmd->SetMomentum(2);
+ gpmd->SetTheta(12.6);
+ gpmd->SetPhi(60);
+ gener->AddGenerator(gpmd,"Gamma for PMD",1);
+
+ //ZDC
+ AliGenFixed *gzdc1=new AliGenFixed(1);
+ gzdc1->SetPart(kProton);
+ gzdc1->SetMomentum(700);
+ gzdc1->SetTheta(0.6);
+ gzdc1->SetPhi(60);
+ gener->AddGenerator(gzdc1,"Proton for ZDC",1);
+
+ AliGenFixed *gzdc2=new AliGenFixed(1);
+ gzdc2->SetPart(kNeutron);
+ gzdc2->SetMomentum(500);
+ gzdc2->SetTheta(0.6);
+ gzdc2->SetPhi(60);
+ gener->AddGenerator(gzdc2,"Neutron for ZDC",1);
+
+ //T0
+ AliGenFixed *gt0=new AliGenFixed(1);
+ gt0->SetPart(kPiPlus);
+ gt0->SetMomentum(2);
+ gt0->SetTheta(5.1);
+ gt0->SetPhi(60);
+ gener->AddGenerator(gt0,"Pi+ for T0",1);
+
+ AliGenFixed *gt01=new AliGenFixed(1);
+ gt01->SetPart(kPiMinus);
+ gt01->SetMomentum(2);
+ gt01->SetTheta(5.1);
+ gt01->SetPhi(60);
+ gener->AddGenerator(gt01,"Pi- for T0",1);
+
+
+ //ACORDE
+ AliGenFixed *gacorde=new AliGenFixed(1);
+ gacorde->SetPart(kMuonPlus);
+ gacorde->SetMomentum(20);
+ gacorde->SetTheta(90.);
+ gacorde->SetPhi(90);
+ gener->AddGenerator(gacorde,"Muon+ for ACORDE",1);
+
+ AliGenFixed *gacorde1=new AliGenFixed(1);
+ gacorde1->SetPart(kMuonMinus);
+ gacorde1->SetMomentum(20);
+ gacorde1->SetTheta(90.);
+ gacorde1->SetPhi(90);
+ gener->AddGenerator(gacorde1,"Muon- for ACORDE",1);
+
gener->Init();
//
//gener->SetVertexSmear(perTrack);
// Field (L3 0.5 T)
- AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., 2);
- field->SetL3ConstField(1); //Using const. field in the barrel if 0
- gAlice->SetField(field);
-
+ TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", -1., -1., AliMagF::k5kG,beamType,beamEnergy));
Int_t iABSO = 1;
Int_t iDIPO = 1;
Int_t iPHOS = 1;
Int_t iPIPE = 1;
Int_t iPMD = 1;
- Int_t iHMPID = 1;
+ Int_t iHMPID = 1;
Int_t iSHIL = 1;
- Int_t iT0 = 1;
+ Int_t iT0 = 1;
Int_t iTOF = 1;
Int_t iTPC = 1;
Int_t iTRD = 1;
Int_t iZDC = 1;
Int_t iEMCAL = 1;
- Int_t iACORDE = 0;
+ Int_t iACORDE= 1;
Int_t iVZERO = 1;
rl->CdGAFile();
//=================== Alice BODY parameters =============================
//=================== FRAME parameters ============================
AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
+ FRAME->SetHoles(1);
}
if (iSHIL)
AliPIPE *PIPE = new AliPIPEv3("PIPE", "Beam Pipe");
}
- if(iITS) {
-
- //=================== ITS parameters ============================
- //
- // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
- // almost all other detectors. This involves the fact that the ITS geometry
- // still has several options to be followed in parallel in order to determine
- // the best set-up which minimizes the induced background. All the geometries
- // available to date are described in the following. Read carefully the comments
- // and use the default version (the only one uncommented) unless you are making
- // comparisons and you know what you are doing. In this case just uncomment the
- // ITS geometry you want to use and run Aliroot.
- //
- // Detailed geometries:
- //
- //
- //
- AliITSvPPRasymmFMD *ITS = new AliITSvPPRasymmFMD("ITS","ITS PPR detailed version with asymmetric services");
- ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
- ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
- // ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer
- ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
- ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
- ITS->SetThicknessChip1(150.); // chip thickness on layer 1 must be in the range [150,300]
- ITS->SetThicknessChip2(150.); // chip thickness on layer 2 must be in the range [150,300]
- ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
- ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
+ if (iITS)
+ {
+ //=================== ITS parameters ============================
-
- //
- // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful
- // for reconstruction !):
- //
- //
- //AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services");
- //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
- //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
- //
- //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services");
- //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
- //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
- //
- //
- //
- // Geant3 <-> EUCLID conversion
- // ============================
- //
- // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
- // media to two ASCII files (called by default ITSgeometry.euc and
- // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
- // The default (=0) means that you dont want to use this facility.
- //
- ITS->SetEUCLID(0);
+ AliITS *ITS = new AliITSv11("ITS","ITS v11");
}
if (iTPC)
if (iTOF) {
//=================== TOF parameters ============================
AliTOF *TOF = new AliTOFv6T0("TOF", "normal TOF");
- // Partial geometry: modules at 2,3,4,6,7,11,12,14,15,16
- // starting at 6h in positive direction
- Int_t TOFSectors[18]={-1,-1,0,0,0,-1,0,0,-1,-1,-1,0,0,-1,0,0,0,0};
- TOF->SetTOFSectors(TOFSectors);
}
if (iHMPID)
{
//=================== HMPID parameters ===========================
- AliHMPID *HMPID = new AliHMPIDv2("HMPID", "normal HMPID");
+ AliHMPID *HMPID = new AliHMPIDv3("HMPID", "normal HMPID");
}
{
//=================== ZDC parameters ============================
- AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC");
+ AliZDC *ZDC = new AliZDCv4("ZDC", "normal ZDC");
}
if (iTRD)
AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
AliTRDgeometry *geoTRD = TRD->GetGeometry();
- // Partial geometry: modules at 2,3,4,6,11,12,14,15
- // starting at 6h in positive direction
- geoTRD->SetSMstatus(0,0);
- geoTRD->SetSMstatus(1,0);
+ // Partial geometry: modules at 0,1,7,8,9,10,17
+ // starting at 3h in positive direction
+ geoTRD->SetSMstatus(2,0);
+ geoTRD->SetSMstatus(3,0);
+ geoTRD->SetSMstatus(4,0);
geoTRD->SetSMstatus(5,0);
- geoTRD->SetSMstatus(7,0);
- geoTRD->SetSMstatus(8,0);
- geoTRD->SetSMstatus(9,0);
- geoTRD->SetSMstatus(10,0);
+ geoTRD->SetSMstatus(6,0);
+ geoTRD->SetSMstatus(11,0);
+ geoTRD->SetSMstatus(12,0);
geoTRD->SetSMstatus(13,0);
+ geoTRD->SetSMstatus(14,0);
+ geoTRD->SetSMstatus(15,0);
geoTRD->SetSMstatus(16,0);
- geoTRD->SetSMstatus(17,0);
}
if (iFMD)
if (iEMCAL)
{
//=================== EMCAL parameters ============================
- AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "SHISH_77_TRD1_2X2_FINAL_110DEG");
+ AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "EMCAL_COMPLETEV1");
}
if (iACORDE)
{
//=================== ACORDE parameters ============================
- AliACORDE *ACORDE = new AliACORDEv0("ACORDE", "normal ACORDE");
+ AliACORDE *ACORDE = new AliACORDEv1("ACORDE", "normal ACORDE");
}
if (iVZERO)