From ce812f4fc89a4aa5e40ec7ad182063b1dabb2deb Mon Sep 17 00:00:00 2001 From: hristov Date: Fri, 6 Feb 2009 16:50:11 +0000 Subject: [PATCH] Adding directory with the production requests --- prod/LHC08d5/Config.C | 887 ++++++++++++++++++++++++++++++++++++++++++ prod/LHC08d5/JDL | 31 ++ prod/LHC08d5/rec.C | 55 +++ prod/LHC08d5/sim.C | 18 + prod/LHC08d5/simrun.C | 53 +++ prod/LHC08d5/tag.C | 109 ++++++ prod/LHC08d6/Config.C | 513 ++++++++++++++++++++++++ prod/LHC08d6/JDL | 30 ++ prod/LHC08d6/rec.C | 20 + prod/LHC08d6/sim.C | 16 + prod/LHC08d6/simrun.C | 153 ++++++++ prod/LHC08d6/tag.C | 108 +++++ 12 files changed, 1993 insertions(+) create mode 100644 prod/LHC08d5/Config.C create mode 100644 prod/LHC08d5/JDL create mode 100644 prod/LHC08d5/rec.C create mode 100644 prod/LHC08d5/sim.C create mode 100644 prod/LHC08d5/simrun.C create mode 100644 prod/LHC08d5/tag.C create mode 100644 prod/LHC08d6/Config.C create mode 100644 prod/LHC08d6/JDL create mode 100644 prod/LHC08d6/rec.C create mode 100644 prod/LHC08d6/sim.C create mode 100644 prod/LHC08d6/simrun.C create mode 100644 prod/LHC08d6/tag.C diff --git a/prod/LHC08d5/Config.C b/prod/LHC08d5/Config.C new file mode 100644 index 00000000000..a1d1be42a90 --- /dev/null +++ b/prod/LHC08d5/Config.C @@ -0,0 +1,887 @@ +// +// Configuration for the Physics Data Challenge 2008 +// pp collisions at 10 TeV +// +// 87.01% of MSEL=0 events (including diffractive) with +// QQbar switched off (these events will include injected J/psi) => kPyMbNoHvq +// +// 11.88% of MSEL=1 events with ccbar (in 4 subsamples) => kCharmpp14000wmi +// bin 1 25% (3.535%): 2.76 < pthard < 3 GeV/c +// bin 2 40% (5.656%): 3 < pthard < 4 GeV/c +// bin 3 29% (4.101%): 4 < pthard < 8 GeV/c +// bin 4 6% (0.848%): pthard > 8 GeV/c +// +// 0.61% of MSEL=1 events with bbbar (in 4 subsamples) => kBeautypp14000wmi +// bin 1 5% (0.037%): 2.76 < pthard < 4 GeV/c +// bin 2 31% (0.226%): 4 < pthard < 6 GeV/c +// bin 3 28% (0.204%): 6 < pthard < 8 GeV/c +// bin 4 36% (0.263%): pthard >8 GeV/c +// +// 0.25% of MSEL=0 events with QQbar switched off and 1 Omega- => kPyOmegaMinus +// 0.25% of MSEL=0 events with QQbar switched off and 1 OmegaBar+ => kPyOmegaPlus +// + + +#if !defined(__CINT__) || defined(__MAKECINT__) +#include +#include +#include +#include +#include +#include +#include +#include "STEER/AliRunLoader.h" +#include "STEER/AliRun.h" +#include "STEER/AliConfig.h" +#include "STEER/AliGenerator.h" +#include "STEER/AliLog.h" +#include "PYTHIA6/AliDecayerPythia.h" +#include "PYTHIA6/PythiaProcesses.h" +#include "EVGEN/AliGenHIJINGpara.h" +#include "THijing/AliGenHijing.h" +#include "EVGEN/AliGenCocktail.h" +#include "EVGEN/AliGenSlowNucleons.h" +#include "EVGEN/AliSlowNucleonModelExp.h" +#include "EVGEN/AliGenParam.h" +#include "EVGEN/AliGenMUONlib.h" +#include "EVGEN/AliGenSTRANGElib.h" +#include "EVGEN/AliGenMUONCocktail.h" +#include "EVGEN/AliGenCocktail.h" +#include "EVGEN/AliGenGeVSim.h" +#include "EVGEN/AliGeVSimParticle.h" +#include "PYTHIA6/AliGenPythia.h" +#include "TDPMjet/AliGenDPMjet.h" +#include "STEER/AliMagF.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/AliITSv11Hybrid.h" +#include "TPC/AliTPCv2.h" +#include "TOF/AliTOFv6T0.h" +#include "HMPID/AliHMPIDv3.h" +#include "ZDC/AliZDCv3.h" +#include "TRD/AliTRDv1.h" +#include "TRD/AliTRDgeometry.h" +#include "FMD/AliFMDv1.h" +#include "MUON/AliMUONv1.h" +#include "PHOS/AliPHOSv1.h" +#include "PHOS/AliPHOSSimParam.h" +#include "PMD/AliPMDv1.h" +#include "T0/AliT0v1.h" +#include "EMCAL/AliEMCALv2.h" +#include "ACORDE/AliACORDEv1.h" +#include "VZERO/AliVZEROv7.h" +#endif + + +enum PDC06Proc_t +{ +//--- Heavy Flavour Production --- + kCharmPbPb5500, kCharmpPb8800, kCharmpp14000, kCharmpp14000wmi, + kD0PbPb5500, kD0pPb8800, kD0pp14000, + kDPlusPbPb5500, kDPluspPb8800, kDPluspp14000, + kBeautyPbPb5500, kBeautypPb8800, kBeautypp14000, kBeautypp14000wmi, +// -- Pythia Mb + kPyMbNoHvq, kPyOmegaPlus, kPyOmegaMinus, kRunMax +}; + +const char * pprRunName[] = { + "kCharmPbPb5500", "kCharmpPb8800", "kCharmpp14000", "kCharmpp14000wmi", + "kD0PbPb5500", "kD0pPb8800", "kD0pp14000", + "kDPlusPbPb5500", "kDPluspPb8800", "kDPluspp14000", + "kBeautyPbPb5500", "kBeautypPb8800", "kBeautypp14000", "kBeautypp14000wmi", + "kPyMbNoHvq", "kPyOmegaPlus", "kPyOmegaMinus" +}; + + +//--- Decay Mode --- +enum DecayHvFl_t +{ + kNature, kHadr, kSemiEl, kSemiMu +}; +//--- Rapidity Cut --- +enum YCut_t +{ + kFull, kBarrel, kMuonArm +}; + +//--- Functions --- +class AliGenPythia; +AliGenPythia *PythiaHVQ(PDC06Proc_t proc); +AliGenerator *MbCocktail(); +AliGenerator *PyMbTriggered(Int_t pdg); +void ProcessEnvironmentVars(); + +// This part for configuration +static PDC06Proc_t proc = kPyMbNoHvq; +static DecayHvFl_t decHvFl = kNature; +static YCut_t ycut = kFull; +static AliMagF::BMap_t mag = AliMagF::k5kG; +static Float_t energy = 10000; // energy in CMS +static Int_t runNumber= 0; +//========================// +// Set Random Number seed // +//========================// +TDatime dt; +static UInt_t seed = dt.Get(); + +// nEvts = -1 : you get 1 QQbar pair and all the fragmentation and +// decay chain +// nEvts = N>0 : you get N charm / beauty Hadrons +Int_t nEvts = -1; +// stars = kTRUE : all heavy resonances and their decay stored +// = kFALSE: only final heavy hadrons and their decays stored +Bool_t stars = kTRUE; + +// To be used only with kCharmpp1400wmi and kBeautypp1400wmi +// To get a "reasonable" agreement with MNR results, events have to be +// generated with the minimum ptHard set to 2.76 GeV. +// To get a "perfect" agreement with MNR results, events have to be +// generated in four ptHard bins with the following relative +// normalizations: +// CHARM +// 2.76-3 GeV: 25% +// 3-4 GeV: 40% +// 4-8 GeV: 29% +// >8 GeV: 6% +// BEAUTY +// 2.76-4 GeV: 5% +// 4-6 GeV: 31% +// 6-8 GeV: 28% +// >8 GeV: 36% +Float_t ptHardMin = 2.76; +Float_t ptHardMax = -1.; + + +// Comment line +static TString comment; + +void Config() +{ + + + // Get settings from environment variables + ProcessEnvironmentVars(); + + // gSystem->Load("libpythia6"); +// gSystem->Load("libEGPythia6"); +// gSystem->Load("libAliPythia6"); + gSystem->Load("liblhapdf.so"); // Parton density functions + gSystem->Load("libEGPythia6.so"); // TGenerator interface + gSystem->Load("libpythia6.so"); // Pythia + gSystem->Load("libAliPythia6.so"); // ALICE specific implementations + + + // libraries required by geant321 +#if defined(__CINT__) + gSystem->Load("liblhapdf"); + gSystem->Load("libEGPythia6"); + gSystem->Load("libpythia6"); + gSystem->Load("libAliPythia6"); + gSystem->Load("libgeant321"); +#endif + + new TGeant3TGeo("C++ Interface to Geant3"); + + // Output every 100 tracks + ((TGeant3*)gMC)->SetSWIT(4,100); + + //======================================================================= + + // Run loader + AliRunLoader* rl=0x0; + 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(1000); + gAlice->SetRunLoader(rl); + + // Set the trigger configuration + gAlice->SetTriggerDescriptor("p-p"); + cout<<"Trigger configuration is set to p-p "<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); + + //======================// + // Set External decayer // + //======================// + TVirtualMCDecayer* decayer = new AliDecayerPythia(); + // DECAYS + // + + switch(decHvFl) { + case kNature: + decayer->SetForceDecay(kNeutralPion); + break; + case kHadr: + decayer->SetForceDecay(kHadronicD); + break; + case kSemiEl: + decayer->SetForceDecay(kSemiElectronic); + break; + case kSemiMu: + decayer->SetForceDecay(kSemiMuonic); + break; + } + decayer->Init(); + gMC->SetExternalDecayer(decayer); + + //=========================// + // Generator Configuration // + //=========================// + AliGenerator* 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); + pythia->SetForceDecay(kNeutralPion); + 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(-12,12); + 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); + } + + + + // PRIMARY VERTEX + + gener->SetOrigin(0., 0., 0.); // vertex position + + // Size of the interaction diamond + // Longitudinal + Float_t sigmaz = 5.4 / TMath::Sqrt(2.); // [cm] + if (energy == 900) + sigmaz = 10.5 / TMath::Sqrt(2.); // [cm] + + // Transverse + Float_t betast = 10; // beta* [m] + Float_t eps = 3.75e-6; // emittance [m] + Float_t gamma = energy / 2.0 / 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(); + + // FIELD + // + + TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, 1., 10., mag)); + + printf("\n \n Comment: %s \n \n", comment.Data()); + + rl->CdGAFile(); + + Int_t iABSO = 1; + Int_t iACORDE= 0; + 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"); + FRAME->SetHoles(1); + } + + 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 AliITSv11Hybrid("ITS","ITS v11Hybrid"); + } + + 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 AliZDCv3("ZDC", "normal ZDC"); + } + + if (iTRD) + { + //=================== TRD parameters ============================ + + AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator"); + AliTRDgeometry *geoTRD = TRD->GetGeometry(); + // Partial geometry: modules at 0,8,9,17 + // Partial geometry: modules at 1,7,10,16 expected for 2009 + // starting at 3h in positive direction + + geoTRD->SetSMstatus(2,0); + geoTRD->SetSMstatus(3,0); + geoTRD->SetSMstatus(4,0); + geoTRD->SetSMstatus(5,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); + + } + + 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"); + } + + if (iPHOS) + { + //=================== PHOS parameters =========================== + + AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP"); + + } + + + 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", "SHISH_77_TRD1_2X2_FINAL_110DEG"); + AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "EMCAL_COMPLETE"); + } + + if (iACORDE) + { + //=================== ACORDE parameters ============================ + + AliACORDE *ACORDE = new AliACORDEv1("ACORDE", "normal ACORDE"); + } + + if (iVZERO) + { + //=================== ACORDE parameters ============================ + + AliVZERO *VZERO = new AliVZEROv7("VZERO", "normal VZERO"); + } +} + + +// PYTHIA + +AliGenPythia *PythiaHVQ(PDC06Proc_t proc) { +//*******************************************************************// +// Configuration file for charm / beauty generation with PYTHIA // +// // +// The parameters have been tuned in order to reproduce the inclusive// +// heavy quark pt distribution given by the NLO pQCD calculation by // +// Mangano, Nason and Ridolfi. // +// // +// For details and for the NORMALIZATION of the yields see: // +// N.Carrer and A.Dainese, // +// "Charm and beauty production at the LHC", // +// ALICE-INT-2003-019, [arXiv:hep-ph/0311225]; // +// PPR Chapter 6.6, CERN/LHCC 2005-030 (2005). // +//*******************************************************************// + AliGenPythia * gener = 0x0; + + switch(proc) { + case kCharmPbPb5500: + comment = comment.Append(" Charm in Pb-Pb at 5.5 TeV"); + gener = new AliGenPythia(nEvts); + gener->SetProcess(kPyCharmPbPbMNR); + gener->SetStrucFunc(kCTEQ4L); + gener->SetPtHard(2.1,-1.0); + gener->SetEnergyCMS(5500.); + gener->SetNuclei(208,208); + break; + case kCharmpPb8800: + comment = comment.Append(" Charm in p-Pb at 8.8 TeV"); + gener = new AliGenPythia(nEvts); + gener->SetProcess(kPyCharmpPbMNR); + gener->SetStrucFunc(kCTEQ4L); + gener->SetPtHard(2.1,-1.0); + gener->SetEnergyCMS(8800.); + gener->SetProjectile("P",1,1); + gener->SetTarget("Pb",208,82); + break; + case kCharmpp14000: + comment = comment.Append(" Charm in pp at 14 TeV"); + gener = new AliGenPythia(nEvts); + gener->SetProcess(kPyCharmppMNR); + gener->SetStrucFunc(kCTEQ4L); + gener->SetPtHard(2.1,-1.0); + gener->SetEnergyCMS(energy); + break; + case kCharmpp14000wmi: + comment = comment.Append(" Charm in pp at 14 TeV with mult. interactions"); + gener = new AliGenPythia(-1); + gener->SetProcess(kPyCharmppMNRwmi); + gener->SetStrucFunc(kCTEQ5L); + gener->SetPtHard(ptHardMin,ptHardMax); + gener->SetEnergyCMS(energy); + break; + case kD0PbPb5500: + comment = comment.Append(" D0 in Pb-Pb at 5.5 TeV"); + gener = new AliGenPythia(nEvts); + gener->SetProcess(kPyD0PbPbMNR); + gener->SetStrucFunc(kCTEQ4L); + gener->SetPtHard(2.1,-1.0); + gener->SetEnergyCMS(5500.); + gener->SetNuclei(208,208); + break; + case kD0pPb8800: + comment = comment.Append(" D0 in p-Pb at 8.8 TeV"); + gener = new AliGenPythia(nEvts); + gener->SetProcess(kPyD0pPbMNR); + gener->SetStrucFunc(kCTEQ4L); + gener->SetPtHard(2.1,-1.0); + gener->SetEnergyCMS(8800.); + gener->SetProjectile("P",1,1); + gener->SetTarget("Pb",208,82); + break; + case kD0pp14000: + comment = comment.Append(" D0 in pp at 14 TeV"); + gener = new AliGenPythia(nEvts); + gener->SetProcess(kPyD0ppMNR); + gener->SetStrucFunc(kCTEQ4L); + gener->SetPtHard(2.1,-1.0); + gener->SetEnergyCMS(energy); + break; + case kDPlusPbPb5500: + comment = comment.Append(" DPlus in Pb-Pb at 5.5 TeV"); + gener = new AliGenPythia(nEvts); + gener->SetProcess(kPyDPlusPbPbMNR); + gener->SetStrucFunc(kCTEQ4L); + gener->SetPtHard(2.1,-1.0); + gener->SetEnergyCMS(5500.); + gener->SetNuclei(208,208); + break; + case kDPluspPb8800: + comment = comment.Append(" DPlus in p-Pb at 8.8 TeV"); + gener = new AliGenPythia(nEvts); + gener->SetProcess(kPyDPluspPbMNR); + gener->SetStrucFunc(kCTEQ4L); + gener->SetPtHard(2.1,-1.0); + gener->SetEnergyCMS(8800.); + gener->SetProjectile("P",1,1); + gener->SetTarget("Pb",208,82); + break; + case kDPluspp14000: + comment = comment.Append(" DPlus in pp at 14 TeV"); + gener = new AliGenPythia(nEvts); + gener->SetProcess(kPyDPlusppMNR); + gener->SetStrucFunc(kCTEQ4L); + gener->SetPtHard(2.1,-1.0); + gener->SetEnergyCMS(energy); + break; + case kBeautyPbPb5500: + comment = comment.Append(" Beauty in Pb-Pb at 5.5 TeV"); + gener = new AliGenPythia(nEvts); + gener->SetProcess(kPyBeautyPbPbMNR); + gener->SetStrucFunc(kCTEQ4L); + gener->SetPtHard(2.75,-1.0); + gener->SetEnergyCMS(5500.); + gener->SetNuclei(208,208); + break; + case kBeautypPb8800: + comment = comment.Append(" Beauty in p-Pb at 8.8 TeV"); + gener = new AliGenPythia(nEvts); + gener->SetProcess(kPyBeautypPbMNR); + gener->SetStrucFunc(kCTEQ4L); + gener->SetPtHard(2.75,-1.0); + gener->SetEnergyCMS(8800.); + gener->SetProjectile("P",1,1); + gener->SetTarget("Pb",208,82); + break; + case kBeautypp14000: + comment = comment.Append(" Beauty in pp at 14 TeV"); + gener = new AliGenPythia(nEvts); + gener->SetProcess(kPyBeautyppMNR); + gener->SetStrucFunc(kCTEQ4L); + gener->SetPtHard(2.75,-1.0); + gener->SetEnergyCMS(energy); + break; + case kBeautypp14000wmi: + comment = comment.Append(" Beauty in pp at 14 TeV with mult. interactions"); + gener = new AliGenPythia(-1); + gener->SetProcess(kPyBeautyppMNRwmi); + gener->SetStrucFunc(kCTEQ5L); + gener->SetPtHard(ptHardMin,ptHardMax); + gener->SetEnergyCMS(energy); + break; + } + + return gener; +} + +AliGenerator* MbCocktail() +{ + comment = comment.Append(" pp at 14 TeV: Pythia low-pt, no heavy quarks + J/Psi from parameterisation"); + AliGenCocktail * gener = new AliGenCocktail(); + gener->UsePerEventRates(); + +// Pythia + + AliGenPythia* pythia = new AliGenPythia(-1); + pythia->SetMomentumRange(0, 999999.); + pythia->SetThetaRange(0., 180.); + pythia->SetYRange(-12.,12.); + pythia->SetPtRange(0,1000.); + //pythia->SetProcess(kPyMb); + pythia->SetProcess(kPyMbWithDirectPhoton); + pythia->SetEnergyCMS(energy); + pythia->SwitchHFOff(); + pythia->SetForceDecay(kNeutralPion); + // pythia->SetEventListRange(-1, 10); + +// J/Psi parameterisation + + AliGenParam* jpsi = new AliGenParam(1, AliGenMUONlib::kJpsi, "CDF scaled", "Jpsi"); + jpsi->SetPtRange(0.,100.); + jpsi->SetYRange(-12., 12.); + jpsi->SetPhiRange(0., 360.); + //jpsi->SetForceDecay(kAll); + jpsi->SetForceDecay(kNeutralPion); + + + gener->AddGenerator(pythia, "Pythia", 1.); + // J/psi rate comes from J/psi / ccbar = 0.47% + // (from Yellow Report and PPRvol2 6.7) + // includes also J/psi from higher charmonia + gener->AddGenerator(jpsi, "J/Psi", 5.6e-4); + + return gener; +} + +AliGenerator* PyMbTriggered(Int_t pdg) +{ + AliGenPythia* pythia = new AliGenPythia(-1); + pythia->SetMomentumRange(0, 999999.); + pythia->SetThetaRange(0., 180.); + pythia->SetYRange(-12.,12.); + pythia->SetPtRange(0,1000.); + pythia->SetProcess(kPyMb); + pythia->SetEnergyCMS(energy); + pythia->SetTriggerParticle(pdg, 0.9); + return pythia; +} + +void ProcessEnvironmentVars() +{ + cout << "Processing environment variables" << endl; + // Random Number seed + if (gSystem->Getenv("CONFIG_SEED")) { + seed = atoi(gSystem->Getenv("CONFIG_SEED")); + } + + gRandom->SetSeed(seed); + cout<<"Seed for random number generation= "<Getenv("DC_RUN")) { + runNumber = atoi(gSystem->Getenv("DC_RUN")); + } + cout<<"Run number "<Getenv("DC_RUN_TYPE")) { + for (Int_t iRun = 0; iRun < kRunMax; iRun++) { + if (strcmp(gSystem->Getenv("DC_RUN_TYPE"), pprRunName[iRun])==0) { + proc = (PDC06Proc_t)iRun; + cout<<"Run type set to "<Rndm()); + + switch (iType) { + case 0: + proc = kPyMbNoHvq; + break; + case 1: + proc = kCharmpp14000wmi; + { + // Define ptHardMin,ptHardMax + // The array below contains the cumulative probability + // for the different pthard bins + Double_t probPtCharm[] = {0.0,0.25,0.65,0.94,1.0}; + Int_t iPt = TMath::BinarySearch(5,probPtCharm,gRandom->Rndm()); + switch (iPt) { + case 0: + ptHardMin = 2.76; + ptHardMax = 3.0; + break; + case 1: + ptHardMin = 3.0; + ptHardMax = 4.0; + break; + case 2: + ptHardMin = 4.0; + ptHardMax = 8.0; + break; + case 3: + ptHardMin = 8.0; + ptHardMax = -1.0; + break; + default: + cout << "ProcessEnvironmentVars: Wrong pthard bin" << endl; + } + } + break; + case 2: + proc = kBeautypp14000wmi; + { + // Define ptHardMin,ptHardMax + // The array below contains the cumulative probability + // for the different pthard bins + Double_t probPtBeauty[] = {0.0,0.05,0.36,0.64,1.0}; + Int_t iPt = TMath::BinarySearch(5,probPtBeauty,gRandom->Rndm()); + switch (iPt) { + case 0: + ptHardMin = 2.76; + ptHardMax = 4.0; + break; + case 1: + ptHardMin = 4.0; + ptHardMax = 6.0; + break; + case 2: + ptHardMin = 6.0; + ptHardMax = 8.0; + break; + case 3: + ptHardMin = 8.0; + ptHardMax = -1.0; + break; + default: + cout << "ProcessEnvironmentVars: Wrong pthard bin" << endl; + } + } + break; + case 3: + proc = kPyOmegaMinus; + break; + case 4: + proc = kPyOmegaPlus; + break; + default: + cout << "ProcessEnvironmentVars: Wrong run type" << endl; + } + cout<<"Run type set to "<SetVertexerTracksConstraintITS(kFALSE); +// grpRecoParam->SetVertexerTracksConstraintTPC(kFALSE); +// reco.SetRecoParam("GRP",grpRecoParam); + + reco.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-15-Release/Residual/"); + + // No write access to the OCDB => specific storage + reco.SetSpecificStorage("GRP/GRP/Data", + Form("local://%s",gSystem->pwd())); + + //------------------------------------------------------------------------- + // Setting the cuts for the V0 and cascade finding + // The values of the cuts below are "reasonable" for pp events + //------------------------------------------------------------------------- + + Double_t v0sels[]={33, // max allowed chi2 + 0.05, // min allowed impact parameter for the 1st daughter + 0.05, // min allowed impact parameter for the 2nd daughter + 0.5, // max allowed DCA between the daughter tracks + 0.99, // max allowed cosine of V0's pointing angle + 0.2, // min radius of the fiducial volume + 100 // max radius of the fiducial volume + }; + AliV0vertexer::SetDefaultCuts(v0sels); + + Double_t xisels[]={33., // max allowed chi2 (same as PDC07) + 0.025, // min allowed V0 impact parameter (PDC07 was 0.05) + 0.010, // "window" around the Lambda mass (PDC07 was 0.008) + 0.025, // min allowed bachelor's impact parameter (PDC07 was 0.035) + 0.2, // max allowed DCA between the V0 and the bachelor (PDC07 was 0.1) + 0.998, // max allowed cosine of the cascade pointing angle (PDC07 was 0.9985) + 0.2, // min radius of the fiducial volume (PDC07 was 0.9) + 100 // max radius of the fiducial volume (same as PDC07) + }; + AliCascadeVertexer::SetDefaultCuts(xisels); + + reco.SetRunQA("ALL:ALL"); + + TStopwatch timer; + timer.Start(); + reco.Run(); + timer.Stop(); + timer.Print(); +} diff --git a/prod/LHC08d5/sim.C b/prod/LHC08d5/sim.C new file mode 100644 index 00000000000..649fb6c2383 --- /dev/null +++ b/prod/LHC08d5/sim.C @@ -0,0 +1,18 @@ +void sim(Int_t nev=10) { + + AliSimulation simu; + simu.SetMakeSDigits("TRD TOF PHOS HMPID EMCAL MUON FMD ZDC PMD T0 VZERO"); + simu.SetMakeDigitsFromHits("ITS TPC"); + + simu.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal"); + + // No write access to the OCDB => specific storage + simu.SetSpecificStorage("GRP/GRP/Data", + Form("local://%s",gSystem->pwd())); + + TStopwatch timer; + timer.Start(); + simu.Run(nev); + timer.Stop(); + timer.Print(); +} diff --git a/prod/LHC08d5/simrun.C b/prod/LHC08d5/simrun.C new file mode 100644 index 00000000000..dcfcba09705 --- /dev/null +++ b/prod/LHC08d5/simrun.C @@ -0,0 +1,53 @@ +// #define VERBOSEARGS +// simrun.C +{ + // extract the run and event variables given with --run --event + int nrun = 0; + int nevent = 0; + int seed = 0; + char sseed[1024]; + char srun[1024]; + char sevent[1024]; + sprintf(srun,""); + sprintf(sevent,""); + for (int i=0; i< gApplication->Argc();i++){ +#ifdef VERBOSEARGS + printf("Arg %d: %s\n",i,gApplication->Argv(i)); +#endif + if (!(strcmp(gApplication->Argv(i),"--run"))) + nrun = atoi(gApplication->Argv(i+1)); + sprintf(srun,"%d",nrun); + if (!(strcmp(gApplication->Argv(i),"--event"))) + nevent = atoi(gApplication->Argv(i+1)); + sprintf(sevent,"%d",nevent); + } + + seed = nrun * 100000 + nevent; + sprintf(sseed,"%d",seed); + + if (seed==0) { + fprintf(stderr,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + fprintf(stderr,"!!!! WARNING! Seeding variable for MC is 0 !!!!\n"); + fprintf(stderr,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + } else { + fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + fprintf(stdout,"!!! MC Seed is %d \n",seed); + fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + } + + // set the seed environment variable + gSystem->Setenv("CONFIG_SEED",sseed); + gSystem->Setenv("DC_RUN",srun); + gSystem->Setenv("DC_EVENT",sevent); + gSystem->Setenv("ALIMDC_RAWDB1","./mdc1"); + gSystem->Setenv("ALIMDC_RAWDB2","./mdc2"); + gSystem->Setenv("ALIMDC_TAGDB","./mdc1/tag"); + gSystem->Setenv("ALIMDC_RUNDB","./mdc1/meta"); + gSystem->Exec("aliroot -b -q sim.C > sim.log 2>&1"); + gSystem->Exec("mv syswatch.log simwatch.log"); + gSystem->Exec("aliroot -b -q rec.C > rec.log 2>&1"); + gSystem->Exec("mv syswatch.log recwatch.log"); + gSystem->Exec("aliroot -b -q tag.C > tag.log 2>&1"); + gSystem->Exec("aliroot -b -q $ALICE_ROOT/STEER/CheckESD.C > check.log 2>&1"); + gSystem->Exec("aliroot -b -q $ALICE_ROOT/STEER/CreateAODfromESD.C > aod.log 2>&1"); +} diff --git a/prod/LHC08d5/tag.C b/prod/LHC08d5/tag.C new file mode 100644 index 00000000000..fa0e6eb2b0f --- /dev/null +++ b/prod/LHC08d5/tag.C @@ -0,0 +1,109 @@ +void tag() { + const char* turl = gSystem->Getenv("ALIEN_JDL_OUTPUTDIR"); + TString fESDFileName = "alien://"; + fESDFileName += turl; + fESDFileName += "/AliESDs.root"; + + TString fGUID = 0; + GetGUID(fGUID); + + TString fAliroot, fRoot, fGeant; + GetVersions(fAliroot,fRoot,fGeant); + + UpdateTag(fAliroot,fRoot,fGeant,fESDFileName,fGUID); +} + +//_____________________________________// +GetVersions(TString &fAliroot, TString &froot, TString &fgeant) { + const char* fver = gSystem->Getenv("ALIEN_JDL_PACKAGES"); + TString fS = fver; + Int_t fFirst = fS.First("#"); + + while(fFirst != -1) { + Int_t fTotalLength = fS.Length(); + TString tmp = fS; + TString fS1 = fS(0,fFirst); + tmp = fS(fFirst+2,fTotalLength); + fS = tmp; + + if(fS1.Contains("Root")) fAliroot = fS1; + if(fS1.Contains("ROOT")) froot = fS1; + if(fS1.Contains("GEANT")) fgeant = fS1; + + if(tmp.Contains("Root")) fAliroot = tmp; + if(tmp.Contains("ROOT")) froot = tmp; + if(tmp.Contains("GEANT")) fgeant = tmp; + + fFirst = tmp.First("#"); + } +} + +//_____________________________________// +GetGUID(TString &guid) { + ofstream myfile ("guid.txt"); + if (myfile.is_open()) { + TFile *f = TFile::Open("AliESDs.root","read"); + if(f->IsOpen()) { + guid = f->GetUUID().AsString(); + myfile << "AliESDs.root \t"<GetUUID().AsString(); + cout<OpenDirectory(gSystem->pwd()); + const char * name = 0x0; + // Add all files matching *pattern* to the chain + while((name = gSystem->GetDirEntry(dirp))) { + if (strstr(name,tagPattern)) { + TFile *f = TFile::Open(name,"read") ; + + AliRunTag *tag = new AliRunTag; + AliEventTag *evTag = new AliEventTag; + TTree *fTree = (TTree *)f->Get("T"); + fTree->SetBranchAddress("AliTAG",&tag); + + //Defining new tag objects + AliRunTag *newTag = new AliRunTag(); + TTree ttag("T","A Tree with event tags"); + TBranch * btag = ttag.Branch("AliTAG", &newTag); + btag->SetCompressionLevel(9); + for(Int_t iTagFiles = 0; iTagFiles < fTree->GetEntries(); iTagFiles++) { + fTree->GetEntry(iTagFiles); + newTag->SetRunId(tag->GetRunId()); + newTag->SetAlirootVersion(faliroot); + newTag->SetRootVersion(froot); + newTag->SetGeant3Version(fgeant); + const TClonesArray *tagList = tag->GetEventTags(); + for(Int_t j = 0; j < tagList->GetEntries(); j++) { + evTag = (AliEventTag *) tagList->At(j); + evTag->SetTURL(turl); + evTag->SetGUID(guid); + newTag->AddEventTag(*evTag); + } + ttag.Fill(); + newTag->Clear(); + }//tag file loop + + TFile* ftag = TFile::Open(name, "recreate"); + ftag->cd(); + ttag.Write(); + ftag->Close(); + + delete tag; + delete newTag; + }//pattern check + }//directory loop + return kTRUE; +} + diff --git a/prod/LHC08d6/Config.C b/prod/LHC08d6/Config.C new file mode 100644 index 00000000000..8f99eeb98e1 --- /dev/null +++ b/prod/LHC08d6/Config.C @@ -0,0 +1,513 @@ +// 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 +#include +#include +#include +#include +#include +#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 "STEER/AliMagF.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/AliITSv11Hybrid.h" +#include "TPC/AliTPCv2.h" +#include "TOF/AliTOFv6T0.h" +#include "HMPID/AliHMPIDv3.h" +#include "ZDC/AliZDCv3.h" +#include "TRD/AliTRDv1.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/AliACORDEv1.h" +#include "VZERO/AliVZEROv7.h" +#endif + +//--- Functions --- +void ProcessEnvironmentVars(); +Float_t EtaToTheta(Float_t arg); +void LoadPythia(); + +//--- Trigger config --- +enum TrigConf_t +{ + kDefaultPPTrig, kDefaultPbPbTrig +}; +const char * TrigConfName[] = { + "p-p","Pb-Pb" +}; + +// This part for configuration +static AliMagF::BMap_t mag = AliMagF::k5kG; +static TrigConf_t trig = kDefaultPbPbTrig; // default pp trigger configuration +static Int_t runNumber = 0; +static Int_t eventNumber = 0; + +//========================// +// Set Random Number seed // +//========================// +TDatime dt; +static UInt_t seed = dt.Get(); +static Int_t runNumber= 0; +static Float_t bMin = 0.; +static Float_t bMax = 5.; +static UInt_t quench = 1; +static UInt_t shad = 1; +static Float_t etaMin = -8.0; +static Float_t etaMax = 8.0; +static Float_t phiMin = 0.; +static Float_t phiMax = 360.; +static TString comment; + +void Config() +{ + // ThetaRange is (0., 180.). It was (0.28,179.72) 7/12/00 09:00 + // Theta range given through pseudorapidity limits 22/6/2001 + + // Set Random Number seed + //gRandom->SetSeed(123456); // Set 0 to use the current time + + AliLog::Message(AliLog::kInfo, Form("Seed for random number generation = %d",gRandom->GetSeed()), "Config.C", "Config.C", "Config()","Config.C", __LINE__); + + // Get settings from environment variables + ProcessEnvironmentVars(); + + // Load Pythia libraries + LoadPythia(); + // Libraries required by geant321 +#if defined(__CINT__) + gSystem->Load("libgeant321"); +#endif + + new TGeant3TGeo("C++ Interface to Geant3"); + + // Output every 100 tracks + ((TGeant3*)gMC)->SetSWIT(4,100); + + AliRunLoader* rl=0x0; + + AliLog::Message(AliLog::kInfo, "Creating Run Loader", "Config.C", "Config.C", "Config()"," Config.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(2); + gAlice->SetRunLoader(rl); + + // gAlice->SetGeometryFromFile("geometry.root"); + + // Uncomment if you want to load geometry from OCDB! >>>> +/* + if(!AliCDBManager::Instance()->IsDefaultStorageSet()){ + cout << "#####################################################" << endl; + cout << "# #" << endl; + cout << "# WARNING: CDB DEFAULT STORAGE NOT SET !!! #" << endl; + cout << "# SETTING IT TO local://$ALICE_ROOT !!! #" << endl; + cout << "# #" << endl; + cout << "#####################################################" << endl; + + AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT"); + } + + if(AliCDBManager::Instance()->GetRun() < 0){ + cout << "#####################################################" << endl; + cout << "# #" << endl; + cout << "# WARNING: RUN NUMBER NOT SET !!! #" << endl; + cout << "# SETTING IT TO 0 !!! #" << endl; + cout << "# #" << endl; + cout << "#####################################################" << endl; + + AliCDBManager::Instance()->SetRun(0); + } + gAlice->SetGeometryFromCDB(); +*/ + // Uncomment if you want to load geometry from OCDB! <<<< + + // Set the trigger configuration + gAlice->SetTriggerDescriptor(TrigConfName[trig]); + cout<<"Trigger configuration is set to "<SetForceDecay(kAll); + decayer->Init(); + gMC->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); + + 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); + + + AliGenHijing *gener = new AliGenHijing(-1); + // centre of mass energy + gener->SetEnergyCMS(5500); + // reference frame + gener->SetReferenceFrame("CMS "); + // projectile + gener->SetProjectile("A ", 208, 82); + gener->SetTarget ("A ", 208, 82); + // impact parameter range + gener->SetImpactParameterRange(bMin, bMax); // bMin = 0 - bMax = 3 + // evaluate cross section before run + gener->SetEvaluate(0); + // tell hijing to keep the full parent child chain + gener->KeepFullEvent(); + // enable jet quenching + gener->SetJetQuenching(quench); // 1 + // enable shadowing + gener->SetShadowing(shad); // 1 + // neutral pion and heavy particle decays switched off + gener->SetDecaysOff(1); + // Don't track spectators + gener->SetSpectators(0); + // trigger + // gener->SetTrigger(0); + // kinematic selection + gener->SetSelectAll(0); + // momentum range + gener->SetMomentumRange(0,999); + // No resytriction on phi, theta + Float_t thmin = EtaToTheta(etaMax); // Theta min <---> eta max 2. + Float_t thmax = EtaToTheta(etaMin); // Theta max <---> eta min -2. + gener->SetPhiRange(phiMin, phiMax); // 0 - 360 + gener->SetThetaRange(thmin,thmax); + // PRIMARY VERTEX + gener->SetOrigin(0, 0, 0); //vertex position +// gener->SetSigma(0, 0, 5.3); //Sigma in (X,Y,Z) (cm) on IP position +// gener->SetCutVertexZ(3.); // Truncate at 3 sigma +// gener->SetVertexSmear(kPerEvent); + + // 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 gamma = 2750. / 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); + + // + // Activate this line if you want the vertex smearing to happen + // track by track + // + //gener->SetVertexSmear(perTrack); + + gener->Init(); + + // Field (L3 0.5 T) + TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, 1., 10., mag)); + + Int_t iABSO = 1; + Int_t iDIPO = 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 iZDC = 1; + Int_t iEMCAL = 1; + Int_t iACORDE = 1; + Int_t iVZERO = 1; + rl->CdGAFile(); + //=================== 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"); + FRAME->SetHoles(1); + } + + 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 AliITSv11Hybrid("ITS","ITS v11Hybrid"); + } + + 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 AliZDCv3("ZDC", "normal ZDC"); + } + + if (iTRD) + { + //=================== TRD parameters ============================ + + AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator"); + } + + 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", "IHEP"); + } + + + 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_COMPLETE"); + } + + if (iACORDE) + { + //=================== ACORDE parameters ============================ + AliACORDE *ACORDE = new AliACORDEv1("ACORDE", "normal ACORDE"); + } + + if (iVZERO) + { + //=================== VZERO parameters ============================ + AliVZERO *VZERO = new AliVZEROv7("VZERO", "normal VZERO"); + } + + AliLog::Message(AliLog::kInfo, "End of Config", "Config.C", "Config.C", "Config()"," Config.C", __LINE__); + +} + +Float_t EtaToTheta(Float_t arg){ + return (180./TMath::Pi())*2.*atan(exp(-arg)); +} + +void ProcessEnvironmentVars() +{ + cout << "Processing environment variables" << endl; + // Random Number seed + if (gSystem->Getenv("CONFIG_SEED")) { + seed = atoi(gSystem->Getenv("CONFIG_SEED")); + } + + gRandom->SetSeed(seed); + cout<<"Seed for random number generation= "<Getenv("DC_RUN")) { + runNumber = atoi(gSystem->Getenv("DC_RUN")); + } + cout<<"Run number "<Getenv("CONFIG_BMIN")) { + bMin = atof(gSystem->Getenv("CONFIG_BMIN")); + } + + if (gSystem->Getenv("CONFIG_BMAX")) { + bMax = atof(gSystem->Getenv("CONFIG_BMAX")); + } + cout<<"Impact parameter in ["<Getenv("QUENCH")) { + quench = atoi(gSystem->Getenv("QUENCH")); + } + if(quench==1) cout<<"With quenching "<Getenv("QHAT")) { + shad = atoi(gSystem->Getenv("QHAT")); + } + if(shad==1) cout<<"With shadowing "<Getenv("CONFIG_ETAMIN")) { + etaMin = atof(gSystem->Getenv("CONFIG_ETAMIN")); + } + + if (gSystem->Getenv("CONFIG_ETAMAX")) { + etaMax = atof(gSystem->Getenv("CONFIG_ETAMAX")); + } + cout<<"Eta acceptance ["<Getenv("CONFIG_PHIMIN")) { + phiMin = atof(gSystem->Getenv("CONFIG_PHIMIN")); + } + + if (gSystem->Getenv("CONFIG_PHIMAX")) { + phiMax = atof(gSystem->Getenv("CONFIG_PHIMAX")); + } + cout<<"Phi acceptance ["<Load("liblhapdf.so"); // Parton density functions + gSystem->Load("libEGPythia6.so"); // TGenerator interface + gSystem->Load("libpythia6.so"); // Pythia + gSystem->Load("libAliPythia6.so"); // ALICE specific implementations +} diff --git a/prod/LHC08d6/JDL b/prod/LHC08d6/JDL new file mode 100644 index 00000000000..8e315545b84 --- /dev/null +++ b/prod/LHC08d6/JDL @@ -0,0 +1,30 @@ +Executable = "aliroot_new"; +Jobtag={"comment:PbPb, HIJING Central"}; + +Packages={"VO_ALICE@AliRoot::v4-16-Rev-05", + "VO_ALICE@GEANT3::v1-9-8","VO_ALICE@ROOT::v5-22-00","VO_ALICE@APISCONFIG::V2.4"}; + +TTL = "72000"; +Price = 1; + +Validationcommand ="/alice/cern.ch/user/a/aliprod/prod2007/configs_pbpb_hijing/validation.sh"; + +InputFile= {"LF:/alice/cern.ch/user/e/estienne/prod2008/config_pbpb_hijing/Config.C", + "LF:/alice/cern.ch/user/e/estienne/prod2008/config_pbpb_hijing/simRun.C", + "LF:/alice/cern.ch/user/e/estienne/prod2008/config_pbpb_hijing/sim.C", + "LF:/alice/cern.ch/user/e/estienne/prod2008/config_pbpb_hijing/rec.C", + "LF:/alice/cern.ch/user/e/estienne/prod2008/config_pbpb_hijing/CheckESD.C", + "LF:/alice/cern.ch/user/e/estienne/prod2008/config_pbpb_hijing/tag.C"}; + +OutputArchive={"log_archive:*.tag.root,stdout,stderr,*.log@Alice::NIHAM::File","root_archive.zip:galice.root,geometry.root,Kinematics.root,TrackRefs.root,AliESDs.root,AliESDfriends.root,FMD.Hits.root,T0.Hits.root,VZERO.Hits.root,*.SDigits.root@Alice::Subatech::DPM"}; + +OutputFile={"Run*.root@Alice::NIHAM::File"}; +OutputDir="[:OUTPUTDIR:]/$1/#alien_counter_03i#"; + +JDLVariables={"Packages", "OutputDir"}; +GUIDFILE="guid.txt"; + +splitarguments="simRun.C --run $1 --event #alien_counter# --bmin 0 --bmax 5 --quench 1 --qhat 1 --etamin -8 --etamax 8 --phimin 0 --phimax 360"; +split="production:1-1000"; + +Workdirectorysize={"6000MB"}; diff --git a/prod/LHC08d6/rec.C b/prod/LHC08d6/rec.C new file mode 100644 index 00000000000..c42c408df3c --- /dev/null +++ b/prod/LHC08d6/rec.C @@ -0,0 +1,20 @@ +void rec() { + + AliReconstruction reco; + reco.SetWriteESDfriend(); + reco.SetWriteAlignmentData(); + + reco.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/?cacheFold=/tmp/CDBCache?operateDisconnected=kFALSE"); + + // No write access to the OCDB => specific storage + reco.SetSpecificStorage("GRP/GRP/Data", + Form("local://%s",gSystem->pwd())); + + reco.SetRunQA("ALL:ALL"); + + TStopwatch timer; + timer.Start(); + reco.Run(); + timer.Stop(); + timer.Print(); +} diff --git a/prod/LHC08d6/sim.C b/prod/LHC08d6/sim.C new file mode 100644 index 00000000000..ad0459a2be8 --- /dev/null +++ b/prod/LHC08d6/sim.C @@ -0,0 +1,16 @@ +void sim(Int_t nev=1) { + + AliSimulation simu; + simu.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/?cacheFold=/tmp/CDBCache?operateDisconnected=kFALSE"); + + // No write access to the OCDB => specific storage + simu.SetSpecificStorage("GRP/GRP/Data", + Form("local://%s",gSystem->pwd())); + + + TStopwatch timer; + timer.Start(); + simu.Run(nev); + timer.Stop(); + timer.Print(); +} diff --git a/prod/LHC08d6/simrun.C b/prod/LHC08d6/simrun.C new file mode 100644 index 00000000000..4788667fed1 --- /dev/null +++ b/prod/LHC08d6/simrun.C @@ -0,0 +1,153 @@ +//#define VERBOSEARGS + +{ + // set job and simulation variables as : + // --run --event --bmin --bmax --quench --qhat --etamin --etamax --phimin --phimax + // root simrun.C --run 1 --event 10 --bmin 0 --bmax 3 --quench 1 --qhat 1 --etamin -2 --etamax 2 --phimin 0 --phimax 6.283185 + + int nrun = 0; + int nevent = 0; + int seed = 0; + +// float minpthard = -1; +// float maxpthard = -1; +// float minptgammapi0 = 1; + + char sseed[1024]; + char srun[1024]; + char sevent[1024]; + char sbmin[1024]; + char sbmax[1024]; + char setamin[1024]; + char setamax[1024]; + char sphimin[1024]; + char sphimax[1024]; + char squench[1024]; + char sqhat[1024]; + + sprintf(sseed,""); + sprintf(srun,""); + sprintf(sevent,""); + sprintf(sbmin,""); + sprintf(sbmax,""); + sprintf(setamin,""); + sprintf(setamax,""); + sprintf(sphimin,""); + sprintf(sphimax,""); + sprintf(squench,""); + sprintf(sqhat,""); + + for (int i=0; i< gApplication->Argc();i++){ +#ifdef VERBOSEARGS + printf("Arg %d: %s\n",i,gApplication->Argv(i)); +#endif + if (!(strcmp(gApplication->Argv(i),"--run"))) + nrun = atoi(gApplication->Argv(i+1)); + sprintf(srun,"%d",nrun); + if (!(strcmp(gApplication->Argv(i),"--event"))) + nevent = atoi(gApplication->Argv(i+1)); + sprintf(sevent,"%d",nevent); + + if (!(strcmp(gApplication->Argv(i),"--bmin"))) + sprintf(sbmin,gApplication->Argv(i+1)); + + if (!(strcmp(gApplication->Argv(i),"--bmax"))) + sprintf(sbmax,gApplication->Argv(i+1)); + + if (!(strcmp(gApplication->Argv(i),"--etamin"))) + sprintf(setamin,gApplication->Argv(i+1)); + + if (!(strcmp(gApplication->Argv(i),"--etamax"))) + sprintf(setamax,gApplication->Argv(i+1)); + + if (!(strcmp(gApplication->Argv(i),"--phimin"))) + sprintf(sphimin,gApplication->Argv(i+1)); + + if (!(strcmp(gApplication->Argv(i),"--phimax"))) + sprintf(sphimax,gApplication->Argv(i+1)); + + if (!(strcmp(gApplication->Argv(i),"--quench"))) + sprintf(squench,gApplication->Argv(i+1)); + + if (!(strcmp(gApplication->Argv(i),"--qhat"))) + sprintf(sqhat,gApplication->Argv(i+1)); + + } + + seed = nrun * 100000 + nevent; + sprintf(sseed,"%d",seed); + + if (seed==0) { + fprintf(stderr,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + fprintf(stderr,"!!!! WARNING! Seeding variable for MC is 0 !!!!\n"); + fprintf(stderr,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + } else { + fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + fprintf(stdout,"!!! MC Seed is %d \n",seed); + fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + } + + fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + fprintf(stdout,"!!! Run is %d \n",nrun); + fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + + fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + fprintf(stdout,"!!! Event is %d \n",nevent); + fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + + fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + fprintf(stdout,"!!! b min is %s \n",sbmin); + fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + + fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + fprintf(stdout,"!!! bmax is %s \n",sbmax); + fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + + fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + fprintf(stdout,"!!! eta min is %s \n",setamin); + fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + + fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + fprintf(stdout,"!!! eta max is %s \n",setamax); + fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + + fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + fprintf(stdout,"!!! phi min is %s \n",sphimin); + fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + + fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + fprintf(stdout,"!!! phi max is %s \n",sphimax); + fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + + fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + fprintf(stdout,"!!! Quenching is %s \n",squench); + fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + + fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + fprintf(stdout,"!!! Shadowing is %s \n",sqhat); + fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + + + // set the seed environment variable + gSystem->Setenv("CONFIG_SEED",sseed); + gSystem->Setenv("DC_RUN",srun); + gSystem->Setenv("DC_EVENT",sevent); + gSystem->Setenv("CONFIG_BMIN",sbmin);//"20"); + gSystem->Setenv("CONFIG_BMAX",sbmax);//"30"); + gSystem->Setenv("QUENCH",squench); + gSystem->Setenv("QHAT",sqhat); + gSystem->Setenv("CONFIG_ETAMIN",setamin);//"20"); + gSystem->Setenv("CONFIG_ETAMAX",setamax);//"30"); + gSystem->Setenv("CONFIG_PHIMIN",sphimin);//"20"); + gSystem->Setenv("CONFIG_PHIMAX",sphimax);//"30"); +// gSystem->Exec("cp $ROOTSYS/etc/system.rootrc .rootrc"); + cout << ">>>>>> SIMULATION <<<<<<" << endl; + gSystem->Exec("aliroot -b -q \"sim.C(2)\" > sim.log 2>&1"); + cout << ">>>>>> RECONSTRUCTION <<<<<<" << endl; + gSystem->Exec("aliroot -b -q rec.C > rec.log 2>&1"); + cout << ">>>>>> TAG <<<<<<" << endl; + gSystem->Exec("aliroot -b -q tag.C > tag.log 2>&1"); + cout << ">>>>>> CHECK ESD <<<<<<" << endl; + gSystem->Exec("aliroot -b -q CheckESD.C > check.log 2>&1"); + +} diff --git a/prod/LHC08d6/tag.C b/prod/LHC08d6/tag.C new file mode 100644 index 00000000000..668d95ae835 --- /dev/null +++ b/prod/LHC08d6/tag.C @@ -0,0 +1,108 @@ +void tag() { + const char* turl = gSystem->Getenv("ALIEN_JDL_OUTPUTDIR"); + TString fESDFileName = "alien://"; + fESDFileName += turl; + fESDFileName += "/AliESDs.root"; + + TString fGUID = 0; + GetGUID(fGUID); + + TString fAliroot, fRoot, fGeant; + GetVersions(fAliroot,fRoot,fGeant); + + UpdateTag(fAliroot,fRoot,fGeant,fESDFileName,fGUID); +} + +//_____________________________________// +GetVersions(TString &fAliroot, TString &froot, TString &fgeant) { + const char* fver = gSystem->Getenv("ALIEN_JDL_PACKAGES"); + TString fS = fver; + Int_t fFirst = fS.First("#"); + + while(fFirst != -1) { + Int_t fTotalLength = fS.Length(); + TString tmp = fS; + TString fS1 = fS(0,fFirst); + tmp = fS(fFirst+2,fTotalLength); + fS = tmp; + + if(fS1.Contains("Root")) fAliroot = fS1; + if(fS1.Contains("ROOT")) froot = fS1; + if(fS1.Contains("GEANT")) fgeant = fS1; + + if(tmp.Contains("Root")) fAliroot = tmp; + if(tmp.Contains("ROOT")) froot = tmp; + if(tmp.Contains("GEANT")) fgeant = tmp; + + fFirst = tmp.First("#"); + } +} + +//_____________________________________// +GetGUID(TString &guid) { + ofstream myfile ("guid.txt"); + if (myfile.is_open()) { + TFile *f = TFile::Open("AliESDs.root","read"); + if(f->IsOpen()) { + guid = f->GetUUID().AsString(); + myfile << "AliESDs.root \t"<GetUUID().AsString(); + cout<OpenDirectory(gSystem->pwd()); + const char * name = 0x0; + // Add all files matching *pattern* to the chain + while((name = gSystem->GetDirEntry(dirp))) { + if (strstr(name,tagPattern)) { + TFile *f = TFile::Open(name,"read") ; + + AliRunTag *tag = new AliRunTag; + AliEventTag *evTag = new AliEventTag; + TTree *fTree = (TTree *)f->Get("T"); + fTree->SetBranchAddress("AliTAG",&tag); + + //Defining new tag objects + AliRunTag *newTag = new AliRunTag(); + TTree ttag("T","A Tree with event tags"); + TBranch * btag = ttag.Branch("AliTAG", &newTag); + btag->SetCompressionLevel(9); + for(Int_t iTagFiles = 0; iTagFiles < fTree->GetEntries(); iTagFiles++) { + fTree->GetEntry(iTagFiles); + newTag->SetRunId(tag->GetRunId()); + newTag->SetAlirootVersion(faliroot); + newTag->SetRootVersion(froot); + newTag->SetGeant3Version(fgeant); + const TClonesArray *tagList = tag->GetEventTags(); + for(Int_t j = 0; j < tagList->GetEntries(); j++) { + evTag = (AliEventTag *) tagList->At(j); + evTag->SetTURL(turl); + evTag->SetGUID(guid); + newTag->AddEventTag(*evTag); + } + ttag.Fill(); + newTag->Clear(); + }//tag file loop + + TFile* ftag = TFile::Open(name, "recreate"); + ftag->cd(); + ttag.Write(); + ftag->Close(); + + delete tag; + delete newTag; + }//pattern check + }//directory loop + return kTRUE; +} -- 2.31.1