]>
Commit | Line | Data |
---|---|---|
573a7917 | 1 | AliProtonAnalysisBase *GetProtonAnalysisBaseObject(const char* analysisLevel = "ESD",\r |
790140ac | 2 | Bool_t kAnalyzeMC = kTRUE,\r |
573a7917 | 3 | const char* esdAnalysisType = "Hybrid",\r |
4de4661f | 4 | const char* pidMode = "Bayesian",\r |
1fd2c71b | 5 | Bool_t kUseOnlineTrigger = kFALSE,\r |
6 | Bool_t kUseOfflineTrigger = kFALSE) {\r | |
573a7917 | 7 | //Function to setup the AliProtonAnalysisBase object and return it\r |
8 | AliProtonAnalysisBase *baseAnalysis = new AliProtonAnalysisBase();\r | |
9 | //baseAnalysis->SetDebugMode();\r | |
10 | baseAnalysis->SetAnalysisLevel(analysisLevel);\r | |
790140ac | 11 | if(analysisLevel == "ESD") {\r |
12 | if(kAnalyzeMC)\r | |
13 | baseAnalysis->SetTriggerMode(AliProtonAnalysisBase::kMB2);\r | |
4de4661f | 14 | //use the offline trigger\r |
15 | if(kUseOnlineTrigger) baseAnalysis->UseOnlineTrigger();\r | |
16 | \r | |
f203beb9 | 17 | //use the offline trigger\r |
1fd2c71b | 18 | if(kUseOfflineTrigger) baseAnalysis->OfflineTriggerInit();\r |
df201289 | 19 | \r |
20 | baseAnalysis->SetMinTPCClusters(80);\r | |
e56f08ed | 21 | baseAnalysis->SetMaxChi2PerTPCCluster(3.5);\r |
71a67ee1 | 22 | /*baseAnalysis->SetMaxCov11(2.0);\r |
e56f08ed | 23 | baseAnalysis->SetMaxCov22(2.0);\r |
24 | baseAnalysis->SetMaxCov33(0.5);\r | |
25 | baseAnalysis->SetMaxCov44(0.5);\r | |
71a67ee1 | 26 | baseAnalysis->SetMaxCov55(2.0);*/\r |
573a7917 | 27 | baseAnalysis->SetMinTPCdEdxPoints(80);\r |
28 | switch(esdAnalysisType) {\r | |
29 | case "TPC":\r | |
30 | baseAnalysis->SetAnalysisMode(AliProtonAnalysisBase::kTPC);\r | |
31 | baseAnalysis->SetPhaseSpace(10, -0.5, 0.5, 16, 0.5, 0.9);\r | |
32 | baseAnalysis->SetTPCpid();\r | |
33 | baseAnalysis->SetMaxSigmaToVertexTPC(2.0);\r | |
34 | //baseAnalysis->SetMaxDCAXYTPC(1.5);\r | |
35 | //baseAnalysis->SetMaxDCAZTPC(1.5);\r | |
36 | break;\r | |
37 | case "Hybrid":\r | |
38 | baseAnalysis->SetAnalysisMode(AliProtonAnalysisBase::kHybrid);\r | |
71a67ee1 | 39 | baseAnalysis->SetPhaseSpace(9, -0.9, 0.9, 6, 0.45, 1.05);\r |
d7fff4c6 | 40 | //baseAnalysis->SetPhaseSpace(18, -0.9, 0.9, 32, 0.5, 1.3);\r |
573a7917 | 41 | baseAnalysis->SetTPCpid();\r |
71a67ee1 | 42 | //baseAnalysis->SetMaxSigmaToVertex(3.0);\r |
43 | //baseAnalysis->SetMaxDCAXY(0.5);\r | |
44 | //baseAnalysis->SetMaxDCAZ(0.7);\r | |
45 | baseAnalysis->SetMaxDCA3D(2.0);\r | |
e56f08ed | 46 | //baseAnalysis->SetPointOnITSLayer6();\r |
47 | //baseAnalysis->SetPointOnITSLayer5();\r | |
47e7cd57 | 48 | //baseAnalysis->SetPointOnITSLayer4();\r |
49 | //baseAnalysis->SetPointOnITSLayer3();\r | |
e56f08ed | 50 | //baseAnalysis->SetPointOnITSLayer2();\r |
51 | //baseAnalysis->SetPointOnITSLayer1();\r | |
4787e0ca | 52 | baseAnalysis->SetPointOnSPDLayers();\r |
e56f08ed | 53 | baseAnalysis->SetMinITSClusters(2);\r |
573a7917 | 54 | break;\r |
afc2ac17 | 55 | case "FullHybrid":\r |
56 | baseAnalysis->SetAnalysisMode(AliProtonAnalysisBase::kFullHybrid);\r | |
57 | baseAnalysis->SetPhaseSpace(9, -0.9, 0.9, 6, 0.45, 1.05);\r | |
58 | //baseAnalysis->SetPhaseSpace(18, -0.9, 0.9, 32, 0.5, 1.3);\r | |
59 | baseAnalysis->SetTPCpid();\r | |
60 | //baseAnalysis->SetMaxSigmaToVertex(3.0);\r | |
61 | //baseAnalysis->SetMaxDCAXY(0.2);\r | |
62 | //baseAnalysis->SetMaxDCAZ(0.7);\r | |
63 | baseAnalysis->SetMaxDCA3D(0.2);\r | |
64 | //baseAnalysis->SetPointOnITSLayer6();\r | |
65 | //baseAnalysis->SetPointOnITSLayer5();\r | |
66 | //baseAnalysis->SetPointOnITSLayer4();\r | |
67 | //baseAnalysis->SetPointOnITSLayer3();\r | |
68 | //baseAnalysis->SetPointOnITSLayer2();\r | |
69 | //baseAnalysis->SetPointOnITSLayer1();\r | |
70 | baseAnalysis->SetPointOnSPDLayers();\r | |
71 | baseAnalysis->SetMinITSClusters(2);\r | |
72 | break;\r | |
573a7917 | 73 | case "Global":\r |
74 | baseAnalysis->SetAnalysisMode(AliProtonAnalysisBase::kGlobal);\r | |
75 | baseAnalysis->SetPhaseSpace(20, -1.0, 1.0, 48, 0.3, 1.5);\r | |
76 | baseAnalysis->SetMaxSigmaToVertex(2.0);\r | |
77 | //baseAnalysis->SetMaxDCAXY(2.0);\r | |
78 | //baseAnalysis->SetMaxDCAZ(2.0);\r | |
79 | baseAnalysis->SetTPCRefit();\r | |
80 | baseAnalysis->SetPointOnITSLayer1();\r | |
81 | baseAnalysis->SetPointOnITSLayer2();\r | |
82 | //baseAnalysis->SetPointOnITSLayer3();\r | |
83 | //baseAnalysis->SetPointOnITSLayer4();\r | |
84 | baseAnalysis->SetPointOnITSLayer5();\r | |
85 | baseAnalysis->SetPointOnITSLayer6();\r | |
86 | baseAnalysis->SetMinITSClusters(5);\r | |
87 | baseAnalysis->SetITSRefit();\r | |
88 | baseAnalysis->SetESDpid();\r | |
89 | baseAnalysis->SetTOFpid();\r | |
90 | break;\r | |
91 | default:\r | |
92 | break;\r | |
93 | }\r | |
4de4661f | 94 | baseAnalysis->SetAcceptedVertexDiamond(1.,1.,10.);\r |
b8cca027 | 95 | baseAnalysis->SetMinNumOfContributors(0);\r |
96 | //baseAnalysis->SetEtaMode();\r | |
573a7917 | 97 | switch(pidMode) {\r |
98 | case "Bayesian":\r | |
99 | baseAnalysis->SetPIDMode(AliProtonAnalysisBase::kBayesian);\r | |
100 | //Momentum dependent priors\r | |
101 | /*TFile *f = TFile::Open("$ALICE_ROOT/PWG2/data/PriorProbabilities.root ");\r | |
102 | TF1 *fitElectrons = (TF1 *)f->Get("fitElectrons");\r | |
103 | TF1 *fitMuons = (TF1 *)f->Get("fitMuons");\r | |
104 | TF1 *fitPions = (TF1 *)f->Get("fitPions");\r | |
105 | TF1 *fitKaons = (TF1 *)f->Get("fitKaons");\r | |
106 | TF1 *fitProtons = (TF1 *)f->Get("fitProtons");\r | |
107 | baseAnalysis->SetPriorProbabilityFunctions(fitElectrons,\r | |
108 | fitMuons,\r | |
109 | fitPions,\r | |
110 | fitKaons,\r | |
111 | fitProtons);*/\r | |
112 | //Fixed prior probabilities\r | |
113 | Double_t partFrac[5] = {0.01, 0.01, 0.85, 0.10, 0.05};\r | |
114 | if(!baseAnalysis->IsPriorProbabilityFunctionUsed())\r | |
115 | baseAnalysis->SetPriorProbabilities(partFrac);\r | |
116 | break;\r | |
117 | case "Ratio":\r | |
118 | baseAnalysis->SetPIDMode(AliProtonAnalysisBase::kRatio);\r | |
c6909683 | 119 | baseAnalysis->SetRatio(-0.2);\r |
573a7917 | 120 | break;\r |
c6909683 | 121 | case "Sigma":\r |
573a7917 | 122 | baseAnalysis->SetPIDMode(AliProtonAnalysisBase::kSigma1);\r |
e56f08ed | 123 | baseAnalysis->SetNSigma(4);\r |
573a7917 | 124 | break;\r |
125 | default:\r | |
126 | break;\r | |
127 | }//PID mode\r | |
128 | }//ESD\r | |
129 | if(analysisLevel == "MC") \r | |
130 | baseAnalysis->SetPhaseSpace(10, -0.5, 0.5, 16, 0.5, 0.9);\r | |
1126df18 | 131 | if(analysisLevel == "AOD")\r |
a73b5c46 | 132 | baseAnalysis->SetPhaseSpace(10, -0.5, 0.5, 16, 0.5, 0.9);\r |
573a7917 | 133 | \r |
134 | return baseAnalysis;\r | |
d7fff4c6 | 135 | }\r |