From 9bb2665ff620d2491497f4b7636f0d3881b20217 Mon Sep 17 00:00:00 2001 From: alibrary Date: Tue, 30 Oct 2007 07:54:53 +0000 Subject: [PATCH] Using symbolic particle types everywhere --- FMD/Config.C | 14 ++++++------ ITS/ConfigSDD03.C | 3 ++- ITS/ConfigSPD02.C | 3 ++- ITS/ConfigSSD03.C | 4 ++-- ITS/oldmacros/ConfigSPD02.C | 4 +++- ITS/oldmacros/Config_muon.C | 4 +++- MUON/Config.C | 4 ++-- PHOS/ConfigTestSuite.C | 6 +++-- PHOS/macros/AlignmentDB/Config.C | 3 ++- PHOS/macros/Embed/Config.C | 5 ++++- PHOS/macros/testSuite/ConfigTestSuite.C | 7 ++++-- TDPMjet/ConfigDPMjet.C | 7 +++--- TRD/Macros/AliTRDConfigPID.C | 21 +++++++++--------- TRD/Macros/AliTRDconfig.C | 7 +++--- doc/aliroot-primer/scripts/Config.C | 2 +- macros/Config.C | 3 ++- macros/ConfigHBT.C | 3 ++- macros/Config_gener.C | 6 ++--- macros/MUONConfig.C | 4 ++-- test/gun/Config.C | 29 +++++++++++++------------ 20 files changed, 80 insertions(+), 59 deletions(-) diff --git a/FMD/Config.C b/FMD/Config.C index 240d3209fcf..75ce3a83462 100644 --- a/FMD/Config.C +++ b/FMD/Config.C @@ -15,7 +15,7 @@ */ #if !defined(__CINT__) || defined(__MAKECINT__) #include -#include +#include #include #include #include @@ -1581,7 +1581,7 @@ GeneratorFactory(EG_t eg, Rad_t rad, TString& comment) { comment = comment.Append(" Flat in FMD1 range"); AliGenBox* gener = new AliGenBox(2000); - gener->SetPart(211); + gener->SetPart(kPiPlus); gener->SetMomentumRange(3,4); gener->SetPhiRange(0, 360); gener->SetThetaRange(0.77, 3.08); @@ -1592,7 +1592,7 @@ GeneratorFactory(EG_t eg, Rad_t rad, TString& comment) { comment = comment.Append(" Flat in FMD2 range"); AliGenBox* gener = new AliGenBox(2000); - gener->SetPart(211); + gener->SetPart(kPiPlus); gener->SetMomentumRange(3,4); gener->SetPhiRange(0, 360); gener->SetThetaRange(2.95, 20.42); @@ -1603,7 +1603,7 @@ GeneratorFactory(EG_t eg, Rad_t rad, TString& comment) { comment = comment.Append(" Flat in FMD3 range"); AliGenBox* gener = new AliGenBox(2000); - gener->SetPart(211); + gener->SetPart(kPiPlus); gener->SetMomentumRange(3,4); gener->SetPhiRange(0, 360); gener->SetThetaRange(155.97, 176.73); @@ -1618,15 +1618,15 @@ GeneratorFactory(EG_t eg, Rad_t rad, TString& comment) gener->SetPhiRange(0, 360); AliGenBox* gener3 = new AliGenBox(2000); gener3->SetThetaRange(155.97, 176.73); - gener3->SetPart(211); + gener3->SetPart(kPiPlus); gener->AddGenerator(gener3, "FMD3", .33); AliGenBox* gener2 = new AliGenBox(2000); gener2->SetThetaRange(2.95, 20.42); - gener2->SetPart(211); + gener2->SetPart(kPiPlus); gener->AddGenerator(gener2, "FMD2", .33); AliGenBox* gener1 = new AliGenBox(2000); gener1->SetThetaRange(0.77, 3.08); - gener1->SetPart(211); + gener1->SetPart(kPiPlus); gener->AddGenerator(gener1, "FMD1", .34); gGener = gener; } diff --git a/ITS/ConfigSDD03.C b/ITS/ConfigSDD03.C index 2e3f892eb15..ae79a87b408 100644 --- a/ITS/ConfigSDD03.C +++ b/ITS/ConfigSDD03.C @@ -1,6 +1,7 @@ // #if !defined(__CINT__) || defined(__MAKECINT__) #include +#include #include #include #include @@ -93,7 +94,7 @@ void Config(){ gener->SetOrigin(0.,0.,-800.); //vertex position gener->SetSigma(0.1,0.1,0.0); //Sigma in (X,Y,Z) (cm) on IP position - gener->SetPart(211); //GEANT particle type + gener->SetPart(kPiPlus); gener->Init(); // Activate this line if you want the vertex smearing to happen // track by track diff --git a/ITS/ConfigSPD02.C b/ITS/ConfigSPD02.C index 5d071c9a754..d07e20d0ed5 100644 --- a/ITS/ConfigSPD02.C +++ b/ITS/ConfigSPD02.C @@ -1,6 +1,7 @@ // #if !defined(__CINT__) || defined(__MAKECINT__) #include +#include #include #include #include @@ -93,7 +94,7 @@ void Config(){ gener->SetOrigin(0.,0.,-50.); //vertex position gener->SetSigma(0.1,0.1,0.0); //Sigma in (X,Y,Z) (cm) on IP position - gener->SetPart(211); //GEANT particle type + gener->SetPart(kPiPlus); gener->Init(); // Activate this line if you want the vertex smearing to happen // track by track diff --git a/ITS/ConfigSSD03.C b/ITS/ConfigSSD03.C index 41ddcdd365c..dc98a475a11 100644 --- a/ITS/ConfigSSD03.C +++ b/ITS/ConfigSSD03.C @@ -97,9 +97,9 @@ void Config(){ //vertex position gener->SetSigma(1.,1.,0.0); //Sigma in (X,Y,Z) (cm) on IP position - //gener->SetPart(211); //GEANT particle type + //gener->SetPart(kPiPlus); //cout<<"kPiPlus="<SetPart(kPiPlus); //GEANT particle type + gener->SetPart(kPiPlus); gener->Init(); // Activate this line if you want the vertex smearing to happen // track by track diff --git a/ITS/oldmacros/ConfigSPD02.C b/ITS/oldmacros/ConfigSPD02.C index 46a858433f1..69337bda928 100644 --- a/ITS/oldmacros/ConfigSPD02.C +++ b/ITS/oldmacros/ConfigSPD02.C @@ -1,3 +1,5 @@ +#include + void Config(){ // Set Random Number seed // gRandom->SetSeed(12345); @@ -70,7 +72,7 @@ void Config(){ gener->SetOrigin(0.,0.,-50.); //vertex position gener->SetSigma(0.1,0.1,0.0); //Sigma in (X,Y,Z) (cm) on IP position - gener->SetPart(211); //GEANT particle type + gener->SetPart(kPiPlus); gener->Init(); // Activate this line if you want the vertex smearing to happen // track by track diff --git a/ITS/oldmacros/Config_muon.C b/ITS/oldmacros/Config_muon.C index 4a3adb8bb83..ad87463b241 100644 --- a/ITS/oldmacros/Config_muon.C +++ b/ITS/oldmacros/Config_muon.C @@ -1,3 +1,5 @@ +#include + void Config(){ // 7-DEC-2000 09:00 // Switch on Transition Radiation simulation. 6/12/00 18:00 @@ -80,7 +82,7 @@ void Config(){ gener->SetPhi(180.); gener->SetTheta(95.); gener->SetOrigin(0,0,0); //vertex position - gener->SetPart(13); //GEANT particle type + gener->SetPart(kMuonMinus); gener->Init(); // // Activate this line if you want the vertex smearing to happen diff --git a/MUON/Config.C b/MUON/Config.C index be3eadc2768..a598a92d332 100644 --- a/MUON/Config.C +++ b/MUON/Config.C @@ -70,7 +70,7 @@ void Config(char directory[100]="", char option[6]="param", const char* digitsto gener->SetMomentumRange(20.,20.1); gener->SetPhiRange(0., 360.); gener->SetThetaRange(171.000,178.001); - gener->SetPart(13); // Muons + gener->SetPart(kMuonMinus); // Muons gener->SetOrigin(0.,0., 0.); //vertex position gener->SetSigma(0.0, 0.0, 0.0); //Sigma in (X,Y,Z) (cm) on IP position } @@ -80,7 +80,7 @@ void Config(char directory[100]="", char option[6]="param", const char* digitsto gener->SetPhiRange(0.); gener->SetThetaRange(0.); gener->SetOrigin(30,30,-1200);//vertex position - gener->SetPart(13); //GEANT particle type 13 is muons + gener->SetPart(kMuonMinus); //GEANT particle type 13 is muons } if (!strcmp(option,"scan")) { AliGenScan *gener = new AliGenScan(-1); diff --git a/PHOS/ConfigTestSuite.C b/PHOS/ConfigTestSuite.C index c7700e6aad6..5f564df6052 100644 --- a/PHOS/ConfigTestSuite.C +++ b/PHOS/ConfigTestSuite.C @@ -1,3 +1,5 @@ +#include + static Int_t eventsPerRun = 100; enum PprGeo_t { @@ -106,7 +108,7 @@ void Config() // gener->AddGenerator(hijingparam,"HIJING PARAM",1); // AliGenBox *genbox = new AliGenBox(nParticles); -// genbox->SetPart(22); +// genbox->SetPart(kGamma); // genbox->SetPtRange(0.3, 10.00); // gener->AddGenerator(genbox,"GENBOX GAMMA for PHOS",1); // gener->Init(); @@ -118,7 +120,7 @@ void Config() gener->SetOrigin(0,0,0); //vertex position gener->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position - gener->SetPart(22); + gener->SetPart(kGamma); gener->Init(); // diff --git a/PHOS/macros/AlignmentDB/Config.C b/PHOS/macros/AlignmentDB/Config.C index 6f3ee7f6c4e..885ed46cdd4 100644 --- a/PHOS/macros/AlignmentDB/Config.C +++ b/PHOS/macros/AlignmentDB/Config.C @@ -10,6 +10,7 @@ #include #include #include +#include #include "STEER/AliRunLoader.h" #include "STEER/AliRun.h" #include "STEER/AliConfig.h" @@ -145,7 +146,7 @@ void Config() gener->SetSigma(0, 0, 0); //Sigma in (X,Y,Z) (cm) on IP position AliGenBox *genbox = new AliGenBox(nParticles); - genbox->SetPart(11); + genbox->SetPart(kElectron); genbox->SetPtRange(0.3, 10.00); gener->AddGenerator(genbox,"GENBOX GAMMA for PHOS",1); gener->Init(); diff --git a/PHOS/macros/Embed/Config.C b/PHOS/macros/Embed/Config.C index 87a69cca829..098871092df 100644 --- a/PHOS/macros/Embed/Config.C +++ b/PHOS/macros/Embed/Config.C @@ -1,3 +1,5 @@ +#include + static Int_t eventsPerRun = 100; enum PprGeo_t { @@ -29,6 +31,7 @@ Float_t EtaToTheta(Float_t arg); void Config() { + cout << "==> Config.C..." << endl; // Set Random Number seed @@ -129,7 +132,7 @@ void Config() gener->SetMomentumRange(0.5, 5.); gener->SetPhiRange(260., 280.); gener->SetThetaRange(82.,98.); - gener->SetPart(22); + gener->SetPart(kGamma); gener->SetOrigin(0, 0, 0); //vertex position gener->SetSigma(0, 0, 0); //Sigma in (X,Y,Z) (cm) on IP position diff --git a/PHOS/macros/testSuite/ConfigTestSuite.C b/PHOS/macros/testSuite/ConfigTestSuite.C index 5eecfe78296..d3cce88486b 100644 --- a/PHOS/macros/testSuite/ConfigTestSuite.C +++ b/PHOS/macros/testSuite/ConfigTestSuite.C @@ -1,3 +1,5 @@ +#include + static Int_t eventsPerRun = 100; enum PprGeo_t { @@ -7,6 +9,7 @@ static PprGeo_t geo = kHoles; void Config() { + // 7-DEC-2000 09:00 // Switch on Transition Radiation simulation. 6/12/00 18:00 // iZDC=1 7/12/00 09:00 @@ -106,7 +109,7 @@ void Config() // gener->AddGenerator(hijingparam,"HIJING PARAM",1); // AliGenBox *genbox = new AliGenBox(nParticles); -// genbox->SetPart(22); +// genbox->SetPart(kGamma); // genbox->SetPtRange(0.3, 10.00); // gener->AddGenerator(genbox,"GENBOX GAMMA for PHOS",1); // gener->Init(); @@ -118,7 +121,7 @@ void Config() gener->SetOrigin(0,0,0); //vertex position gener->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position - gener->SetPart(22); + gener->SetPart(kGamma); gener->Init(); // diff --git a/TDPMjet/ConfigDPMjet.C b/TDPMjet/ConfigDPMjet.C index a05c14f1929..3793887a6c0 100644 --- a/TDPMjet/ConfigDPMjet.C +++ b/TDPMjet/ConfigDPMjet.C @@ -1,5 +1,6 @@ #if !defined(__CINT__) || defined(__MAKECINT__) #include +#include #include #include #include @@ -137,7 +138,7 @@ gSystem->Load("libTDPMjet.so"); gener->SetPhi(180.); gener->SetTheta(5.); gener->SetOrigin(0,0,0); //vertex position - gener->SetPart(13); //GEANT particle type + gener->SetPart(kNeutron); gGener = gener; } break; @@ -153,7 +154,7 @@ gSystem->Load("libTDPMjet.so"); gener->SetOrigin(0,0,0); //vertex position gener->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position - gener->SetPart(5); //GEANT particle type + gener->SetPart(kMuonPlus); gGener = gener; } break; @@ -168,7 +169,7 @@ gSystem->Load("libTDPMjet.so"); gener->SetThetaRange(9,9); //vertex position gener->SetSigma(6,6,0); //Sigma in (X,Y,Z) (cm) on IP position - gener->SetPart(5); + gener->SetPart(kMuonPlus); gener->SetRange(20, -100, 100, 20, -100, 100, 1, 500, 500); gGener = gener; } diff --git a/TRD/Macros/AliTRDConfigPID.C b/TRD/Macros/AliTRDConfigPID.C index 3b40b63a00a..0d4703e19d2 100644 --- a/TRD/Macros/AliTRDConfigPID.C +++ b/TRD/Macros/AliTRDConfigPID.C @@ -14,6 +14,7 @@ #if !defined(__CINT__) || defined(__MAKECINT__) #include +#include #include #include #include @@ -250,7 +251,7 @@ void Config() // electron generator AliGenBox *eminus= new AliGenBox(Npart); - eminus->SetPart(11); + eminus->SetPart(kElectron); eminus->SetMomentumRange(momen,momen); eminus->SetPhiRange(0,360); eminus->SetThetaRange(thmin,thmax); @@ -259,7 +260,7 @@ void Config() // positron generator AliGenBox *eplus= new AliGenBox(Npart); - eplus->SetPart(-11); + eplus->SetPart(kPositron); eplus->SetMomentumRange(momen,momen); eplus->SetPhiRange(0,360); eplus->SetThetaRange(thmin,thmax); @@ -268,7 +269,7 @@ void Config() // mu- generator AliGenBox *muminus= new AliGenBox(Npart); - muminus->SetPart(13); + muminus->SetPart(kMuonMinus); muminus->SetMomentumRange(momen,momen); muminus->SetPhiRange(0,360); muminus->SetThetaRange(thmin,thmax); @@ -277,7 +278,7 @@ void Config() // mu+ generator AliGenBox *muplus= new AliGenBox(Npart); - muplus->SetPart(-13); + muplus->SetPart(kMuonPlus); muplus->SetMomentumRange(momen,momen); muplus->SetPhiRange(0,360); muplus->SetThetaRange(thmin,thmax); @@ -286,7 +287,7 @@ void Config() // pi- generator AliGenBox *piminus= new AliGenBox(Npart); - piminus->SetPart(-211); + piminus->SetPart(kPiMinus); piminus->SetMomentumRange(momen,momen); piminus->SetPhiRange(0,360); piminus->SetThetaRange(thmin,thmax); @@ -295,7 +296,7 @@ void Config() // pi+ generator AliGenBox *piplus= new AliGenBox(Npart); - piplus->SetPart(211); + piplus->SetPart(kPiPlus); piplus->SetMomentumRange(momen,momen); piplus->SetPhiRange(0,360); piplus->SetThetaRange(thmin,thmax); @@ -304,7 +305,7 @@ void Config() // K- generator AliGenBox *kminus= new AliGenBox(Npart); - kminus->SetPart(-321); + kminus->SetPart(kKMinus); kminus->SetMomentumRange(momen,momen); kminus->SetPhiRange(0,360); kminus->SetThetaRange(thmin,thmax); @@ -313,7 +314,7 @@ void Config() // K+ generator AliGenBox *kplus= new AliGenBox(Npart); - kplus->SetPart(321); + kplus->SetPart(kKPlus); kplus->SetMomentumRange(momen,momen); kplus->SetPhiRange(0,360); kplus->SetThetaRange(thmin,thmax); @@ -322,7 +323,7 @@ void Config() // p generator AliGenBox *proton= new AliGenBox(Npart); - proton->SetPart(2212); + proton->SetPart(kProton); proton->SetMomentumRange(momen,momen); proton->SetPhiRange(0,360); proton->SetThetaRange(thmin,thmax); @@ -331,7 +332,7 @@ void Config() // anti-p generator AliGenBox *aproton= new AliGenBox(Npart); - aproton->SetPart(-2212); + aproton->SetPart(kProtonBar); aproton->SetMomentumRange(momen,momen); aproton->SetPhiRange(0,360); aproton->SetThetaRange(thmin,thmax); diff --git a/TRD/Macros/AliTRDconfig.C b/TRD/Macros/AliTRDconfig.C index e3525dd7d4a..cd67657ca3e 100644 --- a/TRD/Macros/AliTRDconfig.C +++ b/TRD/Macros/AliTRDconfig.C @@ -1,6 +1,7 @@ +#include + void Config() { - Int_t iField = 0; // libraries required by geant321 @@ -72,12 +73,12 @@ void Config() AliGenBox *genEl = new AliGenBox(100); genEl->SetOrigin(0,0,0); // Vertex position genEl->SetSigma(0,0,0); // Sigma in (X,Y,Z) (cm) on IP position - genEl->SetPart(11); // Only electrons + genEl->SetPart(kElectron); // Only electrons AliGenBox *genPi = new AliGenBox(100); genPi->SetOrigin(0,0,0); // Vertex position genPi->SetSigma(0,0,0); // Sigma in (X,Y,Z) (cm) on IP position - genPi->SetPart(-211); // Only pions + genPi->SetPart(kPiMinus); // Only pions gener->AddGenerator(genEl,"Electrons",1); gener->AddGenerator(genPi,"Pions" ,1); diff --git a/doc/aliroot-primer/scripts/Config.C b/doc/aliroot-primer/scripts/Config.C index d9621be5c1e..bce52913206 100644 --- a/doc/aliroot-primer/scripts/Config.C +++ b/doc/aliroot-primer/scripts/Config.C @@ -106,7 +106,7 @@ void Config() genbox->SetMomentumRange(10,11.); genbox->SetPhiRange(270.5,270.7); genbox->SetThetaRange(90.5,90.7); - genbox->SetPart(22); + genbox->SetPart(kGamma); gener->AddGenerator(genbox,"GENBOX GAMMA for PHOS",1); gener->Init(); // Initialization of the coctail generator diff --git a/macros/Config.C b/macros/Config.C index 28e80da27b0..9dd4bece568 100644 --- a/macros/Config.C +++ b/macros/Config.C @@ -6,6 +6,7 @@ #if !defined(__CINT__) || defined(__MAKECINT__) #include +#include #include #include #include @@ -157,7 +158,7 @@ void Config() gener->AddGenerator(hijingparam,"HIJING PARAM",1); // AliGenBox *genbox = new AliGenBox(nParticles); -// genbox->SetPart(22); +// genbox->SetPart(kGamma); // genbox->SetPtRange(0.3, 10.00); // gener->AddGenerator(genbox,"GENBOX GAMMA for PHOS",1); gener->Init(); diff --git a/macros/ConfigHBT.C b/macros/ConfigHBT.C index 9dd2464872f..12c0691cc1a 100644 --- a/macros/ConfigHBT.C +++ b/macros/ConfigHBT.C @@ -6,6 +6,7 @@ #if !defined(__CINT__) || defined(__MAKECINT__) #include +#include #include #include #include @@ -164,7 +165,7 @@ void Config() // g1->SetMomentumRange(0, 3); // g1->SetOrigin(0,0,0); //vertex position // g1->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position - // g1->SetPart(310); //K0short(310), Lambda(3122) + // g1->SetPart(kK0Short); //K0short(310), Lambda(3122) /***************** M E V S I M ********************************/ diff --git a/macros/Config_gener.C b/macros/Config_gener.C index 95e6424c5c1..8820a33bbd3 100644 --- a/macros/Config_gener.C +++ b/macros/Config_gener.C @@ -128,7 +128,7 @@ void Config() gener->SetPhi(180.); gener->SetTheta(5.); gener->SetOrigin(0,0,0); //vertex position - gener->SetPart(13); //GEANT particle type + gener->SetPart(kNeutron); gGener = gener; } break; @@ -144,7 +144,7 @@ void Config() gener->SetOrigin(0,0,0); //vertex position gener->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position - gener->SetPart(5); //GEANT particle type + gener->SetPart(kMuonPlus); gGener = gener; } break; @@ -159,7 +159,7 @@ void Config() gener->SetThetaRange(9,9); //vertex position gener->SetSigma(6,6,0); //Sigma in (X,Y,Z) (cm) on IP position - gener->SetPart(5); + gener->SetPart(kMuonPlus); gener->SetRange(20, -100, 100, 20, -100, 100, 1, 500, 500); gGener = gener; } diff --git a/macros/MUONConfig.C b/macros/MUONConfig.C index 2cb7747daad..81e710a9fc6 100644 --- a/macros/MUONConfig.C +++ b/macros/MUONConfig.C @@ -51,7 +51,7 @@ geant3->SetCUTS(cut,cut, cut, cut, cut, cut, cut, cut, cut, cut, tofmax); //gener->SetPhiRange(0,0); //gener->SetThetaRange(5., 5.); //gener->SetOrigin(0,0,0); //vertex position -//gener->SetPart(14) //GEANT particle type +//gener->SetPart(kProton); //********************************************* // Example for Moving Particle Gun * @@ -64,7 +64,7 @@ gener->SetThetaRange(2., 10.); gener->SetOrigin(0,0,0); //vertex position gener->SetSigma(0,0,5.6); //Sigma in (X,Y,Z) (cm) on IP position -gener->SetPart(14) //GEANT particle type +gener->SetPart(kProton); */ //************************************** // Example for HIJING Parameterisation * diff --git a/test/gun/Config.C b/test/gun/Config.C index df4556b67e5..fc3813fd51c 100644 --- a/test/gun/Config.C +++ b/test/gun/Config.C @@ -6,6 +6,7 @@ #if !defined(__CINT__) || defined(__MAKECINT__) #include +#include #include #include #include @@ -155,49 +156,49 @@ void Config() // 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); @@ -206,14 +207,14 @@ void Config() // 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); @@ -225,7 +226,7 @@ void Config() 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 @@ -234,7 +235,7 @@ void Config() 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 @@ -242,19 +243,19 @@ void Config() 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); -- 2.43.0