AliPhysics  f05a842 (f05a842)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
makeTFile4CutsLc2eleLambda.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("eleLambdaAnalysisCuts");
15  RDHFLc->SetTitle("Analysis cuts for eleLambda analysis");
16  RDHFLc->SetUsePhysicsSelection(kTRUE);
17  RDHFLc->SetTriggerClass("");
18  //RDHFLc->SetUseInt7TriggerPP2012();
20  //RDHFLc->EnableCentralTrigger();
21  //RDHFLc->EnableSemiCentralTrigger();
22 
23  const Int_t nptbins=1;
24  RDHFLc->SetNPtBins(nptbins);
25 
26  Float_t* ptbins;
27  ptbins=new Float_t[nptbins+1];
28  ptbins[0]= 0.;
29  ptbins[1]=100.;
30  RDHFLc->SetPtBins(nptbins+1,ptbins);
31 
32  const Int_t nvars=2;
33 
34  Float_t** anacutsarray;
35  anacutsarray=new Float_t*[nvars];
36  for(Int_t ic=0;ic<nvars;ic++)
37  {
38  anacutsarray[ic]=new Float_t[nptbins];
39  }
40 
41  for(Int_t ipt2=0;ipt2<nptbins;ipt2++)
42  {
43  anacutsarray[ 0][ipt2]=10.; // Upper limit on Inv Mass
44  anacutsarray[ 1][ipt2]=0.; // Lower limit on cos(Opening angle)
45  }
46 
47  RDHFLc->SetUseOnTheFlyV0(kFALSE);
48 
49  RDHFLc->SetCuts(nvars,nptbins,anacutsarray);
50 
51  RDHFLc->SetUsePID(kTRUE);
53  AliAODPidHF* pidObj=new AliAODPidHF();
54  //used in kNSigma
55  Double_t sigmaspi[5]={3.,0.,0.,3.,0.};
56  pidObj->SetSigma(sigmaspi);
57  pidObj->SetTPC(kTRUE);
58  pidObj->SetTOF(kTRUE);
59  pidObj->SetMatch(1);
60  //used in kNSigmaCombinedCuts
61  RDHFLc->SetSigmaElectronTPCRange(-0.5,3.0);
62  RDHFLc->SetSigmaElectronTOFRange(-3.0,3.0);
63  //RDHFLc->SetSigmaElectronTPCRange(-99999.,99999.);
64  //RDHFLc->SetSigmaElectronTOFRange(-99999.,99999.);
65  //used both in kNsigma and kNSigmacustomizedcuts
66  RDHFLc->SetPidHF(pidObj);
67  RDHFLc->SetExcludePionTPC(kFALSE);
68  RDHFLc->SetExcludeProtonTPC(kFALSE);
69  RDHFLc->SetExcludeKaonTPC(kFALSE);
70  RDHFLc->SetExcludenSigmaPionTPC(3.0);
71  RDHFLc->SetExcludenSigmaProtonTPC(3.0);
72  RDHFLc->SetExcludenSigmaKaonTPC(3.0);
73 
74  RDHFLc->SetMaxVtxZ(10.);
75 
76  RDHFLc->SetProdUseAODFilterBit(kTRUE);
77  RDHFLc->SetProdTrackTPCNclsPIDMin(80);//could not find in esdtrackcutsw
78  RDHFLc->SetProdTrackTPCNclsRatioMin(0.6);//could not find in esdtrackcutsw
79 
80  AliESDtrackCuts* esdTrackCuts=new AliESDtrackCuts();
81  esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
82  esdTrackCuts->SetRequireTPCRefit(kTRUE);
83  esdTrackCuts->SetMinNClustersTPC(100);
84  //esdTrackCuts->SetMinNCrossedRowsTPC(70);
85  //esdTrackCuts->SetMinRatioCrossedRowsOverFindableClustersTPC(0.8);
86  esdTrackCuts->SetRequireITSRefit(kTRUE);
87  esdTrackCuts->SetMinNClustersITS(4);
88  esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kBoth);//kBoth
89  esdTrackCuts->SetMinDCAToVertexXY(0.);
90  esdTrackCuts->SetEtaRange(-0.6,0.6);
91  esdTrackCuts->SetPtRange(0.5,1.e10);
92  esdTrackCuts->SetMaxDCAToVertexXY(1.0);
93  esdTrackCuts->SetMaxDCAToVertexZ(2.0);
94  esdTrackCuts->SetDCAToVertex2D(kTRUE);
95  esdTrackCuts->SetMaxChi2PerClusterITS(36);
96  RDHFLc->AddTrackCuts(esdTrackCuts);
97 
98  RDHFLc->SetUseOnTheFlyV0(kFALSE);
99  RDHFLc->SetProdV0MassTolLambda(0.006);
100  RDHFLc->SetProdV0PtMin(0.0);
101  RDHFLc->SetProdV0CosPointingAngleToPrimVtxMin(0.995);//AN 0.995(seems too strong for this analysis)
102  RDHFLc->SetProdV0DcaDaughtersMax(1.0);
103  RDHFLc->SetProdV0DaughterEtaRange(0.8);
104  RDHFLc->SetProdV0DaughterPtMin(0.1);
105  RDHFLc->SetProdV0DaughterTPCClusterMin(70);
106  RDHFLc->SetProdRfidMinV0(0.5);
107  RDHFLc->SetProdRfidMaxV0(9000.);
108  RDHFLc->SetProdDcaV0PrToPrimVertexMin(0.06);//default 0.06
109  RDHFLc->SetProdDcaV0PiToPrimVertexMin(0.06);//default 0.06
110  RDHFLc->SetProdV0ProperDecayLengthMax(30.);
111  RDHFLc->SetProdMassRejK0s(0.01);//default 0.01
112 
113 
114  RDHFLc->SetUseLambdaPID(kTRUE);
115  AliAODPidHF* pidObjpr=new AliAODPidHF();
116  Double_t sigmasproton[5]={5.,0.,0.,0.,0.};
117  pidObjpr->SetSigma(sigmasproton);
118  pidObjpr->SetTPC(kTRUE);
119  RDHFLc->SetPidProton(pidObjpr);
120  AliAODPidHF* pidObjpi=new AliAODPidHF();
121  Double_t sigmaspion[5]={5.,0.,0.,0.,0.};
122  pidObjpi->SetSigma(sigmaspion);
123  pidObjpi->SetTPC(kTRUE);
124  RDHFLc->SetPidPion(pidObjpi);
125 
126  cout<<"This is the (anal) object I'm going to save:"<<endl;
127  RDHFLc->PrintAll();
128  TFile* fout=new TFile("eleLambdaCuts.root","RECREATE");
129  fout->cd();
130  RDHFLc->Write();
131  fout->Close();
132  delete fout;
133 
134 }
void SetNPtBins(Int_t nptBins)
Definition: AliRDHFCuts.h:366
void makeInputAliAnalysisTaskSELc2eleLambda()
double Double_t
Definition: External.C:58
void SetMaxVtxZ(Float_t z=1e6)
Definition: AliRDHFCuts.h:60
void SetUsePhysicsSelection(Bool_t use=kTRUE)
Definition: AliRDHFCuts.h:326
void SetPidHF(AliAODPidHF *pidObj)
see enum below
Definition: AliRDHFCuts.h:210
void SetTOF(Bool_t tof)
Definition: AliAODPidHF.h:95
int Int_t
Definition: External.C:63
void SetCuts(Int_t nVars, Int_t nPtBins, Float_t **cutsRD)
void ResetMaskAndEnableMBTrigger()
Definition: AliRDHFCuts.h:73
float Float_t
Definition: External.C:68
void SetSigma(Double_t *sigma)
Definition: AliAODPidHF.h:39
void SetUsePID(Bool_t flag=kTRUE)
Definition: AliRDHFCuts.h:204
virtual void PrintAll() const
void SetPtBins(Int_t nPtBinLimits, Float_t *ptBinLimits)
void SetMatch(Int_t match)
Definition: AliAODPidHF.h:98
void AddTrackCuts(const AliESDtrackCuts *cuts)
Definition: AliRDHFCuts.h:202
void SetTPC(Bool_t tpc)
Definition: AliAODPidHF.h:94
void SetTriggerClass(TString trclass0, TString trclass1="")
Definition: AliRDHFCuts.h:192
Int_t nptbins