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.18 2006/08/28 10:01:56 kharlov
22 * Effective C++ warnings fixed (Timur Pocheptsov)
24 * Revision 1.17 2006/08/25 16:00:53 kharlov
25 * Compliance with Effective C++AliPHOSHit.cxx
27 * Revision 1.16 2006/08/01 12:15:04 cvetan
28 * Adding a constructor from TFolder. Needed by AliReconstruction plugin scheme
30 * Revision 1.15 2005/07/12 20:07:35 hristov
31 * Changes needed to run simulation and reconstrruction in the same AliRoot session
33 * Revision 1.14 2005/05/28 14:19:04 schutz
34 * Compilation warnings fixed by T.P.
38 //_________________________________________________________________________
39 // A singleton. This class should be used in the analysis stage to get
40 // reconstructed objects: Digits, RecPoints, TrackSegments and RecParticles,
41 // instead of directly reading them from galice.root file. This container
42 // ensures, that one reads Digits, made of these particular digits, RecPoints,
43 // made of these particular RecPoints, TrackSegments and RecParticles.
44 // This becomes non trivial if there are several identical branches, produced with
45 // different set of parameters.
47 // An example of how to use (see also class AliPHOSAnalyser):
48 // for(Int_t irecp = 0; irecp < gime->NRecParticles() ; irecp++)
49 // AliPHOSRecParticle * part = gime->RecParticle(1) ;
51 // please->GetEvent(event) ; // reads new event from galice.root
53 //-- Author: Yves Schutz (SUBATECH) & Dmitri Peressounko (RRC KI & SUBATECH)
54 //-- Completely redesigned by Dmitri Peressounko March 2001
56 //-- YS June 2001 : renamed the original AliPHOSIndexToObject and make
57 //-- systematic usage of TFolders without changing the interface
58 //////////////////////////////////////////////////////////////////////////////
61 // --- ROOT system ---
67 // --- Standard library ---
69 // --- AliRoot header files ---
70 #include "AliObjectLoader.h"
72 #include "AliPHOSLoader.h"
74 #include "AliPHOSHit.h"
76 ClassImp(AliPHOSLoader)
79 const TString AliPHOSLoader::fgkHitsName("HITS");//Name for TClonesArray with hits from one event
80 const TString AliPHOSLoader::fgkSDigitsName("SDIGITS");//Name for TClonesArray
81 const TString AliPHOSLoader::fgkDigitsName("DIGITS");//Name for TClonesArray
82 const TString AliPHOSLoader::fgkEmcRecPointsName("EMCRECPOINTS");//Name for TClonesArray
83 const TString AliPHOSLoader::fgkCpvRecPointsName("CPVRECPOINTS");//Name for TClonesArray
84 const TString AliPHOSLoader::fgkTracksName("TRACKS");//Name for TClonesArray
85 const TString AliPHOSLoader::fgkRecParticlesName("RECPARTICLES");//Name for TClonesArray
87 const TString AliPHOSLoader::fgkEmcRecPointsBranchName("PHOSEmcRP");//Name for branch with EMC Reconstructed Points
88 const TString AliPHOSLoader::fgkCpvRecPointsBranchName("PHOSCpvRP");//Name for branch with CPV Reconstructed Points
89 const TString AliPHOSLoader::fgkTrackSegmentsBranchName("PHOSTS");//Name for branch with TrackSegments
90 const TString AliPHOSLoader::fgkRecParticlesBranchName("PHOSRP");//Name for branch with Reconstructed Particles
91 //____________________________________________________________________________
92 AliPHOSLoader::AliPHOSLoader() : fBranchTitle(), fDebug(0), fTmpHits(0x0)
95 fTmpHits = new TClonesArray("AliPHOSHit",1000);
97 //____________________________________________________________________________
98 AliPHOSLoader::AliPHOSLoader(const Char_t *detname,const Char_t *eventfoldername) :
99 AliLoader(detname, eventfoldername),
100 fBranchTitle(), fDebug(0), fTmpHits(0x0)
104 //____________________________________________________________________________
105 AliPHOSLoader::AliPHOSLoader(const Char_t *detname,TFolder *topfolder):
106 AliLoader(detname,topfolder),
107 fBranchTitle(), fDebug(0), fTmpHits(0x0)
111 fTmpHits = new TClonesArray("AliPHOSHit",1000);
114 //____________________________________________________________________________
116 AliPHOSLoader::~AliPHOSLoader()
118 //remove and delete arrays
120 Clean(fgkSDigitsName);
121 Clean(fgkDigitsName);
122 Clean(fgkEmcRecPointsName);
123 Clean(fgkCpvRecPointsName);
124 Clean(fgkTracksName);
125 Clean(fgkRecParticlesName);
129 //____________________________________________________________________________
130 void AliPHOSLoader::CleanFolders()
133 AliLoader::CleanFolders();
136 //____________________________________________________________________________
137 Int_t AliPHOSLoader::SetEvent()
139 //Cleans loaded stuff and and sets Files and Directories
140 // do not post any data to folder
143 Int_t retval = AliLoader::SetEvent();
146 AliError("returned error");
151 if (Hits()) Hits()->Clear();
152 if (SDigits()) SDigits()->Clear();
153 if (Digits()) Digits()->Clear();
154 if (EmcRecPoints()) EmcRecPoints()->Clear();
155 if (CpvRecPoints()) CpvRecPoints()->Clear();
156 if (TrackSegments()) TrackSegments()->Clear();
157 if (RecParticles()) RecParticles()->Clear();
162 //____________________________________________________________________________
163 Int_t AliPHOSLoader::GetEvent()
165 //Overloads GetEvent method called by AliRunLoader::GetEvent(Int_t) method
166 //to add Rec Particles specific for PHOS
168 //First call the original method to get whatever from std. setup is needed
171 retval = AliLoader::GetEvent();
174 AliError("returned error");
178 if (GetHitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadHits();
179 if (GetSDigitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadSDigits();
180 if (GetDigitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadDigits();
181 if (GetRecPointsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadRecPoints();
182 if (GetTracksDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadTracks();
183 if (GetRecParticlesDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadRecParticles();
186 //Now, check if RecPart were loaded
190 // //____________________________________________________________________________
191 // const AliPHOS * AliPHOSLoader::PHOS()
193 // // returns the PHOS object
194 // AliPHOS * phos = dynamic_cast<AliPHOS*>(GetModulesFolder()->FindObject(fDetectorName));
197 // cout << "WARNING: AliPHOSLoader::PHOS -> PHOS module not found in Folders" << endl ;
201 //____________________________________________________________________________
202 Int_t AliPHOSLoader::LoadHits(Option_t* opt)
204 //------- Hits ----------------------
205 //Overload (extends) LoadHits implemented in AliLoader
209 //First call the AliLoader's method to send the TreeH to folder
210 res = AliLoader::LoadHits(opt);
214 AliError("returned error");
218 //read the data from tree in folder and send it to folder
224 //____________________________________________________________________________
225 Int_t AliPHOSLoader::LoadSDigits(Option_t* opt)
227 //---------- SDigits -------------------------
229 //First call the AliLoader's method to send the TreeS to folder
230 res = AliLoader::LoadSDigits(opt);
233 AliError("returned error");
236 return ReadSDigits();
239 //____________________________________________________________________________
240 Int_t AliPHOSLoader::LoadDigits(Option_t* opt)
242 //---------- Digits -------------------------
244 //First call the AliLoader's method to send the TreeS to folder
245 res = AliLoader::LoadDigits(opt);
248 AliError("returned error");
253 //____________________________________________________________________________
254 Int_t AliPHOSLoader::LoadRecPoints(Option_t* opt)
256 // -------------- RecPoints -------------------------------------------
258 //First call the AliLoader's method to send the TreeR to folder
259 res = AliLoader::LoadRecPoints(opt);
262 AliError("returned error");
266 TFolder * phosFolder = GetDetectorDataFolder();
267 if ( phosFolder == 0x0 )
269 AliError("Can not get detector data folder");
272 return ReadRecPoints();
274 //____________________________________________________________________________
276 Int_t AliPHOSLoader::LoadTracks(Option_t* opt)
278 //Loads Tracks: Open File, Reads Tree and posts, Read Data and Posts
279 AliDebug(1, Form("opt = %s",opt));
281 res = AliLoader::LoadTracks(opt);
284 AliError("returned error");
290 //____________________________________________________________________________
291 Int_t AliPHOSLoader::LoadRecParticles(Option_t* opt)
293 // -------------- RecPoints -------------------------------------------
295 //First call the AliLoader's method to send the TreeT to folder
296 res = AliLoader::LoadRecParticles(opt);
299 AliError("returned error");
302 return ReadRecParticles();
305 //____________________________________________________________________________
306 //PostHits etc. PostXXX must be const - not to hide virtual functions
307 //from base class AliLoader, but they call non-constant functions ReadXXX
308 //so I have to const_cast this pointer
309 Int_t AliPHOSLoader::PostHits()const
311 // -------------- Hits -------------------------------------------
312 Int_t reval = AliLoader::PostHits();
315 AliError("returned error");
319 return const_cast<AliPHOSLoader *>(this)->ReadHits();
321 //____________________________________________________________________________
323 Int_t AliPHOSLoader::PostSDigits()const
325 // -------------- SDigits -------------------------------------------
326 Int_t reval = AliLoader::PostSDigits();
329 AliError("returned error");
332 return const_cast<AliPHOSLoader *>(this)->ReadSDigits();
334 //____________________________________________________________________________
336 Int_t AliPHOSLoader::PostDigits()const
338 // -------------- Digits -------------------------------------------
339 Int_t reval = AliLoader::PostDigits();
342 AliError("returned error");
345 return const_cast<AliPHOSLoader *>(this)->ReadDigits();
347 //____________________________________________________________________________
349 Int_t AliPHOSLoader::PostRecPoints()const
351 // -------------- RecPoints -------------------------------------------
352 Int_t reval = AliLoader::PostRecPoints();
355 AliError("returned error");
358 return const_cast<AliPHOSLoader *>(this)->ReadRecPoints();
361 //____________________________________________________________________________
363 Int_t AliPHOSLoader::PostRecParticles()const
365 // -------------- RecParticles -------------------------------------------
366 Int_t reval = AliLoader::PostRecParticles();
369 AliError("returned error");
372 return const_cast<AliPHOSLoader *>(this)->ReadRecParticles();
374 //____________________________________________________________________________
376 Int_t AliPHOSLoader::PostTracks()const
378 // -------------- Tracks -------------------------------------------
379 Int_t reval = AliLoader::PostTracks();
382 AliError("returned error");
385 return const_cast<AliPHOSLoader *>(this)->ReadTracks();
387 //____________________________________________________________________________
391 //____________________________________________________________________________
392 Int_t AliPHOSLoader::ReadHits()
394 // If there is no Clones Array in folder creates it and sends to folder
395 // then tries to read
396 // Reads the first entry of PHOS branch in hit tree TreeH()
397 // Reads data from TreeH and stores it in TClonesArray that sits in DetectorDataFolder
399 TObject** hitref = HitsRef();
405 TClonesArray* hits = static_cast<TClonesArray*>(*hitref);
407 TTree* treeh = TreeH();
410 AliError("Cannot read TreeH from folder");
414 TBranch * hitsbranch = treeh->GetBranch(fDetectorName);
415 if (hitsbranch == 0) {
416 AliError("Cannot find branch PHOS");
420 AliDebug(1, "Reading Hits");
422 if (hitsbranch->GetEntries() > 1) {
424 hitsbranch->SetAddress(&fTmpHits);
426 for (Int_t i = 0 ; i < hitsbranch->GetEntries(); i++) {
427 hitsbranch->GetEntry(i) ;
428 for (Int_t j = 0 ; j < fTmpHits->GetEntriesFast() ; j++) {
429 AliPHOSHit* hit = (AliPHOSHit*)fTmpHits->At(j);
430 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(sdref);
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) ;
591 Int_t maxemc = emca->GetEntries() ;
592 for ( ii= 0 ; ii < maxemc ; ii++ )
593 EmcRecPoints()->Add(emca->At(ii)) ;
597 Int_t maxcpv = cpva->GetEntries() ;
598 for ( ii= 0 ; ii < maxcpv ; ii++ )
599 CpvRecPoints()->Add(cpva->At(ii)) ;
605 //____________________________________________________________________________
606 Int_t AliPHOSLoader::ReadTracks()
608 //Creates and posts to folder an array container,
609 //connects branch in tree (if exists), and reads data to arry
611 TObject** trkref = TracksRef();
613 {//Create and post array
614 MakeTrackSegmentsArray();
615 trkref = TracksRef();
618 TTree * treeT = TreeT();
621 //May happen if file is truncated or new in LoadSDigits, or the file is in update mode,
622 //but tracking was not performed yet for a current event
623 //AliError("There is no Tree with Tracks");
627 TBranch * branch = treeT->GetBranch(fgkTrackSegmentsBranchName);
628 // AliInfo(Form("Branch named %s is opened: 0x%z",
629 // fgkTrackSegmentsBranchName.Data(),branch));
631 {//easy, maybe just a new tree
632 AliError(Form("Cannot find branch named %s",
633 fgkTrackSegmentsBranchName.Data()));
637 branch->SetAddress(trkref);//connect branch to buffer sitting in folder
638 branch->GetEntry(0);//get first event
642 //____________________________________________________________________________
644 Int_t AliPHOSLoader::ReadRecParticles()
646 //Reads Reconstructed Particles from file
647 //Creates and posts to folder an array container,
648 //connects branch in tree (if exists), and reads data to arry
650 TObject** recpartref = RecParticlesRef();
652 if ( recpartref == 0x0 )
653 {//Create and post array
654 MakeRecParticlesArray();
655 recpartref = RecParticlesRef();
658 TTree * treeP = TreeP();
661 //May happen if file is truncated or new in LoadSDigits,
662 //or the file is in update mode,
663 //but tracking was not performed yet for a current event
664 // AliError("There is no Tree with Tracks and Reconstructed Particles");
668 TBranch * branch = treeP->GetBranch(fgkRecParticlesBranchName);
670 {//easy, maybe just a new tree
671 AliError(Form("Cannot find branch %s",
672 fgkRecParticlesBranchName.Data()));
676 branch->SetAddress(recpartref);//connect branch to buffer sitting in folder
677 branch->GetEntry(0);//get first event
683 /***************************************************************************************/
685 AliPHOSLoader* AliPHOSLoader::GetPHOSLoader(const char* eventfoldername)
687 // Return PHOS loader
688 AliRunLoader* rn = AliRunLoader::GetRunLoader(eventfoldername);
690 printf("Can not find Run Loader in folder %s", eventfoldername);
693 return dynamic_cast<AliPHOSLoader*>(rn->GetLoader("PHOSLoader"));
695 /***************************************************************************************/
697 Bool_t AliPHOSLoader::BranchExists(const TString& recName)
699 // Check if a branch named redName exists
700 if (fBranchTitle.IsNull()) return kFALSE;
701 TString dataname, zername ;
703 if(recName == "SDigits")
706 dataname = GetDetectorName();
707 zername = "AliPHOSSDigitizer" ;
710 if(recName == "Digits"){
712 dataname = GetDetectorName();
713 zername = "AliPHOSDigitizer" ;
716 if(recName == "RecPoints"){
718 dataname = fgkEmcRecPointsBranchName;
719 zername = "AliPHOSClusterizer" ;
722 if(recName == "TrackSegments"){
724 dataname = fgkTrackSegmentsBranchName;
725 zername = "AliPHOSTrackSegmentMaker";
728 if(recName == "RecParticles"){
730 dataname = fgkRecParticlesBranchName;
731 zername = "AliPHOSPID";
740 TObjArray * lob = static_cast<TObjArray*>(tree->GetListOfBranches()) ;
742 TBranch * branch = 0 ;
743 TString titleName(fBranchTitle);
746 while ((branch = (static_cast<TBranch*>(next())))) {
747 TString branchName(branch->GetName() ) ;
748 TString branchTitle(branch->GetTitle() ) ;
749 if ( branchName.BeginsWith(dataname) && branchTitle.BeginsWith(fBranchTitle) ){
750 AliWarning(Form("branch %s with title %s ",
751 dataname.Data(),fBranchTitle.Data()));
754 if ( branchName.BeginsWith(zername) && branchTitle.BeginsWith(titleName) ){
755 AliWarning(Form("branch AliPHOS... with title %s ",
756 branch->GetTitle()));
764 void AliPHOSLoader::SetBranchTitle(const TString& btitle)
767 if (btitle.CompareTo(fBranchTitle) == 0) return;
768 fBranchTitle = btitle;
772 //____________________________________________________________________________
773 //Again, must be const not to hide virtual functions from AliLoader
774 //but there are calls to non-const functions, so I have to const_cast this pointer
775 void AliPHOSLoader::CleanHits()const
778 AliLoader::CleanHits();
780 TClonesArray* hits = const_cast<AliPHOSLoader *>(this)->Hits();
781 if (hits) hits->Clear();
783 //____________________________________________________________________________
785 void AliPHOSLoader::CleanSDigits()const
787 // Clean SDigits array
788 AliLoader::CleanSDigits();
789 TClonesArray* sdigits = const_cast<AliPHOSLoader *>(this)->SDigits();
790 if (sdigits) sdigits->Clear();
793 //____________________________________________________________________________
795 void AliPHOSLoader::CleanDigits()const
797 // Clean Digits array
798 AliLoader::CleanDigits();
799 TClonesArray* digits = const_cast<AliPHOSLoader *>(this)->Digits();
800 if (digits) digits->Clear();
802 //____________________________________________________________________________
804 void AliPHOSLoader::CleanRecPoints()const
806 // Clean RecPoints array
807 AliLoader::CleanRecPoints();
808 TObjArray* recpoints = const_cast<AliPHOSLoader *>(this)->EmcRecPoints();
809 if (recpoints) recpoints->Clear();
810 recpoints = const_cast<AliPHOSLoader *>(this)->CpvRecPoints();
811 if (recpoints) recpoints->Clear();
813 //____________________________________________________________________________
815 void AliPHOSLoader::CleanTracks()const
817 //Cleans Tracks stuff
818 AliLoader::CleanTracks();//tree
820 //and clear the array
821 TClonesArray* tracks = const_cast<AliPHOSLoader *>(this)->TrackSegments();
822 if (tracks) tracks->Clear();
825 //____________________________________________________________________________
827 void AliPHOSLoader::CleanRecParticles()
829 // Clean RecParticles array
830 TClonesArray *recpar = RecParticles();
831 if (recpar) recpar->Clear();
835 //____________________________________________________________________________
837 void AliPHOSLoader::MakeHitsArray()
839 // Add Hits array to the data folder
841 TClonesArray* hits = new TClonesArray("AliPHOSHit",1000);
842 hits->SetName(fgkHitsName);
843 GetDetectorDataFolder()->Add(hits);
846 //____________________________________________________________________________
847 void AliPHOSLoader::MakeSDigitsArray()
849 // Add SDigits array to the data folder
850 if ( SDigits()) return;
851 TClonesArray* sdigits = new TClonesArray("AliPHOSDigit",1);
852 sdigits->SetName(fgkSDigitsName);
853 GetDetectorDataFolder()->Add(sdigits);
856 //____________________________________________________________________________
857 void AliPHOSLoader::MakeDigitsArray()
859 // Add Digits array to the data folder
860 if ( Digits()) return;
861 TClonesArray* digits = new TClonesArray("AliPHOSDigit",1);
862 digits->SetName(fgkDigitsName);
863 GetDetectorDataFolder()->Add(digits);
867 //____________________________________________________________________________
868 void AliPHOSLoader::MakeRecPointsArray()
870 // Add RecPoints array to the data folder
871 if ( EmcRecPoints() == 0x0)
873 AliDebug(9, "Making array for EMC");
874 TObjArray* emc = new TObjArray(100) ;
875 emc->SetName(fgkEmcRecPointsName) ;
876 GetDetectorDataFolder()->Add(emc);
879 if ( CpvRecPoints() == 0x0)
881 AliDebug(9, "Making array for CPV");
882 TObjArray* cpv = new TObjArray(100) ;
883 cpv->SetName(fgkCpvRecPointsName);
884 GetDetectorDataFolder()->Add(cpv);
888 //____________________________________________________________________________
889 void AliPHOSLoader::MakeTrackSegmentsArray()
891 // Add TrackSegments array to the data folder
892 if ( TrackSegments()) return;
893 TClonesArray * ts = new TClonesArray("AliPHOSTrackSegment",100) ;
894 ts->SetName(fgkTracksName);
895 GetDetectorDataFolder()->Add(ts);
899 //____________________________________________________________________________
900 void AliPHOSLoader::MakeRecParticlesArray()
902 // Add RecParticles array to the data folder
903 if ( RecParticles()) return;
904 TClonesArray * rp = new TClonesArray("AliPHOSRecParticle",100) ;
905 rp->SetName(fgkRecParticlesName);
906 GetDetectorDataFolder()->Add(rp);