The present commit corresponds to an important change in the way the
[u/mrichter/AliRoot.git] / TPC / AliTPCcalibTime.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16 /*
17     Comments to be written here:
18     1. What do we calibrate.
19
20 Time dependence of gain and drift velocity in order to account for changes in: temperature, pressure, gas composition.
21
22   AliTPCcalibTime *calibTime = new AliTPCcalibTime("cosmicTime","cosmicTime",0, 1213.9e+06, 1213.96e+06, 0.04e+04, 0.04e+04);
23
24
25     2. How to interpret results
26     3. Simple example
27
28 a.) determine the required time range:
29
30 AliXRDPROOFtoolkit tool;
31 TChain * chain = tool.MakeChain("pass2.txt","esdTree",0,6000);
32 chain->Draw("GetTimeStamp()")
33
34 b) analyse calibration object on Proof in calibration train 
35
36 AliTPCcalibTime *calibTime = new AliTPCcalibTime("cosmicTime","cosmicTime", StartTimeStamp, EndTimeStamp, IntegrationTimeVdrift, IntegrationTimeDeDx);
37 s
38 c) plot results
39
40 TFile f("CalibObjects.root");
41 AliTPCcalibTime *cal = (AliTPCcalibTime *)f->Get("TPCCalib")->FindObject("cosmicTime");
42 cal->GetHistVdrift()->Projection(1,0)->Draw()
43
44     4. Analysis using debug streamers.    
45
46     gSystem->AddIncludePath("-I$ALICE_ROOT/TPC/macros");
47     gROOT->LoadMacro("$ALICE_ROOT/TPC/macros/AliXRDPROOFtoolkit.cxx+")
48     AliXRDPROOFtoolkit tool;
49     TChain * chainTime = tool.MakeChain("time.txt","timeInfo",0,10200);
50     chainTime->Lookup();
51
52
53 */
54
55
56 #include "Riostream.h"
57 #include "TChain.h"
58 #include "TTree.h"
59 #include "TH1F.h"
60 #include "TH2F.h"
61 #include "TH3F.h"
62 #include "THnSparse.h"
63 #include "TList.h"
64 #include "TMath.h"
65 #include "TCanvas.h"
66 #include "TFile.h"
67 #include "TF1.h"
68 #include "TVectorD.h"
69 #include "TProfile.h"
70 #include "TGraphErrors.h"
71 #include "TCanvas.h"
72
73 #include "AliTPCclusterMI.h"
74 #include "AliTPCseed.h"
75 #include "AliESDVertex.h"
76 #include "AliESDEvent.h"
77 #include "AliESDfriend.h"
78 #include "AliESDInputHandler.h"
79 #include "AliAnalysisManager.h"
80
81 #include "AliTracker.h"
82 #include "AliMagF.h"
83 #include "AliTPCCalROC.h"
84
85 #include "AliLog.h"
86
87 #include "AliTPCcalibTime.h"
88
89 #include "TTreeStream.h"
90 #include "AliTPCTracklet.h"
91 #include "TTimeStamp.h"
92 #include "AliTPCcalibDB.h"
93 #include "AliTPCcalibLaser.h"
94 #include "AliDCSSensorArray.h"
95 #include "AliDCSSensor.h"
96
97 ClassImp(AliTPCcalibTime)
98
99
100 AliTPCcalibTime::AliTPCcalibTime() 
101   :AliTPCcalibBase(), 
102    fTriggerMask(0),
103    fHistDeDxTgl(0),
104    fHistDeDx(0),
105    fHistVdrift(0),
106    fIntegrationTimeDeDx(0),
107    fIntegrationTimeVdrift(0),  
108    fLaser(0),       // pointer to laser calibration
109    fDz(0),          // current delta z
110    fdEdx(0),        // current dEdx
111    fdEdxRatio(0),   // current dEdx ratio
112    fTl(0),          // current tan(lambda)
113    fCutMaxD(5),        // maximal distance in rfi ditection
114    fCutMaxDz(20),        // maximal distance in rfi ditection
115    fCutTheta(0.03),    // maximal distan theta
116    fCutMinDir(-0.99)   // direction vector products
117
118 {  
119   AliInfo("Default Constructor");  
120 }
121
122
123 AliTPCcalibTime::AliTPCcalibTime(const Text_t *name, const Text_t *title, ULong64_t TriggerMask, UInt_t StartTime, UInt_t EndTime, Int_t deltaIntegrationTimeDeDx, Int_t deltaIntegrationTimeVdrift)
124   :AliTPCcalibBase(),
125    fTriggerMask(0),
126    fHistDeDxTgl(0),
127    fHistDeDx(0),
128    fHistVdrift(0),
129    fIntegrationTimeDeDx(0),
130    fIntegrationTimeVdrift(0),  
131    fLaser(0),       // pointer to laser calibration
132    fDz(0),          // current delta z
133    fdEdx(0),        // current dEdx
134    fdEdxRatio(0),   // current dEdx ratio
135    fTl(0),          // current tan(lambda)
136    fCutMaxD(5),        // maximal distance in rfi ditection
137    fCutMaxDz(20),        // maximal distance in rfi ditection
138    fCutTheta(0.03),    // maximal distan theta
139    fCutMinDir(-0.99)   // direction vector products
140 {
141   
142   SetName(name);
143   SetTitle(title);
144
145   AliInfo("Non Default Constructor");
146
147   fTriggerMask = TriggerMask;
148
149   fIntegrationTimeDeDx = deltaIntegrationTimeDeDx;
150   fIntegrationTimeVdrift = deltaIntegrationTimeVdrift;
151
152   Double_t deltaTime = EndTime - StartTime;
153   
154   Int_t binsVdrift[2] = {TMath::Nint(deltaTime/deltaIntegrationTimeVdrift), 100};
155   Double_t xminVdrift[2] = {StartTime, -20};
156   Double_t xmaxVdrift[2] = {EndTime, 20};
157   fHistVdrift = new THnSparseF("HistVdrift","vDrift; time;#Delta z",2,binsVdrift,xminVdrift,xmaxVdrift);
158
159   Int_t binsDeDxTgl[3] = {TMath::Nint(deltaTime/deltaIntegrationTimeDeDx),30,100};
160   Double_t xminDeDxTgl[3] = {StartTime,-1,0.7};
161   Double_t xmaxDeDxTgl[3] = {EndTime,1,1.3};
162   fHistDeDxTgl = new THnSparseF("HistDeDxTgl","dEdx vs tgl;time;tgl;dEdxUp/dEdxLow",3,binsDeDxTgl,xminDeDxTgl,xmaxDeDxTgl); 
163
164   Int_t binsDeDx[2] = {TMath::Nint(deltaTime/deltaIntegrationTimeDeDx),100};
165   Double_t xminDeDx[2] = {StartTime,1};
166   Double_t xmaxDeDx[2] = {EndTime,100};
167   fHistDeDx = new THnSparseF("HistDeDx","dEdx l;time;dEdx",2,binsDeDx,xminDeDx,xmaxDeDx);
168
169 }
170
171
172
173 AliTPCcalibTime::~AliTPCcalibTime(){
174   //
175   //
176   //
177 }
178 void AliTPCcalibTime::ResetCurrent(){
179   //
180   // reset current values
181   //
182   fDz=0;          // current delta z
183   fdEdx=0;        // current dEdx
184   fdEdxRatio=0;   // current dEdx ratio
185   fTl=0;          // current tan(lambda)
186
187 }
188
189
190 void AliTPCcalibTime::Process(AliESDEvent *event) {
191   //
192   //
193   //
194   Int_t ntracks=event->GetNumberOfTracks();
195   if (ntracks<2) return;
196   ResetCurrent();
197   //
198   ProcessCosmic(event);
199   if (fTrigger==16){
200     if (!fLaser) fLaser =  new AliTPCcalibLaser("laserTPC","laserTPC",kFALSE);
201     fLaser->Process(event);
202   }
203   //  
204   // fill debug streamer
205   if (fStreamLevel>0 && fDz!=0){
206     TTreeSRedirector *cstream = GetDebugStreamer();
207     if (cstream){
208       TTimeStamp tstamp(fTime);
209       Float_t valuePressure0  = AliTPCcalibDB::GetPressure(tstamp,fRun,0);
210       Float_t valuePressure1 = AliTPCcalibDB::GetPressure(tstamp,fRun,1);
211       Double_t ptrelative0   = AliTPCcalibDB::GetPTRelative(tstamp,fRun,0);
212       Double_t ptrelative1   = AliTPCcalibDB::GetPTRelative(tstamp,fRun,1);
213       Double_t temp0         = AliTPCcalibDB::GetTemperature(tstamp,fRun,0);
214       Double_t temp1         = AliTPCcalibDB::GetTemperature(tstamp,fRun,1);
215       TVectorD vecGoofie(20);
216       AliDCSSensorArray* goofieArray = AliTPCcalibDB::Instance()->GetGoofieSensors(fRun);
217       if (goofieArray) 
218         for (Int_t isensor=0; isensor<goofieArray->NumSensors();isensor++){
219           AliDCSSensor *gsensor = goofieArray->GetSensor(isensor);
220           if (gsensor) vecGoofie[isensor]=gsensor->GetValue(tstamp);
221         }
222
223       TVectorD vdriftA, vdriftC,vdriftAC;
224       if (fLaser && fTrigger==16) {
225         if (fLaser->fFitAside)  vdriftA=*(fLaser->fFitAside);
226         if (fLaser->fFitCside)  vdriftC=*(fLaser->fFitCside);
227         if (fLaser->fFitACside) vdriftAC=*(fLaser->fFitACside);
228       }
229       (*cstream)<<"timeInfo"<<
230         "run="<<fRun<<              //  run number
231         "event="<<fEvent<<          //  event number
232         "time="<<fTime<<            //  time stamp of event
233         "trigger="<<fTrigger<<      //  trigger
234         "mag="<<fMagF<<             //  magnetic field
235         // Environment values
236         "press0="<<valuePressure0<<
237         "press1="<<valuePressure1<<
238         "pt0="<<ptrelative0<<
239         "pt1="<<ptrelative1<<
240         "temp0="<<temp0<<
241         "temp1="<<temp1<<
242         "vecGoofie.=<<"<<&vecGoofie<<
243         //
244         // accumulated values
245         //
246         "fDz="<<fDz<<          //! current delta z
247         "fdEdx="<<fdEdx<<        //! current dEdx
248         "fdEdxRatio="<<fdEdxRatio<<   //! current dEdx ratio
249         "fTl="<<fTl<<          //! current tan(lambda)
250         //
251         //laser
252         //
253         "laserA.="<<&vdriftA<<
254         "laserC.="<<&vdriftC<<
255         "laserAC.="<<&vdriftAC<<
256         "\n";
257     }
258   }
259 }
260
261
262
263 void AliTPCcalibTime::ProcessCosmic(AliESDEvent *event) {
264
265   if (!event) {
266     Printf("ERROR: ESD not available");
267     return;
268   }  
269   if (event->GetTimeStamp() == 0 ) {
270     Printf("no time stamp!");
271     return;
272   }
273
274   if (fTriggerMask != 0 && event->GetTriggerMask() != fTriggerMask) return;
275
276   UInt_t time = event->GetTimeStamp();
277
278   //
279   // Find cosmic pairs
280   // 
281   // Track0 is choosen in upper TPC part
282   // Track1 is choosen in lower TPC part
283   //
284   Int_t ntracks=event->GetNumberOfTracks();
285   if (ntracks==0) return;
286   if (ntracks > 10) return; // temporary debug to remove LASER events
287
288
289   if (GetDebugLevel()>1) printf("Hallo world: Im here\n");
290   AliESDfriend *ESDfriend=static_cast<AliESDfriend*>(event->FindListObject("AliESDfriend"));
291   
292   TObjArray  tpcSeeds(ntracks);
293   Double_t vtxx[3]={0,0,0};
294   Double_t svtxx[3]={0.000001,0.000001,100.};
295   AliESDVertex vtx(vtxx,svtxx);
296   //
297   // track loop
298   //
299   for (Int_t i=0;i<ntracks;++i) {
300    AliESDtrack *track = event->GetTrack(i);
301
302    const AliExternalTrackParam * trackIn = track->GetInnerParam();
303    const AliExternalTrackParam * trackOut = track->GetOuterParam();
304    if (!trackIn) continue;
305    if (!trackOut) continue;
306    
307    AliESDfriendTrack *friendTrack = ESDfriend->GetTrack(i);
308    TObject *calibObject;
309    AliTPCseed *seed = 0;
310    for (Int_t l=0;(calibObject=friendTrack->GetCalibObject(l));++l) {
311      if ((seed=dynamic_cast<AliTPCseed*>(calibObject))) break;
312    }
313    if (seed) { 
314      tpcSeeds.AddAt(seed,i);
315      if (track->GetTPCNcls() > 50) {
316        Double_t meanP = 0.5*(trackIn->GetP() + trackOut->GetP());
317        Double_t TPCsignal = seed->CookdEdxNorm(0.0,0.6,1,0,159,0x0,kTRUE,kTRUE);
318        Double_t vecDeDx[2] = {time, TPCsignal};
319        if (meanP > 12) {
320          fdEdx = TPCsignal;
321          fHistDeDx->Fill(vecDeDx);
322        }
323      }
324    }
325   }
326   
327   if (ntracks<2) return;
328   //
329   // Find pairs
330   //
331   for (Int_t i=0;i<ntracks;++i) {
332     AliESDtrack *track0 = event->GetTrack(i);     
333     // track0 - choosen upper part
334     if (!track0) continue;
335     if (!track0->GetOuterParam()) continue;
336     if (track0->GetOuterParam()->GetAlpha()<0) continue;
337     Double_t d1[3];
338     track0->GetDirection(d1);    
339     for (Int_t j=0;j<ntracks;++j) {
340       if (i==j) continue;
341        AliESDtrack *track1 = event->GetTrack(j);   
342        //track 1 lower part
343        if (!track1) continue;
344        if (!track1->GetOuterParam()) continue;
345        if (track1->GetOuterParam()->GetAlpha()>0) continue;
346        //
347        Double_t d2[3];
348        track1->GetDirection(d2);
349       
350        AliTPCseed * seed0 = (AliTPCseed*) tpcSeeds.At(i);
351        AliTPCseed * seed1 = (AliTPCseed*) tpcSeeds.At(j);
352        if (! seed0) continue;
353        if (! seed1) continue;
354        Float_t dir = (d1[0]*d2[0] + d1[1]*d2[1] + d1[2]*d2[2]);
355        Float_t dist0  = track0->GetLinearD(0,0);
356        Float_t dist1  = track1->GetLinearD(0,0);
357        //
358        // conservative cuts - convergence to be guarantied
359        // applying before track propagation
360        if (TMath::Abs(dist0+dist1)>fCutMaxD) continue;   // distance to the 0,0
361        if (dir>fCutMinDir) continue;               // direction vector product
362        Float_t bz = AliTracker::GetBz();
363        Float_t dvertex0[2];   //distance to 0,0
364        Float_t dvertex1[2];   //distance to 0,0 
365        track0->GetDZ(0,0,0,bz,dvertex0);
366        track1->GetDZ(0,0,0,bz,dvertex1);
367        if (TMath::Abs(dvertex0[1])>250) continue;
368        if (TMath::Abs(dvertex1[1])>250) continue;
369        //
370        //
371        //
372        Float_t dmax = TMath::Max(TMath::Abs(dist0),TMath::Abs(dist1));
373        AliExternalTrackParam param0(*track0);
374        AliExternalTrackParam param1(*track1);
375        //
376        // Propagate using Magnetic field and correct fo material budget
377        //
378        AliTracker::PropagateTrackTo(&param0,dmax+1,0.0005,3,kTRUE);
379        AliTracker::PropagateTrackTo(&param1,dmax+1,0.0005,3,kTRUE);
380        //
381        // Propagate rest to the 0,0 DCA - z should be ignored
382        //
383        //Bool_t b0 = ;
384        param0.PropagateToDCA(&vtx,bz,1000);
385        //Bool_t b1 = 
386        param1.PropagateToDCA(&vtx,bz,1000);
387        //      
388        param0.GetDZ(0,0,0,bz,dvertex0);
389        param1.GetDZ(0,0,0,bz,dvertex1);
390        //
391        Double_t xyz0[3];//,pxyz0[3];
392        Double_t xyz1[3];//,pxyz1[3];
393        param0.GetXYZ(xyz0);
394        param1.GetXYZ(xyz1);
395        Bool_t isPair = IsPair(&param0,&param1);
396
397        Double_t z0 = track0->GetOuterParam()->GetZ();
398        Double_t z1 = track1->GetOuterParam()->GetZ();
399
400        Double_t z0inner = track0->GetInnerParam()->GetZ();
401        Double_t z1inner = track1->GetInnerParam()->GetZ();
402
403        if (isPair && z0>0 && z0inner>0 && z1<0 && z1inner<0) {
404          Double_t vecVdrift[2] = {time, param0.GetZ() - param1.GetZ()};
405          
406          if (track0->GetTPCNcls() > 80) {
407            fHistVdrift->Fill(vecVdrift);
408            fDz = param0.GetZ() - param1.GetZ();
409          }
410        }
411        if (isPair && z0 > 0 && z1 > 0) {
412          if (track1->GetTPCNcls()> 110 && track0->GetTPCNcls()> 110 && seed1->CookdEdxNorm(0,0.6,1,0,159,0,kFALSE,kTRUE) > 0) {
413            Float_t dedxratio = seed0->CookdEdxNorm(0,0.6,1,0,159,0,kFALSE,kTRUE)/seed1->CookdEdxNorm(0,0.6,1,0,159,0,kFALSE,kTRUE);
414            Double_t vecDeDxTgl[3] = {time, track0->GetTgl(), seed0->CookdEdxNorm(0,0.6,1,0,159,0,kFALSE,kTRUE)/seed1->CookdEdxNorm(0,0.6,1,0,159,0,kFALSE,kTRUE)};
415            fHistDeDxTgl->Fill(vecDeDxTgl);
416            fdEdxRatio = dedxratio;
417            fTl = track0->GetTgl() ;
418          }
419        }
420        
421     } // end 2nd order loop        
422   } // end 1st order loop
423
424 }
425
426
427 void AliTPCcalibTime::Analyze() {
428   //
429   //
430   //
431   TH2D * hVdrift = GetHistVdrift()->Projection(1,0);
432   hVdrift->Draw();
433 }
434
435
436 Long64_t AliTPCcalibTime::Merge(TCollection *li) {
437
438   TIterator* iter = li->MakeIterator();
439   AliTPCcalibTime* cal = 0;
440
441   while ((cal = (AliTPCcalibTime*)iter->Next())) {
442     if (!cal->InheritsFrom(AliTPCcalibTime::Class())) {
443       Error("Merge","Attempt to add object of class %s to a %s", cal->ClassName(), this->ClassName());
444       return -1;
445     }
446
447     // add histograms here...
448     fHistDeDxTgl->Add(cal->GetHistDeDxVsTgl());
449     fHistVdrift->Add(cal->GetHistVdrift());
450     fHistDeDx->Add(cal->GetHistDeDx());
451
452   }
453   
454   return 0;
455   
456 }
457
458
459
460 Bool_t  AliTPCcalibTime::IsPair(AliExternalTrackParam *tr0, AliExternalTrackParam *tr1){
461   //
462   //
463   /*
464   // 0. Same direction - OPOSITE  - cutDir +cutT    
465   TCut cutDir("cutDir","dir<-0.99")
466   // 1. 
467   TCut cutT("cutT","abs(Tr1.fP[3]+Tr0.fP[3])<0.03")
468   //
469   // 2. The same rphi 
470   TCut cutD("cutD","abs(Tr0.fP[0]+Tr1.fP[0])<5")
471   //
472   //
473   //
474   TCut cutPt("cutPt","abs(Tr1.fP[4]+Tr0.fP[4])<1&&abs(Tr0.fP[4])+abs(Tr1.fP[4])<10");  
475   // 1/Pt diff cut
476   */
477   const Double_t *p0 = tr0->GetParameter();
478   const Double_t *p1 = tr1->GetParameter();
479   if (TMath::Abs(p0[3]+p1[3])>fCutTheta) return kFALSE;
480   if (TMath::Abs(p0[0]+p1[0])>fCutMaxD)  return kFALSE;
481   if (TMath::Abs(p0[1]-p1[1])>fCutMaxDz)  return kFALSE;
482   Double_t d0[3], d1[3];
483   tr0->GetDirection(d0);    
484   tr1->GetDirection(d1);       
485   if (d0[0]*d1[0] + d0[1]*d1[1] + d0[2]*d1[2] >fCutMinDir) return kFALSE;
486   //
487   return kTRUE;  
488 }
489
490
491
492 /*
493   gSystem->AddIncludePath("-I$ALICE_ROOT/TPC/macros");
494     gROOT->LoadMacro("$ALICE_ROOT/TPC/macros/AliXRDPROOFtoolkit.cxx+")
495     AliXRDPROOFtoolkit tool;
496     TChain * chainTime = tool.MakeChain("time.txt","timeInfo",0,10200);
497     chainTime->Lookup();
498
499 TCut dzc("abs(fDz-500*(1-pt1))<4")
500 chainTime->SetMarkerSize(0.2);
501 chainTime->SetMarkerStyle(24);
502
503
504 chainTime->SetMarkerColor(2);
505 chainTime->Draw("fDz:time","trigger==4"+dzc);
506 chainTime->SetMarkerColor(1);
507 chainTime->Draw("fDz:time","trigger==8"+dzc,"same");
508 htemp->SetXTitle("time")
509 htemp->SetYTitle("#Delta_{z}(cm)")
510 gPad->SaveAs("~/Calibration/driftV/pic/cosmicdzraw_time.gif");
511
512
513 chainTime->SetMarkerColor(2);
514 chainTime->Draw("fDz:500*(1-pt1)","trigger==4"+dzc);
515 chainTime->SetMarkerColor(1);
516 chainTime->Draw("fDz:500*(1-pt1)","trigger==8"+dzc,"same");
517 htemp->SetXTitle("2L#frac{#Delta_{P/T}}{P/T}")
518 htemp->SetYTitle("#Delta_{z}(cm)")
519 gPad->SaveAs("~/Calibration/driftV/pic/cosmicdzraw_PT1.gif");
520
521
522
523
524 chainTime->SetLineColor(2);
525 chainTime->Draw("fDz-500*0.965*(1-pt1)","trigger==4"+dzc);
526 chainTime->SetLineColor(1);
527 chainTime->Draw("fDz-500*0.965*(1-pt1)","trigger==8"+dzc,"same");
528 htemp->SetXTitle("#Delta_{z}(cm)")
529 htemp->SetYTitle("")
530 gPad->SaveAs("~/Calibration/driftV/pic/cosmicdzcorr_1D.gif");
531
532
533 chainTime->SetMarkerColor(2);
534 chainTime->Draw("fDz-500*0.965*(1-pt1):time","trigger==4"+dzc);
535 chainTime->SetMarkerColor(1);
536 chainTime->Draw("fDz-500*0.965*(1-pt1):time","trigger==8"+dzc,"same");
537 htemp->SetXTitle("time")
538 htemp->SetYTitle("#Delta_{z}(cm)")
539 gPad->SaveAs("~/Calibration/driftV/pic/cosmicdzcorr_time.gif");
540
541
542
543 gSystem->Load("libSTAT.so");
544 TStatToolkit toolkit;
545 Double_t chi2=0;
546 Int_t    npoints=0;
547 TVectorD fitParam;
548 TMatrixD covMatrix;
549
550
551 chainTime->SetAlias("dpr","(1-press0/970)");
552 chainTime->SetAlias("dtr","(1-(temp0+273.15)/293.)");
553 chainTime->SetAlias("d1pt","(1-(temp0+273.15)/293.)");
554 chainTime->SetAlias("dptr","(press0/(273.15+temp0))/(970./293.15)");
555
556
557 chainTime->SetAlias("dvr","fDz");
558 TString *strvd = toolkit.FitPlane(chainTime,"fDz","dpr*500++dtr*500", "trigger==4"+dzc, chi2,npoints,fitParam,covMatrix,0.99);
559 strvd.Tokenize("++")->Print();
560 chainTime->SetAlias("vdcorr",strvd->Data());
561
562 TString *strvdpt1 = toolkit.FitPlane(chainTime,"fDz","(1-dptr)*500", "trigger==4"+dzc, chi2,npoints,fitParam,covMatrix,0.99);
563 strvdpt1.Tokenize("++")->Print();
564 chainTime->SetAlias("vdcorrpt1",strvdpt1->Data());
565
566
567 TString *strdedx = toolkit.FitPlane(chainTime,"1-fdEdx/27","(1-dptr)", "trigger==4&&run<62000"+dzc, chi2,npoints,fitParam,covMatrix,0.99);
568 strdedx.Tokenize("++")->Print();
569 chainTime->SetAlias("vdcorrpt1",strvdpt1->Data());
570
571 */