AliGenerator* MbPythiaTunePerugia0BtoJpsi2e() { comment = comment.Append(" pp: Pythia (Perugia0) BtoJpsi (1 bbbar per event, 1 b-hadron in |y|<2, 1 J/psi in |y|<2"); // // Pythia AliGenPythia* pythia = new AliGenPythia(-1); pythia->SetMomentumRange(0, 999999.); pythia->SetThetaRange(0., 180.); pythia->SetYRange(-2.,2.); pythia->SetPtRange(0,1000.); pythia->SetProcess(kPyBeautyppMNRwmi); pythia->SetEnergyCMS(energy); // Tune // 320 Perugia 0 pythia->SetTune(320); pythia->UseNewMultipleInteractionsScenario(); // // decays pythia->SetCutOnChild(1); pythia->SetPdgCodeParticleforAcceptanceCut(443); pythia->SetChildYRange(-2,2); pythia->SetChildPtRange(0,10000.); // // decays pythia->SetForceDecay(kBJpsiDiElectron); return pythia; }
AliGenerator* MbPythia() { comment = comment.Append(" pp: Pythia low-pt"); // Pythia AliGenPythia* pythia = new AliGenPythia(-1); pythia->SetMomentumRange(0, 999999.); // pythia->SetThetaRange(0., 180.); // pythia->SetChildYRange(-12.,0.); // pythia->SetPtRange(0,1000.); // pythia->SetCutOnChild(1); pythia->SetProcess(kPyMb); pythia->SetEnergyCMS(energy); pythia->SetForceDecay(kSemiMuonic); return pythia; }
AliGenerator* MbPythiaTunePerugia0bchadr() { comment = comment.Append(" pp: Pythia (Perugia0) bchadr (1 bbbar per event, 1 c-hadron in |y|<1, chadrons decay to hadrons"); // // Pythia AliGenPythia* pythia = new AliGenPythia(-1); pythia->SetMomentumRange(0, 999999.); pythia->SetThetaRange(0., 180.); pythia->SetYRange(-1.,1.); pythia->SetPtRange(0,1000.); pythia->SetProcess(kPyBeautyppMNRwmi); pythia->SetEnergyCMS(energy); // Tune // 320 Perugia 0 pythia->SetTune(320); pythia->UseNewMultipleInteractionsScenario(); // // decays pythia->SetForceDecay(kHadronicD); return pythia; }
AliGenPythia *PythiaHard(PDC07Proc_t proc) { //*******************************************************************// // Configuration file for hard QCD processes generation with PYTHIA // // // //*******************************************************************// AliGenPythia * gener = 0x0; switch(proc) { case kPyJetJet: comment = comment.Append(" pp->jet + jet over at 14 TeV, no restriction"); AliGenPythia * gener = new AliGenPythia(nEvts); gener->SetEnergyCMS(eCMS);// Centre of mass energy gener->SetProcess(kPyJets);// Process type gener->SetJetEtaRange(-1.5, 1.5);// Final state kinematic cuts gener->SetJetPhiRange(0., 360.); gener->SetJetEtRange(10., 1000.); gener->SetPtHard(ptHardMin, ptHardMax);// Pt transfer of the hard scattering gener->SetStrucFunc(kCTEQ4L); return gener; case kPyGammaJetPHOS: comment = comment.Append(" pp->jet + gamma over PHOS"); gener = new AliGenPythia(nEvts); gener->SetEnergyCMS(eCMS); gener->SetProcess(kPyDirectGamma); gener->SetStrucFunc(kCTEQ4L); gener->SetPtHard(ptHardMin,ptHardMax); //gener->SetYHard(-1.0,1.0); gener->SetGammaEtaRange(-0.13,0.13); gener->SetGammaPhiRange(218.,322.);//Over 5 modules +-2 deg break; case kPyJetJetPHOS: comment = comment.Append(" pp->jet + jet over PHOS"); gener = new AliGenPythia(nEvts); gener->SetEnergyCMS(eCMS); gener->SetProcess(kPyJets); gener->SetStrucFunc(kCTEQ4L); gener->SetPtHard(ptHardMin,ptHardMax); //gener->SetYHard(-1.0,1.0); gener->SetJetEtaRange(-1.,1.); gener->SetJetPhiRange(200.,340.); gener->SetPi0InPHOS(kTRUE); gener->SetFragPhotonOrPi0MinPt(ptGammaPi0Min); printf("\n \n Event generator: Minimum pT of particle in calorimeter %f \n \n", ptGammaPi0Min); break; case kPyGammaBremsPHOS: comment = comment.Append(" pp->jet + jet+bremsphoton over PHOS at 14 TeV"); gener = new AliGenPythia(nEvts); gener->SetEnergyCMS(eCMS); gener->SetProcess(kPyJets); gener->SetStrucFunc(kCTEQ4L); gener->SetPtHard(ptHardMin,ptHardMax); //gener->SetYHard(-1.0,1.0); gener->SetJetEtaRange(-1.,1.); gener->SetJetPhiRange(200.,340.); gener->SetFragPhotonInPHOS(kTRUE); gener->SetFragPhotonOrPi0MinPt(ptGammaPi0Min); printf("\n \n Event generator: Minimum pT of particle in calorimeter %f \n \n", ptGammaPi0Min); break; case kPyJetJetPHOSv2: comment = comment.Append(" pp->jet + jet over PHOS version2 "); gener = new AliGenPythia(nEvts); gener->SetEnergyCMS(eCMS); gener->SetProcess(kPyJets); gener->SetStrucFunc(kCTEQ4L); gener->SetPtHard(ptHardMin,ptHardMax); //gener->SetYHard(-1.0,1.0); gener->SetJetEtaRange(-1.,1.); gener->SetJetPhiRange(200.,340.); //gener->SetPi0InPHOS(kTRUE); gener->SetPhotonInPHOSeta(kTRUE); gener->SetPhotonMinPt(ptGammaPi0Min); gener->SetForceDecay(kAll); break; case kPyGammaJetEMCAL: comment = comment.Append(" pp->jet + gamma over EMCAL at 14 TeV"); gener = new AliGenPythia(nEvts); gener->SetEnergyCMS(eCMS); gener->SetProcess(kPyDirectGamma); gener->SetStrucFunc(kCTEQ4L); gener->SetPtHard(ptHardMin,ptHardMax); //gener->SetYHard(-1.0,1.0); gener->SetGammaEtaRange(-0.71,0.71); gener->SetGammaPhiRange(78.,192.);//Over 6 supermodules +-2 deg break; case kPyJetJetEMCAL: comment = comment.Append(" pp->jet + jet over EMCAL at 14 TeV"); gener = new AliGenPythia(nEvts); gener->SetEnergyCMS(eCMS); gener->SetProcess(kPyJets); gener->SetStrucFunc(kCTEQ4L); gener->SetPtHard(ptHardMin,ptHardMax); //gener->SetYHard(-1.0,1.0); gener->SetJetEtaRange(-1,1); gener->SetJetPhiRange(60.,210.); gener->SetPi0InEMCAL(kTRUE); gener->SetFragPhotonOrPi0MinPt(ptGammaPi0Min); printf("\n \n Event generator: Minimum pT of particle in calorimeter %f \n \n", ptGammaPi0Min); break; case kPyGammaBremsEMCAL: comment = comment.Append(" pp->jet + jet+bremsphoton over EMCAL at 14 TeV"); gener = new AliGenPythia(nEvts); gener->SetEnergyCMS(eCMS); gener->SetProcess(kPyJets); gener->SetStrucFunc(kCTEQ4L); gener->SetPtHard(ptHardMin,ptHardMax); //gener->SetYHard(-1.0,1.0); gener->SetJetEtaRange(-1,1); gener->SetJetPhiRange(60.,210.); //Over 2 uncovered PHOS modules gener->SetFragPhotonInEMCAL(kTRUE); gener->SetFragPhotonOrPi0MinPt(ptGammaPi0Min); printf("\n \n Event generator: Minimum pT of particle in calorimeter %f \n \n", ptGammaPi0Min); break; } return gener; }
void Config() { // Get settings from environment variables ProcessEnvironmentVars(); // Random Number seed if (gSystem->Getenv("CONFIG_SEED")) { seed = atoi(gSystem->Getenv("CONFIG_SEED")); } else if(gSystem->Getenv("DC_EVENT") && gSystem->Getenv("DC_RUN")){ seed = runNumber * 100000 + eventNumber; } gRandom->SetSeed(seed); cout<<"Seed for random number generation= "<<gRandom->GetSeed()<<endl; // libraries required by geant321 #if defined(__CINT__) gSystem->Load("liblhapdf"); // Parton density functions gSystem->Load("libEGPythia6"); // TGenerator interface gSystem->Load("libpythia6"); // Pythia gSystem->Load("libAliPythia6"); // ALICE specific implementations gSystem->Load("libgeant321"); #endif new TGeant3TGeo("C++ Interface to Geant3"); // Output every 100 tracks ((TGeant3*)gMC)->SetSWIT(4,100); //======================================================================= // Run loader AliRunLoader* rl=0x0; AliLog::Message(AliLog::kInfo, "Creating Run Loader", "", "", "Config()"," ConfigPPR.C", __LINE__); rl = AliRunLoader::Open("galice.root", AliConfig::GetDefaultEventFolderName(), "recreate"); if (rl == 0x0) { gAlice->Fatal("Config.C","Can not instatiate the Run Loader"); return; } rl->SetCompressionLevel(2); rl->SetNumberOfEventsPerFile(100); gAlice->SetRunLoader(rl); // Set the trigger configuration AliSimulation::Instance()->SetTriggerConfig(TrigConfName[trig]); cout<<"Trigger configuration is set to "<<TrigConfName[trig]<<endl; //======================// // Set External decayer // //======================// TVirtualMCDecayer* decayer = new AliDecayerPythia(); // DECAYS // switch(decHvFl) { case kNature: decayer->SetForceDecay(kAll); break; case kHadr: decayer->SetForceDecay(kHadronicD); break; case kSemiEl: decayer->SetForceDecay(kSemiElectronic); break; case kSemiMu: decayer->SetForceDecay(kSemiMuonic); break; } decayer->Init(); gMC->SetExternalDecayer(decayer); if(proc == kPyJetJetPHOSv2) // in this case we decay the pi0 decayer->SetForceDecay(kNeutralPion); // //======================================================================= // ************* 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); 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); //=========================// // Generator Configuration // //=========================// AliGenPythia* gener = 0x0; if (proc <= kBeautypp14000wmi) { AliGenPythia *pythia = PythiaHVQ(proc); // FeedDown option pythia->SetFeedDownHigherFamily(kFALSE); // Stack filling option if(!stars) pythia->SetStackFillOpt(AliGenPythia::kParentSelection); // Set Count mode if(nEvts>0) pythia->SetCountMode(AliGenPythia::kCountParents); // // DECAYS // switch(decHvFl) { case kNature: pythia->SetForceDecay(kAll); break; case kHadr: pythia->SetForceDecay(kHadronicD); break; case kSemiEl: pythia->SetForceDecay(kSemiElectronic); break; case kSemiMu: pythia->SetForceDecay(kSemiMuonic); break; } // // GEOM & KINE CUTS // pythia->SetMomentumRange(0,99999999); pythia->SetPhiRange(0., 360.); pythia->SetThetaRange(0,180); switch(ycut) { case kFull: pythia->SetYRange(-999,999); break; case kBarrel: pythia->SetYRange(-2,2); break; case kMuonArm: pythia->SetYRange(1,6); break; } gener = pythia; } else if (proc == kPyMbNoHvq) { gener = MbCocktail(); } else if (proc == kPyOmegaMinus) { gener = PyMbTriggered(3334); } else if (proc == kPyOmegaPlus) { gener = PyMbTriggered(-3334); } else if (proc <= kPyGammaBremsEMCAL) { AliGenPythia *pythia = PythiaHard(proc); // FeedDown option pythia->SetFeedDownHigherFamily(kFALSE); // Set Count mode if(nEvts>0) pythia->SetCountMode(AliGenPythia::kCountParents); // // GEOM & KINE CUTS // pythia->SetMomentumRange(0,99999999); // pythia->SetJetEtaRange(-1.5, 1.5);// Final state kinematic cuts // pythia->SetJetPhiRange(0., 360.); // pythia->SetThetaRange(45,135); if(proc == kPyJetJetPHOSv2) pythia->SetForceDecay(kNeutralPion); else pythia->SetForceDecay(kAll); pythia->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0); pythia->SetPtKick(5); // set the intrinsic kt to 5 GeV/c gener = pythia; } // PRIMARY VERTEX gener->SetOrigin(0., 0., 0.); // vertex position // Size of the interaction diamond // Longitudinal Float_t sigmaz = 7.55 / TMath::Sqrt(2.); // [cm] // Transverse Float_t betast = 10; // beta* [m] Float_t eps = 3.75e-6; // emittance [m] Float_t gamma = 7000. / 0.938272; // relativistic gamma [1] Float_t sigmaxy = TMath::Sqrt(eps * betast / gamma) / TMath::Sqrt(2.) * 100.; // [cm] printf("\n \n Diamond size x-y: %10.3e z: %10.3e\n \n", sigmaxy, sigmaz); gener->SetSigma(sigmaxy, sigmaxy, sigmaz); // Sigma in (X,Y,Z) (cm) on IP position gener->SetCutVertexZ(3.); // Truncate at 3 sigma gener->SetVertexSmear(kPerEvent); gener->Init(); //Quenching gener->SetQuench(iquenching); if(iquenching == 1){ Float_t k = 6e5*(qhat/1.7) ; //qhat=1.7, k = 6e5, default value AliPythia::Instance()->InitQuenching(0.,0.1,k,0,0.95,6); } // FIELD if (mag == AliMagF::k2kG) { comment = comment.Append(" | L3 field 0.2 T"); } else if (mag == AliMagF::k5kG) { comment = comment.Append(" | L3 field 0.5 T"); } printf("\n \n Comment: %s \n \n", comment.Data()); // to use constant field in the barrel use: // AliMagF* field = new AliMagF("Maps","Maps", -1., -1., AliMagF::k5kGUniform); AliMagF* field = new AliMagF("Maps","Maps", -1., -1., mag); TGeoGlobalMagField::Instance()->SetField(field); rl->CdGAFile(); Int_t iABSO = 1; Int_t iACORDE= 1; Int_t iDIPO = 1; Int_t iEMCAL = 1; Int_t iFMD = 1; Int_t iFRAME = 1; Int_t iHALL = 1; Int_t iITS = 1; Int_t iMAG = 1; Int_t iMUON = 1; Int_t iPHOS = 1; Int_t iPIPE = 1; Int_t iPMD = 1; Int_t iHMPID = 1; Int_t iSHIL = 1; Int_t iT0 = 1; Int_t iTOF = 1; Int_t iTPC = 1; Int_t iTRD = 1; Int_t iVZERO = 1; Int_t iZDC = 1; //=================== Alice BODY parameters ============================= AliBODY *BODY = new AliBODY("BODY", "Alice envelop"); if (iMAG) { //=================== MAG parameters ============================ // --- Start with Magnet since detector layouts may be depending --- // --- on the selected Magnet dimensions --- AliMAG *MAG = new AliMAG("MAG", "Magnet"); } // // if (iABSO) { //=================== ABSO parameters ============================ AliABSO *ABSO = new AliABSOv3("ABSO", "Muon Absorber"); } if (iDIPO) { //=================== DIPO parameters ============================ AliDIPO *DIPO = new AliDIPOv3("DIPO", "Dipole version 3"); } if (iHALL) { //=================== HALL parameters ============================ AliHALL *HALL = new AliHALLv3("HALL", "Alice Hall"); } if (iFRAME) { //=================== FRAME parameters ============================ AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame"); if (geo == kHoles) FRAME->SetHoles(1); else FRAME->SetHoles(0); } if (iSHIL) { //=================== SHIL parameters ============================ AliSHIL *SHIL = new AliSHILv3("SHIL", "Shielding Version 3"); } if (iPIPE) { //=================== PIPE parameters ============================ AliPIPE *PIPE = new AliPIPEv3("PIPE", "Beam Pipe"); } if(iITS) { //=================== ITS parameters ============================ // AliITS *ITS = new AliITSv11("ITS","ITS v11"); } if (iTPC) { //============================ TPC parameters ===================== AliTPC *TPC = new AliTPCv2("TPC", "Default"); } if (iTOF) { //=================== TOF parameters ============================ AliTOF *TOF = new AliTOFv6T0("TOF", "normal TOF"); } if (iHMPID) { //=================== HMPID parameters =========================== AliHMPID *HMPID = new AliHMPIDv3("HMPID", "normal HMPID"); } if (iZDC) { //=================== ZDC parameters ============================ AliZDC *ZDC = new AliZDCv4("ZDC", "normal ZDC"); } if (iTRD) { //=================== TRD parameters ============================ AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator"); AliTRDgeometry *geoTRD = TRD->GetGeometry(); } if (iFMD) { //=================== FMD parameters ============================ AliFMD *FMD = new AliFMDv1("FMD", "normal FMD"); } if (iMUON) { //=================== MUON parameters =========================== // New MUONv1 version (geometry defined via builders) AliMUON *MUON = new AliMUONv1("MUON", "default"); } //=================== PHOS parameters =========================== if (iPHOS) { AliPHOS *PHOS = new AliPHOSv1("PHOS", "Run1"); } if (iPMD) { //=================== PMD parameters ============================ AliPMD *PMD = new AliPMDv1("PMD", "normal PMD"); } if (iT0) { //=================== T0 parameters ============================ AliT0 *T0 = new AliT0v1("T0", "T0 Detector"); } if (iEMCAL) { //=================== EMCAL parameters ============================ AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "EMCAL_COMPLETEV1 scTh=0.176 pbTh=0.144"); } if (iACORDE) { //=================== CRT parameters ============================ AliACORDE *ACORDE = new AliACORDEv1("ACORDE", "normal ACORDE"); } if (iVZERO) { //=================== CRT parameters ============================ AliVZERO *VZERO = new AliVZEROv7("VZERO", "normal VZERO"); } }