]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TOF/AliTOF.cxx
Removing inheritances from TAttLine, TAttMarker and AliRndm in AliModule. The copy...
[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 "TFile.h"
43 #include "TFolder.h"
44 #include "TROOT.h"
45 #include "TTask.h"
46 #include "TTree.h"
47 #include "TVirtualMC.h"
48
49 #include "AliConst.h"
50 #include "AliLoader.h"
51 #include "AliLog.h"
52 #include "AliMC.h"
53 #include "AliRun.h"
54
55 #include "AliTOFDDLRawData.h"
56 #include "AliTOFDigitizer.h"
57 #include "AliTOFdigit.h"
58 #include "AliTOFhitT0.h"
59 #include "AliTOFhit.h"
60 #include "AliTOFGeometry.h"
61 #include "AliTOFSDigitizer.h"
62 #include "AliTOFSDigit.h"
63 #include "AliTOF.h"
64
65 class AliTOFcluster;
66
67 extern TFile *gFile;
68 extern TROOT *gROOT;
69 extern TVirtualMC *gMC;
70
71 extern AliRun *gAlice;
72
73  
74 ClassImp(AliTOF)
75  
76 //_____________________________________________________________________________
77 AliTOF::AliTOF():
78   fFGeom(0x0),
79   fDTask(0x0),
80   fReTask(0x0),
81   fSDigits(0x0),
82   fNSDigits(0),
83   fReconParticles(0x0),
84   fIdSens(-1),
85   fTZero(kFALSE),
86   fTOFGeometry(0x0)
87 {
88   //
89   // Default constructor
90   //
91   fDigits = 0;
92   fIshunt   = 0;
93   fName = "TOF";
94 }
95  
96 //_____________________________________________________________________________
97 AliTOF::AliTOF(const char *name, const char *title, Option_t *option)
98        : 
99   AliDetector(name,title),
100   fFGeom(0x0),
101   fDTask(0x0),
102   fReTask(0x0),
103   fSDigits(0x0),
104   fNSDigits(0),
105   fReconParticles(0x0),
106   fIdSens(-1),
107   fTZero(kFALSE),
108   fTOFGeometry(0x0)
109 {
110   //
111   // AliTOF standard constructor
112   // 
113   // Here are fixed some important parameters
114   //
115
116   // Initialization of hits, sdigits and digits array
117   // added option for time zero analysis
118   //skowron
119   fTOFGeometry = new AliTOFGeometry();
120
121   if (strstr(option,"tzero")){
122     fHits   = new TClonesArray("AliTOFhitT0",  1000);
123     fTZero = kTRUE;
124     //    AliWarning("tzero option requires AliTOFv4T0/AliTOFv5T0 as TOF version (check Your Config.C)");
125   }else{
126     fHits   = new TClonesArray("AliTOFhit",  1000);
127     fTZero = kFALSE;
128   }
129   if (gAlice==0) {
130      AliFatal("gAlice==0 !");
131   }
132
133   AliMC *mcApplication = (AliMC*)gAlice->GetMCApp();
134
135   if (mcApplication->GetHitLists())
136      mcApplication->AddHitList(fHits);
137   else AliError("gAlice->GetHitLists()==0");
138
139   fIshunt  = 0;
140   fSDigits = new TClonesArray("AliTOFSDigit", 1000);
141   fDigits  = new TClonesArray("AliTOFdigit",  1000);
142
143   //
144   // Digitization parameters
145   //
146   // (Transfer Functions to be inserted here)
147   //
148   //PH  SetMarkerColor(7);
149   //PH  SetMarkerStyle(2);
150   //PH  SetMarkerSize(0.4);
151
152 // Strip Parameters
153   //fGapA    =   4.; //cm  Gap beetween tilted strip in A-type plate
154   //fGapB    =   6.; //cm  Gap beetween tilted strip in B-type plate
155
156   // Physical performances
157   //fTimeRes = 100.;//ps
158   //fChrgRes = 100.;//pC
159
160 }
161
162 //____________________________________________________________________________
163 void AliTOF::SetTOFSectors(Int_t *sectors)
164 {
165   // Setter for partial/full TOF configuration
166
167   for(Int_t isec=0;isec<18;isec++){
168     fTOFSectors[isec]=sectors[isec];
169   }
170 }
171 //____________________________________________________________________________
172 void AliTOF::GetTOFSectors(Int_t *sectors) const
173 {
174   // Getter for partial/full TOF configuration
175
176   for(Int_t isec=0;isec<18;isec++){
177     sectors[isec]=fTOFSectors[isec];
178   }
179 }
180 //_____________________________________________________________________________
181 AliTOF::AliTOF(const AliTOF &source)
182   :AliDetector(),
183   fFGeom(0x0),
184   fDTask(0x0),
185   fReTask(0x0),
186   fSDigits(0x0),
187   fNSDigits(0),
188   fReconParticles(0x0),
189   fIdSens(-1),
190   fTZero(kFALSE),
191   fTOFGeometry(0x0)
192 {
193   // copy constructor
194
195   this->fReconParticles=source.fReconParticles;
196   this->fSDigits=source.fSDigits;
197   this->fTOFGeometry=source.fTOFGeometry;
198
199 }
200
201 //_____________________________________________________________________________
202 AliTOF& AliTOF::operator=(const AliTOF &source)
203 {
204   // ass. op.
205
206   this->fReconParticles=source.fReconParticles;
207   this->fSDigits=source.fSDigits;
208   this->fTOFGeometry=source.fTOFGeometry;
209   return *this;
210
211 }
212
213 //_____________________________________________________________________________
214 void AliTOF::CreateTOFFolders()
215 {
216   // create the ALICE TFolder
217   // create the ALICE TTasks
218   // create the ALICE main TFolder
219   // to be done by AliRun
220
221   TFolder * alice = new TFolder();
222   alice->SetNameTitle("FPAlice", "Alice Folder") ;
223   gROOT->GetListOfBrowsables()->Add(alice) ;
224
225   TFolder * aliceF  = alice->AddFolder("folders", "Alice memory Folder") ;
226   //  make it the owner of the objects that it contains
227   aliceF->SetOwner() ;
228   // geometry folder
229   TFolder * geomF = aliceF->AddFolder("Geometry", "Geometry objects") ;
230   TFolder * aliceT  = alice->AddFolder("tasks", "Alice tasks Folder") ;   
231   //  make it the owner of the objects that it contains
232   aliceT->SetOwner() ;
233
234   TTask * aliceDi = new TTask("(S)Digitizer", "Alice SDigitizer & Digitizer") ;
235   aliceT->Add(aliceDi);
236
237   TTask * aliceRe = new TTask("Reconstructioner", "Alice Reconstructioner") ;
238   aliceT->Add(aliceRe);
239
240   char * tempo = new char[80] ;
241
242   // creates the TOF Digitizer and adds it to alice main (S)Digitizer task
243   sprintf(tempo, "%sDigitizers container",GetName() ) ;
244   fDTask = new TTask(GetName(), tempo);
245   aliceDi->Add(fDTask) ;
246
247   // creates the TOF reconstructioner and adds it to alice main Reconstructioner task
248   sprintf(tempo, "%sReconstructioner container",GetName() ) ;
249   fReTask = new TTask(GetName(), tempo);
250   aliceRe->Add(fReTask) ;
251
252   delete [] tempo ;
253  
254   // creates the TOF geometry  folder
255   geomF->AddFolder("TOF", "Geometry for TOF") ;
256 }
257
258 //_____________________________________________________________________________
259 AliTOF::~AliTOF()
260 {
261   // dtor:
262   // it remove also the alice folder 
263   // and task that TOF creates instead of AliRun
264   /* PH Temporarily commented because of problems
265   TFolder * alice = (TFolder*)gROOT->GetListOfBrowsables()->FindObject("FPAlice") ;
266   delete alice;
267   alice = 0;
268   */
269   if (fHits)
270     {
271       fHits->Delete ();
272       delete fHits;
273       fHits = 0;
274     }
275   if (fDigits)
276     {
277       fDigits->Delete ();
278       delete fDigits;
279       fDigits = 0;
280     }
281   if (fSDigits)
282     {
283       fSDigits->Delete();
284       delete fSDigits;
285       fSDigits = 0;
286     }
287
288   if (fReconParticles)
289     {
290       fReconParticles->Delete ();
291       delete fReconParticles;
292       fReconParticles = 0;
293     }
294
295 }
296
297 //_____________________________________________________________________________
298 void AliTOF::AddHit(Int_t track, Int_t *vol, Float_t *hits)
299 {
300   //
301   // Add a TOF hit
302   // new with placement used
303   //
304   TClonesArray &lhits = *fHits;
305   new(lhits[fNhits++]) AliTOFhit(fIshunt, track, vol, hits);
306 }
307
308 //_____________________________________________________________________________
309 void AliTOF::AddT0Hit(Int_t track, Int_t *vol, Float_t *hits)
310 {
311   //
312   // Add a TOF hit
313   // new with placement used
314   //
315   TClonesArray &lhits = *fHits;
316   new(lhits[fNhits++]) AliTOFhitT0(fIshunt, track, vol, hits);
317 }
318
319 //_____________________________________________________________________________
320 void AliTOF::AddDigit(Int_t *tracks, Int_t *vol, Float_t *digits)
321 {
322   //
323   // Add a TOF digit
324   // new with placement used
325   //
326   TClonesArray &ldigits = *fDigits;
327   new (ldigits[fNdigits++]) AliTOFdigit(tracks, vol, digits);
328 }
329
330 //_____________________________________________________________________________
331 void AliTOF::AddSDigit(Int_t tracknum, Int_t *vol, Float_t *digits)
332 {
333      
334 //
335 // Add a TOF sdigit
336 //
337         
338   TClonesArray &lSDigits = *fSDigits;   
339   new(lSDigits[fNSDigits++]) AliTOFSDigit(tracknum, vol, digits);
340 }
341
342 //_____________________________________________________________________________
343 void AliTOF::SetTreeAddress ()
344 {
345   // Set branch address for the Hits and Digits Tree.
346   
347   if (fLoader->TreeH())
348    {
349      if (fHits == 0x0)
350       {
351         if (fTZero) fHits   = new TClonesArray("AliTOFhitT0", 1000);
352         else fHits   = new TClonesArray("AliTOFhit", 1000);
353       }
354    }
355   AliDetector::SetTreeAddress ();
356
357   TBranch *branch;
358
359   if (fLoader->TreeS () )
360     {
361       branch = fLoader->TreeS ()->GetBranch ("TOF");
362       if (branch) {
363         if (fSDigits == 0x0) fSDigits = new TClonesArray("AliTOFSDigit",  1000);
364         branch->SetAddress (&fSDigits);
365       }
366     }
367
368   if (fLoader->TreeR() ) 
369     {
370       branch = fLoader->TreeR()->GetBranch("TOF"); 
371       if (branch) 
372        {
373          if (fReconParticles == 0x0) fReconParticles = new TClonesArray("AliTOFcluster",  1000);
374          branch->SetAddress(&fReconParticles);
375        }
376     }
377
378   /*
379   if (fLoader->TreeR() && fReconParticles) //I do not know where this array is created - skowron
380     {
381       branch = fLoader->TreeR()->GetBranch("TOF"); 
382       if (branch) 
383        {
384          branch->SetAddress(&fReconParticles) ;
385        }
386     }
387   */
388 }
389
390 //_____________________________________________________________________________
391 void AliTOF::CreateGeometry()
392 {
393   //
394   // Common geometry code 
395   //
396   //Begin_Html
397   /*
398     <img src="picts/AliTOFv23.gif">
399   */
400   //End_Html
401   //
402
403   Float_t xTof, yTof;
404
405   if (IsVersion()==7) {
406
407     xTof = 124.5;//fTOFGeometry->StripLength()+2.*(0.3+0.03); // cm,  x-dimension of FTOA volume
408     yTof = fTOFGeometry->Rmax()-fTOFGeometry->Rmin(); // cm,  y-dimension of FTOA volume
409     Float_t zTof = fTOFGeometry->ZlenA();             // cm,  z-dimension of FTOA volume
410     
411     //  TOF module internal definitions
412     TOFpc(xTof, yTof, zTof, fTOFGeometry->ZlenB());
413
414   } else {
415
416     Float_t wall = 4.;//cm // frame inbetween TOF modules
417
418     // Sizes of TOF module with its support etc..
419     xTof = 2.*(fTOFGeometry->Rmin()*TMath::Tan(10.*kDegrad)-wall/2.-0.5);
420     yTof = fTOFGeometry->Rmax()-fTOFGeometry->Rmin();
421
422     //  TOF module internal definitions 
423     TOFpc(xTof, yTof, fTOFGeometry->ZlenC(), fTOFGeometry->ZlenB(), fTOFGeometry->ZlenA(), fTOFGeometry->MaxhZtof());
424   }
425
426 }
427
428 //_____________________________________________________________________________
429 void AliTOF::DrawModule() const
430 {
431   //
432   // Draw a shaded view of the common part of the TOF geometry
433   //
434
435   AliInfo(" Drawing of AliTOF"); 
436   // Set everything unseen
437   gMC->Gsatt("*", "seen", -1);
438   // 
439   // Set ALIC mother transparent
440   gMC->Gsatt("ALIC","SEEN",0);
441   //
442   // Set the volumes visible
443   gMC->Gsatt("FTOA","SEEN",1);
444   gMC->Gsatt("FTOB","SEEN",1);
445   gMC->Gsatt("FTOC","SEEN",1);
446   gMC->Gsatt("FLTA","SEEN",1);
447   gMC->Gsatt("FLTB","SEEN",1);
448   gMC->Gsatt("FLTC","SEEN",1);
449   gMC->Gsatt("FSTR","SEEN",1);
450   //
451   gMC->Gdopt("hide", "on");
452   gMC->Gdopt("shad", "on");
453   gMC->Gsatt("*", "fill", 7);
454   gMC->SetClipBox(".");
455   gMC->SetClipBox("*", 0, 1000, -1000, 1000, -1000, 1000);
456   gMC->DefaultRange();
457   gMC->Gdraw("alic", 40, 30, 0, 12, 9.5, .02, .02);
458   gMC->Gdhead(1111, "Time Of Flight");
459   gMC->Gdman(18, 4, "MAN");
460   gMC->Gdopt("hide","off");
461 }
462
463 //_____________________________________________________________________________
464 Int_t AliTOF::DistancetoPrimitive(Int_t , Int_t )
465 {
466   //
467   // Returns distance from mouse pointer to detector, default version
468   //
469   return 9999;
470 }
471
472 //___________________________________________
473 void AliTOF::ResetHits ()
474 {
475   // Reset number of clusters and the cluster array for this detector
476   AliDetector::ResetHits ();
477 }
478
479 //____________________________________________
480 void AliTOF::ResetDigits ()
481 {
482   //
483   // Reset number of digits and the digits array for this detector
484   AliDetector::ResetDigits ();
485   //
486
487 //____________________________________________
488 void AliTOF::ResetSDigits ()
489 {
490   //
491   // Reset number of sdigits and the sdigits array for this detector
492   fNSDigits = 0;
493   //fSDigits = 0x0;
494   //
495
496 //_____________________________________________________________________________
497 void AliTOF::Init()
498 {
499   //
500   // Initialise TOF detector after it has been built
501   //
502   // Set id of TOF sensitive volume
503   if (IsVersion() !=0) fIdSens=gMC->VolId("FPAD");
504
505   /*
506   // Save the geometry
507   TDirectory* saveDir = gDirectory;
508   gAlice->GetRunLoader()->CdGAFile();
509   fTOFGeometry->Write("TOFGeometry");
510   saveDir->cd();
511   */
512 }
513
514 //____________________________________________________________________________
515 void AliTOF::MakeBranch(Option_t* option)
516 {
517  //
518  // Initializes the Branches of the TOF inside the 
519  // trees written for each event. 
520  // AliDetector::MakeBranch initializes just the 
521  // Branch inside TreeH. Here we add the branches in 
522  // TreeD, TreeS and TreeR.
523  //
524   const char *oH = strstr(option,"H");
525   if (fLoader->TreeH() && oH)
526    {
527      if (fHits == 0x0)
528       {
529         if (fTZero) fHits   = new TClonesArray("AliTOFhitT0", 1000);
530         else fHits   = new TClonesArray("AliTOFhit", 1000);
531       }
532    }
533   
534   AliDetector::MakeBranch(option);
535
536   Int_t buffersize = 4000;
537   Char_t branchname[10];
538   sprintf(branchname,"%s",GetName());
539   
540   const char *oD = strstr(option,"D");
541   const char *oS = strstr(option,"S");
542   const char *oR = strstr(option,"R");
543
544   if (fLoader->TreeD() && oD){
545     if (fDigits == 0x0) fDigits = new TClonesArray("AliTOFdigit",  1000); 
546     MakeBranchInTree(fLoader->TreeD(), branchname, &fDigits,buffersize, 0) ;
547   }
548
549   if (fLoader->TreeS() && oS){
550     if (fSDigits == 0x0) fSDigits = new TClonesArray("AliTOFSDigit",  1000);
551     MakeBranchInTree(fLoader->TreeS(), branchname, &fSDigits,buffersize, 0) ;
552   }
553
554   if (fLoader->TreeR() && oR){
555     if (fReconParticles == 0x0) fReconParticles = new TClonesArray("AliTOFcluster",  1000);
556     MakeBranchInTree(fLoader->TreeR(), branchname, &fReconParticles,buffersize, 0) ;
557   }
558
559   /*
560   if (fReconParticles && fLoader->TreeR() && oR){
561     MakeBranchInTree(fLoader->TreeR(), branchname, &fReconParticles,buffersize, 0) ;
562   }
563   */
564 }
565
566 //____________________________________________________________________________
567 void AliTOF::Makehits(Bool_t hits) 
568 {
569 // default argument used, see AliTOF.h
570 // Enable/Disable the writing of the TOF-hits branch 
571 // on TreeH
572 // by default :  enabled for TOFv1, v2, v3, v4, v5
573 //              disabled for TOFv0
574 // 
575    if (hits &&  (IsVersion()!=0))
576       fIdSens = gMC->VolId("FPAD");
577    else
578       AliInfo("Option for writing the TOF-hits branch on TreeH: disabled");
579 }
580
581 //____________________________________________________________________________
582 void AliTOF::FinishEvent()
583 {
584 // do nothing
585 }
586
587 //____________________________________________________________________________
588 void AliTOF::Hits2SDigits()
589 {
590 //
591 // Use the TOF SDigitizer to make TOF SDigits
592 //
593
594 //  AliInfo("Start...");
595   
596   AliRunLoader * rl = fLoader->GetRunLoader();
597   AliTOFSDigitizer sd((rl->GetFileName()).Data());
598   ToAliDebug(1, sd.Print(""));
599
600   sd.Exec("") ;
601
602 }
603
604 //____________________________________________________________________________
605 void AliTOF::Hits2SDigits(Int_t evNumber1, Int_t evNumber2)
606 {
607 //
608 // Use the TOF SDigitizer to make TOF SDigits
609 //
610
611   if ((evNumber2-evNumber1)==1) 
612       AliDebug(1, Form("I am making sdigits for the %dth event", evNumber1))
613   else if ((evNumber2-evNumber1)>1)
614       AliDebug(1, Form("I am making sdigits for the events from the " 
615                        "%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   
710   AliDebug(1,"Formatting raw data for TOF");
711   digits->GetEvent(0);
712   rawWriter.RawDataTOF(digits->GetBranch("TOF"));  
713
714   fLoader->UnloadDigits();
715   
716 }
717
718 //____________________________________________________________________________
719 void AliTOF::RecreateSDigitsArray() {
720 //
721 // delete TClonesArray fSDigits and create it again
722 //  needed for backward compatability with PPR test production
723 //
724   delete fSDigits;
725   fSDigits       = new TClonesArray("AliTOFSDigit",  1000);
726 }
727 //____________________________________________________________________________
728 void AliTOF::CreateSDigitsArray() {
729 //
730 // create TClonesArray fSDigits
731 //  needed for backward compatability with PPR test production
732 //
733   fSDigits       = new TClonesArray("AliTOFSDigit",  1000);
734 }