]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/STRANGENESS/LambdaK0/macros/runV0Analysis.C
Added DCA V0 to primary vertex information to MC task for X-check / QA / potential...
[u/mrichter/AliRoot.git] / PWGLF / STRANGENESS / LambdaK0 / macros / runV0Analysis.C
CommitLineData
57a6d361 1runV0Analysis(TString lV0Type = "Lambda", Bool_t doSystematics = kFALSE){
2 //Argument: System analysed - one of "Lambda", "AntiLambda", "K0Short"
3 cout<<"Macro to test V0 analysis module"<<endl;
4
5 cout<<"----------------------------------------------------"<<endl;
6 cout<<" V0 Analysis Macro "<<endl;
7 cout<<"----------------------------------------------------"<<endl;
8 cout<<endl;
9 cout<<"----------------------------------------------------"<<endl;
10 cout<<" ---> Compiling needed class, please wait... "<<endl;
11 //Compile Macro
12 Int_t workedornot = gSystem->CompileMacro("AliV0Module.cxx","-kfo");
13 cout<<"----------------------------------------------------"<<endl;
14 cout<<endl;
15 if( workedornot == 0 ){
16 cout<<"*************************************"<<endl;
17 cout<<" AliV0Module.cxx compilation failed! "<<endl;
18 cout<<"*************************************"<<endl;
19 return;
20 }
21
22 //Load Class
23 gSystem->Load("AliV0Module_cxx.so");
24
25 //Initialize Analysis Object
26 AliV0Module *v0 = new AliV0Module(lV0Type);
27
28 if ( lV0Type == "Lambda" || lV0Type == "AntiLambda" ){
29 //Low-Stat binning
30 Double_t ptbinlimits[] = {0.4,0.6,0.8,1,1.2,1.4,1.6,1.8,2.0,2.3,2.6,2.9,3.4,4.0,5.0};
31 //High-Stat binning
32 //Double_t ptbinlimits[] = {0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2.0,2.2,2.4,2.6,2.8,3.0,3.2,3.4,3.6,3.8,4,4.4,4.9,5.5,6.0,7,8,10};
33 }
34 if ( lV0Type == "K0Short"){
35 //Low-Stat binning
36 //Double_t ptbinlimits[] = {
37 // 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4,
38 // 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.5, 4.0, 5.0 };
39 //High-Stat binning
40 Double_t ptbinlimits[] ={ 0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8, 0.9,1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2.,2.2,2.4,2.6,2.8,3.0,
41 3.3,3.6,3.9,4.2,4.6,5,5.4,5.9, 6.5,7,7.5,8,8.5,9.2,10,11,12,13.5,15};
42 }
43
44 Long_t ptbinnumb = sizeof(ptbinlimits)/sizeof(Double_t) - 1;
45
46 //Set Pt Bins Used in Analysis
47 v0->SetPtBinLimits( ptbinnumb, ptbinlimits );
48
49 //Set Default Cuts - note: Particle dependent
50 v0->SetDefaultCuts();
51
52 //Feeddown treatment switch (applies only to Lambda, AntiLambda)
53 v0->SetFeeddownTreatment ("UseMCRatio");
54
55 //Set CINT1B/INEL Ratio for normalization
56 v0->SetCINT1BoverINEL ( 0.851 );
57
58 //Set Filenames
59 v0->SetRealDataFile ( "MergedAnalysisResults-125085-LHC10d.root" );
60 v0->SetMCDataFile ( "MergedAnalysisResults-125085-LHC10f6a.root" );
61 v0->SetFeedDownDataFile( "MergedAnalysisResults-125085-LHC10f6a.root" );
62
63 if ( lV0Type == "Lambda" ) v0->SetOutputFile( "Results-Lambda-7TeV.root" );
64 if ( lV0Type == "AntiLambda" ) v0->SetOutputFile( "Results-AntiLambda-7TeV.root" );
65 if ( lV0Type == "K0Short" ) v0->SetOutputFile( "Results-K0Short-7TeV.root" );
66
67 //Run the analysis
68 v0->DoAnalysis();
69
70 //Attempt DoubleChargedXi feeddown and see what it looks like
71 if(lV0Type == "Lambda" || lV0Type == "AntiLambda" ){
72 v0->SetFeeddownTreatment("DoubleChargedXi");
73 if ( lV0Type == "Lambda" ) v0->SetOutputFile( "Results-Lambda-7TeV-DoubleChargedXiFD.root" );
74 if ( lV0Type == "AntiLambda" ) v0->SetOutputFile( "Results-AntiLambda-7TeV-DoubleChargedXiFD.root" );
75 v0->DoAnalysis();
76 }
77
78 //Perform Systematics if demanded
79 if ( doSystematics ){
80 //------------------------------------------------------------
81 // Topological Selection Variables Systematics
82 TString lSystFile = "Results-Systematics";
83 if(lV0Type == "Lambda" ) lSystFile.Append("-Lambda-");
84 if(lV0Type == "AntiLambda") lSystFile.Append("-AntiLambda-");
85 if(lV0Type == "K0Short" ) lSystFile.Append("-K0Short-");
86
87 cout<<endl<<"---> Performing Systematics Studies: V0 Decay Radius"<<endl;
88 v0->SetDefaultCuts();
89 v0->SetCutV0Radius(0.300); v0->SetOutputFile( lSystFile + "V0Radius-1.root" ); v0->DoAnalysis();
90 v0->SetCutV0Radius(0.400); v0->SetOutputFile( lSystFile + "V0Radius-2.root" ); v0->DoAnalysis();
91 v0->SetCutV0Radius(0.600); v0->SetOutputFile( lSystFile + "V0Radius-3.root" ); v0->DoAnalysis();
92 v0->SetCutV0Radius(0.700); v0->SetOutputFile( lSystFile + "V0Radius-4.root" ); v0->DoAnalysis();
93
94 cout<<endl<<"---> Performing Systematics Studies: DCA Neg track to PV"<<endl;
95 v0->SetDefaultCuts();
96 v0->SetCutDCANegToPV(0.050); v0->SetOutputFile( lSystFile + "DCANegToPV-1.root" ); v0->DoAnalysis();
97 v0->SetCutDCANegToPV(0.055); v0->SetOutputFile( lSystFile + "DCANegToPV-2.root" ); v0->DoAnalysis();
98 v0->SetCutDCANegToPV(0.070); v0->SetOutputFile( lSystFile + "DCANegToPV-3.root" ); v0->DoAnalysis();
99 v0->SetCutDCANegToPV(0.080); v0->SetOutputFile( lSystFile + "DCANegToPV-4.root" ); v0->DoAnalysis();
100
101 cout<<endl<<"---> Performing Systematics Studies: DCA Pos track to PV"<<endl;
102 v0->SetDefaultCuts();
103 v0->SetCutDCAPosToPV(0.050); v0->SetOutputFile( lSystFile + "DCAPosToPV-1.root" ); v0->DoAnalysis();
104 v0->SetCutDCAPosToPV(0.055); v0->SetOutputFile( lSystFile + "DCAPosToPV-2.root" ); v0->DoAnalysis();
105 v0->SetCutDCAPosToPV(0.070); v0->SetOutputFile( lSystFile + "DCAPosToPV-3.root" ); v0->DoAnalysis();
106 v0->SetCutDCAPosToPV(0.080); v0->SetOutputFile( lSystFile + "DCAPosToPV-4.root" ); v0->DoAnalysis();
107
108 cout<<endl<<"---> Performing Systematics Studies: DCA Pos track to PV"<<endl;
109 v0->SetDefaultCuts();
110 if( lV0Type == "Lambda" || lV0Type == "AntiLambda" ){
111 v0->SetCutV0CosPA(0.993); v0->SetOutputFile( lSystFile + "V0CosPA-1.root" ); v0->DoAnalysis();
112 v0->SetCutV0CosPA(0.994); v0->SetOutputFile( lSystFile + "V0CosPA-2.root" ); v0->DoAnalysis();
113 v0->SetCutV0CosPA(0.996); v0->SetOutputFile( lSystFile + "V0CosPA-3.root" ); v0->DoAnalysis();
114 v0->SetCutV0CosPA(0.997); v0->SetOutputFile( lSystFile + "V0CosPA-4.root" ); v0->DoAnalysis();
115 } else {
116 v0->SetCutV0CosPA(0.95); v0->SetOutputFile( lSystFile + "V0CosPA-1.root" ); v0->DoAnalysis();
117 v0->SetCutV0CosPA(0.96); v0->SetOutputFile( lSystFile + "V0CosPA-2.root" ); v0->DoAnalysis();
118 v0->SetCutV0CosPA(0.98); v0->SetOutputFile( lSystFile + "V0CosPA-3.root" ); v0->DoAnalysis();
119 v0->SetCutV0CosPA(0.99); v0->SetOutputFile( lSystFile + "V0CosPA-4.root" ); v0->DoAnalysis();
120 }
121 cout<<endl<<"---> Performing Systematics Studies: DCA V0 Daughters"<<endl;
122 v0->SetDefaultCuts();
123 v0->SetCutDCAPosToPV(0.050); v0->SetOutputFile( lSystFile + "DCAV0Daughters-1.root" ); v0->DoAnalysis();
124 v0->SetCutDCAPosToPV(0.055); v0->SetOutputFile( lSystFile + "DCAV0Daughters-2.root" ); v0->DoAnalysis();
125 v0->SetCutDCAPosToPV(0.070); v0->SetOutputFile( lSystFile + "DCAV0Daughters-3.root" ); v0->DoAnalysis();
126 v0->SetCutDCAPosToPV(0.080); v0->SetOutputFile( lSystFile + "DCAV0Daughters-4.root" ); v0->DoAnalysis();
127 //End topological selection variables systematics
128 //------------------------------------------------------------
129
130 //other systematics: could be placed here in the future...
131 }
132
133}
134