AliPhysics  9c66e61 (9c66e61)
makeTFile4CutsLc2pK0s.C
Go to the documentation of this file.
1 #include <Riostream.h>
2 #include <TFile.h>
4 #include <AliAODPidHF.h>
5 #include <TClonesArray.h>
6 #include <TParameter.h>
7 #include <TF1.h>
8 
10 {
11 
13 
14  RDHFLc->SetName("LcAnalysisCuts");
15  RDHFLc->SetTitle("Analysis cuts for Lc analysis");
16  RDHFLc->SetUsePhysicsSelection(kTRUE);
17  RDHFLc->SetTriggerClass("");
18  //RDHFLc->SetUseInt7TriggerPP2012();
20  RDHFLc->EnableCentralTrigger();
21  RDHFLc->EnableSemiCentralTrigger();
22 
23  const Int_t nptbins=8;
24  RDHFLc->SetNPtBins(nptbins);
25 
26  Float_t* ptbins;
27  ptbins=new Float_t[nptbins+1];
28  ptbins[0]= 0.;
29  ptbins[1]= 2.;
30  ptbins[2]= 3.;
31  ptbins[3]= 4.;
32  ptbins[4]= 5.;
33  ptbins[5]= 6.;
34  ptbins[6]= 8.;
35  ptbins[7]=12.;
36  ptbins[8]=100.;
37  RDHFLc->SetPtBins(nptbins+1,ptbins);
38 
39  const Int_t nvars=7;
40 
41  Float_t** anacutsarray;
42  anacutsarray=new Float_t*[nvars];
43  for(Int_t ic=0;ic<nvars;ic++)
44  {
45  anacutsarray[ic]=new Float_t[nptbins];
46  }
47 
48  for(Int_t ipt2=0;ipt2<nptbins;ipt2++)
49  {
50  anacutsarray[ 0][ipt2]=0.25; // Tolerance Invariant mass of Lc
51  anacutsarray[ 1][ipt2]=2.00; // Min Lc pT
52  anacutsarray[ 2][ipt2]=0.3; // Min Bach pT
53  anacutsarray[ 3][ipt2]=0.5; // Max Bach d0
54  anacutsarray[ 4][ipt2]=1.5; // Max V0 d0
55  anacutsarray[ 5][ipt2]=0.010; // Tolrelance mass K0s
56  anacutsarray[ 6][ipt2]=0.000; // Decay Length XY
57  }
58 
59  RDHFLc->SetUseOnTheFlyV0(kFALSE);
60 
61  RDHFLc->SetCuts(nvars,nptbins,anacutsarray);
62 
63  RDHFLc->SetUsePID(kTRUE);
65  AliAODPidHF* pidObj=new AliAODPidHF();
66  Double_t sigmaspi[5]={3.,0.,0.,3.,0.};
67  pidObj->SetSigma(sigmaspi);
68  pidObj->SetTPC(kTRUE);
69  pidObj->SetTOF(kTRUE);
70  pidObj->SetMatch(1);
71  RDHFLc->SetPidHF(pidObj);
72  RDHFLc->GetPidHF()->SetUseCombined(kTRUE);
73  RDHFLc->GetPidHF()->SetUseDefaultPriors(kTRUE);
75  RDHFLc->SetCombinedPIDThreshold(0.02);
76 
77  RDHFLc->SetMaxVtxZ(10.);
78 
79  RDHFLc->SetUseOnTheFlyV0(kFALSE);
80  RDHFLc->SetProdRoughMassTol(0.25);
81  RDHFLc->SetProdRoughPtMin(2.0);
82  RDHFLc->SetProdTrackPtMin(0.3);
83  RDHFLc->SetProdTrackEtaRange(0.8);
84  RDHFLc->SetProdUseAODFilterBit(kTRUE);
85  RDHFLc->SetProdV0MassTolK0s(0.010);
86  RDHFLc->SetProdV0PtMin(0.3);
88  RDHFLc->SetProdV0DcaDaughtersMax(1.5);
89  RDHFLc->SetProdV0DaughterEtaRange(0.8);
90  RDHFLc->SetProdV0DaughterPtMin(0.1);
92 
93  cout<<"This is the (anal) object I'm going to save:"<<endl;
94  RDHFLc->PrintAll();
95  TFile* fout=new TFile("LcCuts.root","RECREATE");
96  fout->cd();
97  RDHFLc->Write();
98  fout->Close();
99  delete fout;
100 
101 }
void SetNPtBins(Int_t nptBins)
Definition: AliRDHFCuts.h:403
double Double_t
Definition: External.C:58
void SetMaxVtxZ(Float_t z=1e6)
Definition: AliRDHFCuts.h:61
void EnableSemiCentralTrigger()
Definition: AliRDHFCuts.h:97
void SetUsePhysicsSelection(Bool_t use=kTRUE)
Definition: AliRDHFCuts.h:362
void SetPidHF(AliAODPidHF *pidObj)
see enum below
Definition: AliRDHFCuts.h:215
AliAODPidHF * GetPidHF() const
Definition: AliRDHFCuts.h:247
void SetTOF(Bool_t tof)
Definition: AliAODPidHF.h:95
void SetUseCombined(Bool_t useCombined=kTRUE)
Definition: AliAODPidHF.h:200
void SetUseDefaultPriors(Bool_t defaultP)
Definition: AliAODPidHF.h:201
void SetCombDetectors(ECombDetectors pidComb)
Definition: AliAODPidHF.h:112
int Int_t
Definition: External.C:63
void SetCuts(Int_t nVars, Int_t nPtBins, Float_t **cutsRD)
void ResetMaskAndEnableMBTrigger()
Definition: AliRDHFCuts.h:77
float Float_t
Definition: External.C:68
void makeInputAliAnalysisTaskSELc2pK0s()
void SetSigma(Double_t *sigma)
Definition: AliAODPidHF.h:39
void EnableCentralTrigger()
Definition: AliRDHFCuts.h:85
void SetUsePID(Bool_t flag=kTRUE)
Definition: AliRDHFCuts.h:209
virtual void PrintAll() const
void SetPtBins(Int_t nPtBinLimits, Float_t *ptBinLimits)
void SetMatch(Int_t match)
Definition: AliAODPidHF.h:98
void SetTPC(Bool_t tpc)
Definition: AliAODPidHF.h:94
TFile * fout
input train file
void SetTriggerClass(TString trclass0, TString trclass1="")
Definition: AliRDHFCuts.h:197
void SetPIDStrategy(EPIDStrategy pidStrategy)
Int_t nptbins