]>
Commit | Line | Data |
---|---|---|
c84dbedf | 1 | #include <Riostream.h> |
2 | #include <TFile.h> | |
3 | #include "AliHFAssociatedTrackCuts.h" | |
4 | #include <TClonesArray.h> | |
5 | #include <TParameter.h> | |
6 | #include "AliAODPidHF.h" | |
7 | ||
8 | /* $Id$ */ | |
9 | ||
53454b81 | 10 | void makeInputHFCorrelation(TString suffix = ""){ |
c84dbedf | 11 | |
12 | AliHFAssociatedTrackCuts* HFCorrelationCuts=new AliHFAssociatedTrackCuts(); | |
13 | HFCorrelationCuts->SetName("AssociatedCuts"); | |
14 | HFCorrelationCuts->SetTitle("Cuts for associated track"); | |
15 | Float_t eta = 0.9; | |
16 | //______________________________ set ESD track cuts | |
17 | AliESDtrackCuts* esdTrackCuts=new AliESDtrackCuts(); | |
18 | ||
19 | esdTrackCuts->SetRequireSigmaToVertex(kFALSE); | |
20 | esdTrackCuts->SetDCAToVertex2D(kFALSE); | |
21 | ||
22 | esdTrackCuts->SetRequireTPCRefit(kTRUE); | |
23 | esdTrackCuts->SetRequireITSRefit(kTRUE); | |
24 | esdTrackCuts->SetMinNClustersTPC(80); | |
25 | esdTrackCuts->SetMinNClustersITS(2); | |
26 | //esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny); // set requirement on Pixels | |
27 | // default is kBoth, otherwise kAny | |
28 | esdTrackCuts->SetPtRange(0.3,1.e10); | |
29 | esdTrackCuts->SetEtaRange(-eta,eta); | |
30 | HFCorrelationCuts->AddTrackCuts(esdTrackCuts); | |
31 | //______________________________ set Pool for event mixing | |
32 | ||
33 | ||
34 | ||
35 | HFCorrelationCuts->SetMaxNEventsInPool(200); | |
36 | HFCorrelationCuts->SetMinNTracksInPool(1000); | |
37 | HFCorrelationCuts->SetMinEventsToMix(8); | |
38 | ||
39 | HFCorrelationCuts->SetNofPoolBins(5,5); | |
40 | ||
41 | Double_t MBins[]={0,20,40,60,80,500}; | |
42 | Double_t * MultiplicityBins = MBins; | |
43 | ||
44 | Double_t ZBins[]={-10,-5,-2.5,2.5,5,10}; | |
45 | Double_t *ZVrtxBins = ZBins; | |
46 | ||
47 | HFCorrelationCuts->SetPoolBins(ZVrtxBins,MultiplicityBins); | |
48 | ||
53454b81 | 49 | //______________________________ MC event type |
50 | ||
51 | ||
52 | HFCorrelationCuts->SetNofMCEventTypes(2); | |
53 | Int_t MCEvType[]={53,68}; | |
54 | Int_t *MCEvTypeArray = MCEvType; | |
55 | HFCorrelationCuts->SetMCEventTypes(MCEvTypeArray); | |
c84dbedf | 56 | |
57 | //______________________________ set kinematics cuts for AOD track | |
58 | const int nofcuts = 4; | |
59 | Float_t* trackcutsarray; | |
60 | trackcutsarray=new Float_t[nofcuts]; | |
61 | trackcutsarray[0] = 0.3;//track min pt | |
62 | trackcutsarray[1] = 100.;//track max pt | |
63 | trackcutsarray[2] = -1000000000.;//track min impact parameter | |
64 | trackcutsarray[3] = 100.;//track max impact parameter | |
65 | HFCorrelationCuts->SetNVarsTrack(nofcuts); | |
66 | HFCorrelationCuts->SetAODTrackCuts(trackcutsarray); | |
67 | ||
68 | HFCorrelationCuts->SetCharge(0); // -1/+1 to look for opposite/same charge, 0 no charge selection | |
69 | HFCorrelationCuts->SetFilterBit(0); // set 0 for analysis with AOD from 2010 | |
70 | ||
71 | ||
72 | //______________________________ set kinematics cuts for AOD v0 | |
73 | const int nofcuts2 = 7; | |
74 | ||
75 | Float_t* vzerocutsarray; | |
76 | vzerocutsarray=new Float_t[nofcuts2]; | |
77 | vzerocutsarray[0] = 0.2; // max dca between two daugters (cm) | |
78 | vzerocutsarray[1] = 2; // max chi square | |
79 | vzerocutsarray[2] = 2.; // min decay length (cm) | |
80 | vzerocutsarray[3] = 15; // max decay length (cm) | |
81 | vzerocutsarray[4] = 0.2; // min opening angle between two daugters | |
82 | vzerocutsarray[5] = 0; // min pt of k0 (GeV/c) | |
83 | vzerocutsarray[6] = 0.9; // set eta acceptance | |
84 | ||
85 | HFCorrelationCuts->SetNVarsVzero(nofcuts2); | |
86 | HFCorrelationCuts->SetAODvZeroCuts(vzerocutsarray); | |
87 | ||
88 | //______________________________ set PID | |
89 | ||
90 | Int_t mode =1; | |
91 | AliAODPidHF* pidObj=new AliAODPidHF(); | |
92 | pidObj->SetMatch(mode); | |
93 | pidObj->SetSigma(0,2); // TPC | |
94 | pidObj->SetSigma(3,3); // TOF | |
95 | pidObj->SetTPC(kTRUE); | |
96 | pidObj->SetTOF(kTRUE); | |
97 | pidObj->SetCompat(kTRUE); | |
98 | ||
99 | HFCorrelationCuts->SetPidHF(pidObj); | |
100 | ||
53454b81 | 101 | //______________________________ Add additional info |
102 | ||
103 | TString description = "Cuts for hadron selection - low pt selection cut"; | |
104 | ||
105 | HFCorrelationCuts->AddDescription(description); | |
c84dbedf | 106 | //______________________________ save to *.root file |
107 | HFCorrelationCuts->PrintAll(); | |
108 | ||
53454b81 | 109 | TString outputfilename = "AssocPartCuts"; |
110 | outputfilename += suffix; | |
111 | outputfilename += ".root"; | |
112 | ||
113 | TString pathOutputFile = "~/CorrelationAnalysis/CutObjects/AssocTracks/"; | |
114 | ||
115 | outputfilename.Prepend(pathOutputFile.Data()); | |
116 | ||
117 | ||
118 | TFile* fout=new TFile(outputfilename.Data(),"recreate"); //set this!! | |
c84dbedf | 119 | fout->cd(); |
120 | HFCorrelationCuts->Write(); | |
121 | fout->Close(); | |
53454b81 | 122 | cout << "***************************************** " << endl; |
123 | cout << "File " << outputfilename << " created " << endl; | |
124 | cout << "***************************************** " << endl; | |
c84dbedf | 125 | |
126 | } |