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 protons and antiprotons
17 // author: Eulogio Serradilla <eulogio.serradilla@cern.ch>
19 #if !defined(__CINT__) || defined(__MAKECINT__)
21 #include "AliLnDriver.h"
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 = ""
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
42 , Bool_t makeRatio = 1
43 , Bool_t makeSpectra = 1 )
46 // lhc10b, lhc10c, lhc10d, lhc10e config for protons and antiprotons
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;
67 GetTriggerEfficiency(trigEff, kTrigName, period);
69 // input and output filenames
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";
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";
80 // configure the driver and run
84 driver.SetSpecies(kSpecies);
86 driver.SetInputFilenames(inputData, inputSimu, inputSimuFix, inputCorr);
87 driver.SetOutputFilenames(outputPt, outputRatio, outputSpectra);
89 driver.SetRapidityInterval(-ymax,ymax);
91 driver.SetOutputTag(outputTag);
92 driver.SetOutputCorTag(outputTag);
94 driver.SetTriggerEfficiency(trigEff);
95 driver.SetExtrapolateToINEL(inel);
96 driver.SetMCtoINEL(kMCtoINEL);
98 driver.SetPtInterval(ptmin, ptmax);
99 driver.SetPidPt(ptpid);
101 driver.SetPidEfficiency(kPidEff);
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);
112 driver.SetDebugLevel(kDebugLevel);
114 driver.SetMakeStats(makeStats);
115 driver.SetMakeCorrections(makeCor);
116 driver.SetMakePt(makePt);
117 driver.SetMakeRatio(makeRatio);
118 driver.SetMakeSpectra(makeSpectra);
124 if(!drawOutput) return 0;
126 DrawOutputCorr(kSpecies, inputCorr, driver.GetOutputCorrTag());
128 if(kSecProc == 0) DrawCorrDebug(driver.GetPtCorrDebugFilename(), driver.GetOutputCorrTag(), kSpecies, ptmin, ptmax, kDCAxy[0], kDCAxy[1]);
130 DrawPtDebug(driver.GetPtDebugFilename(), outputTag, kSpecies, 0);
131 DrawOutputRatio(outputRatio, outputTag, kSpecies);
132 DrawOutputSpectra(outputSpectra, outputTag, kSpecies);