AliPhysics  aaf9c62 (aaf9c62)
makeTFile4CutsXicPlus2XiPiPi.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  RDHFXicPlus->SetName("XicPlusAnalysisCuts");
15  RDHFXicPlus->SetTitle("Analysis cuts for Xic analysis");
16  RDHFXicPlus->SetUsePhysicsSelection(kTRUE);
17  RDHFXicPlus->SetTriggerClass("");
18  RDHFXicPlus->SetUseInt7TriggerPP2012();
19  //RDHFXicPlus->ResetMaskAndEnableMBTrigger();
20  //RDHFXicPlus->EnableCentralTrigger();
21  //RDHFXicPlus->EnableSemiCentralTrigger();
22 
23  const Int_t nptbins=7;
24  RDHFXicPlus->SetNPtBins(nptbins);
25 
26  Float_t* ptbins;
27  ptbins=new Float_t[nptbins+1];
28  ptbins[0]= 0.;
29  ptbins[1]= 4.;
30  ptbins[2]= 5.;
31  ptbins[3]= 6.;
32  ptbins[4]= 7.;
33  ptbins[5]= 8.;
34  ptbins[6]=12.;
35  ptbins[7]=100.;
36  RDHFXicPlus->SetPtBins(nptbins+1,ptbins);
37 
38  const Int_t nvars=13;
39 
40  Float_t** anacutsarray;
41  anacutsarray=new Float_t*[nvars];
42  for(Int_t ic=0;ic<nvars;ic++)
43  {
44  anacutsarray[ic]=new Float_t[nptbins];
45  }
46 
47  for(Int_t ipt2=0;ipt2<nptbins;ipt2++)
48  {
49  anacutsarray[ 0][ipt2]=0.25; // Tolerance Invariant mass of Xic
50  anacutsarray[ 1][ipt2]=3.00; // Min pT of Xic
51  anacutsarray[ 2][ipt2]=0.008; // Tolerance Mass of Xi
52  anacutsarray[ 3][ipt2]=0.010; // Tolerance Mass of Lambda
53  anacutsarray[ 4][ipt2]=0.2; // Max Dca between pi-pi
54  anacutsarray[ 5][ipt2]=2.0; //Max Dca between pi-casc
55  anacutsarray[ 6][ipt2]=0.15; // Max d0 of pion
56  anacutsarray[ 7][ipt2]=99999.; // Max d0 of Xi
57  anacutsarray[ 8][ipt2]=0.00; // Min d0 of Xi bachelor
58  anacutsarray[ 9][ipt2]=0.00; // Min d0 of Xi Lambda
59  anacutsarray[10][ipt2]=0.8; // Min Xic Pointing angle
60  anacutsarray[11][ipt2]=0.00; // Min Xic Decay Length XY
61  anacutsarray[12][ipt2]=0.30; // Min pT Bachelor
62  }
63 
64  RDHFXicPlus->SetCuts(nvars,nptbins,anacutsarray);
65 
66  RDHFXicPlus->SetUsePID(kTRUE);//Even if it is true, the cut is not applied in ntuple mode. Thi is just to store PID variables in ntuple. The cut is applied for histogram mode only.
68  AliAODPidHF* pidObj=new AliAODPidHF();
69  Double_t sigmaspi[5]={3.,0.,0.,0.,0.};
70  pidObj->SetSigma(sigmaspi);
71  pidObj->SetTPC(kTRUE);
72  RDHFXicPlus->SetPidHF(pidObj);
73  RDHFXicPlus->GetPidHF()->SetUseCombined(kFALSE);
74  RDHFXicPlus->GetPidHF()->SetUseDefaultPriors(kTRUE);
76  RDHFXicPlus->SetCombinedPIDThreshold(0.02);
77 
78  RDHFXicPlus->SetMaxVtxZ(10.);
79 
80  //The following cuts are used before object creation
81  RDHFXicPlus->SetProdTrackPtMin(1.0);
82  RDHFXicPlus->SetProdTrackEtaRange(0.8);
83  RDHFXicPlus->SetProdUseAODFilterBit(kTRUE);
84  RDHFXicPlus->SetProdMassTolLambda(0.008);
85  RDHFXicPlus->SetProdMassTolXi(0.012);
86  RDHFXicPlus->SetProdMassRejOmega(0.000);
87  RDHFXicPlus->SetProdRfidMinV0(0.6);
88  RDHFXicPlus->SetProdRfidMaxV0(9000.);
89  RDHFXicPlus->SetProdRfidMinXi(1.2);
90  RDHFXicPlus->SetProdRfidMaxXi(9000.);
91  RDHFXicPlus->SetProdCascProperDecayLengthMax(4.9*3.);
92  RDHFXicPlus->SetProdDcaXiDaughtersMax(1.3);
93  RDHFXicPlus->SetProdDcaV0DaughtersMax(1.5);
94  RDHFXicPlus->SetProdDcaBachToPrimVertexMin(0.04);
95  RDHFXicPlus->SetProdDcaV0ToPrimVertexMin(0.06);
96  RDHFXicPlus->SetProdDcaV0PrToPrimVertexMin(0.03);
97  RDHFXicPlus->SetProdDcaV0PiToPrimVertexMin(0.04);
98  RDHFXicPlus->SetProdXiCosineOfPoiningAngleMin(0.97);
99  RDHFXicPlus->SetProdV0CosineOfPoiningAngleXiMin(0.97);
100  RDHFXicPlus->SetProdCascNTPCClustersMin(70.);
101  RDHFXicPlus->SetProdLikeSignDcaMax(0.5);
102  RDHFXicPlus->SetProdRoughMassTol(0.25);
103  RDHFXicPlus->SetProdRoughPtMin(3.0);
104 
105  RDHFXicPlus->SetUseCascadePID(kTRUE);
106  AliAODPidHF* pidObjcascpi=new AliAODPidHF();
107  Double_t sigmascascpi[5]={4.,0.,0.,0.,0.};
108  pidObjcascpi->SetSigma(sigmascascpi);
109  pidObjcascpi->SetTPC(kTRUE);
110  RDHFXicPlus->SetPidCascPi(pidObjcascpi);
111 
112  AliAODPidHF* pidObjcascpr=new AliAODPidHF();
113  Double_t sigmascascpr[5]={4.,0.,0.,0.,0.};
114  pidObjcascpr->SetSigma(sigmascascpr);
115  pidObjcascpr->SetTPC(kTRUE);
116  RDHFXicPlus->SetPidCascPr(pidObjcascpr);
117 
118  cout<<"This is the (anal) object I'm going to save:"<<endl;
119  RDHFXicPlus->PrintAll();
120  TFile* fout=new TFile("XicPlusCuts.root","RECREATE");
121  fout->cd();
122  RDHFXicPlus->Write();
123  fout->Close();
124  delete fout;
125 
126 }
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 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 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)
float Float_t
Definition: External.C:68
void SetUseInt7TriggerPP2012()
Definition: AliRDHFCuts.h:128
void SetSigma(Double_t *sigma)
Definition: AliAODPidHF.h:39
void SetUsePID(Bool_t flag=kTRUE)
Definition: AliRDHFCuts.h:209
virtual void PrintAll() const
void SetPtBins(Int_t nPtBinLimits, Float_t *ptBinLimits)
void SetTPC(Bool_t tpc)
Definition: AliAODPidHF.h:94
void makeInputAliAnalysisTaskSEXicPlus2XiPiPi()
TFile * fout
input train file
void SetTriggerClass(TString trclass0, TString trclass1="")
Definition: AliRDHFCuts.h:197
Int_t nptbins