]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGLF/SPECTRA/Nuclei/B2/macros/LHC10xMult.C
cumulative changes for root scripts and code cleanup
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / Nuclei / B2 / macros / LHC10xMult.C
index 7a7bc5d310892967dd747edaddca25140bd6853e..5b9bd50d8b34f28ebd75e983af5bd5abb7ab33b4 100644 (file)
 // LHC10x multiplicity config for protons and deuterons
 // author: Eulogio Serradilla <eulogio.serradilla@cern.ch>
 
+#if !defined(__CINT__) || defined(__MAKECINT__)
 #include <TSystem.h>
 #include <TROOT.h>
 #include <TString.h>
 #include <TFileMerger.h>
-
 #include "AliLnDriver.h"
+#endif
+
 #include "Config.h"
 
-Int_t LHC10xMult(  const TString& species   = "Proton"
+Int_t LHC10xMult(  const TString& species   = "Deuteron"
                  , const TString& inputDir  = "~/alice/input"
                  , const TString& outputDir = "~/alice/output"
                  , const TString& period    = "lhc10d"
                  , const TString& otag      = "lhc10d"
-                 , Int_t option = 2)
+                 , const TString& trkselTag = "-tpc3-nsd-moc"
+                 , Double_t       ymax      = 0.5
+                 , Int_t          option    = 2)
 {
 //
 // lhc10x multiplicity config
@@ -44,13 +48,10 @@ Int_t LHC10xMult(  const TString& species   = "Proton"
        
        const Bool_t  kINEL[kNmult] = { 0 };
        
-       Int_t lowbin   = (species=="Proton") ? 5  : 4;
-       Int_t jointbin = (species=="Proton") ? 11 : 6;
-       Int_t hibin    = (species=="Proton") ? 31 : 12;
-       
-       Double_t ymin  = (species=="Proton") ? 1.1e-6 : 1.1e-8;
-       Double_t ymax  = (species=="Proton") ? 4.e-1  : 7.e-4;
-       
+       Double_t ptmin   = (species=="Proton") ? 0.4 : 0.7;
+       Double_t ptjoint = (species=="Proton") ? 1.0 : 1.0;
+       Double_t ptmax   = (species=="Proton") ? 2.0 : 2.5;
+       Double_t ptpid   = (species=="Proton") ? 0.4 : 1.3;
        
        if( (option<0) || (option>2) || ((species != "Proton") && (species != "Deuteron")))
        {
@@ -66,32 +67,36 @@ Int_t LHC10xMult(  const TString& species   = "Proton"
        
        for(Int_t i=0; i<kNmult; ++i)
        {
+               // limit the ptmax value for deuterons
+               if(species == "Deuteron") ptmax = kDtrPtMax[i];
+               
                cout << endl;
                cout << "Multiplicity class : " << kMultTag[i] << endl;
                cout << "Period             : " << period << endl;
                
-               TString outputTag  = otag + "-" + kMultTag[i];
+               TString outputTag = otag + kMultTag[i];
                
-               TString arg =          inputDir            + "\","
-                             + "\"" + outputDir           + "\","
-                             + "\"" + period              + "\","
-                             + "\"" + outputTag           + "\","
-                             + "\"" + "-" + kMultTag[i]   + "\"," // data
-                             + "\"" + "";                         // same simulations for all mult
+               TString arg =          inputDir    + "\","
+                             + "\"" + outputDir   + "\","
+                             + "\"" + period      + "\","
+                             + "\"" + outputTag   + "\","
+                             + "\"" + trkselTag   + "\","
+                             + "\"" + kMultTag[i] + "\"," // data
+                             + "\"" + "";          // same simulations for all mult
                        
                switch(option)
                {
                        case 0:
                                cout << "Config_" << species << "_TPC_LHC10x.C" << endl << endl;
-                               gROOT->ProcessLine(Form(".x Config_%s_TPC_LHC10x.C+g(\"%s\", %d, 0)", species.Data(), arg.Data(), kINEL[i]));
+                               gROOT->ProcessLine(Form(".x Config_%s_TPC_LHC10x.C+g(\"%s\", %f, %d, 0, %f, %f)", species.Data(), arg.Data(), ymax, kINEL[i], ptmin, ptmax));
                                break;
                        case 1:
                                cout << "Config_" << species << "_LHC10x.C" << endl << endl;
-                               gROOT->ProcessLine(Form(".x Config_%s_TOF_LHC10x.C+g(\"%s\", %d, 0)", species.Data(), arg.Data(), kINEL[i]));
+                               gROOT->ProcessLine(Form(".x Config_%s_TOF_LHC10x.C+g(\"%s\", %f, %d, 0, %f, %f, %f)", species.Data(), arg.Data(), ymax, kINEL[i], ptmin, ptmax, ptpid));
                                break;
                        case 2:
                                cout << "Config_TPCTOF_LHC10x.C" << endl << endl;
-                               gROOT->ProcessLine(Form(".x Config_TPCTOF_LHC10x.C+g(\"%s\", %d, 0, \"%s\", %d, %d, %d)", arg.Data(), kINEL[i], species.Data(), lowbin, jointbin, hibin));
+                               gROOT->ProcessLine(Form(".x Config_TPCTOF_LHC10x.C+g(\"%s\", %f, %d, 0, \"%s\", %f, %f, %f, %f)", arg.Data(), ymax, kINEL[i], species.Data(), ptmin, ptjoint, ptmax, ptpid));
                                break;
                }
                
@@ -123,9 +128,12 @@ Int_t LHC10xMult(  const TString& species   = "Proton"
        
        // draw output
        
-       gROOT->ProcessLine(Form(".x DrawDir.C+g(\"%s\",\"Anti%s%s_Ratio_Pt\",\"\",0,4.5, 0., 1.8, \"p_{T} (GeV/c)\", \"#bar{p}/p\", 0, \"cRatio\",\"Particle ratio\")", allRatios.Data(),species.Data(),species.Data()));
+       gROOT->ProcessLine(Form(".x DrawDir.C+g(\"%s\",\"Anti%s%s_Ratio_Pt\",\"\",0,4.5, 0., 1.8, \"#it{p}_{T} (GeV/c)\", \"#bar{p}/p\", 0, \"cRatio\",\"Particle ratio\")", allRatios.Data(),species.Data(),species.Data()));
+       
+       Double_t minYield = (species=="Proton") ? 1.1e-6 : 1.1e-8;
+       Double_t maxYield = (species=="Proton") ? 4.e-1  : 7.e-4;
        
-       DrawOutputSpectraMult(allSpectra, species, ymin, ymax);
+       DrawOutputSpectraMult(allSpectra, species, minYield, maxYield);
        
        return 0;
 }