]>
Commit | Line | Data |
---|---|---|
c683985a | 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 deuterons and antideuterons | |
17 | // author: Eulogio Serradilla <eulogio.serradilla@cern.ch> | |
18 | ||
19 | #if !defined(__CINT__) || defined(__MAKECINT__) | |
20 | #include <TROOT.h> | |
21 | #include <TString.h> | |
22 | #include "AliLnDriver.h" | |
23 | #endif | |
24 | ||
25 | #include "Config.h" | |
26 | ||
27 | Int_t Config_Deuteron_TOF_LHC10x( const TString& inputDir = "~/alice/input" | |
28 | , const TString& outputDir = "~/alice/output" | |
29 | , const TString& period = "lhc10bcde" | |
30 | , const TString& outputTag = "lhc10bcde" | |
31 | , const TString& trkselTag = "-tpc3-nsd-moc" | |
32 | , const TString& multTag = "" | |
33 | , const TString& multCorTag = "" | |
34 | , Double_t ymax = 0.5 | |
35 | , Bool_t inel = 0 // for mult | |
36 | , Bool_t drawOutput = 1 // for batch | |
37 | , Double_t ptmin = 0.7 | |
38 | , Double_t ptmax = 3.0 | |
39 | , Double_t ptpid = 0.8 | |
40 | , Bool_t makeStats = 1 | |
41 | , Bool_t makeCor = 1 | |
42 | , Bool_t makePt = 1 | |
43 | , Bool_t makeRatio = 1 | |
44 | , Bool_t makeSpectra = 1) | |
45 | { | |
46 | // | |
47 | // lhc10b, lhc10c, lhc10d, lhc10e config for deuterons and antideuterons | |
48 | // | |
49 | const TString kSpecies = "Deuteron"; | |
50 | const TString kTrkSel = "its_tpc_tof_dca"; | |
51 | const TString kTrigName = "mband"; | |
52 | const Bool_t kMCtoINEL = 1; | |
53 | const Bool_t kPid = 1; | |
54 | const Int_t kPidProc = 0; // 0 m2, 1 dm2, 2 time | |
55 | const Double_t kPidEff = 1.; | |
56 | const Bool_t kSecondaries = 1; | |
57 | const Int_t kSecProc = 0; // 0 tff, 1 mc | |
58 | const Int_t kMatDCAxyMod = 1; // 0 geant, 1 flat | |
59 | const Bool_t kAntiNucTemplate = 0; | |
60 | const Int_t kNbin = 5; | |
61 | const Double_t kDCAxy[2] = {-0.2,0.2}; | |
62 | const Bool_t kEfficiency = 1; | |
63 | const Bool_t kFitFrac = 1; | |
64 | const Int_t kDebugLevel = 1; | |
65 | ||
66 | Double_t bkgLimitToF[2] = {-2, 2}; | |
67 | Double_t pidLimitToF[2] = {-2.,6.}; | |
68 | ||
69 | Double_t bkgLimitM2[2] = {1.8,6.0}; | |
70 | Double_t pidLimitM2[2] = {1.8,6.}; | |
71 | ||
72 | if(kPidProc==1) | |
73 | { | |
74 | for(Int_t i=0; i<2; ++i) | |
75 | { | |
76 | bkgLimitM2[i] -= 3.51792; | |
77 | pidLimitM2[i] -= 3.51792; | |
78 | } | |
79 | } | |
80 | ||
81 | Double_t trigEff[3]; | |
82 | GetTriggerEfficiency(trigEff, kTrigName, period); | |
83 | ||
84 | // input and output filenames | |
85 | ||
86 | TString inputData = inputDir + "/" + period + "/" + MakeInputName(kSpecies, period, kTrkSel+trkselTag+multTag) + ".root"; | |
87 | TString inputSimu = inputDir + "/" + period + "/" + MakeSimuName(kSpecies, period, kTrkSel+trkselTag+multCorTag) + ".root"; | |
88 | TString inputSimuFix = inputDir + "/" + period + "/" + MakeSimuFixName(kSpecies, period, kTrkSel+trkselTag+multCorTag) + ".root"; | |
89 | TString inputCorr = inputDir + "/" + period + "/" + MakeInputName(kSpecies, period, kTrkSel+trkselTag+multTag) + "-corr.root"; | |
90 | ||
91 | TString outputPt = outputDir + "/" + MakeOutputName(kSpecies, outputTag) + "-Pt.root"; | |
92 | TString outputRatio = outputDir + "/" + MakeOutputName(kSpecies, outputTag) + "-Ratio.root"; | |
93 | TString outputSpectra = outputDir + "/" + MakeOutputName(kSpecies, outputTag) + "-Spectra.root"; | |
94 | ||
95 | // configure the driver and run | |
96 | ||
97 | AliLnDriver driver; | |
98 | ||
99 | driver.SetSpecies(kSpecies); | |
100 | ||
101 | driver.SetInputFilenames(inputData, inputSimu, inputSimuFix, inputCorr); | |
102 | driver.SetOutputFilenames(outputPt, outputRatio, outputSpectra); | |
103 | ||
104 | driver.SetRapidityInterval(-ymax,ymax); | |
105 | ||
106 | driver.SetOutputTag(outputTag); | |
107 | driver.SetOutputCorTag(outputTag); | |
108 | ||
109 | driver.SetTriggerEfficiency(trigEff); | |
110 | driver.SetExtrapolateToINEL(inel); | |
111 | driver.SetMCtoINEL(kMCtoINEL); | |
112 | driver.SetPtInterval(ptmin, ptmax); | |
113 | driver.SetPid(kPid); | |
114 | driver.SetPidProcedure(kPidProc); | |
115 | driver.SetPidEfficiency(kPidEff); | |
116 | driver.SetPidPt(ptpid); | |
117 | ||
118 | if(kPidProc==2) | |
119 | { | |
120 | driver.SetBkgInterval(bkgLimitToF[0], bkgLimitToF[1]); | |
121 | driver.SetPidInterval(pidLimitToF[0], pidLimitToF[1]); | |
122 | } | |
123 | else | |
124 | { | |
125 | driver.SetBkgInterval(bkgLimitM2[0], bkgLimitM2[1]); | |
126 | driver.SetPidInterval(pidLimitM2[0], pidLimitM2[1]); | |
127 | } | |
128 | ||
129 | driver.SetSecondaries(kSecondaries); | |
130 | driver.SetSecProcedure(kSecProc); | |
131 | driver.SetMatDCAxyModel(kMatDCAxyMod); | |
132 | driver.SetAntiNucleusAsTemplate(kAntiNucTemplate); | |
133 | driver.SetNBin(kNbin); | |
134 | driver.SetDCAxyInterval(kDCAxy[0], kDCAxy[1]); | |
135 | driver.SetEfficiency(kEfficiency,0); | |
136 | driver.SetFitFractionCorr(kFitFrac); | |
137 | ||
138 | driver.SetDebugLevel(kDebugLevel); | |
139 | ||
140 | driver.SetMakeStats(makeStats); | |
141 | driver.SetMakeCorrections(makeCor); | |
142 | driver.SetMakePt(makePt); | |
143 | driver.SetMakeRatio(makeRatio); | |
144 | driver.SetMakeSpectra(makeSpectra); | |
145 | ||
146 | driver.Run(); | |
147 | ||
148 | // draw output | |
149 | ||
150 | if(!drawOutput) return 0; | |
151 | ||
152 | DrawOutputCorr(kSpecies, inputCorr, driver.GetOutputCorrTag()); | |
153 | ||
154 | if(kSecProc == 0) gROOT->ProcessLine(Form(".x DrawSec.C+g(\"%s\",\"%s\",\"Deuteron\", %f, %f, %f, %f)", driver.GetPtCorrDebugFilename().Data(), driver.GetOutputCorrTag().Data(), ptmin, ptmax, kDCAxy[0], kDCAxy[1])); | |
155 | ||
156 | DrawPtDebug(driver.GetPtDebugFilename(), outputTag, kSpecies, kPid, ptmax, ptpid); | |
157 | DrawOutputRatio(outputRatio, outputTag, kSpecies); | |
158 | DrawOutputSpectra(outputSpectra, outputTag, kSpecies); | |
159 | ||
160 | return 0; | |
161 | } |