Example #1
0
AliGenerator* MbPythia()
{
      comment = comment.Append(" pp: Pythia low-pt");
//
//    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->SetEnergyCMS(energy);
      
      return pythia;
}
Example #2
0
AliGenerator* JPsi7TeV()
/*{
    AliGenParam *jpsi7TeV = new AliGenParam(1, AliGenMUONlib::kJpsi,"CDF pp 7");
    jpsi7TeV->SetMomentumRange(0,999);
    jpsi7TeV->SetPtRange(0,20.);
    jpsi7TeV->SetYRange(-4.2,-2.3);
    jpsi7TeV->SetPhiRange(0., 360.);
    jpsi7TeV->SetCutOnChild(1);
    jpsi7TeV->SetChildPhiRange(0.,360.);
    jpsi7TeV->SetChildThetaRange(0.,180.);
    jpsi7TeV->SetForceDecay(kDiMuon);
    jpsi7TeV->SetTrackingFlag(1);

    return jpsi7TeV;
}*/
{
      comment = comment.Append(" pp at 7 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->SetEnergyCMS(energy);
      pythia->SwitchHFOff();

//   J/Psi parameterisation
//      AliGenParam* jpsi = new AliGenParam(1, AliGenMUONlib::kJpsi, "CDF scaled", "Jpsi");
      AliGenParam* jpsi = new AliGenParam(1, AliGenMUONlib::kJpsi,"CDF pp 7");
      jpsi->SetPtRange(0.,100.);
      // jpsi->SetYRange(-8., 8.);
      jpsi->SetYRange(-1.5, 1.5); //this to speed up !!!
      jpsi->SetPhiRange(0., 360.);
      jpsi->SetForceDecay(kDiElectron);  // this has to be changed to force J/psi->e+e-

      //gener->AddGenerator(jpsi,   "J/Psi", 8.e-4); // expected yield
      gener->AddGenerator(jpsi,   "J/Psi", 1.);  // 1 J/psi per event
      gener->AddGenerator(pythia, "Pythia", 1.);

      return gener;
}
Example #3
0
AliGenerator* MbPythiaTuneATLAS()
{
      comment = comment.Append(" pp: Pythia low-pt");
//
//    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->SetEnergyCMS(energy);
//    Tune
//    C   306 ATLAS-CSC: Arthur Moraes' (new) ATLAS tune (needs CTEQ6L externally)
      pythia->SetTune(306);
      pythia->SetStrucFunc(kCTEQ6l);
//
      return pythia;
}
Example #4
0
AliGenerator* MbPythiaTunePerugia0()
{
      comment = comment.Append(" pp: Pythia low-pt (Perugia0)");
//
//    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->SetEnergyCMS(energy);
//    Tune
//    320     Perugia 0
      pythia->SetTune(320);
      pythia->UseNewMultipleInteractionsScenario();
//
      return pythia;
}
Example #5
0
AliGenerator* MbPythiaTuneD6T()
{
      comment = comment.Append(" pp: Pythia low-pt");
//
//    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->SetEnergyCMS(energy);
//    Tune
//    109     D6T : Rick Field's CDF Tune D6T (NB: needs CTEQ6L pdfs externally)
      pythia->SetTune(109); // F I X
      pythia->SetStrucFunc(kCTEQ6l);
//
      return pythia;
}
Example #6
0
AliGenerator* MbPythiaTunePerugia0Jpsi()
{
    comment = comment.Append("pp Cocktail: Pythia (Perugia0) + 1 Jpsi forced to dielectrons");
    //Generating a cocktail
    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->SetEnergyCMS(energy);
//    Tune
//    320     Perugia 0
      pythia->SetTune(320);
      pythia->UseNewMultipleInteractionsScenario();

//
//  JPsi is the second ingredient of the cocktail
      //AliGenParam* jpsi = new AliGenParam(1, AliGenMUONlib::kJpsi, "CDF scaled", "Jpsi"); // 14 TeV
      AliGenParam* jpsi=0x0;
      if(JpsiHarderPt) jpsi = new AliGenParam(1, AliGenMUONlib::kJpsi, "CDF pp 8.8", "Jpsi");  // 8.8 TeV
      else jpsi = new AliGenParam(1, AliGenMUONlib::kJpsi, "CDF pp 7", "Jpsi");  // 7 TeV
      //AliGenParam* jpsi = new AliGenParam(1, AliGenMUONlib::kJpsi, "CDF pp 7", "Jpsi");  // 7 TeV
      //AliGenParam* jpsi = new AliGenParam(1, AliGenMUONlib::kJpsi, "CDF pp 8.8", "Jpsi");  // 8.8 TeV

      jpsi->SetPtRange(0.,999.);
      jpsi->SetYRange(-1.0, 1.0);
      jpsi->SetPhiRange(0.,360.);
      //jpsi->SetChildYRange(-0.9,0.9);     // decaying electrons should be in TRD acceptance
      jpsi->SetForceDecay(kDiElectron);
      jpsi->Init();

    gener->AddGenerator(pythia, "Pythia", 1.);  // 1 is weighting factor : Rate per event
    gener->AddGenerator(jpsi,"JPsi",1);
//    gener->Init();

    return gener;
}
Example #7
0
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;
}
Example #8
0
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");
    }
}