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