]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TOF/AliTOF.cxx
Inserted a new static class variable (fgTOFRawWriter) in the AliTOF class, to avoid...
[u/mrichter/AliRoot.git] / TOF / AliTOF.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 /* $Id$ */
16
17 ///////////////////////////////////////////////////////////////////////////////
18 //                                                                           //
19 //  Time Of Flight                                                           //
20 //  This class contains the basic functions for the Time Of Flight           //
21 //  detector. Functions specific to one particular geometry are              //
22 //  contained in the derived classes                                         //
23 //                                                                           //
24 //  VERSIONE WITH 5 SYMMETRIC MODULES ALONG Z AXIS                           //
25 //  ============================================================             //
26 //                                                                           //
27 //  VERSION WITH HOLES FOR PHOS AND TRD IN SPACEFRAME WITH HOLES             //
28 //                                                                           //
29 //  Volume sensibile : FPAD                                                  //
30 //                                                                           //
31 //                                                                           //
32 //                                                                           //
33 //                                                                           //
34 ///////////////////////////////////////////////////////////////////////////////
35 // Begin_Html
36 /*
37 <img src="picts/AliTOFClass.gif">
38 */
39 //End_Html
40
41 #include <TClonesArray.h>
42 #include <TFile.h>
43 #include <TFolder.h>
44 #include <TROOT.h>
45 #include <TTask.h>
46 #include <TTree.h>
47 #include <TVirtualMC.h>
48 #include <TStopwatch.h>
49
50 #include "AliConst.h"
51 #include "AliLoader.h"
52 #include "AliLog.h"
53 #include "AliMC.h"
54 #include "AliRun.h"
55
56 #include "AliTOFDDLRawData.h"
57 #include "AliTOFDigitizer.h"
58 #include "AliTOFdigit.h"
59 #include "AliTOFhitT0.h"
60 #include "AliTOFhit.h"
61 #include "AliTOFGeometry.h"
62 #include "AliTOFSDigitizer.h"
63 #include "AliTOFSDigit.h"
64 #include "AliTOF.h"
65
66 class AliTOFcluster;
67
68 extern TFile *gFile;
69 extern TROOT *gROOT;
70 extern TVirtualMC *gMC;
71
72 extern AliRun *gAlice;
73
74
75 ClassImp(AliTOF)
76
77
78 AliTOFDDLRawData AliTOF::fgTOFRawWriter = AliTOFDDLRawData();
79
80  
81 //_____________________________________________________________________________
82 AliTOF::AliTOF():
83   fFGeom(0x0),
84   fDTask(0x0),
85   fReTask(0x0),
86   fSDigits(0x0),
87   fNSDigits(0),
88   fReconParticles(0x0),
89   fIdSens(-1),
90   fTZero(kFALSE),
91   fTOFHoles(kTRUE),
92   fTOFGeometry(0x0)
93 {
94   //
95   // Default constructor
96   //
97
98   //by default all sectors switched on
99   for (Int_t ii=0; ii<18; ii++) fTOFSectors[ii]=0;
100
101   fDigits = 0;
102   fIshunt   = 0;
103   fName = "TOF";
104
105 }
106  
107 //_____________________________________________________________________________
108 AliTOF::AliTOF(const char *name, const char *title, Option_t *option)
109        : 
110   AliDetector(name,title),
111   fFGeom(0x0),
112   fDTask(0x0),
113   fReTask(0x0),
114   fSDigits(0x0),
115   fNSDigits(0),
116   fReconParticles(0x0),
117   fIdSens(-1),
118   fTZero(kFALSE),
119   fTOFHoles(kTRUE),
120   fTOFGeometry(0x0)
121 {
122   //
123   // AliTOF standard constructor
124   // 
125   // Here are fixed some important parameters
126   //
127
128   // Initialization of hits, sdigits and digits array
129   // added option for time zero analysis
130   //skowron
131   fTOFGeometry = new AliTOFGeometry();
132
133   //by default all sectors switched on
134   for (Int_t ii=0; ii<18; ii++) fTOFSectors[ii]=0;
135
136   if (strstr(option,"tzero")){
137     fHits   = new TClonesArray("AliTOFhitT0",  1000);
138     fTZero = kTRUE;
139     //    AliWarning("tzero option requires AliTOFv4T0/AliTOFv5T0 as TOF version (check Your Config.C)");
140   }else{
141     fHits   = new TClonesArray("AliTOFhit",  1000);
142     fTZero = kFALSE;
143   }
144   if (gAlice==0) {
145      AliFatal("gAlice==0 !");
146   }
147
148   AliMC *mcApplication = (AliMC*)gAlice->GetMCApp();
149
150   if (mcApplication->GetHitLists())
151      mcApplication->AddHitList(fHits);
152   else AliError("gAlice->GetHitLists()==0");
153
154   fIshunt  = 0;
155   fSDigits = new TClonesArray("AliTOFSDigit", 1000);
156   fDigits  = new TClonesArray("AliTOFdigit",  1000);
157
158   //
159   // Digitization parameters
160   //
161   // (Transfer Functions to be inserted here)
162   //
163   //PH  SetMarkerColor(7);
164   //PH  SetMarkerStyle(2);
165   //PH  SetMarkerSize(0.4);
166
167 // Strip Parameters
168   //fGapA    =   4.; //cm  Gap beetween tilted strip in A-type plate
169   //fGapB    =   6.; //cm  Gap beetween tilted strip in B-type plate
170
171   // Physical performances
172   //fTimeRes = 100.;//ps
173   //fChrgRes = 100.;//pC
174
175 }
176
177 //____________________________________________________________________________
178 void AliTOF::SetTOFSectors(Int_t *sectors)
179 {
180   // Setter for partial/full TOF configuration
181
182   for(Int_t isec=0;isec<18;isec++){
183     fTOFSectors[isec]=sectors[isec];
184   }
185 }
186 //____________________________________________________________________________
187 void AliTOF::GetTOFSectors(Int_t *sectors) const
188 {
189   // Getter for partial/full TOF configuration
190
191   for(Int_t isec=0;isec<18;isec++){
192     sectors[isec]=fTOFSectors[isec];
193   }
194 }
195
196 //_____________________________________________________________________________
197 void AliTOF::CreateTOFFolders()
198 {
199   // create the ALICE TFolder
200   // create the ALICE TTasks
201   // create the ALICE main TFolder
202   // to be done by AliRun
203
204   TFolder * alice = new TFolder();
205   alice->SetNameTitle("FPAlice", "Alice Folder") ;
206   gROOT->GetListOfBrowsables()->Add(alice) ;
207
208   TFolder * aliceF  = alice->AddFolder("folders", "Alice memory Folder") ;
209   //  make it the owner of the objects that it contains
210   aliceF->SetOwner() ;
211   // geometry folder
212   TFolder * geomF = aliceF->AddFolder("Geometry", "Geometry objects") ;
213   TFolder * aliceT  = alice->AddFolder("tasks", "Alice tasks Folder") ;   
214   //  make it the owner of the objects that it contains
215   aliceT->SetOwner() ;
216
217   TTask * aliceDi = new TTask("(S)Digitizer", "Alice SDigitizer & Digitizer") ;
218   aliceT->Add(aliceDi);
219
220   TTask * aliceRe = new TTask("Reconstructioner", "Alice Reconstructioner") ;
221   aliceT->Add(aliceRe);
222
223   char * tempo = new char[80] ;
224
225   // creates the TOF Digitizer and adds it to alice main (S)Digitizer task
226   sprintf(tempo, "%sDigitizers container",GetName() ) ;
227   fDTask = new TTask(GetName(), tempo);
228   aliceDi->Add(fDTask) ;
229
230   // creates the TOF reconstructioner and adds it to alice main Reconstructioner task
231   sprintf(tempo, "%sReconstructioner container",GetName() ) ;
232   fReTask = new TTask(GetName(), tempo);
233   aliceRe->Add(fReTask) ;
234
235   delete [] tempo ;
236  
237   // creates the TOF geometry  folder
238   geomF->AddFolder("TOF", "Geometry for TOF") ;
239 }
240
241 //_____________________________________________________________________________
242 AliTOF::~AliTOF()
243 {
244   // dtor:
245   // it remove also the alice folder 
246   // and task that TOF creates instead of AliRun
247   /* PH Temporarily commented because of problems
248   TFolder * alice = (TFolder*)gROOT->GetListOfBrowsables()->FindObject("FPAlice") ;
249   delete alice;
250   alice = 0;
251   */
252   if (fHits)
253     {
254       fHits->Delete ();
255       delete fHits;
256       fHits = 0;
257     }
258   if (fDigits)
259     {
260       fDigits->Delete ();
261       delete fDigits;
262       fDigits = 0;
263     }
264   if (fSDigits)
265     {
266       fSDigits->Delete();
267       delete fSDigits;
268       fSDigits = 0;
269     }
270
271   if (fReconParticles)
272     {
273       fReconParticles->Delete ();
274       delete fReconParticles;
275       fReconParticles = 0;
276     }
277
278 }
279
280 //_____________________________________________________________________________
281 void AliTOF::AddHit(Int_t track, Int_t *vol, Float_t *hits)
282 {
283   //
284   // Add a TOF hit
285   // new with placement used
286   //
287   TClonesArray &lhits = *fHits;
288   new(lhits[fNhits++]) AliTOFhit(fIshunt, track, vol, hits);
289 }
290
291 //_____________________________________________________________________________
292 void AliTOF::AddT0Hit(Int_t track, Int_t *vol, Float_t *hits)
293 {
294   //
295   // Add a TOF hit
296   // new with placement used
297   //
298   TClonesArray &lhits = *fHits;
299   new(lhits[fNhits++]) AliTOFhitT0(fIshunt, track, vol, hits);
300 }
301
302 //_____________________________________________________________________________
303 void AliTOF::AddDigit(Int_t *tracks, Int_t *vol, Int_t *digits)
304 {
305   //
306   // Add a TOF digit
307   // new with placement used
308   //
309   TClonesArray &ldigits = *fDigits;
310   new (ldigits[fNdigits++]) AliTOFdigit(tracks, vol, digits);
311 }
312
313 //_____________________________________________________________________________
314 void AliTOF::AddSDigit(Int_t tracknum, Int_t *vol, Int_t *digits)
315 {
316      
317 //
318 // Add a TOF sdigit
319 //
320         
321   TClonesArray &lSDigits = *fSDigits;   
322   new(lSDigits[fNSDigits++]) AliTOFSDigit(tracknum, vol, digits);
323 }
324
325 //_____________________________________________________________________________
326 void AliTOF::SetTreeAddress ()
327 {
328   // Set branch address for the Hits and Digits Tree.
329   
330   if (fLoader->TreeH())
331    {
332      if (fHits == 0x0)
333       {
334         if (fTZero) fHits   = new TClonesArray("AliTOFhitT0", 1000);
335         else fHits   = new TClonesArray("AliTOFhit", 1000);
336       }
337    }
338   AliDetector::SetTreeAddress ();
339
340   TBranch *branch;
341
342   if (fLoader->TreeS () )
343     {
344       branch = fLoader->TreeS ()->GetBranch ("TOF");
345       if (branch) {
346         if (fSDigits == 0x0) fSDigits = new TClonesArray("AliTOFSDigit",  1000);
347         branch->SetAddress (&fSDigits);
348       }
349     }
350
351   if (fLoader->TreeR() ) 
352     {
353       branch = fLoader->TreeR()->GetBranch("TOF"); 
354       if (branch) 
355        {
356          if (fReconParticles == 0x0) fReconParticles = new TClonesArray("AliTOFcluster",  1000);
357          branch->SetAddress(&fReconParticles);
358        }
359     }
360
361   /*
362   if (fLoader->TreeR() && fReconParticles) //I do not know where this array is created - skowron
363     {
364       branch = fLoader->TreeR()->GetBranch("TOF"); 
365       if (branch) 
366        {
367          branch->SetAddress(&fReconParticles) ;
368        }
369     }
370   */
371 }
372
373 //_____________________________________________________________________________
374 void AliTOF::CreateGeometry()
375 {
376   //
377   // Common geometry code 
378   //
379   //Begin_Html
380   /*
381     <img src="picts/AliTOFv23.gif">
382   */
383   //End_Html
384   //
385
386   Float_t xTof, yTof;
387
388   if (IsVersion()==8) {
389
390     xTof = 124.5;//fTOFGeometry->StripLength()+2.*(0.3+0.03); // cm,  x-dimension of FTOA volume
391     yTof = fTOFGeometry->Rmax()-fTOFGeometry->Rmin(); // cm,  y-dimension of FTOA volume
392     Float_t zTof = fTOFGeometry->ZlenA();             // cm,  z-dimension of FTOA volume
393     
394     //  TOF module internal definitions
395     TOFpc(xTof, yTof, zTof);
396
397   } else if (IsVersion()==7) {
398
399     xTof = 124.5;//fTOFGeometry->StripLength()+2.*(0.3+0.03); // cm,  x-dimension of FTOA volume
400     yTof = fTOFGeometry->Rmax()-fTOFGeometry->Rmin(); // cm,  y-dimension of FTOA volume
401     Float_t zTof = fTOFGeometry->ZlenA();             // cm,  z-dimension of FTOA volume
402     
403     //  TOF module internal definitions
404     TOFpc(xTof, yTof, zTof, fTOFGeometry->ZlenB());
405
406   } else {
407
408     Float_t wall = 4.;//cm // frame inbetween TOF modules
409
410     // Sizes of TOF module with its support etc..
411     xTof = 2.*(fTOFGeometry->Rmin()*TMath::Tan(10.*kDegrad)-wall/2.-0.5);
412     yTof = fTOFGeometry->Rmax()-fTOFGeometry->Rmin();
413
414     //  TOF module internal definitions 
415     TOFpc(xTof, yTof, fTOFGeometry->ZlenC(), fTOFGeometry->ZlenB(), fTOFGeometry->ZlenA(), fTOFGeometry->MaxhZtof());
416   }
417
418 }
419
420 //_____________________________________________________________________________
421 void AliTOF::DrawModule() const
422 {
423   //
424   // Draw a shaded view of the common part of the TOF geometry
425   //
426
427   AliInfo(" Drawing of AliTOF"); 
428   // Set everything unseen
429   gMC->Gsatt("*", "seen", -1);
430   // 
431   // Set ALIC mother transparent
432   gMC->Gsatt("ALIC","SEEN",0);
433   //
434   // Set the volumes visible
435   gMC->Gsatt("FTOA","SEEN",1);
436   gMC->Gsatt("FTOB","SEEN",1);
437   gMC->Gsatt("FTOC","SEEN",1);
438   gMC->Gsatt("FLTA","SEEN",1);
439   gMC->Gsatt("FLTB","SEEN",1);
440   gMC->Gsatt("FLTC","SEEN",1);
441   gMC->Gsatt("FSTR","SEEN",1);
442   //
443   gMC->Gdopt("hide", "on");
444   gMC->Gdopt("shad", "on");
445   gMC->Gsatt("*", "fill", 7);
446   gMC->SetClipBox(".");
447   gMC->SetClipBox("*", 0, 1000, -1000, 1000, -1000, 1000);
448   gMC->DefaultRange();
449   gMC->Gdraw("alic", 40, 30, 0, 12, 9.5, .02, .02);
450   gMC->Gdhead(1111, "Time Of Flight");
451   gMC->Gdman(18, 4, "MAN");
452   gMC->Gdopt("hide","off");
453 }
454
455 //___________________________________________
456 void AliTOF::ResetHits ()
457 {
458   // Reset number of clusters and the cluster array for this detector
459   AliDetector::ResetHits ();
460 }
461
462 //____________________________________________
463 void AliTOF::ResetDigits ()
464 {
465   //
466   // Reset number of digits and the digits array for this detector
467   AliDetector::ResetDigits ();
468   //
469
470 //____________________________________________
471 void AliTOF::ResetSDigits ()
472 {
473   //
474   // Reset number of sdigits and the sdigits array for this detector
475   fNSDigits = 0;
476   //fSDigits = 0x0;
477   //
478
479 //_____________________________________________________________________________
480 void AliTOF::Init()
481 {
482   //
483   // Initialise TOF detector after it has been built
484   //
485   // Set id of TOF sensitive volume
486   if (IsVersion() !=0) fIdSens=gMC->VolId("FPAD");
487
488   /*
489   // Save the geometry
490   TDirectory* saveDir = gDirectory;
491   AliRunLoader::GetRunLoader()->CdGAFile();
492   fTOFGeometry->Write("TOFGeometry");
493   saveDir->cd();
494   */
495 }
496
497 //____________________________________________________________________________
498 void AliTOF::MakeBranch(Option_t* option)
499 {
500  //
501  // Initializes the Branches of the TOF inside the 
502  // trees written for each event. 
503  // AliDetector::MakeBranch initializes just the 
504  // Branch inside TreeH. Here we add the branches in 
505  // TreeD, TreeS and TreeR.
506  //
507   const char *oH = strstr(option,"H");
508   if (fLoader->TreeH() && oH)
509    {
510      if (fHits == 0x0)
511       {
512         if (fTZero) fHits   = new TClonesArray("AliTOFhitT0", 1000);
513         else fHits   = new TClonesArray("AliTOFhit", 1000);
514       }
515    }
516   
517   AliDetector::MakeBranch(option);
518
519   Int_t buffersize = 4000;
520   Char_t branchname[10];
521   sprintf(branchname,"%s",GetName());
522   
523   const char *oD = strstr(option,"D");
524   const char *oS = strstr(option,"S");
525   const char *oR = strstr(option,"R");
526
527   if (fLoader->TreeD() && oD){
528     if (fDigits == 0x0) fDigits = new TClonesArray("AliTOFdigit",  1000); 
529     MakeBranchInTree(fLoader->TreeD(), branchname, &fDigits,buffersize, 0) ;
530   }
531
532   if (fLoader->TreeS() && oS){
533     if (fSDigits == 0x0) fSDigits = new TClonesArray("AliTOFSDigit",  1000);
534     MakeBranchInTree(fLoader->TreeS(), branchname, &fSDigits,buffersize, 0) ;
535   }
536
537   if (fLoader->TreeR() && oR){
538     if (fReconParticles == 0x0) fReconParticles = new TClonesArray("AliTOFcluster",  1000);
539     MakeBranchInTree(fLoader->TreeR(), branchname, &fReconParticles,buffersize, 0) ;
540   }
541
542   /*
543   if (fReconParticles && fLoader->TreeR() && oR){
544     MakeBranchInTree(fLoader->TreeR(), branchname, &fReconParticles,buffersize, 0) ;
545   }
546   */
547 }
548
549 //____________________________________________________________________________
550 void AliTOF::Makehits(Bool_t hits) 
551 {
552 // default argument used, see AliTOF.h
553 // Enable/Disable the writing of the TOF-hits branch 
554 // on TreeH
555 // by default :  enabled for TOFv1, v2, v3, v4, v5
556 //              disabled for TOFv0
557 // 
558    if (hits &&  (IsVersion()!=0))
559       fIdSens = gMC->VolId("FPAD");
560    else
561       AliInfo("Option for writing the TOF-hits branch on TreeH: disabled");
562 }
563
564 //____________________________________________________________________________
565 void AliTOF::FinishEvent()
566 {
567 // do nothing
568 }
569
570 //____________________________________________________________________________
571 void AliTOF::Hits2SDigits()
572 {
573 //
574 // Use the TOF SDigitizer to make TOF SDigits
575 //
576
577 //  AliInfo("Start...");
578   
579   AliRunLoader * rl = fLoader->GetRunLoader();
580   AliTOFSDigitizer sd((rl->GetFileName()).Data());
581   ToAliDebug(1, sd.Print(""));
582
583   sd.Exec("") ;
584
585 }
586
587 //____________________________________________________________________________
588 void AliTOF::Hits2SDigits(Int_t evNumber1, Int_t evNumber2)
589 {
590 //
591 // Use the TOF SDigitizer to make TOF SDigits
592 //
593
594   if ((evNumber2-evNumber1)==1) 
595     AliDebug(1, Form("I am making sdigits for the %dth event", evNumber1));
596   if ((evNumber2-evNumber1)>1)
597     AliDebug(1, Form("I am making sdigits for the events from the %dth to the %dth", evNumber1, evNumber2-1));
598  
599   AliRunLoader * rl = fLoader->GetRunLoader();
600   AliTOFSDigitizer sd((rl->GetFileName()).Data(),evNumber1,evNumber2) ;
601   ToAliDebug(1, sd.Print(""));
602
603   sd.Exec("") ;
604
605 }
606
607 //___________________________________________________________________________
608 AliDigitizer* AliTOF::CreateDigitizer(AliRunDigitizer* manager) const
609 {
610   return new AliTOFDigitizer(manager);
611 }
612
613 //___________________________________________________________________________
614 Bool_t AliTOF::CheckOverlap(Int_t* vol, Int_t* digit,Int_t Track)
615 {
616 //
617 // Checks if 2 or more hits belong to the same pad.
618 // In this case the data assigned to the digit object
619 // are the ones of the first hit in order of Time.
620 // 2 hits from the same track on the same pad are collected.
621 // Called only by Hits2SDigits.
622 // This procedure has to be optimized in the next TOF release.
623 //
624
625   Bool_t overlap = kFALSE;
626   Int_t  vol2[5];
627
628   for (Int_t ndig=0; ndig<fSDigits->GetEntries(); ndig++){
629     AliTOFdigit* currentDigit = (AliTOFdigit*)(fSDigits->UncheckedAt(ndig));
630     currentDigit->GetLocation(vol2);
631     Bool_t idem= kTRUE;
632     // check on digit volume
633     for (Int_t i=0;i<=4;i++){
634       if (!idem) break;
635       if (vol[i]!=vol2[i]) idem=kFALSE;}
636
637     if (idem){  // same pad fired
638       Int_t tdc2 = digit[0];
639       Int_t tdc1 = currentDigit->GetTdc();
640
641       // we separate two digits on the same pad if
642       // they are separated in time by at least 25 ns
643       // remember that tdc time is given in ps
644
645       if (TMath::Abs(tdc1-tdc2)<25000){
646         // in case of overlap we take the earliest
647         if (tdc1>tdc2){
648           currentDigit->SetTdc(tdc2); 
649           currentDigit->SetAdc(digit[1]);
650         }
651         else {
652           currentDigit->SetTdc(tdc1);
653           currentDigit->SetAdc(digit[1]);
654         }
655         currentDigit->AddTrack(Track); // add track number in the track array
656         overlap = kTRUE;
657         return overlap;
658       } else 
659         overlap= kFALSE;
660
661     } // close if (idem) -> two digits on the same TOF pad
662
663   } // end loop on existing sdigits
664
665   return overlap;
666 }
667 //____________________________________________________________________________
668 void AliTOF::Digits2Raw()
669 {
670 //
671 // Starting from the TOF digits, writes the Raw Data objects
672 //
673
674   TStopwatch stopwatch;
675   stopwatch.Start();
676
677   fLoader->LoadDigits();
678
679   TTree* digits = fLoader->TreeD();
680   if (!digits) {
681     AliError("no digits tree");
682     return;
683   }
684   
685   fgTOFRawWriter.Clear();
686   fgTOFRawWriter.SetVerbose(0);
687   if (fgTOFRawWriter.GetPackedAcquisitionMode()) {
688     if(fgTOFRawWriter.GetMatchingWindow()>8192)
689       AliWarning(Form("You are running in packing mode and the matching window is %.2f ns, i.e. greater than 199.8848 ns",
690                       fgTOFRawWriter.GetMatchingWindow()*AliTOFGeometry::TdcBinWidth()*1.e-03));
691   }
692   fgTOFRawWriter.Clear();
693   
694   AliDebug(1,"Formatting raw data for TOF");
695   digits->GetEvent(0);
696   fgTOFRawWriter.RawDataTOF(digits->GetBranch("TOF"));  
697
698   fLoader->UnloadDigits();
699   
700   AliDebug(1, Form("Execution time to write TOF raw data : R:%.2fs C:%.2fs",
701                    stopwatch.RealTime(),stopwatch.CpuTime()));
702
703 }
704
705 //____________________________________________________________________________
706 void AliTOF::RecreateSDigitsArray() {
707 //
708 // delete TClonesArray fSDigits and create it again
709 //  needed for backward compatability with PPR test production
710 //
711   fSDigits->Clear();
712 }
713 //____________________________________________________________________________
714 void AliTOF::CreateSDigitsArray() {
715 //
716 // create TClonesArray fSDigits
717 //  needed for backward compatability with PPR test production
718 //
719   fSDigits       = new TClonesArray("AliTOFSDigit",  1000);
720 }