1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 // LHC10x config for deuterons and antideuterons
17 // author: Eulogio Serradilla <eulogio.serradilla@cern.ch>
19 #if !defined(__CINT__) || defined(__MAKECINT__)
22 #include "AliLnDriver.h"
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 = ""
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
43 , Bool_t makeRatio = 1
44 , Bool_t makeSpectra = 1)
47 // lhc10b, lhc10c, lhc10d, lhc10e config for deuterons and antideuterons
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;
66 Double_t bkgLimitToF[2] = {-2, 2};
67 Double_t pidLimitToF[2] = {-2.,6.};
69 Double_t bkgLimitM2[2] = {1.8,6.0};
70 Double_t pidLimitM2[2] = {1.8,6.};
74 for(Int_t i=0; i<2; ++i)
76 bkgLimitM2[i] -= 3.51792;
77 pidLimitM2[i] -= 3.51792;
82 GetTriggerEfficiency(trigEff, kTrigName, period);
84 // input and output filenames
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";
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";
95 // configure the driver and run
99 driver.SetSpecies(kSpecies);
101 driver.SetInputFilenames(inputData, inputSimu, inputSimuFix, inputCorr);
102 driver.SetOutputFilenames(outputPt, outputRatio, outputSpectra);
104 driver.SetRapidityInterval(-ymax,ymax);
106 driver.SetOutputTag(outputTag);
107 driver.SetOutputCorTag(outputTag);
109 driver.SetTriggerEfficiency(trigEff);
110 driver.SetExtrapolateToINEL(inel);
111 driver.SetMCtoINEL(kMCtoINEL);
112 driver.SetPtInterval(ptmin, ptmax);
114 driver.SetPidProcedure(kPidProc);
115 driver.SetPidEfficiency(kPidEff);
116 driver.SetPidPt(ptpid);
120 driver.SetBkgInterval(bkgLimitToF[0], bkgLimitToF[1]);
121 driver.SetPidInterval(pidLimitToF[0], pidLimitToF[1]);
125 driver.SetBkgInterval(bkgLimitM2[0], bkgLimitM2[1]);
126 driver.SetPidInterval(pidLimitM2[0], pidLimitM2[1]);
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);
138 driver.SetDebugLevel(kDebugLevel);
140 driver.SetMakeStats(makeStats);
141 driver.SetMakeCorrections(makeCor);
142 driver.SetMakePt(makePt);
143 driver.SetMakeRatio(makeRatio);
144 driver.SetMakeSpectra(makeSpectra);
150 if(!drawOutput) return 0;
152 DrawOutputCorr(kSpecies, inputCorr, driver.GetOutputCorrTag());
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]));
156 DrawPtDebug(driver.GetPtDebugFilename(), outputTag, kSpecies, kPid, ptmax, ptpid);
157 DrawOutputRatio(outputRatio, outputTag, kSpecies);
158 DrawOutputSpectra(outputSpectra, outputTag, kSpecies);