AliRoot Core  v5-06-30 (35d6c57)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CalibClParamNew.C
Go to the documentation of this file.
1 
58 
59  gSystem->Load("libANALYSIS");
60  gSystem->Load("libSTAT");
61  gSystem->Load("libTPCcalib");
62 
63  //e.g
64  gSystem->AddIncludePath("-I$ALICE_ROOT/TPC/macros");
65  gROOT->LoadMacro("$ALICE_ROOT/TPC/macros/AliXRDPROOFtoolkit.cxx+");
66  AliXRDPROOFtoolkit tool;
67  TChain * chainCosmic = tool.MakeChain("cosmic.txt","Track0",0,1000000);
68  chainCosmic->Lookup();
69 
70 
71 
72  TCut cutT("cutT","abs(Tr1.fP[3]+Tr0.fP[3])<0.01"); // OK
73  TCut cutD("cutD","abs(Tr0.fP[0]+Tr1.fP[0])<2"); // OK
74  TCut cutP1("cutP1","abs(Tr0.fP[1]-Tr1.fP[1])<3"); // OK
75  TCut cutPt("cutPt","abs(Tr1.fP[4]+Tr0.fP[4])<0.1&&abs(Tr0.fP[4])+abs(Tr1.fP[4])<10");
76  TCut cutN("cutN","min(Orig0.fTPCncls,Orig1.fTPCncls)>100");
77  TCut cutA=cutT+cutD+cutPt+cutN+cutP1;
78 
79  TCut cutS("cutS","Orig0.fIp.fP[1]*Orig1.fIp.fP[1]>0");
80 
81  if (gProof) chainCosmic->SetProof(kTRUE);
82  //
83  //
84  //
85  //
86 
87  //
88  // Q normalization - short - medium - long
89  //
90 
91  TVectorD paramT(3);
92  TVectorD paramM(3);
93  TH1 * hisRatio =0;
94 
95  chainCosmic->Draw("Seed0.CookdEdxNorm(0.01,0.65,0,0,64,0,kFALSE)/Seed0.CookdEdxNorm(0.01,0.65,0,0,159,0,kFALSE)>>hisRatio(100,0.5,1.5)","min(Orig0.fTPCncls,Orig1.fTPCncls)>130","");
96  hisRatio = (TH1*)gROOT->FindObject("hisRatio");
97  hisRatio->Fit("gaus");
98  paramT[0]=hisRatio->GetFunction("gaus")->GetParameter(1);
99  //
100  chainCosmic->Draw("Seed0.CookdEdxNorm(0.01,0.65,0,64,127,0,kFALSE)/Seed0.CookdEdxNorm(0.01,0.65,0,0,159,0,kFALSE)>>hisRatio(100,0.5,1.5)","min(Orig0.fTPCncls,Orig1.fTPCncls)>130","");
101  hisRatio = (TH1*)gROOT->FindObject("hisRatio");
102  hisRatio->Fit("gaus");
103  paramT[1]=hisRatio->GetFunction("gaus")->GetParameter(1);
104  //
105  chainCosmic->Draw("Seed0.CookdEdxNorm(0.01,0.65,0,127,159,0,kFALSE)/Seed0.CookdEdxNorm(0.01,0.65,0,0,159,0,kFALSE)>>hisRatio(100,0.5,1.5)","min(Orig0.fTPCncls,Orig1.fTPCncls)>130","");
106  hisRatio = (TH1*)gROOT->FindObject("hisRatio");
107  hisRatio->Fit("gaus");
108  paramT[2]=hisRatio->GetFunction("gaus")->GetParameter(1);
109  //
110  chainCosmic->Draw("Seed0.CookdEdxNorm(0.01,0.65,1,0,64,0,kFALSE)/Seed0.CookdEdxNorm(0.01,0.65,1,0,159,0,kFALSE)>>hisRatio(100,0.5,1.5)","min(Orig0.fTPCncls,Orig1.fTPCncls)>130","");
111  hisRatio = (TH1*)gROOT->FindObject("hisRatio");
112  hisRatio->Fit("gaus");
113  paramM[0]=hisRatio->GetFunction("gaus")->GetParameter(1);
114  //
115  chainCosmic->Draw("Seed0.CookdEdxNorm(0.01,0.65,1,64,127,0,kFALSE)/Seed0.CookdEdxNorm(0.01,0.65,1,0,159,0,kFALSE)>>hisRatio(100,0.5,1.5)","min(Orig0.fTPCncls,Orig1.fTPCncls)>130","");
116  hisRatio = (TH1*)gROOT->FindObject("hisRatio");
117  hisRatio->Fit("gaus");
118  paramM[1]=hisRatio->GetFunction("gaus")->GetParameter(1);
119  //
120  chainCosmic->Draw("Seed0.CookdEdxNorm(0.01,0.65,1,127,159,0,kFALSE)/Seed0.CookdEdxNorm(0.01,0.65,1,0,159,0,kFALSE)>>hisRatio(100,0.5,1.5)","min(Orig0.fTPCncls,Orig1.fTPCncls)>130","");
121  hisRatio = (TH1*)gROOT->FindObject("hisRatio");
122  hisRatio->Fit("gaus");
123  paramM[2]=hisRatio->GetFunction("gaus")->GetParameter(1);
124  //
125 
126 
127 
128 
129 
130  paramCl->fQpadTnorm=(TVectorD*)paramT->Clone();
131  paramCl->fQpadMnorm=(TVectorD*)paramM->Clone();
132 
133 
134  //check
135 
136 
137 }
138 
139 
140 
141 
142 
143 
void TestChainCosmicDedx()
TCut cutN
TOOLKIT for chain manipulation:
TCut cutS
TCut cutD
Definition: MakeGlobalFit.C:76
TROOT * gROOT
TChain * chainCosmic
TVectorD * fQpadMnorm
q pad normalization - Max charge
TVectorD * fQpadTnorm
q pad normalization - Total charge
TCut cutA
AliTPCClusterParam * paramCl
Definition: CalibPID.C:68
static TChain * MakeChain(const char *fileIn, const char *treeName, const char *fName=0, Int_t maxFiles=-1, Int_t startFile=0)