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:
21 * Revision 1.15 2005/07/12 20:07:35 hristov
22 * Changes needed to run simulation and reconstrruction in the same AliRoot session
24 * Revision 1.14 2005/05/28 14:19:04 schutz
25 * Compilation warnings fixed by T.P.
29 //_________________________________________________________________________
30 // A singleton. This class should be used in the analysis stage to get
31 // reconstructed objects: Digits, RecPoints, TrackSegments and RecParticles,
32 // instead of directly reading them from galice.root file. This container
33 // ensures, that one reads Digits, made of these particular digits, RecPoints,
34 // made of these particular RecPoints, TrackSegments and RecParticles.
35 // This becomes non trivial if there are several identical branches, produced with
36 // different set of parameters.
38 // An example of how to use (see also class AliPHOSAnalyser):
39 // for(Int_t irecp = 0; irecp < gime->NRecParticles() ; irecp++)
40 // AliPHOSRecParticle * part = gime->RecParticle(1) ;
42 // please->GetEvent(event) ; // reads new event from galice.root
44 //*-- Author: Yves Schutz (SUBATECH) & Dmitri Peressounko (RRC KI & SUBATECH)
45 //*-- Completely redesigned by Dmitri Peressounko March 2001
47 //*-- YS June 2001 : renamed the original AliPHOSIndexToObject and make
48 //*-- systematic usage of TFolders without changing the interface
49 //////////////////////////////////////////////////////////////////////////////
52 // --- ROOT system ---
58 // --- Standard library ---
60 // --- AliRoot header files ---
61 #include "AliObjectLoader.h"
63 #include "AliPHOSLoader.h"
65 #include "AliPHOSHit.h"
66 #include "AliPHOSCalibrationDB.h"
67 #include "AliPHOSGetter.h"
69 ClassImp(AliPHOSLoader)
72 const TString AliPHOSLoader::fgkHitsName("HITS");//Name for TClonesArray with hits from one event
73 const TString AliPHOSLoader::fgkSDigitsName("SDIGITS");//Name for TClonesArray
74 const TString AliPHOSLoader::fgkDigitsName("DIGITS");//Name for TClonesArray
75 const TString AliPHOSLoader::fgkEmcRecPointsName("EMCRECPOINTS");//Name for TClonesArray
76 const TString AliPHOSLoader::fgkCpvRecPointsName("CPVRECPOINTS");//Name for TClonesArray
77 const TString AliPHOSLoader::fgkTracksName("TRACKS");//Name for TClonesArray
78 const TString AliPHOSLoader::fgkRecParticlesName("RECPARTICLES");//Name for TClonesArray
80 const TString AliPHOSLoader::fgkEmcRecPointsBranchName("PHOSEmcRP");//Name for branch with EMC Reconstructed Points
81 const TString AliPHOSLoader::fgkCpvRecPointsBranchName("PHOSCpvRP");//Name for branch with CPV Reconstructed Points
82 const TString AliPHOSLoader::fgkTrackSegmentsBranchName("PHOSTS");//Name for branch with TrackSegments
83 const TString AliPHOSLoader::fgkRecParticlesBranchName("PHOSRP");//Name for branch with Reconstructed Particles
84 //____________________________________________________________________________
85 AliPHOSLoader::AliPHOSLoader()
89 //____________________________________________________________________________
90 AliPHOSLoader::AliPHOSLoader(const Char_t *detname,const Char_t *eventfoldername):
91 AliLoader(detname,eventfoldername)
95 //____________________________________________________________________________
96 AliPHOSLoader::AliPHOSLoader(const Char_t *detname,TFolder *topfolder):
97 AliLoader(detname,topfolder)
101 //____________________________________________________________________________
103 AliPHOSLoader::~AliPHOSLoader()
105 //remove and delete arrays
107 Clean(fgkSDigitsName);
108 Clean(fgkDigitsName);
109 Clean(fgkEmcRecPointsName);
110 Clean(fgkCpvRecPointsName);
111 Clean(fgkTracksName);
112 Clean(fgkRecParticlesName);
114 // set to 0x0 the objgetter in AliGetter ... weird isn it !
115 AliPHOSGetter * gime = AliPHOSGetter::Instance() ; // (AliLoader::GetRunLoader()->GetFileName()).Data()) ;
120 //____________________________________________________________________________
121 void AliPHOSLoader::CleanFolders()
124 AliLoader::CleanFolders();
127 //____________________________________________________________________________
128 Int_t AliPHOSLoader::SetEvent()
130 //Cleans loaded stuff and and sets Files and Directories
131 // do not post any data to folder/tasks
134 Int_t retval = AliLoader::SetEvent();
137 AliError("returned error");
142 if (Hits()) Hits()->Clear();
143 if (SDigits()) SDigits()->Clear();
144 if (Digits()) Digits()->Clear();
145 if (EmcRecPoints()) EmcRecPoints()->Clear();
146 if (CpvRecPoints()) CpvRecPoints()->Clear();
147 if (TrackSegments()) TrackSegments()->Clear();
148 if (RecParticles()) RecParticles()->Clear();
153 //____________________________________________________________________________
154 Int_t AliPHOSLoader::GetEvent()
156 //Overloads GetEvent method called by AliRunLoader::GetEvent(Int_t) method
157 //to add Rec Particles specific for PHOS
159 //First call the original method to get whatever from std. setup is needed
162 retval = AliLoader::GetEvent();
165 AliError("returned error");
169 if (GetHitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadHits();
170 if (GetSDigitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadSDigits();
171 if (GetDigitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadDigits();
172 if (GetRecPointsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadRecPoints();
173 if (GetTracksDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadTracks();
174 if (GetRecParticlesDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadRecParticles();
177 //Now, check if RecPart were loaded
181 //____________________________________________________________________________
182 const AliPHOS * AliPHOSLoader::PHOS()
184 // returns the PHOS object
185 AliPHOS * phos = dynamic_cast<AliPHOS*>(GetModulesFolder()->FindObject(fDetectorName));
188 cout << "WARNING: AliPHOSLoader::PHOS -> PHOS module not found in Folders" << endl ;
192 //____________________________________________________________________________
193 const AliPHOSGeometry * AliPHOSLoader::PHOSGeometry()
195 // Return PHOS geometry
196 AliPHOSGeometry * rv = 0 ;
198 rv = PHOS()->GetGeometry();
203 //____________________________________________________________________________
204 Int_t AliPHOSLoader::LoadHits(Option_t* opt)
206 //------- Hits ----------------------
207 //Overload (extends) LoadHits implemented in AliLoader
211 //First call the AliLoader's method to send the TreeH to folder
212 res = AliLoader::LoadHits(opt);
216 AliError("returned error");
220 //read the data from tree in folder and send it to folder
226 //____________________________________________________________________________
227 Int_t AliPHOSLoader::LoadSDigits(Option_t* opt)
229 //---------- SDigits -------------------------
231 //First call the AliLoader's method to send the TreeS to folder
232 res = AliLoader::LoadSDigits(opt);
235 AliError("returned error");
238 return ReadSDigits();
241 //____________________________________________________________________________
242 Int_t AliPHOSLoader::LoadDigits(Option_t* opt)
244 //---------- Digits -------------------------
246 //First call the AliLoader's method to send the TreeS to folder
247 res = AliLoader::LoadDigits(opt);
250 AliError("returned error");
255 //____________________________________________________________________________
256 Int_t AliPHOSLoader::LoadRecPoints(Option_t* opt)
258 // -------------- RecPoints -------------------------------------------
260 //First call the AliLoader's method to send the TreeR to folder
261 res = AliLoader::LoadRecPoints(opt);
264 AliError("returned error");
268 TFolder * phosFolder = GetDetectorDataFolder();
269 if ( phosFolder == 0x0 )
271 AliError("Can not get detector data folder");
274 return ReadRecPoints();
276 //____________________________________________________________________________
278 Int_t AliPHOSLoader::LoadTracks(Option_t* opt)
280 //Loads Tracks: Open File, Reads Tree and posts, Read Data and Posts
281 AliDebug(1, Form("opt = %s",opt));
283 res = AliLoader::LoadTracks(opt);
286 AliError("returned error");
292 //____________________________________________________________________________
293 Int_t AliPHOSLoader::LoadRecParticles(Option_t* opt)
295 // -------------- RecPoints -------------------------------------------
297 //First call the AliLoader's method to send the TreeT to folder
298 res = AliLoader::LoadRecParticles(opt);
301 AliError("returned error");
304 return ReadRecParticles();
307 //____________________________________________________________________________
308 //PostHits etc. PostXXX must be const - not to hide virtual functions
309 //from base class AliLoader, but they call non-constant functions ReadXXX
310 //so I have to const_cast this pointer
311 Int_t AliPHOSLoader::PostHits()const
313 // -------------- Hits -------------------------------------------
314 Int_t reval = AliLoader::PostHits();
317 AliError("returned error");
321 return const_cast<AliPHOSLoader *>(this)->ReadHits();
323 //____________________________________________________________________________
325 Int_t AliPHOSLoader::PostSDigits()const
327 // -------------- SDigits -------------------------------------------
328 Int_t reval = AliLoader::PostSDigits();
331 AliError("returned error");
334 return const_cast<AliPHOSLoader *>(this)->ReadSDigits();
336 //____________________________________________________________________________
338 Int_t AliPHOSLoader::PostDigits()const
340 // -------------- Digits -------------------------------------------
341 Int_t reval = AliLoader::PostDigits();
344 AliError("returned error");
347 return const_cast<AliPHOSLoader *>(this)->ReadDigits();
349 //____________________________________________________________________________
351 Int_t AliPHOSLoader::PostRecPoints()const
353 // -------------- RecPoints -------------------------------------------
354 Int_t reval = AliLoader::PostRecPoints();
357 AliError("returned error");
360 return const_cast<AliPHOSLoader *>(this)->ReadRecPoints();
363 //____________________________________________________________________________
365 Int_t AliPHOSLoader::PostRecParticles()const
367 // -------------- RecParticles -------------------------------------------
368 Int_t reval = AliLoader::PostRecParticles();
371 AliError("returned error");
374 return const_cast<AliPHOSLoader *>(this)->ReadRecParticles();
376 //____________________________________________________________________________
378 Int_t AliPHOSLoader::PostTracks()const
380 // -------------- Tracks -------------------------------------------
381 Int_t reval = AliLoader::PostTracks();
384 AliError("returned error");
387 return const_cast<AliPHOSLoader *>(this)->ReadTracks();
389 //____________________________________________________________________________
393 //____________________________________________________________________________
394 Int_t AliPHOSLoader::ReadHits()
396 // If there is no Clones Array in folder creates it and sends to folder
397 // then tries to read
398 // Reads the first entry of PHOS branch in hit tree TreeH()
399 // Reads data from TreeH and stores it in TClonesArray that sits in DetectorDataFolder
401 TObject** hitref = HitsRef();
408 TClonesArray* hits = dynamic_cast<TClonesArray*>(*hitref);
410 TTree* treeh = TreeH();
414 AliError("Cannot read TreeH from folder");
418 TBranch * hitsbranch = treeh->GetBranch(fDetectorName);
421 AliError("Cannot find branch PHOS");
425 AliDebug(1, "Reading Hits");
427 if (hitsbranch->GetEntries() > 1)
429 TClonesArray * tempo = new TClonesArray("AliPHOSHit",1000);
431 hitsbranch->SetAddress(&tempo);
434 for (i = 0 ; i < hitsbranch->GetEntries(); i++)
436 hitsbranch->GetEntry(i) ;
438 for ( j = 0 ; j < tempo->GetEntries() ; j++)
440 AliPHOSHit* hit = (AliPHOSHit*)tempo->At(j);
441 new((*hits)[index]) AliPHOSHit( *hit ) ;
450 hitsbranch->SetAddress(hitref);
451 hitsbranch->GetEntry(0) ;
456 //____________________________________________________________________________
457 Int_t AliPHOSLoader::ReadSDigits()
459 // Read the summable digits tree TreeS():
460 // Check if TClones is in folder
461 // if not create and add to folder
462 // connect to tree if available
465 TObject** sdref = SDigitsRef();
469 sdref = SDigitsRef();
472 TTree * treeS = TreeS();
475 //May happen if file is truncated or new in LoadSDigits
476 //AliError("There is no SDigit Tree");
480 TBranch * branch = treeS->GetBranch(fDetectorName);
482 {//easy, maybe just a new tree
483 //AliError("Cannot find branch PHOS");
487 branch->SetAddress(SDigitsRef());
492 //____________________________________________________________________________
493 Int_t AliPHOSLoader::ReadDigits()
495 // Read the summable digits tree TreeS():
496 // Check if TClones is in folder
497 // if not create and add to folder
498 // connect to tree if available
501 TObject** dref = DigitsRef();
503 {//if there is not array in folder, create it and put it there
508 TTree * treeD = TreeD();
511 //May happen if file is truncated or new in LoadSDigits
512 //AliError("There is no Digit Tree");
516 TBranch * branch = treeD->GetBranch(fDetectorName);
518 {//easy, maybe just a new tree
519 //AliError("Cannot find branch ",fDetectorName.Data());
523 branch->SetAddress(dref);//connect branch to buffer sitting in folder
524 branch->GetEntry(0);//get first event
529 //____________________________________________________________________________
531 void AliPHOSLoader::Track(Int_t itrack)
533 // Read the first entry of PHOS branch in hit tree gAlice->TreeH()
538 AliError("Can not load hits.");
543 TBranch * hitsbranch = dynamic_cast<TBranch*>(TreeH()->GetListOfBranches()->FindObject("PHOS")) ;
546 cout << "WARNING: AliPHOSLoader::ReadTreeH -> Cannot find branch PHOS" << endl ;
549 if(!Hits()) PostHits();
551 hitsbranch->SetAddress(HitsRef());
552 hitsbranch->GetEntry(itrack);
556 //____________________________________________________________________________
557 Int_t AliPHOSLoader::ReadRecPoints()
559 //Creates and posts to folder an array container,
560 //connects branch in tree (if exists), and reads data to array
562 MakeRecPointsArray();
564 TObjArray * cpva = 0x0 ;
565 TObjArray * emca = 0x0 ;
567 TTree * treeR = TreeR();
571 //May happen if file is truncated or new in LoadSDigits
576 TBranch * emcbranch = treeR->GetBranch(fgkEmcRecPointsBranchName);
578 if (emcbranch == 0x0)
580 AliError(Form("Can not get branch with EMC Rec. Points named %s",
581 fgkEmcRecPointsBranchName.Data()));
586 emcbranch->SetAddress(&emca) ;
587 emcbranch->GetEntry(0) ;
589 TBranch * cpvbranch = treeR->GetBranch(fgkCpvRecPointsBranchName);
590 if (cpvbranch == 0x0)
592 AliError(Form("Can not get branch with CPV Rec. Points named %s",
593 fgkCpvRecPointsBranchName.Data()));
598 cpvbranch->SetAddress(&cpva);
599 cpvbranch->GetEntry(0) ;
603 Int_t maxemc = emca->GetEntries() ;
604 for ( ii= 0 ; ii < maxemc ; ii++ )
605 EmcRecPoints()->Add(emca->At(ii)) ;
607 Int_t maxcpv = cpva->GetEntries() ;
608 for ( ii= 0 ; ii < maxcpv ; ii++ )
609 CpvRecPoints()->Add(cpva->At(ii)) ;
614 //____________________________________________________________________________
615 Int_t AliPHOSLoader::ReadTracks()
617 //Creates and posts to folder an array container,
618 //connects branch in tree (if exists), and reads data to arry
620 TObject** trkref = TracksRef();
622 {//Create and post array
623 MakeTrackSegmentsArray();
624 trkref = TracksRef();
627 TTree * treeT = TreeT();
630 //May happen if file is truncated or new in LoadSDigits, or the file is in update mode,
631 //but tracking was not performed yet for a current event
632 //AliError("There is no Tree with Tracks");
636 TBranch * branch = treeT->GetBranch(fgkTrackSegmentsBranchName);
638 {//easy, maybe just a new tree
639 AliError(Form("Cannot find branch named %s",
640 fgkTrackSegmentsBranchName.Data()));
644 branch->SetAddress(trkref);//connect branch to buffer sitting in folder
645 branch->GetEntry(0);//get first event
649 //____________________________________________________________________________
651 Int_t AliPHOSLoader::ReadRecParticles()
653 //Reads Reconstructed Particles from file
654 //Creates and posts to folder an array container,
655 //connects branch in tree (if exists), and reads data to arry
657 TObject** recpartref = RecParticlesRef();
659 if ( recpartref == 0x0 )
660 {//Create and post array
661 MakeRecParticlesArray();
662 recpartref = RecParticlesRef();
665 TTree * treeP = TreeP();
668 //May happen if file is truncated or new in LoadSDigits,
669 //or the file is in update mode,
670 //but tracking was not performed yet for a current event
671 // AliError("There is no Tree with Tracks and Reconstructed Particles");
675 TBranch * branch = treeP->GetBranch(fgkRecParticlesBranchName);
677 {//easy, maybe just a new tree
678 AliError(Form("Cannot find branch %s",
679 fgkRecParticlesBranchName.Data()));
683 branch->SetAddress(recpartref);//connect branch to buffer sitting in folder
684 branch->GetEntry(0);//get first event
690 AliPHOSGeometry* AliPHOSLoader::GetPHOSGeometry()
692 //returns PHOS geometry from gAlice
693 //static Method used by some classes where it is not convienient to pass eventfoldername
696 AliPHOS* phos=dynamic_cast<AliPHOS*>(gAlice->GetDetector("PHOS"));
699 return phos->GetGeometry();
701 /***************************************************************************************/
703 AliPHOSLoader* AliPHOSLoader::GetPHOSLoader(const char* eventfoldername)
705 // Return PHOS loader
706 AliRunLoader* rn = AliRunLoader::GetRunLoader(eventfoldername);
708 printf("Can not find Run Loader in folder %s", eventfoldername);
711 return dynamic_cast<AliPHOSLoader*>(rn->GetLoader("PHOSLoader"));
713 /***************************************************************************************/
715 Bool_t AliPHOSLoader::BranchExists(const TString& recName)
717 // Check if a branch named redName exists
718 if (fBranchTitle.IsNull()) return kFALSE;
719 TString dataname, zername ;
721 if(recName == "SDigits")
724 dataname = GetDetectorName();
725 zername = "AliPHOSSDigitizer" ;
728 if(recName == "Digits"){
730 dataname = GetDetectorName();
731 zername = "AliPHOSDigitizer" ;
734 if(recName == "RecPoints"){
736 dataname = fgkEmcRecPointsBranchName;
737 zername = "AliPHOSClusterizer" ;
740 if(recName == "TrackSegments"){
742 dataname = fgkTrackSegmentsBranchName;
743 zername = "AliPHOSTrackSegmentMaker";
746 if(recName == "RecParticles"){
748 dataname = fgkRecParticlesBranchName;
749 zername = "AliPHOSPID";
758 TObjArray * lob = static_cast<TObjArray*>(tree->GetListOfBranches()) ;
760 TBranch * branch = 0 ;
761 TString titleName(fBranchTitle);
764 while ((branch = (static_cast<TBranch*>(next())))) {
765 TString branchName(branch->GetName() ) ;
766 TString branchTitle(branch->GetTitle() ) ;
767 if ( branchName.BeginsWith(dataname) && branchTitle.BeginsWith(fBranchTitle) ){
768 AliWarning(Form("branch %s with title %s ",
769 dataname.Data(),fBranchTitle.Data()));
772 if ( branchName.BeginsWith(zername) && branchTitle.BeginsWith(titleName) ){
773 AliWarning(Form("branch AliPHOS... with title %s ",
774 branch->GetTitle()));
782 void AliPHOSLoader::SetBranchTitle(const TString& btitle)
785 if (btitle.CompareTo(fBranchTitle) == 0) return;
786 fBranchTitle = btitle;
790 //____________________________________________________________________________
791 //Again, must be const not to hide virtual functions from AliLoader
792 //but there are calls to non-const functions, so I have to const_cast this pointer
793 void AliPHOSLoader::CleanHits()const
796 AliLoader::CleanHits();
798 TClonesArray* hits = const_cast<AliPHOSLoader *>(this)->Hits();
799 if (hits) hits->Clear();
801 //____________________________________________________________________________
803 void AliPHOSLoader::CleanSDigits()const
805 // Clean SDigits array
806 AliLoader::CleanSDigits();
807 TClonesArray* sdigits = const_cast<AliPHOSLoader *>(this)->SDigits();
808 if (sdigits) sdigits->Clear();
811 //____________________________________________________________________________
813 void AliPHOSLoader::CleanDigits()const
815 // Clean Digits array
816 AliLoader::CleanDigits();
817 TClonesArray* digits = const_cast<AliPHOSLoader *>(this)->Digits();
818 if (digits) digits->Clear();
820 //____________________________________________________________________________
822 void AliPHOSLoader::CleanRecPoints()const
824 // Clean RecPoints array
825 AliLoader::CleanRecPoints();
826 TObjArray* recpoints = const_cast<AliPHOSLoader *>(this)->EmcRecPoints();
827 if (recpoints) recpoints->Clear();
828 recpoints = const_cast<AliPHOSLoader *>(this)->CpvRecPoints();
829 if (recpoints) recpoints->Clear();
831 //____________________________________________________________________________
833 void AliPHOSLoader::CleanTracks()const
835 //Cleans Tracks stuff
836 AliLoader::CleanTracks();//tree
838 //and clear the array
839 TClonesArray* tracks = const_cast<AliPHOSLoader *>(this)->TrackSegments();
840 if (tracks) tracks->Clear();
843 //____________________________________________________________________________
845 void AliPHOSLoader::CleanRecParticles()
847 // Clean RecParticles array
848 TClonesArray *recpar = RecParticles();
849 if (recpar) recpar->Clear();
853 //____________________________________________________________________________
855 void AliPHOSLoader::ReadCalibrationDB(const char * database,const char * filename)
857 // Read calibration data base from file
858 if(fcdb && (strcmp(database,fcdb->GetTitle())==0))
861 TFile * file = gROOT->GetFile(filename) ;
863 file = TFile::Open(filename);
865 AliError(Form("Cannot open file %s", filename)) ;
870 fcdb = dynamic_cast<AliPHOSCalibrationDB *>(file->Get("AliPHOSCalibrationDB")) ;
872 AliError(Form("No database %s in file %s", database, filename)) ;
874 //____________________________________________________________________________
876 // AliPHOSSDigitizer* AliPHOSLoader::PHOSSDigitizer()
878 // //return PHOS SDigitizer
879 // return dynamic_cast<AliPHOSSDigitizer*>(SDigitizer()) ;
882 //____________________________________________________________________________
883 void AliPHOSLoader::MakeHitsArray()
885 // Add Hits array to the data folder
887 TClonesArray* hits = new TClonesArray("AliPHOSHit",1000);
888 hits->SetName(fgkHitsName);
889 GetDetectorDataFolder()->Add(hits);
892 //____________________________________________________________________________
893 void AliPHOSLoader::MakeSDigitsArray()
895 // Add SDigits array to the data folder
896 if ( SDigits()) return;
897 TClonesArray* sdigits = new TClonesArray("AliPHOSDigit",1);
898 sdigits->SetName(fgkSDigitsName);
899 GetDetectorDataFolder()->Add(sdigits);
902 //____________________________________________________________________________
903 void AliPHOSLoader::MakeDigitsArray()
905 // Add Digits array to the data folder
906 if ( Digits()) return;
907 TClonesArray* digits = new TClonesArray("AliPHOSDigit",1);
908 digits->SetName(fgkDigitsName);
909 GetDetectorDataFolder()->Add(digits);
913 //____________________________________________________________________________
914 void AliPHOSLoader::MakeRecPointsArray()
916 // Add RecPoints array to the data folder
917 if ( EmcRecPoints() == 0x0)
919 AliDebug(9, "Making array for EMC");
920 TObjArray* emc = new TObjArray(100) ;
921 emc->SetName(fgkEmcRecPointsName) ;
922 GetDetectorDataFolder()->Add(emc);
925 if ( CpvRecPoints() == 0x0)
927 AliDebug(9, "Making array for CPV");
928 TObjArray* cpv = new TObjArray(100) ;
929 cpv->SetName(fgkCpvRecPointsName);
930 GetDetectorDataFolder()->Add(cpv);
934 //____________________________________________________________________________
935 void AliPHOSLoader::MakeTrackSegmentsArray()
937 // Add TrackSegments array to the data folder
938 if ( TrackSegments()) return;
939 TClonesArray * ts = new TClonesArray("AliPHOSTrackSegment",100) ;
940 ts->SetName(fgkTracksName);
941 GetDetectorDataFolder()->Add(ts);
945 //____________________________________________________________________________
946 void AliPHOSLoader::MakeRecParticlesArray()
948 // Add RecParticles array to the data folder
949 if ( RecParticles()) return;
950 TClonesArray * rp = new TClonesArray("AliPHOSRecParticle",100) ;
951 rp->SetName(fgkRecParticlesName);
952 GetDetectorDataFolder()->Add(rp);