2 /**************************************************************************
3 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * Author: The ALICE Off-line Project. *
6 * Contributors are mentioned in the code where appropriate. *
8 * Permission to use, copy, modify and distribute this software and its *
9 * documentation strictly for non-commercial purposes is hereby granted *
10 * without fee, provided that the above copyright notice appears in all *
11 * copies and that both the copyright notice and this permission notice *
12 * appear in the supporting documentation. The authors make no claims *
13 * about the suitability of this software for any purpose. It is *
14 * provided "as is" without express or implied warranty. *
15 **************************************************************************/
17 /****************************************************************************
18 * TPC Calibration Class for GOOFIE values. Drift velocity, gas composition *
20 ****************************************************************************/
22 #include "AliTPCGoofieValues.h"
25 /*****************************************************************************
26 * The class AliTPCGoofieValues allows the access to GoofieValues. The only *
27 * construtor is load a data from ASCI file. The methods make Tgraphs and *
28 * TSplines of the time dependace of th values. One method allows save the *
29 * the graphs and spline togather with tree of allvalues into file. *
31 Current example usage:
33 AliTPCGoofieValues *goofieVal = new AliTPCGoofieValues("Goofie_data_january_run_01_08.txt");
34 TFile f("goofieValues.root","recreate");
35 goofieVal->Write("goofie");
37 And now you can browse
40 *****************************************************************************/
42 ClassImp(AliTPCGoofieValues)
44 //____________________________________________________________________________
45 AliTPCGoofieValues::AliTPCGoofieValues():
47 fLinesInFile(0),///< lines in ASCII file
48 fStartTime(0),///< StartTime
49 fEndTime(0),///< EndTime
50 fTimeOfRun(0),///<TimeOfRun
51 fTempGrad(0),///<TempGrad
52 fAverageTempGraph(0), ///<graph of average temperatures
53 fTempGradGraph(0),///<graph of temperature gradients
54 fPressGraph(0),///<graph of pressures
55 fVdriftGraph(0),///<graph of drift velocities
56 fVdriftcorGraph(0),///<graph of drift velocities corrected
57 fGainFGraph(0),///<graph of near gain
58 fGainNGraph(0),///<graph of far gain
59 fCO2Graph(0),///<graph of CO2 content
60 fN2Graph(0),///<graph of N2 content
62 fAverageTempSpline(0),///< spline of average temperatures
63 fTempGradSpline(0),///<spline of temperature gradients
64 fPressSpline(0),///<spline of pressures
65 fVdriftSpline(0),///<spline of drift velocities
66 fVdriftcorSpline(0),///<spline of drift velocities corrected
67 fGainFSpline(0),///<spline of near gain
68 fGainNSpline(0),///<spline of far gain
69 fCO2Spline(0),///<spline of CO2 content
71 fGoofieValues(0)///<spline of N2 content
74 // Default constructor
78 //____________________________________________________________________________
79 AliTPCGoofieValues::AliTPCGoofieValues(const char *fname):
81 fLinesInFile(0),///< lines in ASCII file
82 fStartTime(0),///< StartTime
83 fEndTime(0),///< EndTime
84 fTimeOfRun(0),///<TimeOfRun
85 fTempGrad(0),///<TempGrad
86 fAverageTempGraph(0), ///<graph of average temperatures
87 fTempGradGraph(0),///<graph of temperature gradients
88 fPressGraph(0),///<graph of pressures
89 fVdriftGraph(0),///<graph of drift velocities
90 fVdriftcorGraph(0),///<graph of drift velocities corrected
91 fGainFGraph(0),///<graph of near gain
92 fGainNGraph(0),///<graph of far gain
93 fCO2Graph(0),///<graph of CO2 content
94 fN2Graph(0),///<graph of N2 content
96 fAverageTempSpline(0),///< spline of average temperatures
97 fTempGradSpline(0),///<spline of temperature gradients
98 fPressSpline(0),///<spline of pressures
99 fVdriftSpline(0),///<spline of drift velocities
100 fVdriftcorSpline(0),///<spline of drift velocities corrected
101 fGainFSpline(0),///<spline of near gain
102 fGainNSpline(0),///<spline of far gain
103 fCO2Spline(0),///<spline of CO2 content
105 fGoofieValues(0)///<spline of N2 content
108 Constructor take a values from ASCI file with raw values. <br>
109 example: <b>fname = AliTPCGoofie_run_001.txt </b><br>
110 Read the next values, in this order (each line of the file is a data point) <br>
111 fGoofieTime fGoofieTempF fGoofieTempN fGoofiePress fGoofieVdrift fGoofieVdriftcor fGoofieAreaF fGoofieAreaN fGoofieCO2 fGoofieN2
121 fGoofieValues = new TTree("tree","goofie values");
122 fLinesInFile = fGoofieValues->ReadFile(fname,"fGoofieTime/D:fGoofieTempF/D:fGoofieTempN/D:fGoofiePress/D:fGoofieVdrift/D:fGoofieVdriftcor/D:fGoofieAreaF/D:fGoofieAreaN/D:fGoofieCO2/D:fGoofieN2/D");
124 fAverageTempGraph = new TGraph();
125 fTempGradGraph = new TGraph();
126 fPressGraph = new TGraph();
127 fVdriftGraph = new TGraph();
128 fVdriftcorGraph = new TGraph();
129 fGainFGraph = new TGraph();
130 fGainNGraph = new TGraph();
131 fCO2Graph = new TGraph();
132 fN2Graph = new TGraph();
135 //Splines are allocated via FillAllSplines
138 //________________________________________________________________________________
139 AliTPCGoofieValues::~AliTPCGoofieValues()
142 AliTPCGoofieValues destructor
146 //_________________________________________________________________________________
147 Long64_t AliTPCGoofieValues::GetLinesInFile(){
150 //_________________________________________________________________________________
151 Double_t AliTPCGoofieValues::GetStartTime()
154 take a time in beging of run from Goofie in seconds
159 //__________________________________________________________________________________
160 Double_t AliTPCGoofieValues::GetEndTime()
163 take the time in the end of run from Goofie in seconds
169 //__________________________________________________________________________________
170 Double_t AliTPCGoofieValues::GetTimeOfRun()
173 return time of run in seconds
176 Double_t time = GetEndTime(/*const char *fname*/) - GetStartTime(/*const char *fname*/);
179 //__________________________________________________________________________________
180 Double_t AliTPCGoofieValues::GetTempGrad(Double_t timeSec)
184 gradient of temperature in the chosen time in run
189 tempGrad = EvalTempGrad(timeSec);
192 //__________________________________________________________________________________
193 void AliTPCGoofieValues::FillAllGraphs(){
195 Fill ALL the Graphs.<br>
196 There are individual methods, to do the same.<br>
197 This function is anyway called in the ctor.
198 Selection has to be implemented:
202 AliTPCGoofieValues *a = new AliTPCGoofieValues("Goofie_data_january_run_01_08.txt");
203 TEventList list("listGood","listGood");
204 a->GetTree()->Draw(">>listGood","abs(fGoofieAreaN-2600)<500&&abs(fGoofieAreaF-2900)<300&&abs(fGoofieAreaF/fGoofieAreaN-1.1)<0.2","");
205 a->GetTree()->Draw("fGoofieVdrift:fGoofieTime");
206 a->GetTree()->SetEventList(&list);
207 a->GetTree()->SetMarkerColor(2);
209 a->GetTree()->Draw("fGoofieVdrift:fGoofieTime","","same*");
210 TGraph gr(200,a.GetTree()->GetV2(),a.GetTree()->GetV1());
214 fit->SetMinPoints(200);
215 fit->InitKnots(&gr,15,0,0.2)
217 fit.MakeDiffHisto(&gr)->Draw();
221 Long64_t nevent = fGoofieValues->GetEntries();
223 //temporal for reading the branches
224 Double_t fGoofieTime = 0;
225 Double_t fGoofieTempN = 0;
226 Double_t fGoofieTempF = 0;
227 Double_t fGoofiePress = 0;
228 Double_t fGoofieAreaF = 0;
229 Double_t fGoofieAreaN = 0;
230 Double_t fGoofieVdriftcor = 0;
231 Double_t fGoofieVdrift = 0;
232 Double_t fGoofieCO2 = 0;
233 Double_t fGoofieN2 = 0;
234 fGoofieValues->SetBranchAddress("fGoofieTime",&fGoofieTime);
235 fGoofieValues->SetBranchAddress("fGoofieTempN",&fGoofieTempN);
236 fGoofieValues->SetBranchAddress("fGoofieTempF",&fGoofieTempF);
237 fGoofieValues->SetBranchAddress("fGoofiePress",&fGoofiePress);
238 fGoofieValues->SetBranchAddress("fGoofieAreaF",&fGoofieAreaF);
239 fGoofieValues->SetBranchAddress("fGoofieAreaN",&fGoofieAreaN);
240 fGoofieValues->SetBranchAddress("fGoofieVdriftcor",&fGoofieVdriftcor);
241 fGoofieValues->SetBranchAddress("fGoofieVdrift",&fGoofieVdrift);
242 fGoofieValues->SetBranchAddress("fGoofieCO2",&fGoofieCO2);
243 fGoofieValues->SetBranchAddress("fGoofieN2",&fGoofieN2);
244 fStartTime = 0; //fGoofieValues->GetBranch("fGoofieTime")->GetEntry(0);
246 for (int i = 0; i < nevent; ++i){
247 if (fGoofieValues->GetEvent(i)<0){
248 // cout<< "you're done, man !" << endl;
251 if (i==0) fStartTime = fGoofieTime;
252 else if (i == (nevent-1)) fEndTime = fGoofieTime;
253 //// cout<< " reading " << i << endl;
254 fAverageTempGraph->SetPoint(i,(fGoofieTime - fStartTime),(fGoofieTempF+fGoofieTempN)/2);
255 fTempGradGraph->SetPoint(i,(fGoofieTime - fStartTime),(fGoofieTempF-fGoofieTempN)/25);
256 fPressGraph->SetPoint(i,(fGoofieTime - fStartTime),fGoofiePress);
257 fGainFGraph->SetPoint(i,(fGoofieTime - fStartTime),fGoofieAreaF);
258 fGainNGraph->SetPoint(i,(fGoofieTime - fStartTime),fGoofieAreaN);
259 fVdriftGraph->SetPoint(i,(fGoofieTime - fStartTime),fGoofieVdrift);
260 fVdriftcorGraph->SetPoint(i,(fGoofieTime - fStartTime),fGoofieVdriftcor);
261 fCO2Graph->SetPoint(i,(fGoofieTime - fStartTime),fGoofieCO2);
262 fN2Graph->SetPoint(i,(fGoofieTime - fStartTime),fGoofieN2);
267 void AliTPCGoofieValues::FillAllSplines(){
269 Fill ALL the Splines.<br>
270 There are individual methods, to do the same.<br>
271 This function is anyway called in the ctor.
274 fAverageTempSpline = new TSpline3("temperature",fAverageTempGraph);
275 fTempGradSpline = new TSpline3("temperature gradient",fTempGradGraph);
276 fPressSpline = new TSpline3("pressure",fPressGraph);
277 fVdriftcorSpline = new TSpline3("vdriftcor",fVdriftcorGraph);
278 fVdriftSpline = new TSpline3("vdrift",fVdriftGraph);
279 fGainFSpline = new TSpline3("gainF",fGainFGraph);
280 fGainNSpline = new TSpline3("gainN",fGainNGraph);
281 fCO2Spline = new TSpline3("co2",fCO2Graph);
282 fN2Spline = new TSpline3("n2",fN2Graph);
286 //___________________________________________________________________________________
287 void AliTPCGoofieValues::FillAverageTempGraph()
290 graph of temperature vs time. <br>
291 If the graph is already filled, it's only putting a title.
294 fAverageTempGraph->SetTitle("time dependence of temperature");
296 if (!fAverageTempGraph->GetN()==0){
297 // cout<< " graph already filled !!! " << endl;
300 Double_t fGoofieTime = 0;
301 Double_t fGoofieTempN = 0;
302 Double_t fGoofieTempF = 0;
303 fGoofieValues->SetBranchAddress("fGoofieTime",&fGoofieTime);
304 fGoofieValues->SetBranchAddress("fGoofieTempN",&fGoofieTempN);
305 fGoofieValues->SetBranchAddress("fGoofieTempF",&fGoofieTempF);
307 Long64_t nevent = fGoofieValues->GetEntries();
309 for (int i = 0; i < nevent; ++i){
310 if (fGoofieValues->GetEvent(i)<0){
311 // cout<< "you're done, man !" << endl;
314 if (i==0) fStartTime = fGoofieTime;
315 else if (i == (nevent-1)) fEndTime = fGoofieTime;
316 fAverageTempGraph->SetPoint(i,(fGoofieTime - fStartTime),(fGoofieTempF+fGoofieTempN)/2);
320 //__________________________________________________________________________________
321 void AliTPCGoofieValues::FillTempGradGraph()
324 graph of temperature gradient [K/cm]<br>
325 If the graph is already filled, it's only putting a title.
328 fTempGradGraph->SetTitle("time dpendance of Temperature`s gradient");
330 if(! fTempGradGraph->GetN()==0){
331 // cout<< " graph already filled !!! " << endl;
334 Double_t fGoofieTime = 0;
335 Double_t fGoofieTempN = 0;
336 Double_t fGoofieTempF = 0;
337 fGoofieValues->SetBranchAddress("fGoofieTime",&fGoofieTime);
338 fGoofieValues->SetBranchAddress("fGoofieTempN",&fGoofieTempN);
339 fGoofieValues->SetBranchAddress("fGoofieTempF",&fGoofieTempF);
341 Long64_t nevent = fGoofieValues->GetEntries();
342 for (int i = 0; i < nevent; ++i){
343 if (fGoofieValues->GetEvent(i)<0){
344 // cout<< "you're done, man !" << endl;
347 if (i==0) fStartTime = fGoofieTime;
348 else if (i == (nevent-1)) fEndTime = fGoofieTime;
349 fTempGradGraph->SetPoint(i,(fGoofieTime - fStartTime),(fGoofieTempF-fGoofieTempN)/25);
354 //____________________________________________________________________________________
355 void AliTPCGoofieValues::FillPressGraph()
358 Graph of pressure<br>
359 If the graph is already filled, it's only putting a title.
362 fPressGraph->SetTitle("time dpendance of Pressure");
363 if(!fPressGraph->GetN()==0){
364 // cout<< " graph already filled !!! " << endl;
367 Double_t fGoofieTime = 0;
368 Double_t fGoofiePress = 0;
369 fGoofieValues->SetBranchAddress("fGoofieTime",&fGoofieTime);
370 fGoofieValues->SetBranchAddress("fGoofiePress",&fGoofiePress);
372 Long64_t nevent = fGoofieValues->GetEntries();
373 for (int i = 0; i < nevent; ++i){
374 if (fGoofieValues->GetEvent(i)<0){
375 // cout<< "you're done, man !" << endl;
378 if (i==0) fStartTime = fGoofieTime;
379 else if (i == (nevent-1)) fEndTime = fGoofieTime;
380 fPressGraph->SetPoint(i,(fGoofieTime - fStartTime),fGoofiePress);
386 //________________________________________________________________________________________________
387 void AliTPCGoofieValues::FillGainFGraph()
391 return graph of Gain in the far point of Goofie`s detector<br>
392 If the graph is already filled, it's only putting a title.
395 fGainFGraph->SetTitle("time dpendance of Gain in the far point in natural unit");
397 if(!fGainFGraph->GetN()==0){
398 // cout<< " graph already filled !!! " << endl;
401 Double_t fGoofieTime = 0;
402 Double_t fGoofieAreaF = 0;
403 fGoofieValues->SetBranchAddress("fGoofieTime",&fGoofieTime);
404 fGoofieValues->SetBranchAddress("fGoofieAreaF",&fGoofieAreaF);
405 Long64_t nevent = fGoofieValues->GetEntries();
406 for (int i = 0; i < nevent; ++i){
407 if (fGoofieValues->GetEvent(i)<0){
408 // cout<< "you're done, man !" << endl;
411 if (i==0) fStartTime = fGoofieTime;
412 else if (i == (nevent-1)) fEndTime = fGoofieTime;
413 fGainFGraph->SetPoint(i,(fGoofieTime - fStartTime),fGoofieAreaF);
418 //_____________________________________________________________________________________
419 void AliTPCGoofieValues::FillGainNGraph()
422 Graph of Gain in the near point of Goofie`s detector<br>
423 If the graph is already filled, it's only putting a title.
426 fGainNGraph->SetTitle("time dependance of Gain in the far poin in natural unit");
427 if(!fGainNGraph->GetN()==0){
428 // cout<< " graph already filled !!! " << endl;
432 Double_t fGoofieTime = 0;
433 Double_t fGoofieAreaN = 0;
434 fGoofieValues->SetBranchAddress("fGoofieTime",&fGoofieTime);
435 fGoofieValues->SetBranchAddress("fGoofieAreaN",&fGoofieAreaN);
436 Long64_t nevent = fGoofieValues->GetEntries();
437 for (int i = 0; i < nevent; ++i){
438 if (fGoofieValues->GetEvent(i)<0){
439 // cout<< "you're done, man !" << endl;
442 if (i==0) fStartTime = fGoofieTime;
443 else if (i == (nevent-1)) fEndTime = fGoofieTime;
444 fGainNGraph->SetPoint(i,(fGoofieTime - fStartTime),fGoofieAreaN);
449 //_______________________________________________________________________________________
450 void AliTPCGoofieValues::FillVdriftGraph()
453 Graph of raw Vdrift<br>
454 If the graph is already filled, it's only putting a title.
457 fVdriftGraph->SetTitle("time dpendance of raw Vdrift");
458 if(!fVdriftGraph->GetN()==0){
459 // cout<< " graph already filled !!! " << endl;
462 Double_t fGoofieTime = 0;
463 Double_t fGoofieVdrift = 0;
464 fGoofieValues->SetBranchAddress("fGoofieTime",&fGoofieTime);
465 fGoofieValues->SetBranchAddress("fGoofieVdrift",&fGoofieVdrift);
466 Long64_t nevent = fGoofieValues->GetEntries();
467 for (int i = 0; i < nevent; ++i){
468 if (fGoofieValues->GetEvent(i)<0){
469 // cout<< "you're done, man !" << endl;
472 if (i==0) fStartTime = fGoofieTime;
473 else if (i == (nevent-1)) fEndTime = fGoofieTime;
474 fVdriftGraph->SetPoint(i,(fGoofieTime - fStartTime),fGoofieVdrift);
478 //_____________________________________________________________________________________________
479 void AliTPCGoofieValues::FillVdriftcorGraph()
482 Graph of Vdrift corrected by temperature and pressure<br>
483 If the graph is already filled, it's only putting a title.
486 fVdriftcorGraph->SetTitle("time dpendance of raw Vdriftcor");
487 if(!fVdriftcorGraph->GetN()==0){
488 // cout<< " graph already filled !!! " << endl;
491 Double_t fGoofieTime = 0;
492 Double_t fGoofieVdriftcor = 0;
493 fGoofieValues->SetBranchAddress("fGoofieTime",&fGoofieTime);
494 fGoofieValues->SetBranchAddress("fGoofieVdriftcor",&fGoofieVdriftcor);
495 Long64_t nevent = fGoofieValues->GetEntries();
496 for (int i = 0; i < nevent; ++i){
497 if (fGoofieValues->GetEvent(i)<0){
498 // cout<< "you're done, man !" << endl;
501 if (i==0) fStartTime = fGoofieTime;
502 else if (i == (nevent-1)) fEndTime = fGoofieTime;
503 fVdriftcorGraph->SetPoint(i,(fGoofieTime - fStartTime),fGoofieVdriftcor);
507 //____________________________________________________________________________________________
508 void AliTPCGoofieValues::FillCO2Graph()
512 If the graph is already filled, it's only putting a title.
515 fCO2Graph->SetTitle("time dependance of CO2");
516 if(!fCO2Graph->GetN()==0){
517 // cout<< " graph already filled !!! " << endl;
520 Double_t fGoofieTime = 0;
521 fGoofieValues->SetBranchAddress("fGoofieTime",&fGoofieTime);
522 Double_t fGoofieCO2 = 0;
523 fGoofieValues->SetBranchAddress("fGoofieCO2",&fGoofieCO2);
524 Long64_t nevent = fGoofieValues->GetEntries();
525 for (int i = 0; i < nevent; ++i){
526 if (fGoofieValues->GetEvent(i)<0){
527 // cout<< "you're done, man !" << endl;
530 if (i==0) fStartTime = fGoofieTime;
531 else if (i == (nevent-1)) fEndTime = fGoofieTime;
532 fCO2Graph->SetPoint(i,(fGoofieTime - fStartTime),fGoofieCO2);
536 //_____________________________________________________________________________________________
537 void AliTPCGoofieValues::FillN2Graph()
541 If the graph is already filled, it's only putting a title.
545 fN2Graph->SetTitle("time dependance of N2");
546 if(!fN2Graph->GetN()==0){
547 // cout<< " graph already filled !!! " << endl;
550 Double_t fGoofieTime = 0;
551 fGoofieValues->SetBranchAddress("fGoofieTime",&fGoofieTime);
552 Double_t fGoofieN2 = 0;
553 fGoofieValues->SetBranchAddress("fGoofieN2",&fGoofieN2);
554 Long64_t nevent = fGoofieValues->GetEntries();
555 for (int i = 0; i < nevent; ++i){
556 if (fGoofieValues->GetEvent(i)<0){
557 // cout<< "you're done, man !" << endl;
560 if (i==0) fStartTime = fGoofieTime;
561 else if (i == (nevent-1)) fEndTime = fGoofieTime;
562 fN2Graph->SetPoint(i,(fGoofieTime - fStartTime),fGoofieN2);
567 //_________________________________________________________________________________________
568 void AliTPCGoofieValues::FillAverageTempSpline()
571 TSpline object of average temperature<br>
572 If the spline is already filled, it's printing a message.
574 if(!fAverageTempSpline)
575 fAverageTempSpline = new TSpline3("temperature",fAverageTempGraph);
577 // cout<< " spline already filled !!! " << endl;
581 //_________________________________________________________________________________________
582 void AliTPCGoofieValues::FillTempGradSpline()
586 TSpline object of temperature gradient<br>
587 If the spline is already filled, it's printing a message.
590 fTempGradSpline = new TSpline3("temperature gradient",fTempGradGraph);
592 // cout<< " spline already filled !!! " << endl;
595 //_________________________________________________________________________________________
596 void AliTPCGoofieValues::FillPressSpline()
600 TSpline object of pressure<br>
601 If the spline is already filled, it's printing a message.
604 fPressSpline = new TSpline3("pressure",fPressGraph);
606 // cout<< " spline already filled !!! " << endl;
610 //_________________________________________________________________________________________
611 void AliTPCGoofieValues::FillVdriftSpline()
615 TSpline object of drift velocity<br>
616 If the spline is already filled, it's printing a message.
619 fVdriftSpline = new TSpline3("vdrift",fVdriftGraph);
621 // cout<< " spline already filled !!! " << endl;
625 //_________________________________________________________________________________________
626 void AliTPCGoofieValues::FillVdriftcorSpline()
631 TSpline object of drift velocit corrected<br>
632 If the spline is already filled, it's printing a message.
634 if(!fVdriftcorSpline)
635 fVdriftcorSpline = new TSpline3("vdriftcor",fVdriftcorGraph);
637 // cout<< " spline already filled !!! " << endl;
641 //_________________________________________________________________________________________
642 void AliTPCGoofieValues::FillGainFSpline()
646 return TSpline object of gain in far point<br>
647 If the spline is already filled, it's printing a message.
650 fGainFSpline = new TSpline3("gainF",fGainFGraph);
652 // cout<< " spline already filled !!! " << endl;
656 //_________________________________________________________________________________________
657 void AliTPCGoofieValues::FillGainNSpline()
661 TSpline object of gain in near point<br>
662 If the spline is already filled, it's printing a message.
665 fGainNSpline = new TSpline3("gainN",fGainNGraph);
667 // cout<< " spline already filled !!! " << endl;
671 //_________________________________________________________________________________________
672 void AliTPCGoofieValues::FillCO2Spline()
676 TSpline object of average temperature<br>
677 If the spline is already filled, it's printing a message.
680 fCO2Spline = new TSpline3("co2",fCO2Graph);
682 // cout<< " spline already filled !!! " << endl;
685 //_________________________________________________________________________________________
686 void AliTPCGoofieValues::FillN2Spline()
690 TSpline object of average temperature<br>
691 If the spline is already filled, it's printing a message.
694 fN2Spline = new TSpline3("n2",fN2Graph);
696 // cout<< " spline already filled !!! " << endl;
699 //__________________________________________________________________________________________
700 Double_t AliTPCGoofieValues::EvalTempGrad(Double_t timeSec)
703 fTempGradSpline = new TSpline3("temperature gradient",fTempGradGraph);
704 Double_t a = fTempGradSpline->Eval(timeSec);
708 //___________________________________________________________________________________________
709 Double_t AliTPCGoofieValues::EvalAverageTemp(Double_t timeSec)
711 if(!fAverageTempSpline)
712 fAverageTempSpline = new TSpline3("temperature",fAverageTempGraph);
713 Double_t a = fAverageTempSpline->Eval(timeSec);
717 //___________________________________________________________________________________________
718 Double_t AliTPCGoofieValues::EvalPress(Double_t timeSec)
721 fPressSpline = new TSpline3("pressure",fPressGraph);
722 Double_t a = fPressSpline->Eval(timeSec);
726 //___________________________________________________________________________________________
727 Double_t AliTPCGoofieValues::EvalVdrift(Double_t timeSec)
730 fVdriftSpline = new TSpline3("vdrift",fVdriftGraph);
731 Double_t a = fVdriftSpline->Eval(timeSec);
735 //___________________________________________________________________________________________
736 Double_t AliTPCGoofieValues::EvalVdriftcor(Double_t timeSec)
738 if(!fVdriftcorSpline)
739 fVdriftcorSpline = new TSpline3("vdriftcor",fVdriftcorGraph);
740 Double_t a = fVdriftcorSpline->Eval(timeSec);
744 //___________________________________________________________________________________________
745 Double_t AliTPCGoofieValues::EvalGainF(Double_t timeSec)
748 fGainFSpline = new TSpline3("gainF",fGainFGraph);
749 Double_t a = fGainFSpline->Eval(timeSec);
753 //___________________________________________________________________________________________
754 Double_t AliTPCGoofieValues::EvalGainN(Double_t timeSec)
757 fGainNSpline = new TSpline3("gainN",fGainNGraph);
758 Double_t a = fGainNSpline->Eval(timeSec);
762 //___________________________________________________________________________________________
763 Double_t AliTPCGoofieValues::EvalCO2(Double_t timeSec)
766 fCO2Spline = new TSpline3("co2",fCO2Graph);
767 Double_t a = fCO2Spline->Eval(timeSec);
771 //___________________________________________________________________________________________
772 Double_t AliTPCGoofieValues::EvalN2(Double_t timeSec)
775 fN2Spline = new TSpline3("n2",fN2Graph);
776 Double_t a = fN2Spline->Eval(timeSec);
780 void AliTPCGoofieValues::PrintTree(){
782 Testing function: it prints all the information stored in the tree
785 Long64_t nevent = fGoofieValues->GetEntries();
786 // cout<< " number of entries: " << nevent << endl;
787 //temporal for reading the branches
788 Double_t fGoofieTime = 0;
789 Double_t fGoofieTempN = 0;
790 Double_t fGoofieTempF = 0;
791 Double_t fGoofiePress = 0;
792 Double_t fGoofieAreaF = 0;
793 Double_t fGoofieAreaN = 0;
795 Double_t fGoofieVdriftcor = 0;
796 Double_t fGoofieVdrift = 0;
797 Double_t fGoofieCO2 = 0;
798 Double_t fGoofieN2 = 0;
800 fGoofieValues->SetBranchAddress("fGoofieTime",&fGoofieTime);
801 fGoofieValues->SetBranchAddress("fGoofieTempN",&fGoofieTempN);
802 fGoofieValues->SetBranchAddress("fGoofieTempF",&fGoofieTempF);
803 fGoofieValues->SetBranchAddress("fGoofiePress",&fGoofiePress);
805 fGoofieValues->SetBranchAddress("fGoofieAreaF",&fGoofieAreaF);
806 fGoofieValues->SetBranchAddress("fGoofieAreaN",&fGoofieAreaN);
808 fGoofieValues->SetBranchAddress("fGoofieVdriftcor",&fGoofieVdriftcor);
809 fGoofieValues->SetBranchAddress("fGoofieVdrift",&fGoofieVdrift);
811 fGoofieValues->SetBranchAddress("fGoofieCO2",&fGoofieCO2);
812 fGoofieValues->SetBranchAddress("fGoofieN2",&fGoofieN2);
814 for (int j = 0; j < nevent; ++j){
815 if (fGoofieValues->GetEvent(j)<0){
816 // cout<< "you're done, man !" << endl;
819 // // cout<< " reading event: " << j << " " << fGoofieTime << " "
820 // << fGoofieTempN << " " << fGoofieTempF << " "
821 // << fGoofiePress << " " << fGoofiePress << " "
822 // << fGoofieAreaF << " " << fGoofieAreaN << " "
823 // << fGoofieVdriftcor << " " << fGoofieVdrift << " "
824 // << fGoofieCO2 << " " << fGoofieN2 << endl;