Add deuteron TPC config example and some minor fixes
authoreserradi <eserradi@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 20 Jan 2013 15:57:14 +0000 (15:57 +0000)
committereserradi <eserradi@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 20 Jan 2013 15:57:14 +0000 (15:57 +0000)
16 files changed:
PWGLF/SPECTRA/Nuclei/B2/AliLnDriver.cxx
PWGLF/SPECTRA/Nuclei/B2/AliLnDriver.h
PWGLF/SPECTRA/Nuclei/B2/AliLnEfficiency.cxx
PWGLF/SPECTRA/Nuclei/B2/AliLnFakeTracks.cxx
PWGLF/SPECTRA/Nuclei/B2/AliLnPt.cxx
PWGLF/SPECTRA/Nuclei/B2/AliLnRatio.cxx
PWGLF/SPECTRA/Nuclei/B2/AliLnSecondaries.cxx
PWGLF/SPECTRA/Nuclei/B2/AliLnSecondaries.h
PWGLF/SPECTRA/Nuclei/B2/AliLnUnfolding.cxx
PWGLF/SPECTRA/Nuclei/B2/Config.h
PWGLF/SPECTRA/Nuclei/B2/macros/Config_Deuteron_TOF_LHC10x.C
PWGLF/SPECTRA/Nuclei/B2/macros/Config_Deuteron_TPCTOF_LHC10x.C [new file with mode: 0644]
PWGLF/SPECTRA/Nuclei/B2/macros/Config_Deuteron_TPC_LHC10x.C [new file with mode: 0644]
PWGLF/SPECTRA/Nuclei/B2/macros/Config_Proton_TPCTOF_LHC10x.C
PWGLF/SPECTRA/Nuclei/B2/macros/DrawPt.C
PWGLF/SPECTRA/Nuclei/B2/macros/LHC10xMult.C

index c7f3b43..efc543e 100644 (file)
@@ -58,6 +58,7 @@ AliLnDriver::AliLnDriver()
 , fSecondaries(1)
 , fSecProd(AliLnSecondaries::kTFractionFitter)
 , fMatDCAxyMod(AliLnSecondaries::kGeantDCAxy)
+, fANucTemplate(0)
 , fNbin(1)
 , fYMin(-0.5)
 , fYMax(0.5)
@@ -208,6 +209,7 @@ void AliLnDriver::MakePtCorr() const
                lncorr.GetLnSecondaries()->SetCorBins(fLowPtBin, fHighPtBin);
                lncorr.GetLnSecondaries()->SetProcedure(fSecProd);
                lncorr.GetLnSecondaries()->SetMatDCAxyModel(fMatDCAxyMod);
+               lncorr.GetLnSecondaries()->SetAntiNucleusAsTemplate(fANucTemplate);
                lncorr.GetLnSecondaries()->SetDCAxyInterval(fMinDCAxy, fMaxDCAxy);
                lncorr.GetLnSecondaries()->SetNBin(fNbin);
                lncorr.GetLnSecondaries()->SetScalingFactors(fScMat, fScFd);
index cb0291b..0065c8b 100644 (file)
@@ -67,6 +67,7 @@ class AliLnDriver: public TObject
        void SetFakeTracks(Bool_t flag=1) { fFakeTracks = flag; }
        void SetSecondaries(Bool_t flag=1) { fSecondaries = flag; }
        void SetSecProd(Int_t prod) { fSecProd = prod; }
+       void SetAntiNucleusAsTemplate(Bool_t flag=1) { fANucTemplate = flag; }
        void SetMatDCAxyModel(Int_t model=1) { fMatDCAxyMod = model; }
        void SetNBin(Int_t nbin) { fNbin = nbin; }
        void SetDCAxyInterval(Double_t dcamin, Double_t dcamax) { fMinDCAxy = dcamin; fMaxDCAxy = dcamax; }
@@ -112,6 +113,7 @@ class AliLnDriver: public TObject
        Bool_t   fSecondaries;  // correction of secondaries
        Int_t    fSecProd;      // procedure for estimating fractions
        Int_t    fMatDCAxyMod;  // DCAxy model for correction of secondaries
+       Bool_t   fANucTemplate; // enable antinucleus as template for primaries
        Int_t    fNbin;         // rebin of DCAxy distribution
        Double_t fYMin;         // min rapidity
        Double_t fYMax;         // max rapidity
index ad93b99..ef9d1de 100644 (file)
@@ -39,6 +39,7 @@ AliLnEfficiency::AliLnEfficiency(const TString& particle, const TString& simuFil
 //
 // constructor
 //
+       TH1::SetDefaultSumw2();
 }
 
 AliLnEfficiency::~AliLnEfficiency()
index 8ecd6e3..f4622fe 100644 (file)
@@ -39,6 +39,7 @@ AliLnFakeTracks::AliLnFakeTracks(const TString& particle, const TString& simuFil
 //
 // constructor
 //
+       TH1::SetDefaultSumw2();
 }
 
 AliLnFakeTracks::~AliLnFakeTracks()
index 6a07e3d..592ba6d 100644 (file)
@@ -162,9 +162,10 @@ Int_t AliLnPt::Exec()
                fdebug->cd(fOutputTag.Data());
                
                TH1D* hPidPt = 0;
