29 #if !defined(__CINT__) || defined(__MAKECINT__) 31 #include <Riostream.h> 37 #include <TVirtualMC.h> 38 #include <TGeoGlobalMagField.h> 48 #include "AliDecayerPythia.h" 49 #include "AliGenCocktail.h" 50 #include "AliGenHIJINGpara.h" 52 #include "AliGenParam.h" 53 #include "AliGenBox.h" 54 #include "AliGenPHOSlib.h" 59 #include "AliABSOv3.h" 60 #include "AliDIPOv3.h" 61 #include "AliHALLv3.h" 62 #include "AliFRAMEv2.h" 63 #include "AliSHILv3.h" 64 #include "AliPIPEv3.h" 65 #include "AliITSv11.h" 67 #include "AliTOFv6T0.h" 68 #include "AliHMPIDv3.h" 71 #include "AliTRDgeometry.h" 74 #include "AliPHOSv1.h" 78 #include "AliACORDEv1.h" 79 #include "AliVZEROv7.h" 87 #ifndef TRANSPORTMODEL 88 #define TRANSPORTMODEL 92 #endif //TRANSPORTMODEL 107 "SKIP CONFIGURATION *** Remember to load before LoadLibForConfig.C!! Set there the transport model!! ***",
108 "Config.C",
"Config.C",
"Config()",
"Config.C", __LINE__);
118 Form(
"Seed for random number generation = %d",gRandom->GetSeed()),
119 "Config.C",
"Config.C",
"Config()",
"Config.C", __LINE__);
125 "Config.C",
"Config.C",
"Config()",
"Config.C", __LINE__);
127 new TGeant3TGeo(
"C++ Interface to Geant3");
132 "Creating Run Loader",
133 "Config.C",
"Config.C",
"Config()",
" Config.C", __LINE__);
140 gAlice->Fatal(
"Config.C",
"Can not instatiate the Run Loader");
150 cout<<
"Trigger configuration is set to Pb-Pb"<<endl;
153 TVirtualMCDecayer* decayer =
new AliDecayerPythia();
154 decayer->SetForceDecay(kAll);
161 if (gSystem->Getenv(
"CONFIG_NPARTICLES"))
163 nParticles = atoi(gSystem->Getenv(
"CONFIG_NPARTICLES"));
166 if (gSystem->Getenv(
"CONFIG_YEAR"))
168 year = atoi(gSystem->Getenv(
"CONFIG_YEAR"));
171 AliGenBox *gener =
new AliGenBox(nParticles);
172 gener->SetMomentumRange(10.,10.);
177 gener->SetPhiRange(80.0,120.0);
178 else if(
year == 2011)
179 gener->SetPhiRange(80.0,180.0);
180 else if(
year == 2012 ||
year == 2013)
181 gener->SetPhiRange(80.0,190.0);
183 gener->SetPhiRange(80.0,330.0);
256 AliBODY *BODY =
new AliBODY(
"BODY",
"Alice envelop");
263 AliMAG *MAG =
new AliMAG(
"MAG",
"Magnet");
270 AliABSO *ABSO =
new AliABSOv3(
"ABSO",
"Muon Absorber");
277 AliDIPO *DIPO =
new AliDIPOv3(
"DIPO",
"Dipole version 3");
284 AliHALL *HALL =
new AliHALLv3(
"HALL",
"Alice Hall");
292 AliFRAMEv2 *
FRAME =
new AliFRAMEv2(
"FRAME",
"Space Frame");
299 AliSHIL *SHIL =
new AliSHILv3(
"SHIL",
"Shielding Version 3");
307 AliPIPE *PIPE =
new AliPIPEv3(
"PIPE",
"Beam Pipe");
314 AliITS *ITS =
new AliITSv11(
"ITS",
"ITS v11");
320 AliTPC *TPC =
new AliTPCv2(
"TPC",
"Default");
327 AliTOF *TOF =
new AliTOFv6T0(
"TOF",
"normal TOF");
334 AliHMPID *HMPID =
new AliHMPIDv3(
"HMPID",
"normal HMPID");
343 AliZDC *ZDC =
new AliZDCv3(
"ZDC",
"normal ZDC");
349 AliTRDgeometry *geoTRD = 0;
356 AliTRDtestG4 *TRD =
new AliTRDtestG4(
"TRD",
"TRD slow simulator");
357 TRD->SetScaleG4(1.11);
358 geoTRD = TRD->GetGeometry();
363 AliTRD *TRD =
new AliTRDv1(
"TRD",
"TRD slow simulator");
364 geoTRD = TRD->GetGeometry();
371 printf(
"*** TRD configuration for 2011\n");
372 geoTRD->SetSMstatus(2,0);
373 geoTRD->SetSMstatus(3,0);
374 geoTRD->SetSMstatus(4,0);
375 geoTRD->SetSMstatus(5,0);
376 geoTRD->SetSMstatus(6,0);
377 geoTRD->SetSMstatus(12,0);
378 geoTRD->SetSMstatus(13,0);
379 geoTRD->SetSMstatus(14,0);
383 printf(
"*** TRD configuration for 2012\n");
384 geoTRD->SetSMstatus(4,0);
385 geoTRD->SetSMstatus(5,0);
386 geoTRD->SetSMstatus(12,0);
387 geoTRD->SetSMstatus(13,0);
388 geoTRD->SetSMstatus(14,0);
408 AliPHOS *
PHOS =
new AliPHOSv1(
"PHOS",
"noCPV_Modules123");
415 AliPMD *PMD =
new AliPMDv1(
"PMD",
"normal PMD");
421 AliT0 *T0 =
new AliT0v1(
"T0",
"T0 Detector");
430 else if (
year == 2011)
432 else if (
year == 2012 ||
year == 2013)
441 AliACORDE *ACORDE =
new AliACORDEv1(
"ACORDE",
"normal ACORDE");
447 AliVZERO *VZERO =
new AliVZEROv7(
"VZERO",
"normal VZERO");
459 "Config.C",
"Config.C",
"Config()",
"Config.C", __LINE__);
464 TG4RunConfiguration* runConfiguration
465 =
new TG4RunConfiguration(
"geomRoot",
466 "FTFP_BERT_EMV+optical",
467 "specialCuts+stackPopper+stepLimiter",
469 geant4 =
new TGeant4(
"TGeant4",
470 "The Geant4 Monte Carlo : FTFP_BERT_EMV-EMCAL",
472 cout <<
"Geant4 has been created." << endl;
476 cout <<
"Monte Carlo has been already created." << endl;
483 geant4->ProcessGeantCommand(
"/control/verbose 2");
484 geant4->ProcessGeantCommand(
"/mcVerbose/all 1");
485 geant4->ProcessGeantCommand(
"/mcVerbose/geometryManager 1");
486 geant4->ProcessGeantCommand(
"/mcVerbose/opGeometryManager 1");
487 geant4->ProcessGeantCommand(
"/mcTracking/loopVerbose 1");
488 geant4->ProcessGeantCommand(
"/mcPhysics/rangeCuts 0.01 mm");
490 geant4->ProcessGeantCommand(
"/mcVerbose/composedPhysicsList 2");
491 geant4->ProcessGeantCommand(
"/mcTracking/skipNeutrino true");
492 geant4->ProcessGeantCommand(
"/mcDet/setIsMaxStepInLowDensityMaterials true");
493 geant4->ProcessGeantCommand(
"/mcDet/setMaxStepInLowDensityMaterials 10 m");
494 geant4->ProcessGeantCommand(
"/mcMagField/setConstDistance 1 mm");
498 geant4->ProcessGeantCommand(
"/process/optical/verbose 0");
499 geant4->ProcessGeantCommand(
"/process/optical/processActivation Scintillation 0");
500 geant4->ProcessGeantCommand(
"/process/optical/processActivation OpWLS 0");
501 geant4->ProcessGeantCommand(
"/process/optical/processActivation OpMieHG 0");
502 geant4->ProcessGeantCommand(
"/process/optical/setTrackSecondariesFirst Cerenkov 0");
512 geant4->ProcessGeantCommand(
"/mcPhysics/emModel/setEmModel PAI");
513 geant4->ProcessGeantCommand(
"/mcPhysics/emModel/setRegions TRD_Gas-mix");
514 geant4->ProcessGeantCommand(
"/mcPhysics/emModel/setParticles all");
530 geant4->ProcessGeantCommand(
"/mcPhysics/emModel/setEmModel SpecialUrbanMsc");
531 geant4->ProcessGeantCommand(
"/mcPhysics/emModel/setRegions EMCAL_Lead$ EMCAL_Scintillator$");
532 geant4->ProcessGeantCommand(
"/mcPhysics/emModel/setParticles e- e+");
544 TVirtualMC * vmc = TVirtualMC::GetMC();
546 vmc->SetExternalDecayer(decayer);
548 vmc->SetProcess(
"DCAY",1);
549 vmc->SetProcess(
"PAIR",1);
550 vmc->SetProcess(
"COMP",1);
551 vmc->SetProcess(
"PHOT",1);
552 vmc->SetProcess(
"PFIS",0);
553 vmc->SetProcess(
"DRAY",0);
554 vmc->SetProcess(
"ANNI",1);
555 vmc->SetProcess(
"BREM",1);
556 vmc->SetProcess(
"MUNU",1);
557 vmc->SetProcess(
"CKOV",1);
558 vmc->SetProcess(
"HADR",1);
559 vmc->SetProcess(
"LOSS",2);
560 vmc->SetProcess(
"MULS",1);
561 vmc->SetProcess(
"RAYL",1);
564 Float_t tofmax = 1.e10;
566 vmc->SetCut(
"CUTGAM", cut);
567 vmc->SetCut(
"CUTELE", cut);
568 vmc->SetCut(
"CUTNEU", cut);
569 vmc->SetCut(
"CUTHAD", cut);
570 vmc->SetCut(
"CUTMUO", cut);
571 vmc->SetCut(
"BCUTE", cut);
572 vmc->SetCut(
"BCUTM", cut);
573 vmc->SetCut(
"DCUTE", cut);
574 vmc->SetCut(
"DCUTM", cut);
575 vmc->SetCut(
"PPCUTM", cut);
576 vmc->SetCut(
"TOFMAX", tofmax);
584 return (180./TMath::Pi())*2.*atan(exp(-arg));
596 AliGenParam *gener =
new AliGenParam(nPart,
new AliGenPHOSlib(),type,
"");
599 gener->SetMomentumRange(0,999);
600 gener->SetYRange(-2,2);
601 gener->SetPtRange(1,30);
603 gener->SetForceDecay(kGammaEM);
604 gener->SetCutOnChild(1);
605 gener->SetChildPtRange(0.,30);
610 gener->SetPhiRange(80., 100.);
615 gener->SetChildPhiRange(80., 100.);
618 else if(calo==
"PHOS")
621 gener->SetPhiRange(250., 320.);
625 gener->SetChildPhiRange(250., 327.);
627 else if(calo==
"DCAL")
630 gener->SetPhiRange(260., 320.);
634 gener->SetChildPhiRange(260., 327.);
printf("Chi2/npoints = %f\n", TMath::Sqrt(chi2/npoints))
void SetRunLoader(AliRunLoader *rloader)
static const TString & GetDefaultEventFolderName()
Int_t year
year for detector configuration
Float_t EtaToTheta(Float_t arg)
static void Message(UInt_t level, const char *message, const char *module, const char *className, const char *function, const char *file, Int_t line)
Concrete implementation of FMD detector driver - detailed version.
AliDetector class for MUON subsystem providing simulation data management.
Forward Multiplicity Detector based on Silicon wafers. This class is the driver for especially simula...
void Config(const char *directory="", const char *option="param", const char *digitstore="AliMUONDigitStoreV2S", bool forEmbedding=kFALSE, bool forRealistic=kFALSE)
Forward Multiplicity Detector based on Silicon wafers.
static AliRunLoader * Open(const char *filename="galice.root", const char *eventfoldername=AliConfig::GetDefaultEventFolderName(), Option_t *option="READ")
AliGenerator * GenParamCalo(Int_t nPart, Int_t type, TString calo)
Bool_t checkGeoAndRun
check or not the year to configure the detector
void SetTriggerConfig(TString conf)
AliDetector class for MUON subsystem which implements functions for simulation.
void SetCompressionLevel(Int_t cl)
static AliSimulation * Instance()
Base Class for EMCAL description.
void SetNumberOfEventsPerFile(Int_t nevpf)
EMCal simulation manager class v2.