1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 /* History of cvs commits:
23 //_________________________________________________________________________
24 // A singleton. This class should be used in the analysis stage to get
25 // reconstructed objects: Digits, RecPoints, TrackSegments and RecParticles,
26 // instead of directly reading them from galice.root file. This container
27 // ensures, that one reads Digits, made of these particular digits, RecPoints,
28 // made of these particular RecPoints, TrackSegments and RecParticles.
29 // This becomes non trivial if there are several identical branches, produced with
30 // different set of parameters.
32 // An example of how to use (see also class AliPHOSAnalyser):
33 // for(Int_t irecp = 0; irecp < gime->NRecParticles() ; irecp++)
34 // AliPHOSRecParticle * part = gime->RecParticle(1) ;
36 // please->GetEvent(event) ; // reads new event from galice.root
38 //*-- Author: Yves Schutz (SUBATECH) & Dmitri Peressounko (RRC KI & SUBATECH)
39 //*-- Completely redesigned by Dmitri Peressounko March 2001
41 //*-- YS June 2001 : renamed the original AliPHOSIndexToObject and make
42 //*-- systematic usage of TFolders without changing the interface
43 //////////////////////////////////////////////////////////////////////////////
46 // --- ROOT system ---
52 // --- Standard library ---
54 // --- AliRoot header files ---
55 #include "AliObjectLoader.h"
57 #include "AliPHOSLoader.h"
59 #include "AliPHOSHit.h"
60 #include "AliPHOSCalibrationDB.h"
61 #include "AliPHOSGetter.h"
63 ClassImp(AliPHOSLoader)
66 const TString AliPHOSLoader::fgkHitsName("HITS");//Name for TClonesArray with hits from one event
67 const TString AliPHOSLoader::fgkSDigitsName("SDIGITS");//Name for TClonesArray
68 const TString AliPHOSLoader::fgkDigitsName("DIGITS");//Name for TClonesArray
69 const TString AliPHOSLoader::fgkEmcRecPointsName("EMCRECPOINTS");//Name for TClonesArray
70 const TString AliPHOSLoader::fgkCpvRecPointsName("CPVRECPOINTS");//Name for TClonesArray
71 const TString AliPHOSLoader::fgkTracksName("TRACKS");//Name for TClonesArray
72 const TString AliPHOSLoader::fgkRecParticlesName("RECPARTICLES");//Name for TClonesArray
74 const TString AliPHOSLoader::fgkEmcRecPointsBranchName("PHOSEmcRP");//Name for branch with EMC Reconstructed Points
75 const TString AliPHOSLoader::fgkCpvRecPointsBranchName("PHOSCpvRP");//Name for branch with CPV Reconstructed Points
76 const TString AliPHOSLoader::fgkTrackSegmentsBranchName("PHOSTS");//Name for branch with TrackSegments
77 const TString AliPHOSLoader::fgkRecParticlesBranchName("PHOSRP");//Name for branch with Reconstructed Particles
78 //____________________________________________________________________________
79 AliPHOSLoader::AliPHOSLoader()
83 //____________________________________________________________________________
84 AliPHOSLoader::AliPHOSLoader(const Char_t *detname,const Char_t *eventfoldername):
85 AliLoader(detname,eventfoldername)
89 //____________________________________________________________________________
91 AliPHOSLoader::~AliPHOSLoader()
93 //remove and delete arrays
95 Clean(fgkSDigitsName);
97 Clean(fgkEmcRecPointsName);
98 Clean(fgkCpvRecPointsName);
100 Clean(fgkRecParticlesName);
102 // set to 0x0 the objgetter in AliGetter ... weird isn it !
103 AliPHOSGetter * gime = AliPHOSGetter::Instance() ; // (AliLoader::GetRunLoader()->GetFileName()).Data()) ;
108 //____________________________________________________________________________
109 void AliPHOSLoader::CleanFolders()
112 AliLoader::CleanFolders();
115 //____________________________________________________________________________
116 Int_t AliPHOSLoader::SetEvent()
118 //Cleans loaded stuff and and sets Files and Directories
119 // do not post any data to folder/tasks
122 Int_t retval = AliLoader::SetEvent();
125 AliError("returned error");
130 if (Hits()) Hits()->Clear();
131 if (SDigits()) SDigits()->Clear();
132 if (Digits()) Digits()->Clear();
133 if (EmcRecPoints()) EmcRecPoints()->Clear();
134 if (CpvRecPoints()) CpvRecPoints()->Clear();
135 if (TrackSegments()) TrackSegments()->Clear();
136 if (RecParticles()) RecParticles()->Clear();
141 //____________________________________________________________________________
142 Int_t AliPHOSLoader::GetEvent()
144 //Overloads GetEvent method called by AliRunLoader::GetEvent(Int_t) method
145 //to add Rec Particles specific for PHOS
147 //First call the original method to get whatever from std. setup is needed
150 retval = AliLoader::GetEvent();
153 AliError("returned error");
157 if (GetHitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadHits();
158 if (GetSDigitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadSDigits();
159 if (GetDigitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadDigits();
160 if (GetRecPointsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadRecPoints();
161 if (GetTracksDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadTracks();
162 if (GetRecParticlesDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadRecParticles();
165 //Now, check if RecPart were loaded
169 //____________________________________________________________________________
170 const AliPHOS * AliPHOSLoader::PHOS()
172 // returns the PHOS object
173 AliPHOS * phos = dynamic_cast<AliPHOS*>(GetModulesFolder()->FindObject(fDetectorName));
176 cout << "WARNING: AliPHOSLoader::PHOS -> PHOS module not found in Folders" << endl ;
180 //____________________________________________________________________________
181 const AliPHOSGeometry * AliPHOSLoader::PHOSGeometry()
183 // Return PHOS geometry
184 AliPHOSGeometry * rv = 0 ;
186 rv = PHOS()->GetGeometry();
191 //____________________________________________________________________________
192 Int_t AliPHOSLoader::LoadHits(Option_t* opt)
194 //------- Hits ----------------------
195 //Overload (extends) LoadHits implemented in AliLoader
199 //First call the AliLoader's method to send the TreeH to folder
200 res = AliLoader::LoadHits(opt);
204 AliError("returned error");
208 //read the data from tree in folder and send it to folder
214 //____________________________________________________________________________
215 Int_t AliPHOSLoader::LoadSDigits(Option_t* opt)
217 //---------- SDigits -------------------------
219 //First call the AliLoader's method to send the TreeS to folder
220 res = AliLoader::LoadSDigits(opt);
223 AliError("returned error");
226 return ReadSDigits();
229 //____________________________________________________________________________
230 Int_t AliPHOSLoader::LoadDigits(Option_t* opt)
232 //---------- Digits -------------------------
234 //First call the AliLoader's method to send the TreeS to folder
235 res = AliLoader::LoadDigits(opt);
238 AliError("returned error");
243 //____________________________________________________________________________
244 Int_t AliPHOSLoader::LoadRecPoints(Option_t* opt)
246 // -------------- RecPoints -------------------------------------------
248 //First call the AliLoader's method to send the TreeR to folder
249 res = AliLoader::LoadRecPoints(opt);
252 AliError("returned error");
256 TFolder * phosFolder = GetDetectorDataFolder();
257 if ( phosFolder == 0x0 )
259 AliError("Can not get detector data folder");
262 return ReadRecPoints();
264 //____________________________________________________________________________
266 Int_t AliPHOSLoader::LoadTracks(Option_t* opt)
268 //Loads Tracks: Open File, Reads Tree and posts, Read Data and Posts
269 AliDebug(1, Form("opt = %s",opt));
271 res = AliLoader::LoadTracks(opt);
274 AliError("returned error");
280 //____________________________________________________________________________
281 Int_t AliPHOSLoader::LoadRecParticles(Option_t* opt)
283 // -------------- RecPoints -------------------------------------------
285 //First call the AliLoader's method to send the TreeT to folder
286 res = AliLoader::LoadRecParticles(opt);
289 AliError("returned error");
292 return ReadRecParticles();
295 //____________________________________________________________________________
296 //PostHits etc. PostXXX must be const - not to hide virtual functions
297 //from base class AliLoader, but they call non-constant functions ReadXXX
298 //so I have to const_cast this pointer
299 Int_t AliPHOSLoader::PostHits()const
301 // -------------- Hits -------------------------------------------
302 Int_t reval = AliLoader::PostHits();
305 AliError("returned error");
309 return const_cast<AliPHOSLoader *>(this)->ReadHits();
311 //____________________________________________________________________________
313 Int_t AliPHOSLoader::PostSDigits()const
315 // -------------- SDigits -------------------------------------------
316 Int_t reval = AliLoader::PostSDigits();
319 AliError("returned error");
322 return const_cast<AliPHOSLoader *>(this)->ReadSDigits();
324 //____________________________________________________________________________
326 Int_t AliPHOSLoader::PostDigits()const
328 // -------------- Digits -------------------------------------------
329 Int_t reval = AliLoader::PostDigits();
332 AliError("returned error");
335 return const_cast<AliPHOSLoader *>(this)->ReadDigits();
337 //____________________________________________________________________________
339 Int_t AliPHOSLoader::PostRecPoints()const
341 // -------------- RecPoints -------------------------------------------
342 Int_t reval = AliLoader::PostRecPoints();
345 AliError("returned error");
348 return const_cast<AliPHOSLoader *>(this)->ReadRecPoints();
351 //____________________________________________________________________________
353 Int_t AliPHOSLoader::PostRecParticles()const
355 // -------------- RecParticles -------------------------------------------
356 Int_t reval = AliLoader::PostRecParticles();
359 AliError("returned error");
362 return const_cast<AliPHOSLoader *>(this)->ReadRecParticles();
364 //____________________________________________________________________________
366 Int_t AliPHOSLoader::PostTracks()const
368 // -------------- Tracks -------------------------------------------
369 Int_t reval = AliLoader::PostTracks();
372 AliError("returned error");
375 return const_cast<AliPHOSLoader *>(this)->ReadTracks();
377 //____________________________________________________________________________
381 //____________________________________________________________________________
382 Int_t AliPHOSLoader::ReadHits()
384 // If there is no Clones Array in folder creates it and sends to folder
385 // then tries to read
386 // Reads the first entry of PHOS branch in hit tree TreeH()
387 // Reads data from TreeH and stores it in TClonesArray that sits in DetectorDataFolder
389 TObject** hitref = HitsRef();
396 TClonesArray* hits = dynamic_cast<TClonesArray*>(*hitref);
398 TTree* treeh = TreeH();
402 AliError("Cannot read TreeH from folder");
406 TBranch * hitsbranch = treeh->GetBranch(fDetectorName);
409 AliError("Cannot find branch PHOS");
413 AliDebug(1, "Reading Hits");
415 if (hitsbranch->GetEntries() > 1)
417 TClonesArray * tempo = new TClonesArray("AliPHOSHit",1000);
419 hitsbranch->SetAddress(&tempo);
422 for (i = 0 ; i < hitsbranch->GetEntries(); i++)
424 hitsbranch->GetEntry(i) ;
426 for ( j = 0 ; j < tempo->GetEntries() ; j++)
428 AliPHOSHit* hit = (AliPHOSHit*)tempo->At(j);
429 new((*hits)[index]) AliPHOSHit( *hit ) ;
437 hitsbranch->SetAddress(hitref);
438 hitsbranch->GetEntry(0) ;
443 //____________________________________________________________________________
444 Int_t AliPHOSLoader::ReadSDigits()
446 // Read the summable digits tree TreeS():
447 // Check if TClones is in folder
448 // if not create and add to folder
449 // connect to tree if available
452 TObject** sdref = SDigitsRef();
456 sdref = SDigitsRef();
459 TTree * treeS = TreeS();
462 //May happen if file is truncated or new in LoadSDigits
463 //AliError("There is no SDigit Tree");
467 TBranch * branch = treeS->GetBranch(fDetectorName);
469 {//easy, maybe just a new tree
470 //AliError("Cannot find branch PHOS");
474 branch->SetAddress(SDigitsRef());
479 //____________________________________________________________________________
480 Int_t AliPHOSLoader::ReadDigits()
482 // Read the summable digits tree TreeS():
483 // Check if TClones is in folder
484 // if not create and add to folder
485 // connect to tree if available
488 TObject** dref = DigitsRef();
490 {//if there is not array in folder, create it and put it there
495 TTree * treeD = TreeD();
498 //May happen if file is truncated or new in LoadSDigits
499 //AliError("There is no Digit Tree");
503 TBranch * branch = treeD->GetBranch(fDetectorName);
505 {//easy, maybe just a new tree
506 //AliError("Cannot find branch ",fDetectorName.Data());
510 branch->SetAddress(dref);//connect branch to buffer sitting in folder
511 branch->GetEntry(0);//get first event
516 //____________________________________________________________________________
518 void AliPHOSLoader::Track(Int_t itrack)
520 // Read the first entry of PHOS branch in hit tree gAlice->TreeH()
525 AliError("Can not load hits.");
530 TBranch * hitsbranch = dynamic_cast<TBranch*>(TreeH()->GetListOfBranches()->FindObject("PHOS")) ;
533 cout << "WARNING: AliPHOSLoader::ReadTreeH -> Cannot find branch PHOS" << endl ;
536 if(!Hits()) PostHits();
538 hitsbranch->SetAddress(HitsRef());
539 hitsbranch->GetEntry(itrack);
543 //____________________________________________________________________________
544 Int_t AliPHOSLoader::ReadRecPoints()
546 //Creates and posts to folder an array container,
547 //connects branch in tree (if exists), and reads data to array
549 MakeRecPointsArray();
551 TObjArray * cpva = 0x0 ;
552 TObjArray * emca = 0x0 ;
554 TTree * treeR = TreeR();
558 //May happen if file is truncated or new in LoadSDigits
563 TBranch * emcbranch = treeR->GetBranch(fgkEmcRecPointsBranchName);
565 if (emcbranch == 0x0)
567 AliError(Form("Can not get branch with EMC Rec. Points named %s",
568 fgkEmcRecPointsBranchName.Data()));
573 emcbranch->SetAddress(&emca) ;
574 emcbranch->GetEntry(0) ;
576 TBranch * cpvbranch = treeR->GetBranch(fgkCpvRecPointsBranchName);
577 if (cpvbranch == 0x0)
579 AliError(Form("Can not get branch with CPV Rec. Points named %s",
580 fgkCpvRecPointsBranchName.Data()));
585 cpvbranch->SetAddress(&cpva);
586 cpvbranch->GetEntry(0) ;
590 Int_t maxemc = emca->GetEntries() ;
591 for ( ii= 0 ; ii < maxemc ; ii++ )
592 EmcRecPoints()->Add(emca->At(ii)) ;
594 Int_t maxcpv = cpva->GetEntries() ;
595 for ( ii= 0 ; ii < maxcpv ; ii++ )
596 CpvRecPoints()->Add(cpva->At(ii)) ;
601 //____________________________________________________________________________
602 Int_t AliPHOSLoader::ReadTracks()
604 //Creates and posts to folder an array container,
605 //connects branch in tree (if exists), and reads data to arry
607 TObject** trkref = TracksRef();
609 {//Create and post array
610 MakeTrackSegmentsArray();
611 trkref = TracksRef();
614 TTree * treeT = TreeT();
617 //May happen if file is truncated or new in LoadSDigits, or the file is in update mode,
618 //but tracking was not performed yet for a current event
619 //AliError("There is no Tree with Tracks");
623 TBranch * branch = treeT->GetBranch(fgkTrackSegmentsBranchName);
625 {//easy, maybe just a new tree
626 AliError(Form("Cannot find branch named %s",
627 fgkTrackSegmentsBranchName.Data()));
631 branch->SetAddress(trkref);//connect branch to buffer sitting in folder
632 branch->GetEntry(0);//get first event
636 //____________________________________________________________________________
638 Int_t AliPHOSLoader::ReadRecParticles()
640 //Reads Reconstructed Particles from file
641 //Creates and posts to folder an array container,
642 //connects branch in tree (if exists), and reads data to arry
644 TObject** recpartref = RecParticlesRef();
646 if ( recpartref == 0x0 )
647 {//Create and post array
648 MakeRecParticlesArray();
649 recpartref = RecParticlesRef();
652 TTree * treeP = TreeP();
655 //May happen if file is truncated or new in LoadSDigits,
656 //or the file is in update mode,
657 //but tracking was not performed yet for a current event
658 // AliError("There is no Tree with Tracks and Reconstructed Particles");
662 TBranch * branch = treeP->GetBranch(fgkRecParticlesBranchName);
664 {//easy, maybe just a new tree
665 AliError(Form("Cannot find branch %s",
666 fgkRecParticlesBranchName.Data()));
670 branch->SetAddress(recpartref);//connect branch to buffer sitting in folder
671 branch->GetEntry(0);//get first event
677 AliPHOSGeometry* AliPHOSLoader::GetPHOSGeometry()
679 //returns PHOS geometry from gAlice
680 //static Method used by some classes where it is not convienient to pass eventfoldername
683 AliPHOS* phos=dynamic_cast<AliPHOS*>(gAlice->GetDetector("PHOS"));
686 return phos->GetGeometry();
688 /***************************************************************************************/
690 AliPHOSLoader* AliPHOSLoader::GetPHOSLoader(const char* eventfoldername)
692 // Return PHOS loader
693 AliRunLoader* rn = AliRunLoader::GetRunLoader(eventfoldername);
695 printf("Can not find Run Loader in folder %s", eventfoldername);
698 return dynamic_cast<AliPHOSLoader*>(rn->GetLoader("PHOSLoader"));
700 /***************************************************************************************/
702 Bool_t AliPHOSLoader::BranchExists(const TString& recName)
704 // Check if a branch named redName exists
705 if (fBranchTitle.IsNull()) return kFALSE;
706 TString dataname, zername ;
708 if(recName == "SDigits")
711 dataname = GetDetectorName();
712 zername = "AliPHOSSDigitizer" ;
715 if(recName == "Digits"){
717 dataname = GetDetectorName();
718 zername = "AliPHOSDigitizer" ;
721 if(recName == "RecPoints"){
723 dataname = fgkEmcRecPointsBranchName;
724 zername = "AliPHOSClusterizer" ;
727 if(recName == "TrackSegments"){
729 dataname = fgkTrackSegmentsBranchName;
730 zername = "AliPHOSTrackSegmentMaker";
733 if(recName == "RecParticles"){
735 dataname = fgkRecParticlesBranchName;
736 zername = "AliPHOSPID";
745 TObjArray * lob = static_cast<TObjArray*>(tree->GetListOfBranches()) ;
747 TBranch * branch = 0 ;
748 TString titleName(fBranchTitle);
751 while ((branch = (static_cast<TBranch*>(next())))) {
752 TString branchName(branch->GetName() ) ;
753 TString branchTitle(branch->GetTitle() ) ;
754 if ( branchName.BeginsWith(dataname) && branchTitle.BeginsWith(fBranchTitle) ){
755 AliWarning(Form("branch %s with title %s ",
756 dataname.Data(),fBranchTitle.Data()));
759 if ( branchName.BeginsWith(zername) && branchTitle.BeginsWith(titleName) ){
760 AliWarning(Form("branch AliPHOS... with title %s ",
761 branch->GetTitle()));
769 void AliPHOSLoader::SetBranchTitle(const TString& btitle)
772 if (btitle.CompareTo(fBranchTitle) == 0) return;
773 fBranchTitle = btitle;
777 //____________________________________________________________________________
778 //Again, must be const not to hide virtual functions from AliLoader
779 //but there are calls to non-const functions, so I have to const_cast this pointer
780 void AliPHOSLoader::CleanHits()const
783 AliLoader::CleanHits();
785 TClonesArray* hits = const_cast<AliPHOSLoader *>(this)->Hits();
786 if (hits) hits->Clear();
788 //____________________________________________________________________________
790 void AliPHOSLoader::CleanSDigits()const
792 // Clean SDigits array
793 AliLoader::CleanSDigits();
794 TClonesArray* sdigits = const_cast<AliPHOSLoader *>(this)->SDigits();
795 if (sdigits) sdigits->Clear();
798 //____________________________________________________________________________
800 void AliPHOSLoader::CleanDigits()const
802 // Clean Digits array
803 AliLoader::CleanDigits();
804 TClonesArray* digits = const_cast<AliPHOSLoader *>(this)->Digits();
805 if (digits) digits->Clear();
807 //____________________________________________________________________________
809 void AliPHOSLoader::CleanRecPoints()const
811 // Clean RecPoints array
812 AliLoader::CleanRecPoints();
813 TObjArray* recpoints = const_cast<AliPHOSLoader *>(this)->EmcRecPoints();
814 if (recpoints) recpoints->Clear();
815 recpoints = const_cast<AliPHOSLoader *>(this)->CpvRecPoints();
816 if (recpoints) recpoints->Clear();
818 //____________________________________________________________________________
820 void AliPHOSLoader::CleanTracks()const
822 //Cleans Tracks stuff
823 AliLoader::CleanTracks();//tree
825 //and clear the array
826 TClonesArray* tracks = const_cast<AliPHOSLoader *>(this)->TrackSegments();
827 if (tracks) tracks->Clear();
830 //____________________________________________________________________________
832 void AliPHOSLoader::CleanRecParticles()
834 // Clean RecParticles array
835 TClonesArray *recpar = RecParticles();
836 if (recpar) recpar->Clear();
840 //____________________________________________________________________________
842 void AliPHOSLoader::ReadCalibrationDB(const char * database,const char * filename)
844 // Read calibration data base from file
845 if(fcdb && (strcmp(database,fcdb->GetTitle())==0))
848 TFile * file = gROOT->GetFile(filename) ;
850 file = TFile::Open(filename);
852 AliError(Form("Cannot open file %s", filename)) ;
857 fcdb = dynamic_cast<AliPHOSCalibrationDB *>(file->Get("AliPHOSCalibrationDB")) ;
859 AliError(Form("No database %s in file %s", database, filename)) ;
861 //____________________________________________________________________________
863 // AliPHOSSDigitizer* AliPHOSLoader::PHOSSDigitizer()
865 // //return PHOS SDigitizer
866 // return dynamic_cast<AliPHOSSDigitizer*>(SDigitizer()) ;
869 //____________________________________________________________________________
870 void AliPHOSLoader::MakeHitsArray()
872 // Add Hits array to the data folder
874 TClonesArray* hits = new TClonesArray("AliPHOSHit",1000);
875 hits->SetName(fgkHitsName);
876 GetDetectorDataFolder()->Add(hits);
879 //____________________________________________________________________________
880 void AliPHOSLoader::MakeSDigitsArray()
882 // Add SDigits array to the data folder
883 if ( SDigits()) return;
884 TClonesArray* sdigits = new TClonesArray("AliPHOSDigit",1);
885 sdigits->SetName(fgkSDigitsName);
886 GetDetectorDataFolder()->Add(sdigits);
889 //____________________________________________________________________________
890 void AliPHOSLoader::MakeDigitsArray()
892 // Add Digits array to the data folder
893 if ( Digits()) return;
894 TClonesArray* digits = new TClonesArray("AliPHOSDigit",1);
895 digits->SetName(fgkDigitsName);
896 GetDetectorDataFolder()->Add(digits);
900 //____________________________________________________________________________
901 void AliPHOSLoader::MakeRecPointsArray()
903 // Add RecPoints array to the data folder
904 if ( EmcRecPoints() == 0x0)
906 AliDebug(9, "Making array for EMC");
907 TObjArray* emc = new TObjArray(100) ;
908 emc->SetName(fgkEmcRecPointsName) ;
909 GetDetectorDataFolder()->Add(emc);
912 if ( CpvRecPoints() == 0x0)
914 AliDebug(9, "Making array for CPV");
915 TObjArray* cpv = new TObjArray(100) ;
916 cpv->SetName(fgkCpvRecPointsName);
917 GetDetectorDataFolder()->Add(cpv);
921 //____________________________________________________________________________
922 void AliPHOSLoader::MakeTrackSegmentsArray()
924 // Add TrackSegments array to the data folder
925 if ( TrackSegments()) return;
926 TClonesArray * ts = new TClonesArray("AliPHOSTrackSegment",100) ;
927 ts->SetName(fgkTracksName);
928 GetDetectorDataFolder()->Add(ts);
932 //____________________________________________________________________________
933 void AliPHOSLoader::MakeRecParticlesArray()
935 // Add RecParticles array to the data folder
936 if ( RecParticles()) return;
937 TClonesArray * rp = new TClonesArray("AliPHOSRecParticle",100) ;
938 rp->SetName(fgkRecParticlesName);
939 GetDetectorDataFolder()->Add(rp);