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"
78 ClassImp(AliPHOSLoader)
81 const TString AliPHOSLoader::fgkHitsName("HITS");//Name for TClonesArray with hits from one event
82 const TString AliPHOSLoader::fgkSDigitsName("SDIGITS");//Name for TClonesArray
83 const TString AliPHOSLoader::fgkDigitsName("DIGITS");//Name for TClonesArray
84 const TString AliPHOSLoader::fgkEmcRecPointsName("EMCRECPOINTS");//Name for TClonesArray
85 const TString AliPHOSLoader::fgkCpvRecPointsName("CPVRECPOINTS");//Name for TClonesArray
86 const TString AliPHOSLoader::fgkTracksName("TRACKS");//Name for TClonesArray
87 const TString AliPHOSLoader::fgkRecParticlesName("RECPARTICLES");//Name for TClonesArray
89 const TString AliPHOSLoader::fgkEmcRecPointsBranchName("PHOSEmcRP");//Name for branch with EMC Reconstructed Points
90 const TString AliPHOSLoader::fgkCpvRecPointsBranchName("PHOSCpvRP");//Name for branch with CPV Reconstructed Points
91 const TString AliPHOSLoader::fgkTrackSegmentsBranchName("PHOSTS");//Name for branch with TrackSegments
92 const TString AliPHOSLoader::fgkRecParticlesBranchName("PHOSRP");//Name for branch with Reconstructed Particles
93 //____________________________________________________________________________
94 AliPHOSLoader::AliPHOSLoader() : fBranchTitle(), fDebug(0), fTmpHits(0x0)
97 fTmpHits = new TClonesArray("AliPHOSHit",1000);
99 //____________________________________________________________________________
100 AliPHOSLoader::AliPHOSLoader(const Char_t *detname,const Char_t *eventfoldername) :
101 AliLoader(detname, eventfoldername),
102 fBranchTitle(), fDebug(0), fTmpHits(0x0)
106 //____________________________________________________________________________
107 AliPHOSLoader::AliPHOSLoader(const Char_t *detname,TFolder *topfolder):
108 AliLoader(detname,topfolder),
109 fBranchTitle(), fDebug(0), fTmpHits(0x0)
113 fTmpHits = new TClonesArray("AliPHOSHit",1000);
116 //____________________________________________________________________________
118 AliPHOSLoader::~AliPHOSLoader()
120 //remove and delete arrays
122 Clean(fgkSDigitsName);
123 Clean(fgkDigitsName);
124 Clean(fgkEmcRecPointsName);
125 Clean(fgkCpvRecPointsName);
126 Clean(fgkTracksName);
127 Clean(fgkRecParticlesName);
131 //____________________________________________________________________________
132 void AliPHOSLoader::CleanFolders()
135 AliLoader::CleanFolders();
138 //____________________________________________________________________________
139 Int_t AliPHOSLoader::SetEvent()
141 //Cleans loaded stuff and and sets Files and Directories
142 // do not post any data to folder
145 Int_t retval = AliLoader::SetEvent();
148 AliError("returned error");
153 if (Hits()) Hits()->Clear();
154 if (SDigits()) SDigits()->Clear();
155 if (Digits()) Digits()->Clear();
156 if (EmcRecPoints()) EmcRecPoints()->Clear();
157 if (CpvRecPoints()) CpvRecPoints()->Clear();
158 if (TrackSegments()) TrackSegments()->Clear();
159 if (RecParticles()) RecParticles()->Clear();
164 //____________________________________________________________________________
165 Int_t AliPHOSLoader::GetEvent()
167 //Overloads GetEvent method called by AliRunLoader::GetEvent(Int_t) method
168 //to add Rec Particles specific for PHOS
170 //First call the original method to get whatever from std. setup is needed
173 retval = AliLoader::GetEvent();
176 AliError("returned error");
180 if (GetHitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadHits();
181 if (GetSDigitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadSDigits();
182 if (GetDigitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadDigits();
183 if (GetRecPointsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadRecPoints();
184 if (GetTracksDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadTracks();
185 if (GetRecParticlesDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadRecParticles();
188 //Now, check if RecPart were loaded
192 // //____________________________________________________________________________
193 // const AliPHOS * AliPHOSLoader::PHOS()
195 // // returns the PHOS object
196 // AliPHOS * phos = dynamic_cast<AliPHOS*>(GetModulesFolder()->FindObject(fDetectorName));
199 // cout << "WARNING: AliPHOSLoader::PHOS -> PHOS module not found in Folders" << endl ;
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();
407 TClonesArray* hits = static_cast<TClonesArray*>(*hitref);
409 TTree* treeh = TreeH();
412 AliError("Cannot read TreeH from folder");
416 TBranch * hitsbranch = treeh->GetBranch(fDetectorName);
417 if (hitsbranch == 0) {
418 AliError("Cannot find branch PHOS");
422 AliDebug(1, "Reading Hits");
424 if (hitsbranch->GetEntries() > 1) {
426 hitsbranch->SetAddress(&fTmpHits);
428 for (Int_t i = 0 ; i < hitsbranch->GetEntries(); i++) {
429 hitsbranch->GetEntry(i) ;
430 for (Int_t j = 0 ; j < fTmpHits->GetEntriesFast() ; j++) {
431 AliPHOSHit* hit = (AliPHOSHit*)fTmpHits->At(j);
432 new((*hits)[index]) AliPHOSHit( *hit ) ;
439 hitsbranch->SetAddress(hitref);
440 hitsbranch->GetEntry(0) ;
445 //____________________________________________________________________________
446 Int_t AliPHOSLoader::ReadSDigits()
448 // Read the summable digits tree TreeS():
449 // Check if TClones is in folder
450 // if not create and add to folder
451 // connect to tree if available
454 TObject** sdref = SDigitsRef();
458 sdref = SDigitsRef();
461 TTree * treeS = TreeS();
464 //May happen if file is truncated or new in LoadSDigits
465 //AliError("There is no SDigit Tree");
469 TBranch * branch = treeS->GetBranch(fDetectorName);
471 {//easy, maybe just a new tree
472 //AliError("Cannot find branch PHOS");
476 branch->SetAddress(sdref);
481 //____________________________________________________________________________
482 Int_t AliPHOSLoader::ReadDigits()
484 // Read the summable digits tree TreeS():
485 // Check if TClones is in folder
486 // if not create and add to folder
487 // connect to tree if available
490 TObject** dref = DigitsRef();
492 {//if there is not array in folder, create it and put it there
497 TTree * treeD = TreeD();
500 //May happen if file is truncated or new in LoadSDigits
501 //AliError("There is no Digit Tree");
505 TBranch * branch = treeD->GetBranch(fDetectorName);
507 {//easy, maybe just a new tree
508 //AliError("Cannot find branch ",fDetectorName.Data());
512 branch->SetAddress(dref);//connect branch to buffer sitting in folder
513 branch->GetEntry(0);//get first event
518 //____________________________________________________________________________
520 void AliPHOSLoader::Track(Int_t itrack)
522 // Read the first entry of PHOS branch in hit tree gAlice->TreeH()
527 AliError("Can not load hits.");
532 TBranch * hitsbranch = dynamic_cast<TBranch*>(TreeH()->GetListOfBranches()->FindObject("PHOS")) ;
535 cout << "WARNING: AliPHOSLoader::ReadTreeH -> Cannot find branch PHOS" << endl ;
538 if(!Hits()) PostHits();
540 hitsbranch->SetAddress(HitsRef());
541 hitsbranch->GetEntry(itrack);
545 //____________________________________________________________________________
546 Int_t AliPHOSLoader::ReadRecPoints()
548 //Creates and posts to folder an array container,
549 //connects branch in tree (if exists), and reads data to array
551 MakeRecPointsArray();
553 TObjArray * cpva = 0x0 ;
554 TObjArray * emca = 0x0 ;
556 TTree * treeR = TreeR();
560 //May happen if file is truncated or new in LoadSDigits
565 TBranch * emcbranch = treeR->GetBranch(fgkEmcRecPointsBranchName);
567 if (emcbranch == 0x0)
569 AliError(Form("Can not get branch with EMC Rec. Points named %s",
570 fgkEmcRecPointsBranchName.Data()));
575 emcbranch->SetAddress(&emca) ;
576 emcbranch->GetEntry(0) ;
578 TBranch * cpvbranch = treeR->GetBranch(fgkCpvRecPointsBranchName);
579 if (cpvbranch == 0x0)
581 AliError(Form("Can not get branch with CPV Rec. Points named %s",
582 fgkCpvRecPointsBranchName.Data()));
587 cpvbranch->SetAddress(&cpva);
588 cpvbranch->GetEntry(0) ;
593 Int_t maxemc = emca->GetEntries() ;
594 for ( ii= 0 ; ii < maxemc ; ii++ )
595 EmcRecPoints()->Add(emca->At(ii)) ;
599 Int_t maxcpv = cpva->GetEntries() ;
600 for ( ii= 0 ; ii < maxcpv ; ii++ )
601 CpvRecPoints()->Add(cpva->At(ii)) ;
607 //____________________________________________________________________________
608 Int_t AliPHOSLoader::ReadTracks()
610 //Creates and posts to folder an array container,
611 //connects branch in tree (if exists), and reads data to arry
613 TObject** trkref = TracksRef();
615 {//Create and post array
616 MakeTrackSegmentsArray();
617 trkref = TracksRef();
620 TTree * treeT = TreeT();
623 //May happen if file is truncated or new in LoadSDigits, or the file is in update mode,
624 //but tracking was not performed yet for a current event
625 //AliError("There is no Tree with Tracks");
629 TBranch * branch = treeT->GetBranch(fgkTrackSegmentsBranchName);
630 // AliInfo(Form("Branch named %s is opened: 0x%z",
631 // fgkTrackSegmentsBranchName.Data(),branch));
633 {//easy, maybe just a new tree
634 AliError(Form("Cannot find branch named %s",
635 fgkTrackSegmentsBranchName.Data()));
639 branch->SetAddress(trkref);//connect branch to buffer sitting in folder
640 branch->GetEntry(0);//get first event
644 //____________________________________________________________________________
646 Int_t AliPHOSLoader::ReadRecParticles()
648 //Reads Reconstructed Particles from file
649 //Creates and posts to folder an array container,
650 //connects branch in tree (if exists), and reads data to arry
652 TObject** recpartref = RecParticlesRef();
654 if ( recpartref == 0x0 )
655 {//Create and post array
656 MakeRecParticlesArray();
657 recpartref = RecParticlesRef();
660 TTree * treeP = TreeP();
663 //May happen if file is truncated or new in LoadSDigits,
664 //or the file is in update mode,
665 //but tracking was not performed yet for a current event
666 // AliError("There is no Tree with Tracks and Reconstructed Particles");
670 TBranch * branch = treeP->GetBranch(fgkRecParticlesBranchName);
672 {//easy, maybe just a new tree
673 AliError(Form("Cannot find branch %s",
674 fgkRecParticlesBranchName.Data()));
678 branch->SetAddress(recpartref);//connect branch to buffer sitting in folder
679 branch->GetEntry(0);//get first event
685 /***************************************************************************************/
687 AliPHOSLoader* AliPHOSLoader::GetPHOSLoader(const char* eventfoldername)
689 // Return PHOS loader
690 AliRunLoader* rn = AliRunLoader::GetRunLoader(eventfoldername);
692 printf("Can not find Run Loader in folder %s", eventfoldername);
695 return dynamic_cast<AliPHOSLoader*>(rn->GetLoader("PHOSLoader"));
697 /***************************************************************************************/
699 Bool_t AliPHOSLoader::BranchExists(const TString& recName)
701 // Check if a branch named redName exists
702 if (fBranchTitle.IsNull()) return kFALSE;
703 TString dataname, zername ;
705 if(recName == "SDigits")
708 dataname = GetDetectorName();
709 zername = "AliPHOSSDigitizer" ;
712 if(recName == "Digits"){
714 dataname = GetDetectorName();
715 zername = "AliPHOSDigitizer" ;
718 if(recName == "RecPoints"){
720 dataname = fgkEmcRecPointsBranchName;
721 zername = "AliPHOSClusterizer" ;
724 if(recName == "TrackSegments"){
726 dataname = fgkTrackSegmentsBranchName;
727 zername = "AliPHOSTrackSegmentMaker";
730 if(recName == "RecParticles"){
732 dataname = fgkRecParticlesBranchName;
733 zername = "AliPHOSPID";
742 TObjArray * lob = static_cast<TObjArray*>(tree->GetListOfBranches()) ;
744 TBranch * branch = 0 ;
745 TString titleName(fBranchTitle);
748 while ((branch = (static_cast<TBranch*>(next())))) {
749 TString branchName(branch->GetName() ) ;
750 TString branchTitle(branch->GetTitle() ) ;
751 if ( branchName.BeginsWith(dataname) && branchTitle.BeginsWith(fBranchTitle) ){
752 AliWarning(Form("branch %s with title %s ",
753 dataname.Data(),fBranchTitle.Data()));
756 if ( branchName.BeginsWith(zername) && branchTitle.BeginsWith(titleName) ){
757 AliWarning(Form("branch AliPHOS... with title %s ",
758 branch->GetTitle()));
766 void AliPHOSLoader::SetBranchTitle(const TString& btitle)
769 if (btitle.CompareTo(fBranchTitle) == 0) return;
770 fBranchTitle = btitle;
774 //____________________________________________________________________________
775 //Again, must be const not to hide virtual functions from AliLoader
776 //but there are calls to non-const functions, so I have to const_cast this pointer
777 void AliPHOSLoader::CleanHits()const
780 AliLoader::CleanHits();
782 TClonesArray* hits = const_cast<AliPHOSLoader *>(this)->Hits();
783 if (hits) hits->Clear();
785 //____________________________________________________________________________
787 void AliPHOSLoader::CleanSDigits()const
789 // Clean SDigits array
790 AliLoader::CleanSDigits();
791 TClonesArray* sdigits = const_cast<AliPHOSLoader *>(this)->SDigits();
792 if (sdigits) sdigits->Clear();
795 //____________________________________________________________________________
797 void AliPHOSLoader::CleanDigits()const
799 // Clean Digits array
800 AliLoader::CleanDigits();
801 TClonesArray* digits = const_cast<AliPHOSLoader *>(this)->Digits();
802 if (digits) digits->Clear();
804 //____________________________________________________________________________
806 void AliPHOSLoader::CleanRecPoints()const
808 // Clean RecPoints array
809 AliLoader::CleanRecPoints();
810 TObjArray* recpoints = const_cast<AliPHOSLoader *>(this)->EmcRecPoints();
811 if (recpoints) recpoints->Clear();
812 recpoints = const_cast<AliPHOSLoader *>(this)->CpvRecPoints();
813 if (recpoints) recpoints->Clear();
815 //____________________________________________________________________________
817 void AliPHOSLoader::CleanTracks()const
819 //Cleans Tracks stuff
820 AliLoader::CleanTracks();//tree
822 //and clear the array
823 TClonesArray* tracks = const_cast<AliPHOSLoader *>(this)->TrackSegments();
824 if (tracks) tracks->Clear();
827 //____________________________________________________________________________
829 void AliPHOSLoader::CleanRecParticles()
831 // Clean RecParticles array
832 TClonesArray *recpar = RecParticles();
833 if (recpar) recpar->Clear();
837 //____________________________________________________________________________
839 void AliPHOSLoader::MakeHitsArray()
841 // Add Hits array to the data folder
843 TClonesArray* hits = new TClonesArray("AliPHOSHit",1000);
844 hits->SetName(fgkHitsName);
845 GetDetectorDataFolder()->Add(hits);
848 //____________________________________________________________________________
849 void AliPHOSLoader::MakeSDigitsArray()
851 // Add SDigits array to the data folder
852 if ( SDigits()) return;
853 TClonesArray* sdigits = new TClonesArray("AliPHOSDigit",1);
854 sdigits->SetName(fgkSDigitsName);
855 GetDetectorDataFolder()->Add(sdigits);
858 //____________________________________________________________________________
859 void AliPHOSLoader::MakeDigitsArray()
861 // Add Digits array to the data folder
862 if ( Digits()) return;
863 TClonesArray* digits = new TClonesArray("AliPHOSDigit",1);
864 digits->SetName(fgkDigitsName);
865 GetDetectorDataFolder()->Add(digits);
869 //____________________________________________________________________________
870 void AliPHOSLoader::MakeRecPointsArray()
872 // Add RecPoints array to the data folder
873 if ( EmcRecPoints() == 0x0)
875 AliDebug(9, "Making array for EMC");
876 TObjArray* emc = new TObjArray(100) ;
877 emc->SetName(fgkEmcRecPointsName) ;
878 GetDetectorDataFolder()->Add(emc);
881 if ( CpvRecPoints() == 0x0)
883 AliDebug(9, "Making array for CPV");
884 TObjArray* cpv = new TObjArray(100) ;
885 cpv->SetName(fgkCpvRecPointsName);
886 GetDetectorDataFolder()->Add(cpv);
890 //____________________________________________________________________________
891 void AliPHOSLoader::MakeTrackSegmentsArray()
893 // Add TrackSegments array to the data folder
894 if ( TrackSegments()) return;
895 TClonesArray * ts = new TClonesArray("AliPHOSTrackSegment",100) ;
896 ts->SetName(fgkTracksName);
897 GetDetectorDataFolder()->Add(ts);
901 //____________________________________________________________________________
902 void AliPHOSLoader::MakeRecParticlesArray()
904 // Add RecParticles array to the data folder
905 if ( RecParticles()) return;
906 TClonesArray * rp = new TClonesArray("AliPHOSRecParticle",100) ;
907 rp->SetName(fgkRecParticlesName);
908 GetDetectorDataFolder()->Add(rp);