-               if(fPidM2)
+               if(fPidM2 && (fHiPtBin > fLowM2Bin))
                {
-                       hPidPt = this->PID(hOrigPt, hM2Pt, fLowM2Bin, fHiM2Bin, fParticle + "_M2Corr_Pt");
+                       Int_t hibin = (fHiPtBin > fHiM2Bin) ? fHiM2Bin : fHiPtBin;
+                       hPidPt = this->PID(hOrigPt, hM2Pt, fLowM2Bin, hibin, fParticle + "_M2Corr_Pt");
                }
                else
                {
@@ -250,6 +251,7 @@ Int_t AliLnPt::Exec()
        TH1D* hPt = (TH1D*) hCorPt->Clone(Form("%s_Pt", fParticle.Data()));
        hPt->SetTitle(fParticle.Data());
        hPt->Reset();
+       hPt->Sumw2();
        
        for(Int_t i=fLowPtBin; i<fHiPtBin; ++i)
        {
@@ -422,6 +424,7 @@ TH1D* AliLnPt::PID(const TH1D* hPt, const TH2D* hM2Pt, Int_t lowbin, Int_t hibin
        
        TH1D* hPidPt = (TH1D*) hPt->Clone(name.Data());
        hPidPt->Reset();
+       hPidPt->Sumw2();
        
        // first bins are not contaminated since the identification is clear
        // integrate around the m2 value
index da37f36..014c0fc 100644 (file)
@@ -46,6 +46,7 @@ AliLnRatio::~AliLnRatio()
 //
 // destructor
 //
+       TH1::SetDefaultSumw2();
 }
 
 Int_t AliLnRatio::Exec()
index d783e05..6ada515 100644 (file)
@@ -51,6 +51,7 @@ AliLnSecondaries::AliLnSecondaries(const TString& particle, const TString& dataF
 , fMaxDCAxy(1.5)
 , fFracProc(0)
 , fMatDCAxyMod(AliLnSecondaries::kFlatDCAxy)
+, fANucTemplate(0)
 , fScMat(1)
 , fScFd(1)
 {
@@ -171,12 +172,15 @@ Int_t AliLnSecondaries::Exec()
        {
                // only secondaries from materials for nuclei
                TH2D* hDataDCAxyPt   = (TH2D*)FindObj(fdata, fParticle + "_PID_DCAxy_Pt");
-               TH2D* hDataMCDCAxyPt = (TH2D*)FindObj(fsimu, fParticle + "_PID_DCAxy_Pt"); // for debugging
+               TH2D* hDataMCDCAxyPt = (TH2D*)FindObj(fsimu, fParticle + "_PID_DCAxy_Pt");
                TH2D* hPrimDCAxyPt   = (TH2D*)FindObj(fsimu, fParticle + "_Sim_PID_Prim_DCAxy_Pt");
-               // use the anti-ion as template for primaries
-               //TH2D* hPrimDCAxyPt   = (TH2D*)FindObj(fdata, Form("Anti%s_PID_DCAxy_Pt",fParticle.Data()));
-               TH2D* hMatDCAxyPt    = (TH2D*)FindObj(fsimu, fParticle + "_Sim_PID_Mat_DCAxy_Pt");
                
+               if(fANucTemplate)
+               {
+                       hPrimDCAxyPt   = (TH2D*)FindObj(fdata, Form("Anti%s_PID_DCAxy_Pt",fParticle.Data()));
+               }
+               
+               TH2D* hMatDCAxyPt    = (TH2D*)FindObj(fsimu, fParticle + "_Sim_PID_Mat_DCAxy_Pt");
                if(fMatDCAxyMod == kFlatDCAxy)
                {
                        hMatDCAxyPt = this->GetFlatDCAxyPt(10, hPrimDCAxyPt, fParticle + "_Sim_PID_Mat_DCAxy_Pt");
@@ -269,6 +273,7 @@ void AliLnSecondaries::GetFraction(TH1D* hPrimPt) const
 //
        TF1* one = new TF1("one", "1", hPrimPt->GetXaxis()->GetXmin(), hPrimPt->GetXaxis()->GetXmax());
        hPrimPt->Reset();
+       hPrimPt->Sumw2();
        hPrimPt->Add(one);
        delete one;
 }
@@ -387,7 +392,7 @@ void AliLnSecondaries::GetFraction(TH1D* hFracPt[3], const TH2D* hDCAxyPt, const
        }
 }
 
-Int_t AliLnSecondaries::GetTFFfractions(Double_t* frac, Double_t* err, TH1D* hData, TH1D* hPrim, TH1D* hSec, Int_t ibin, const char* sec) const
+Int_t AliLnSecondaries::GetTFFfractions(Double_t* frac, Double_t* err, TH1D* hData, TH1D* hPrim, TH1D* hSec, Int_t ibin, const TString& sec) const
 {
 //
 // find the fractions of 2 contributions
@@ -409,7 +414,7 @@ Int_t AliLnSecondaries::GetTFFfractions(Double_t* frac, Double_t* err, TH1D* hDa
                fit->GetResult(1, frac[1], err[1]);
        }
        
-       const char* contrib[] = {"Prim", sec };
+       const char* contrib[] = {"Prim", sec.Data() };
        this->WriteTFFdebug(hData, fit, status, ibin, contrib, frac, 2);
        
        delete mc;
@@ -490,18 +495,19 @@ void AliLnSecondaries::WriteTFFdebug(TH1D* hData, TFractionFitter* fit, Int_t st
        }
 }
 
-TH1D* AliLnSecondaries::ZeroClone(TH1D* h, const char* name) const
+TH1D* AliLnSecondaries::ZeroClone(const TH1D* h, const TString& name) const
 {
 //
 // clone histogram and reset to zero
 //
-       TH1D* clone = (TH1D*)h->Clone(name);
+       TH1D* clone = (TH1D*)h->Clone(name.Data());
        clone->Reset();
+       clone->Sumw2();
        
        return clone;
 }
 
-void AliLnSecondaries::GetRooFitFractions(Double_t* frac, Double_t* err, const TH1D* hData, const TH1D* hPrim, const TH1D* hSec, Int_t ibin, const char* secname) const
+void AliLnSecondaries::GetRooFitFractions(Double_t* frac, Double_t* err, const TH1D* hData, const TH1D* hPrim, const TH1D* hSec, Int_t ibin, const TString& secname) const
 {
 //
 // DCAxy model 2 contributions
@@ -543,13 +549,9 @@ void AliLnSecondaries::GetRooFitFractions(Double_t* frac, Double_t* err, const T
        
        // ------ debug ------------
        
-       TH1D* hDebugFit =  (TH1D*)hData->Clone(Form("%s_Fit_Data_DCAxy_%02d",fParticle.Data(),ibin));
-       TH1D* hDebugPrim = (TH1D*)hData->Clone(Form("%s_Fit_Prim_DCAxy_%02d",fParticle.Data(),ibin));
-       TH1D* hDebugSec =  (TH1D*)hData->Clone(Form("%s_Fit_%s_DCAxy_%02d",fParticle.Data(),secname,ibin));
-       
-       hDebugFit->Reset();
-       hDebugPrim->Reset();
-       hDebugSec->Reset();
+       TH1D* hDebugFit  = this->ZeroClone(hData, fParticle + "_Fit_Data_DCAxy_" + Form("%02d",ibin));
+       TH1D* hDebugPrim = this->ZeroClone(hData, fParticle + "_Fit_Prim_DCAxy_" + Form("%02d",ibin));
+       TH1D* hDebugSec  = this->ZeroClone(hData, fParticle + "_Fit_" + secname + "_DCAxy_" + Form("%02d",ibin));
        
        w->pdf("model")->fillHistogram(hDebugFit,x,nevents);
        w->pdf("Sprim")->fillHistogram(hDebugPrim,x,w->var("Nprim")->getVal());
@@ -617,15 +619,10 @@ void AliLnSecondaries::GetRooFitFractions(Double_t* frac, Double_t* err, const T
        
        // ------ debug ------------
        
-       TH1D* hDebugFit =  (TH1D*)hData->Clone(Form("%s_Fit_Data_DCAxy_%02d",fParticle.Data(),ibin));
-       TH1D* hDebugPrim = (TH1D*)hData->Clone(Form("%s_Fit_Prim_DCAxy_%02d",fParticle.Data(),ibin));
-       TH1D* hDebugMat =  (TH1D*)hData->Clone(Form("%s_Fit_Mat_DCAxy_%02d",fParticle.Data(),ibin));
-       TH1D* hDebugFdwn = (TH1D*)hData->Clone(Form("%s_Fit_Fdwn_DCAxy_%02d",fParticle.Data(),ibin));
-       
-       hDebugFit->Reset();
-       hDebugPrim->Reset();
-       hDebugMat->Reset();
-       hDebugFdwn->Reset();
+       TH1D* hDebugFit  = this->ZeroClone(hData, fParticle + "_Fit_Data_DCAxy_" + Form("%02d",ibin));
+       TH1D* hDebugPrim = this->ZeroClone(hData, fParticle + "_Fit_Prim_DCAxy_" + Form("%02d",ibin));
+       TH1D* hDebugMat  = this->ZeroClone(hData, fParticle + "_Fit_Mat_DCAxy_" + Form("%02d",ibin));
+       TH1D* hDebugFdwn = this->ZeroClone(hData, fParticle + "_Fit_Fdwn_DCAxy_" + Form("%02d",ibin));
        
        w->pdf("model")->fillHistogram(hDebugFit,x,hData->Integral());
        w->pdf("Sprim")->fillHistogram(hDebugPrim,x,w->var("Nprim")->getVal());
@@ -655,6 +652,7 @@ TH2D* AliLnSecondaries::GetFlatDCAxyPt(Double_t max, const TH2D* hDCAxyPt, const
        TF1* fnc = new TF1("gen","1", fMinDCAxy, fMaxDCAxy);
        TH2D* h = (TH2D*)hDCAxyPt->Clone(name.Data());
        h->Reset();
+       h->Sumw2();
        
        TAxis* xAxis = h->GetXaxis();
        TAxis* yAxis = h->GetYaxis();
index 941be4b..4779cb5 100644 (file)
@@ -40,11 +40,12 @@ class AliLnSecondaries: public TObject
        void SetNBin(Int_t nbin) { fNbin = nbin; }
        
        void SetProcedure(Int_t prod) { fFracProc=prod; }
+       void SetAntiNucleusAsTemplate(Bool_t flag=1) { fANucTemplate = flag; }
        void SetMatDCAxyModel(Int_t model) { fMatDCAxyMod = model; }
        void SetScalingFactors(Double_t mat, Double_t fd) { fScMat=mat; fScFd=fd; }
        
        enum { kTFractionFitter=0, kRooFit, kMonteCarlo };
-       enum { kGeantDCAxy=0, kFlatDCAxy, kGaussianDCAxy};
+       enum { kGeantDCAxy=0, kFlatDCAxy};
        
   private:
  
@@ -56,18 +57,17 @@ class AliLnSecondaries: public TObject
        void GetFraction(TH1D* hFracPt[3], const TH2D* hDCAxyPt, const TH2D* hMCDCAxyPt, const TH2D* hPrimDCAxyPt, const TH2D* hMatDCAxyPt, const TH2D* hFdwnDCAxyPt) const;
        
        Int_t GetTFFfractions(Double_t* frac, Double_t* err, TH1D* hData, TH1D* hPrim, TH1D* hMat, TH1D* hFdwn, Int_t ibin) const;
-       Int_t GetTFFfractions(Double_t* frac, Double_t* err, TH1D* hData, TH1D* hPrim, TH1D* hSec, Int_t ibin, const char* secName) const;
+       Int_t GetTFFfractions(Double_t* frac, Double_t* err, TH1D* hData, TH1D* hPrim, TH1D* hSec, Int_t ibin, const TString& secName) const;
        
-       void GetRooFitFractions(Double_t* frac, Double_t* err, const TH1D* hData, const TH1D* hPrim, const TH1D* hSec, Int_t ibin, const char* sec) const;
+       void GetRooFitFractions(Double_t* frac, Double_t* err, const TH1D* hData, const TH1D* hPrim, const TH1D* hSec, Int_t ibin, const TString& secName) const;
        void GetRooFitFractions(Double_t* frac, Double_t* err, const TH1D* hData, const TH1D* hPrim, const TH1D* hMat, const TH1D* hFdwn, Int_t ibin) const;
        
        TH2D* GetFlatDCAxyPt(Double_t norm, const TH2D* hDCAxyPt, const TString& name) const;
-       //TH2D* GetGaussianDCAxyPt(Double_t norm, Double_t mean, Double_t sigma, const TH2D* hDCAxyPt, const char* name) const;
        
        TF1* GetMatFraction(const TString& name) const;
        TF1* GetFdwnFraction(const TString& name) const;
        
-       TH1D* ZeroClone(TH1D* h, const char* name) const;
+       TH1D* ZeroClone(const TH1D* h, const TString& name) const;
        void WriteTFFdebug(TH1D* hData, TFractionFitter* fit, Int_t status, Int_t ibin, const char* contrib[], Double_t* frac, Int_t kmax) const;
        
   private:
@@ -79,8 +79,8 @@ class AliLnSecondaries: public TObject
        TString fOutputFilename; // output filename
        TString fOutputTag; // tag for the ouput
        
-       Int_t fLowBin; // low bin for the corrections
-       Int_t fHiBin ; // high bin for the corrections
+       Int_t fLowBin; // low pt bin for the corrections
+       Int_t fHiBin ; // high pt bin for the corrections
        
        Int_t fNbin; // for rebinning DCA distributions
        
@@ -89,6 +89,7 @@ class AliLnSecondaries: public TObject
        
        Int_t fFracProc;  // procedure for estimating the fractions
        Int_t fMatDCAxyMod; // DCAxy model for secondaries from materials
+       Bool_t fANucTemplate; // enable antinucleus as template for primaries
        
        Double_t fScMat; // scaling factor for material fraction
        Double_t fScFd; // scaling factor for feed-down fraction
index 6dceed7..08317ef 100644 (file)
@@ -39,6 +39,7 @@ AliLnUnfolding::AliLnUnfolding(const TString& particle, const TString& simuFilen
 //
 // constructor
 //
+       TH1::SetDefaultSumw2();
 }
 
 AliLnUnfolding::~AliLnUnfolding()
index fcf75a6..42a9477 100644 (file)
@@ -19,25 +19,32 @@ namespace B2mult
 // multiplicity classes
 //
        const Int_t kNmult = 6;
-       const TString kMultClass[kNmult]   = { "nch0002", "nch0204", "nch0408", "nch0811", "nch1120", "nch20xx" };
+       const TString kMultClass[kNmult]   = { "ntrk0002", "ntrk0204", "ntrk0408", "ntrk0811", "ntrk1120", "ntrk20xx" };
        const Double_t kKNOmult[kNmult]    = { 0.20, 0.60, 1.01, 1.60, 2.60, 4.35 };
        const Double_t kKNOmultErr[kNmult] = { 0, 0, 0, 0, 0, 0 };
 };
 
-Double_t GetVertexCorrection(const TString& period)
+Double_t GetVertexCorrection(const TString& period, Int_t vtxCut=10)
 {
 //
-// vertex correction factor for |Vz| < 10 cm and LHC12a5x simulations
+// vertex correction factor for |Vz| < 10 cm, |Vz| < 5 cm and LHC12a5x simulations
 //
        TString name = period;
        name.ToLower();
        
-       if(name == "lhc10c900")   return 1.0142;
-       if(name == "lhc10b")      return 1.0006;
-       if(name == "lhc10c")      return 1.0007;
-       if(name == "lhc10d")      return 1.0224;
-       if(name == "lhc10e")      return 1.0423;
-       if(name == "lhc11a_wsdd") return 1.0728;
+       if(name == "lhc10c900" && vtxCut == 10)   return 1.0142;
+       if(name == "lhc10b" && vtxCut == 10)      return 1.0006;
+       if(name == "lhc10c" && vtxCut == 10)      return 1.0007;
+       if(name == "lhc10d" && vtxCut == 10)      return 1.0224;
+       if(name == "lhc10e" && vtxCut == 10)      return 1.0423;
+       if(name == "lhc11a_wsdd" && vtxCut == 10) return 1.0728;
+       
+       if(name == "lhc10c900" && vtxCut == 5)    return 1.0866;
+       if(name == "lhc10b" && vtxCut == 5)       return 1.0175;
+       if(name == "lhc10c" && vtxCut == 5)       return 1.0180;
+       if(name == "lhc10d" && vtxCut == 5)       return 1.0431;
+       if(name == "lhc10e" && vtxCut == 5)       return 1.0934;
+       if(name == "lhc11a_wsdd" && vtxCut == 5)  return 1.1716;
        
        return 1;
 }
@@ -163,8 +170,6 @@ TString GetSimuPeriod(const TString& period)
        if(period=="lhc10c900")   return "lhc10e13";
        if(period=="lhc10b")      return "lhc10d1";
        if(period=="lhc10c")      return "lhc10d4";
-       //if(period=="lhc10b")      return "lhc12a5bb";
-       //if(period=="lhc10c")      return "lhc12a5bc";
        if(period=="lhc10d")      return "lhc10f6a";
        if(period=="lhc10e")      return "lhc10e21";
        if(period=="lhc11a_wsdd") return "lhc11e3a_wsdd";
@@ -185,7 +190,7 @@ TString GetSimuFixPeriod(const TString& period)
        if(period=="lhc10c")      return "lhc12a5bc";
        if(period=="lhc10d")      return "lhc12a5bd";
        if(period=="lhc10e")      return "lhc12a5be";
-       if(period=="lhc10bcde")   return "lhc12a5b";
+       if(period=="lhc10bcde")   return "lhc12a5bbcde";
        if(period=="lhc11a_wsdd") return "lhc12a5c_wsdd";
        
        return "";
@@ -289,7 +294,7 @@ void DrawCorrDebug(const TString& sec, const TString& tag, const TString& specie
        }
 }
 
-void DrawPtDebug(const TString& pt, const TString& tag, const TString& species, Bool_t m2pid=0, Int_t lowm2bin=9, Int_t him2bin=17)
+void DrawPtDebug(const TString& pt, const TString& tag, const TString& species, Bool_t m2pid=0, Int_t hiptbin=17, Int_t lowm2bin=9, Int_t him2bin=17)
 {
 //
 // draw pt debug for the particle species
@@ -298,7 +303,7 @@ void DrawPtDebug(const TString& pt, const TString& tag, const TString& species,
        
        for(Int_t i=0; i<2; ++i)
        {
-               gROOT->ProcessLine(Form(".x DrawPt.C+g(\"%s\",\"%s\",\"%s\",%d,%d, %d)", pt.Data(), tag.Data(), kParticle[i].Data(), m2pid, lowm2bin, him2bin));
+               gROOT->ProcessLine(Form(".x DrawPt.C+g(\"%s\",\"%s\",\"%s\",%d, %d, %d, %d)", pt.Data(), tag.Data(), kParticle[i].Data(), hiptbin, m2pid, lowm2bin, him2bin));
        }
 }
 
index 0b2b4e8..c0664bb 100644 (file)
@@ -33,27 +33,28 @@ Int_t Config_Deuteron_TOF_LHC10x(const TString& inputDir   = "~/alice/input",
 //\r
 // lhc10b, lhc10c, lhc10d, lhc10e config for deuterons and antideuterons\r
 //\r
-       const TString  kSpecies     = "Deuteron";\r
-       const TString  kTrkSel      = "its_tpc_tof_dca-tpc3";\r
-       const TString  kTrigName    = "mbor";\r
-       const Bool_t   kVtxCorr     = 0;\r
-       const Double_t kVtxCorrVal  = GetVertexCorrection(period);\r
-       const Int_t    kPtBin[2]    = {4,13};\r
-       const Int_t    kM2Bin[2]    = {8,18};\r
-       const Bool_t   kPidM2       = 1;\r
-       const Bool_t   kUnfolding   = 1;\r
-       const Int_t    kIter        = 5;\r
-       const Bool_t   kFakeTracks  = 0;\r
-       const Bool_t   kSecondaries = 1;\r
-       const Int_t    kSecProd     = 0; // 0 tff, 1 roofit, 2 mc\r
-       const Int_t    kMatDCAxyMod = 1; // 0 geant, 1 flat\r
-       const Int_t    kNbin        = 5;\r
-       const Double_t kDCAxy[2]    = {-0.2,0.2};\r
-       const Double_t kM2Bkg[2]    = {2.2,5.};\r
-       const Double_t kM2tpc[2]    = {2.,6.5};\r
-       const Bool_t   kEfficiency  = 1;\r
-       const Bool_t   kFitFrac     = 1;\r
-       const Double_t kSysErr[2]   = {0.10, 0.11} ;\r
+       const TString  kSpecies         = "Deuteron";\r
+       const TString  kTrkSel          = "its_tpc_tof_dca-tpc3";\r
+       const TString  kTrigName        = "mbor";\r
+       const Bool_t   kVtxCorr         = 0;\r
+       const Double_t kVtxCorrVal      = GetVertexCorrection(period);\r
+       const Int_t    kPtBin[2]        = {4,13};\r
+       const Int_t    kM2Bin[2]        = {8,18};\r
+       const Bool_t   kPidM2           = 1;\r
+       const Bool_t   kUnfolding       = 1;\r
+       const Int_t    kIter            = 5;\r
+       const Bool_t   kFakeTracks      = 0;\r
+       const Bool_t   kSecondaries     = 1;\r
+       const Int_t    kSecProd         = 0; // 0 tff, 1 roofit, 2 mc\r
+       const Int_t    kMatDCAxyMod     = 1; // 0 geant, 1 flat\r
+       const Bool_t   kAntiNucTemplate = 0;\r
+       const Int_t    kNbin            = 5;\r
+       const Double_t kDCAxy[2]        = {-0.2,0.2};\r
+       const Double_t kM2Bkg[2]        = {2.2,5.};\r
+       const Double_t kM2tpc[2]        = {2.,6.5};\r
+       const Bool_t   kEfficiency      = 1;\r
+       const Bool_t   kFitFrac         = 1;\r
+       const Double_t kSysErr[2]       = {0.10, 0.11} ;\r
        \r
        Double_t xsec[3];\r
        GetInelXSection(xsec, period);\r
@@ -96,6 +97,7 @@ Int_t Config_Deuteron_TOF_LHC10x(const TString& inputDir   = "~/alice/input",
        driver.SetSecondaries(kSecondaries);\r
        driver.SetSecProd(kSecProd);\r
        driver.SetMatDCAxyModel(kMatDCAxyMod);\r
+       driver.SetAntiNucleusAsTemplate(kAntiNucTemplate);\r
        driver.SetNBin(kNbin);\r
        driver.SetDCAxyInterval(kDCAxy[0], kDCAxy[1]);\r
        driver.SetEfficiency(kEfficiency,0);\r
@@ -116,7 +118,7 @@ Int_t Config_Deuteron_TOF_LHC10x(const TString& inputDir   = "~/alice/input",
        \r
        if(kSecProd != 2) gROOT->ProcessLine(Form(".x DrawSec.C+g(\"%s\",\"\",\"Deuteron\", %d, %d, %f, %f)", driver.GetPtCorrDebugFilename().Data(), kPtBin[0], kPtBin[1], kDCAxy[0], kDCAxy[1]));\r
        \r
-       DrawPtDebug(driver.GetPtDebugFilename(), outputTag, kSpecies, kPidM2, kM2Bin[0], kM2Bin[1]);\r
+       DrawPtDebug(driver.GetPtDebugFilename(), outputTag, kSpecies, kPidM2, kPtBin[1], kM2Bin[0], kM2Bin[1]);\r
        DrawOutputRatio(outputRatio, outputTag, kSpecies);\r
        DrawOutputSpectra(outputSpectra, outputTag, kSpecies);\r
        \r
diff --git a/PWGLF/SPECTRA/Nuclei/B2/macros/Config_Deuteron_TPCTOF_LHC10x.C b/PWGLF/SPECTRA/Nuclei/B2/macros/Config_Deuteron_TPCTOF_LHC10x.C
new file mode 100644 (file)
index 0000000..d9f6a32
--- /dev/null
@@ -0,0 +1,231 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+// LHC10x config for deuterons and antideuterons
+// author: Eulogio Serradilla <eulogio.serradilla@cern.ch>
+
+#include <Riostream.h>
+#include <TSystem.h>
+#include <TString.h>
+#include <TFileMerger.h>
+
+#include "AliLnDriver.h"
+#include "Config.h"
+
+Int_t Config_Deuteron_TPCTOF_LHC10x(const TString& inputDir   = "~/alice/input",
+                                    const TString& outputDir  = "~/alice/output",
+                                    const TString& period     = "lhc10d",
+                                    const TString& outputTag  = "lhc10d",
+                                    const TString& multTag    = "",
+                                    const TString& multCorTag = "",
+                                    Bool_t normToInel         = 1,  // for mult
+                                    Bool_t drawOutput         = 1)  // for batch
+{
+//
+// lhc10b, lhc10c, lhc10d, lhc10e config for deuterons and antideuterons
+// (combine TPC and TOF)
+//
+       const TString  kSpecies         = "Deuteron";
+       
+       const TString  kTrkSelTPC       = "its_tpc_dca_spd-tpc3";
+       const TString  kTrkSelTOF       = "its_tpc_tof_dca-tpc3";
+       
+       const TString  kOutputTagTPC    = outputTag + "-tpc";
+       const TString  kOutputTagTOF    = outputTag + "-tof";
+       
+       const Int_t    kLowPtBin        = 4; // bin width = 0.2 GeV/c
+       const Int_t    kJointBin        = 6;
+       const Int_t    kHiPtBin         = 18;
+       
+       const TString  kTrigName        = "mbor";
+       const Bool_t   kVtxCorr         = 0;
+       const Double_t kVtxCorrVal      = GetVertexCorrection(period);
+       
+       const Bool_t   kUnfolding       = 1;
+       const Int_t    kIter            = 5;
+       const Bool_t   kFakeTracks      = 0;
+       const Bool_t   kSecondaries     = 1;
+       const Int_t    kSecProd         = 0; // 0 tff, 1 roofit, 2 mc
+       const Int_t    kMatDCAxyMod     = 1; // 0 geant, 1 flat
+       const Bool_t   kAntiNucTemplate = 0;
+       const Int_t    kNbin            = 5;
+       const Double_t kDCAxy[2]        = {-0.2,0.2};
+       const Bool_t   kEfficiency      = 1;
+       const Bool_t   kFitFrac         = 0;
+       
+       // for TOF
+       const Int_t    kM2Bin[2]        = {8,18};
+       const Double_t kM2Bkg[2]        = {2.2,5.};
+       const Double_t kM2tpc[2]        = {2.,6.5};
+       
+       const Double_t kSysErr[2]       = {0.10, 0.11} ;
+       
+       Double_t xsec[3];
+       GetInelXSection(xsec, period);
+       
+       Double_t trigEff[3];
+       GetTriggerEfficiency(trigEff, kTrigName, period);
+       
+       // common options
+       
+       AliLnDriver driver;
+       
+       driver.SetSpecies(kSpecies);
+       
+       driver.SetTriggerEfficiency(trigEff);
+       driver.SetInelXSection(xsec);
+       driver.SetNormalizeToINEL(normToInel);
+       driver.SetVertexCorrection(kVtxCorr, kVtxCorrVal);
+       
+       driver.SetPidM2(0);
+       driver.SetUnfolding(kUnfolding, kIter);
+       driver.SetFakeTracks(kFakeTracks);
+       driver.SetSecondaries(kSecondaries);
+       driver.SetSecProd(kSecProd);
+       driver.SetMatDCAxyModel(kMatDCAxyMod);
+       driver.SetAntiNucleusAsTemplate(kAntiNucTemplate);
+       driver.SetNBin(kNbin);
+       driver.SetDCAxyInterval(kDCAxy[0], kDCAxy[1]);
+       driver.SetEfficiency(kEfficiency,0);
+       driver.SetFitFractionCorr(kFitFrac);
+       
+       driver.SetSysErr(kSysErr[0],kSysErr[1]);
+       
+       // get the pt with TPC up to kJointBin
+       
+       TString inputDataTPC     = inputDir + "/" + period + "/"
+                                + MakeInputName(kSpecies, period, kTrkSelTPC+multTag) + ".root";
+       
+       TString inputSimuTPC     = inputDir + "/" + period + "/"
+                                + MakeSimuName(kSpecies, period, kTrkSelTPC+multCorTag) + ".root";
+       
+       TString inputSimuFixTPC  = inputDir + "/" + period + "/"
+                                + MakeSimuFixName(kSpecies, period, kTrkSelTPC+multCorTag, 0) + ".root";
+       
+       TString inputCorrTPC     = inputDir + "/" + period + "/"
+                                + MakeInputName(kSpecies, period, kTrkSelTPC+multTag) + "-corr.root";
+       
+       TString outputPtTPC      = outputDir + "/" + MakeOutputName(kSpecies, kOutputTagTPC) + "-Pt.root";
+       TString outputRatioTPC   = outputDir + "/" + MakeOutputName(kSpecies, kOutputTagTPC) + "-Ratio.root";
+       TString outputSpectraTPC = outputDir + "/" + MakeOutputName(kSpecies, kOutputTagTPC) + "-Spectra.root";
+       
+       
+       driver.SetInputFilenames(inputDataTPC, inputSimuTPC, inputSimuFixTPC, inputCorrTPC);
+       driver.SetOutputFilenames(outputPtTPC, outputRatioTPC, outputSpectraTPC);
+       
+       driver.SetOutputTag(kOutputTagTPC);
+       
+       driver.SetMakeStats(0);
+       driver.SetMakeCorrections(1);
+       driver.SetMakePt(1);
+       driver.SetMakeRatio(0);
+       driver.SetMakeSpectra(0);
+       
+       driver.SetPtBinInterval(kLowPtBin, kJointBin);
+       
+       TString outputCorrDebugTPC = driver.GetPtCorrDebugFilename();
+       TString outputPtDebugTPC   = driver.GetPtDebugFilename();
+       
+       driver.Run();
+       
+       // get the pt with TOF from kJointBin to kHiPtBin
+       
+       TString inputDataTOF     = inputDir + "/" + period + "/"
+                                + MakeInputName(kSpecies, period, kTrkSelTOF+multTag) + ".root";
+       
+       TString inputSimuTOF     = inputDir + "/" + period + "/"
+                                + MakeSimuName(kSpecies, period, kTrkSelTOF+multCorTag) + ".root";
+       
+       TString inputSimuFixTOF  = inputDir + "/" + period + "/"
+                                + MakeSimuFixName(kSpecies, period, kTrkSelTOF+multCorTag) + ".root";
+       
+       TString inputCorrTOF     = inputDir + "/" + period + "/"
+                                + MakeInputName(kSpecies, period, kTrkSelTOF+multTag) + "-corr.root";
+       
+       TString outputPtTOF      = outputDir + "/" + MakeOutputName(kSpecies, kOutputTagTOF) + "-Pt.root";
+       TString outputRatioTOF   = outputDir + "/" + MakeOutputName(kSpecies, kOutputTagTOF) + "-Ratio.root";
+       TString outputSpectraTOF = outputDir + "/" + MakeOutputName(kSpecies, kOutputTagTOF) + "-Spectra.root";
+       
+       
+       driver.SetInputFilenames(inputDataTOF, inputSimuTOF, inputSimuFixTOF, inputCorrTOF);
+       driver.SetOutputFilenames(outputPtTOF, outputRatioTOF, outputSpectraTOF);
+       
+       driver.SetOutputTag(kOutputTagTOF);
+       
+       driver.SetMakeStats(1);
+       driver.SetMakeCorrections(1);
+       driver.SetMakePt(1);
+       driver.SetMakeRatio(0);
+       driver.SetMakeSpectra(0);
+       
+       driver.SetPtBinInterval(kJointBin, kHiPtBin);
+       driver.SetUnfolding(0);
+       driver.SetEfficiency(kEfficiency,0);
+       driver.SetPidM2(1);
+       driver.SetM2BinInterval(kM2Bin[0], kM2Bin[1]);
+       driver.SetM2BkgInterval(kM2Bkg[0], kM2Bkg[1]);
+       driver.SetM2TPCInterval(kM2tpc[0], kM2tpc[1]);
+       
+       TString outputCorrDebugTOF = driver.GetPtCorrDebugFilename();
+       TString outputPtDebugTOF   = driver.GetPtDebugFilename();
+       
+       driver.Run();
+       
+       // combine TPC and TOF pt
+       
+       TString outputPt      = outputDir + "/" + MakeOutputName(kSpecies, outputTag) + "-Pt.root";
+       TString outputRatio   = outputDir + "/" + MakeOutputName(kSpecies, outputTag) + "-Ratio.root";
+       TString outputSpectra = outputDir + "/" + MakeOutputName(kSpecies, outputTag) + "-Spectra.root";
+       
+       TFileMerger m;
+       
+       m.AddFile(outputPtTPC.Data(),0);
+       m.AddFile(outputPtTOF.Data(),0);
+       
+       m.OutputFile(outputPt.Data());
+       
+       m.Merge();
+       
+       // make ratio and spectra
+       
+       driver.SetOutputFilenames(outputPt, outputRatio, outputSpectra);
+       
+       driver.SetOutputTag(outputTag);
+       
+       driver.SetMakeCorrections(0);
+       driver.SetMakePt(0);
+       driver.SetMakeRatio(1);
+       driver.SetMakeSpectra(1);
+       
+       driver.Run();
+       
+       // delete tmp files
+       
+       gSystem->Exec(Form("rm -f %s %s %s %s", inputCorrTPC.Data(), outputPtTPC.Data(), outputCorrDebugTPC.Data(), outputPtDebugTPC.Data()));
+       gSystem->Exec(Form("rm -f %s %s %s %s", inputCorrTOF.Data(), outputPtTOF.Data(), outputCorrDebugTOF.Data(), outputPtDebugTOF.Data()));
+       
+       // draw output
+       
+       if(!drawOutput) return 0;
+       
+       TStyle* st = GetDrawingStyle();
+       st->cd();
+       gROOT->ForceStyle();
+       
+       DrawOutputRatio(outputRatio, outputTag, kSpecies);
+       DrawOutputSpectra(outputSpectra, outputTag, kSpecies);
+       
+       return 0;
+}
diff --git a/PWGLF/SPECTRA/Nuclei/B2/macros/Config_Deuteron_TPC_LHC10x.C b/PWGLF/SPECTRA/Nuclei/B2/macros/Config_Deuteron_TPC_LHC10x.C
new file mode 100644 (file)
index 0000000..d207523
--- /dev/null
@@ -0,0 +1,120 @@
+/**************************************************************************\r
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *\r
+ *                                                                        *\r
+ * Author: The ALICE Off-line Project.                                    *\r
+ * Contributors are mentioned in the code where appropriate.              *\r
+ *                                                                        *\r
+ * Permission to use, copy, modify and distribute this software and its   *\r
+ * documentation strictly for non-commercial purposes is hereby granted   *\r
+ * without fee, provided that the above copyright notice appears in all   *\r
+ * copies and that both the copyright notice and this permission notice   *\r
+ * appear in the supporting documentation. The authors make no claims     *\r
+ * about the suitability of this software for any purpose. It is          *\r
+ * provided "as is" without express or implied warranty.                  *\r
+ **************************************************************************/\r
+\r
+// LHC10x config for deuterons and antideuterons\r
+// author: Eulogio Serradilla <eulogio.serradilla@cern.ch>\r
+\r
+#include <TROOT.h>\r
+#include <TString.h>\r
+#include "AliLnDriver.h"\r
+#include "Config.h"\r
+\r
+Int_t Config_Deuteron_TPC_LHC10x(const TString& inputDir   = "~/alice/input",\r
+                                 const TString& outputDir  = "~/alice/output",\r
+                                 const TString& period     = "lhc10d",\r
+                                 const TString& outputTag  = "lhc10d",\r
+                                 const TString& multTag    = "",\r
+                                 const TString& multCorTag = "",\r
+                                 Bool_t normToInel         = 1,  // for mult\r
+                                 Bool_t drawOutput         = 1)  // for batch\r
+{\r
+//\r
+// lhc10b, lhc10c, lhc10d, lhc10e config for deuterons and antideuterons\r
+// (TPC)\r
+//\r
+       const TString  kSpecies         = "Deuteron";\r
+       const TString  kTrkSel          = "its_tpc_dca_spd-tpc3";\r
+       const TString  kTrigName        = "mbor";\r
+       const Bool_t   kVtxCorr         = 0;\r
+       const Double_t kVtxCorrVal      = GetVertexCorrection(period);\r
+       const Int_t    kPtBin[2]        = {3,6};\r
+       const Bool_t   kUnfolding       = 1;\r
+       const Int_t    kIter            = 7;\r
+       const Bool_t   kFakeTracks      = 0;\r
+       const Bool_t   kSecondaries     = 1;\r
+       const Int_t    kSecProd         = 0; // 0 tff, 1 roofit, 2 mc\r
+       const Int_t    kMatDCAxyMod     = 1; // 0 geant, 1 flat\r
+       const Bool_t   kAntiNucTemplate = 0;\r
+       const Int_t    kNbin            = 5;\r
+       const Double_t kDCAxy[2]        = {-0.2,0.2};\r
+       const Bool_t   kEfficiency      = 1;\r
+       const Bool_t   kFitFrac         = 0;\r
+       const Double_t kSysErr[2]       = {0.10, 0.11} ;\r
+       \r
+       Double_t xsec[3];\r
+       GetInelXSection(xsec, period);\r
+       \r
+       Double_t trigEff[3];\r
+       GetTriggerEfficiency(trigEff, kTrigName, period);\r
+       \r
+       // input and output filenames\r
+       \r
+       TString inputData     = inputDir + "/" + period + "/" + MakeInputName(kSpecies, period, kTrkSel+multTag) + ".root";\r
+       TString inputSimu     = inputDir + "/" + period + "/" + MakeSimuName(kSpecies, period, kTrkSel+multCorTag) + ".root";\r
+       TString inputSimuFix  = inputDir + "/" + period + "/" + MakeSimuFixName(kSpecies, period, kTrkSel+multCorTag) + ".root";\r
+       TString inputCorr     = inputDir + "/" + period + "/" + MakeInputName(kSpecies, period, kTrkSel+multTag) + "-corr.root";\r
+       \r
+       TString outputPt      = outputDir + "/" + MakeOutputName(kSpecies, outputTag) + "-Pt.root";\r
+       TString outputRatio   = outputDir + "/" + MakeOutputName(kSpecies, outputTag) + "-Ratio.root";\r
+       TString outputSpectra = outputDir + "/" + MakeOutputName(kSpecies, outputTag) + "-Spectra.root";\r
+       \r
+       // configure the driver and run\r
+       \r
+       AliLnDriver driver;\r
+       \r
+       driver.SetSpecies(kSpecies);\r
+       \r
+       driver.SetInputFilenames(inputData, inputSimu, inputSimuFix, inputCorr);\r
+       driver.SetOutputFilenames(outputPt, outputRatio, outputSpectra);\r
+       \r
+       driver.SetOutputTag(outputTag);\r
+       driver.SetTriggerEfficiency(trigEff);\r
+       driver.SetInelXSection(xsec);\r
+       driver.SetNormalizeToINEL(normToInel);\r
+       driver.SetVertexCorrection(kVtxCorr, kVtxCorrVal);\r
+       driver.SetPtBinInterval(kPtBin[0], kPtBin[1]);\r
+       driver.SetPidM2(0);\r
+       driver.SetUnfolding(kUnfolding, kIter);\r
+       driver.SetFakeTracks(kFakeTracks);\r
+       driver.SetSecondaries(kSecondaries);\r
+       driver.SetSecProd(kSecProd);\r
+       driver.SetMatDCAxyModel(kMatDCAxyMod);\r
+       driver.SetAntiNucleusAsTemplate(kAntiNucTemplate);\r
+       driver.SetNBin(kNbin);\r
+       driver.SetDCAxyInterval(kDCAxy[0], kDCAxy[1]);\r
+       driver.SetEfficiency(kEfficiency,0);\r
+       driver.SetFitFractionCorr(kFitFrac);\r
+       driver.SetSysErr(kSysErr[0],kSysErr[1]);\r
+       \r
+       driver.Run();\r
+       \r
+       // draw output\r
+       \r
+       if(!drawOutput) return 0;\r
+       \r
+       TStyle* st = GetDrawingStyle();\r
+       st->cd();\r
+       gROOT->ForceStyle();\r
+       \r
+       DrawOutputCorr(kSpecies,inputCorr);\r
+       \r
+       if(kSecProd != 2) gROOT->ProcessLine(Form(".x DrawSec.C+g(\"%s\",\"\",\"Deuteron\", %d, %d, %f, %f)", driver.GetPtCorrDebugFilename().Data(), kPtBin[0], kPtBin[1], kDCAxy[0], kDCAxy[1]));\r
+       \r
+       DrawPtDebug(driver.GetPtDebugFilename(), outputTag, kSpecies, 0);\r
+       DrawOutputRatio(outputRatio, outputTag, kSpecies);\r
+       DrawOutputSpectra(outputSpectra, outputTag, kSpecies);\r
+       \r
+       return 0;\r
+}\r
index d216f3c..22eb28a 100644 (file)
@@ -45,6 +45,7 @@ Int_t Config_Proton_TPCTOF_LHC10x(const TString& inputDir   = "~/alice/input",
        const TString  kOutputTagTPC = outputTag + "-tpc";
        const TString  kOutputTagTOF = outputTag + "-tof";
        
+       const Int_t    kLowPtBin     = 5; // bin width = 0.1 GeV/c
        const Int_t    kJointBin     = 11;
        const Int_t    kHiPtBin      = 36;
        
@@ -130,7 +131,7 @@ Int_t Config_Proton_TPCTOF_LHC10x(const TString& inputDir   = "~/alice/input",
        driver.SetMakeRatio(0);
        driver.SetMakeSpectra(0);
        
-       driver.SetPtBinInterval(5, kJointBin);
+       driver.SetPtBinInterval(kLowPtBin, kJointBin);
        
        TString outputCorrDebugTPC = driver.GetPtCorrDebugFilename();
        TString outputPtDebugTPC   = driver.GetPtDebugFilename();
index a326902..65d9532 100644 (file)
@@ -34,7 +34,7 @@
 
 #include "B2.h"
 
-void DrawPt(const TString& inputFile="debug.root", const TString& tag="test", const TString& particle="AntiDeuteron", Bool_t m2pid=0, Int_t lowm2bin=9, Int_t him2bin=17)
+void DrawPt(const TString& inputFile="debug.root", const TString& tag="test", const TString& particle="AntiDeuteron", Int_t hiptbin=17, Bool_t m2pid=0, Int_t lowm2bin=9, Int_t him2bin=17)
 {
 //
 // Draw corrected pt for debugging
@@ -47,7 +47,7 @@ void DrawPt(const TString& inputFile="debug.root", const TString& tag="test", co
        
        // m2 data fitted models
        
-       if(m2pid)
+       if(m2pid && (hiptbin>lowm2bin))
        {
                TH1D* hPidPt = (TH1D*)FindObj(finput, tag, Form("%s_PID_Pt",particle.Data()));
                Double_t binwidth = hPidPt->GetBinWidth(0);
@@ -67,7 +67,7 @@ void DrawPt(const TString& inputFile="debug.root", const TString& tag="test", co
                TGraphErrors* grFitM2Pt = new TGraphErrors();
                grFitM2Pt->SetName(Form("%s_Fit_M2_Pt", particle.Data()));
                
-               for(Int_t i=lowm2bin, j=0; i<him2bin && i-lowm2bin < 9 ; ++i)
+               for(Int_t i=lowm2bin, j=0; i<him2bin && i-lowm2bin < 9 && i < hiptbin; ++i)
                {
                        c0->cd(i-lowm2bin+1);
                        //gPad->SetLogy(0);
index 5c81f2f..f3a5351 100644 (file)
@@ -24,7 +24,7 @@
 #include "AliLnDriver.h"
 #include "Config.h"
 
-Int_t LHC10xMult(const TString& species   = "Deuteron",
+Int_t LHC10xMult(const TString& species   = "Proton",
                  const TString& inputDir  = "~/alice/input",
                  const TString& outputDir = "~/alice/output",
                  const TString& period    = "lhc10d",
@@ -34,9 +34,9 @@ Int_t LHC10xMult(const TString& species   = "Deuteron",
 // lhc10x multiplicity config
 // call Config_XXX for each multiplicity class
 //
-// if Proton and option = 0 then use Config_Proton_TPC
-// if Proton and option = 1 then use Config_Proton_TOF
-// if Proton and option = 2 then use Config_Proton_TPCTOF
+// if option = 0 then use Config_XXX_TPC
+// if option = 1 then use Config_XXX_TOF
+// if option = 2 then use Config_XXX_TPCTOF
 //
        using namespace B2mult;
        using namespace std;
@@ -81,11 +81,21 @@ Int_t LHC10xMult(const TString& species   = "Deuteron",
                        cout << "Config_Proton_TPCTOF_LHC10x.C" << endl << endl;
                        gROOT->ProcessLine(Form(".x Config_Proton_TPCTOF_LHC10x.C+g(\"%s\",%d,0)", arg.Data(), kNormToInel[i]));
                }
-               else if(species=="Deuteron")
+               else if(species=="Deuteron" && option==0)
+               {
+                       cout << "Config_Deuteron_TPC_LHC10x.C" << endl << endl;
+                       gROOT->ProcessLine(Form(".x Config_Deuteron_TOF_LHC10x.C+g(\"%s\",%d,0)", arg.Data(), kNormToInel[i]));
+               }
+               else if(species=="Deuteron" && option==1)
                {
                        cout << "Config_Deuteron_TOF_LHC10x.C" << endl << endl;
                        gROOT->ProcessLine(Form(".x Config_Deuteron_TOF_LHC10x.C+g(\"%s\",%d,0)", arg.Data(), kNormToInel[i]));
                }
+               else if(species=="Deuteron" && option==2)
+               {
+                       cout << "Config_Deuteron_TPCTOF_LHC10x.C" << endl << endl;
+                       gROOT->ProcessLine(Form(".x Config_Deuteron_TPCTOF_LHC10x.C+g(\"%s\",%d,0)", arg.Data(), kNormToInel[i]));
+               }
                else
                {
                        cerr << "unknown species/option: " << species << "/" << option << endl;