]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/SPECTRA/Nuclei/B2/macros/Config_Proton_TOF_LHC10x.C
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / Nuclei / B2 / macros / Config_Proton_TOF_LHC10x.C
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16 // LHC10x config for protons and antiprotons
17 // author: Eulogio Serradilla <eulogio.serradilla@cern.ch>
18
19 #if !defined(__CINT__) || defined(__MAKECINT__)
20 #include <TString.h>
21 #include "AliLnDriver.h"
22 #endif
23
24 #include "Config.h"
25
26 Int_t Config_Proton_TOF_LHC10x(  const TString& inputDir   = "~/alice/input"
27                                , const TString& outputDir  = "~/alice/output"
28                                , const TString& period     = "lhc10d"
29                                , const TString& outputTag  = "lhc10d"
30                                , const TString& trkselTag  = "-bayes-nsd"
31                                , const TString& multTag    = ""
32                                , const TString& multCorTag = ""
33                                , Double_t       ymax       = 0.5
34                                , Bool_t inel               = 0  // for mult
35                                , Bool_t drawOutput         = 1  // for batch
36                                , Double_t  ptmin           = 1.0
37                                , Double_t  ptmax           = 3.5
38                                , Double_t  ptpid           = 3.5
39                                , Bool_t makeStats          = 1
40                                , Bool_t makeCor            = 1
41                                , Bool_t makePt             = 1
42                                , Bool_t makeRatio          = 1
43                                , Bool_t makeSpectra        = 1 )
44 {
45 //
46 // lhc10b, lhc10c, lhc10d, lhc10e config for protons and antiprotons
47 // (TOF)
48 //
49         const TString  kSpecies     = "Proton";
50         const TString  kTrkSel      = "its_tpc_tof_dca_spd";
51         const TString  kTrigName    = "mbor";
52         const Bool_t   kMCtoINEL    = 1;
53         const Bool_t   kSecondaries = 1;
54         const Int_t    kSecProc     = 0; // 0 tff, 1 mc
55         const Int_t    kMatDCAxyMod = 1; // 0 geant, 1 flat
56         const Int_t    kNbin        = 10;
57         const Double_t kDCAxy[2]    = {-1.,1.};
58         const Bool_t   kEfficiency  = 1;
59         const Double_t kMatScaling  = 1;
60         const Double_t kFdwnScaling = 1;
61         const Bool_t   kSameFdwn    = 1;
62         const Bool_t   kPid         = 0;
63         const Double_t kPidEff      = 1;
64         const Int_t    kDebugLevel  = 1;
65         
66         Double_t trigEff[3];
67         GetTriggerEfficiency(trigEff, kTrigName, period);
68         
69         // input and output filenames
70         
71         TString inputData     = inputDir + "/" + period + "/" + MakeInputName(kSpecies, period, kTrkSel+trkselTag+multTag) + ".root";
72         TString inputSimu     = inputDir + "/" + period + "/" + MakeSimuName(kSpecies, period, kTrkSel+trkselTag+multCorTag) + ".root";
73         TString inputSimuFix  = inputDir + "/" + period + "/" + MakeSimuFixName(kSpecies, period, kTrkSel+trkselTag+multCorTag) + ".root";
74         TString inputCorr     = inputDir + "/" + period + "/" + MakeInputName(kSpecies, period, kTrkSel+trkselTag+multTag) + "-corr.root";
75         
76         TString outputPt      = outputDir + "/" + MakeOutputName(kSpecies, outputTag) + "-Pt.root";
77         TString outputRatio   = outputDir + "/" + MakeOutputName(kSpecies, outputTag) + "-Ratio.root";
78         TString outputSpectra = outputDir + "/" + MakeOutputName(kSpecies, outputTag) + "-Spectra.root";
79         
80         // configure the driver and run
81         
82         AliLnDriver driver;
83         
84         driver.SetSpecies(kSpecies);
85         
86         driver.SetInputFilenames(inputData, inputSimu, inputSimuFix, inputCorr);
87         driver.SetOutputFilenames(outputPt, outputRatio, outputSpectra);
88         
89         driver.SetRapidityInterval(-ymax,ymax);
90         
91         driver.SetOutputTag(outputTag);
92         driver.SetOutputCorTag(outputTag);
93         
94         driver.SetTriggerEfficiency(trigEff);
95         driver.SetExtrapolateToINEL(inel);
96         driver.SetMCtoINEL(kMCtoINEL);
97         
98         driver.SetPtInterval(ptmin, ptmax);
99         driver.SetPidPt(ptpid);
100         driver.SetPid(kPid);
101         driver.SetPidEfficiency(kPidEff);
102         
103         driver.SetSecondaries(kSecondaries);
104         driver.SetSecProcedure(kSecProc);
105         driver.SetMatDCAxyModel(kMatDCAxyMod);
106         driver.SetNBin(kNbin);
107         driver.SetDCAxyInterval(kDCAxy[0], kDCAxy[1]);
108         driver.SetEfficiency(kEfficiency);
109         driver.SetScalingFactors(kMatScaling, kFdwnScaling);
110         driver.SetSameFeedDownCorr(kSameFdwn);
111         
112         driver.SetDebugLevel(kDebugLevel);
113         
114         driver.SetMakeStats(makeStats);
115         driver.SetMakeCorrections(makeCor);
116         driver.SetMakePt(makePt);
117         driver.SetMakeRatio(makeRatio);
118         driver.SetMakeSpectra(makeSpectra);
119         
120         driver.Run();
121         
122         // draw output
123         
124         if(!drawOutput) return 0;
125         
126         DrawOutputCorr(kSpecies, inputCorr, driver.GetOutputCorrTag());
127         
128         if(kSecProc == 0) DrawCorrDebug(driver.GetPtCorrDebugFilename(), driver.GetOutputCorrTag(), kSpecies, ptmin, ptmax, kDCAxy[0], kDCAxy[1]);
129         
130         DrawPtDebug(driver.GetPtDebugFilename(), outputTag, kSpecies, 0);
131         DrawOutputRatio(outputRatio, outputTag, kSpecies);
132         DrawOutputSpectra(outputSpectra, outputTag, kSpecies);
133         
134         return 0;
135 }