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 //_________________________________________________________________________
19 // A singleton. This class should be used in the analysis stage to get
20 // reconstructed objects: Digits, RecPoints, TrackSegments and RecParticles,
21 // instead of directly reading them from galice.root file. This container
22 // ensures, that one reads Digits, made of these particular digits, RecPoints,
23 // made of these particular RecPoints, TrackSegments and RecParticles.
24 // This becomes non trivial if there are several identical branches, produced with
25 // different set of parameters.
27 // An example of how to use (see also class AliPHOSAnalyser):
28 // for(Int_t irecp = 0; irecp < gime->NRecParticles() ; irecp++)
29 // AliPHOSRecParticle * part = gime->RecParticle(1) ;
31 // please->GetEvent(event) ; // reads new event from galice.root
33 //*-- Author: Yves Schutz (SUBATECH) & Dmitri Peressounko (RRC KI & SUBATECH)
34 //*-- Completely redesigned by Dmitri Peressounko March 2001
36 //*-- YS June 2001 : renamed the original AliPHOSIndexToObject and make
37 //*-- systematic usage of TFolders without changing the interface
38 //////////////////////////////////////////////////////////////////////////////
41 // --- ROOT system ---
47 // --- Standard library ---
49 // --- AliRoot header files ---
51 #include "AliPHOSLoader.h"
53 #include "AliPHOSHit.h"
54 #include "AliPHOSCalibrationDB.h"
55 #include "AliPHOSGetter.h"
57 ClassImp(AliPHOSLoader)
60 const TString AliPHOSLoader::fgkHitsName("HITS");//Name for TClonesArray with hits from one event
61 const TString AliPHOSLoader::fgkSDigitsName("SDIGITS");//Name for TClonesArray
62 const TString AliPHOSLoader::fgkDigitsName("DIGITS");//Name for TClonesArray
63 const TString AliPHOSLoader::fgkEmcRecPointsName("EMCRECPOINTS");//Name for TClonesArray
64 const TString AliPHOSLoader::fgkCpvRecPointsName("CPVRECPOINTS");//Name for TClonesArray
65 const TString AliPHOSLoader::fgkTracksName("TRACKS");//Name for TClonesArray
66 const TString AliPHOSLoader::fgkRecParticlesName("RECPARTICLES");//Name for TClonesArray
68 const TString AliPHOSLoader::fgkEmcRecPointsBranchName("PHOSEmcRP");//Name for branch with EMC Reconstructed Points
69 const TString AliPHOSLoader::fgkCpvRecPointsBranchName("PHOSCpvRP");//Name for branch with CPV Reconstructed Points
70 const TString AliPHOSLoader::fgkTrackSegmentsBranchName("PHOSTS");//Name for branch with TrackSegments
71 const TString AliPHOSLoader::fgkRecParticlesBranchName("PHOSRP");//Name for branch with Reconstructed Particles
72 //____________________________________________________________________________
73 AliPHOSLoader::AliPHOSLoader()
77 //____________________________________________________________________________
78 AliPHOSLoader::AliPHOSLoader(const Char_t *detname,const Char_t *eventfoldername):
79 AliLoader(detname,eventfoldername)
83 //____________________________________________________________________________
85 AliPHOSLoader::~AliPHOSLoader()
87 //remove and delete arrays
89 Clean(fgkSDigitsName);
91 Clean(fgkEmcRecPointsName);
92 Clean(fgkCpvRecPointsName);
94 Clean(fgkRecParticlesName);
95 // set to 0x0 the objgetter in AliGetter ... weird isn it !
96 AliPHOSGetter * gime = AliPHOSGetter::Instance() ;
101 //____________________________________________________________________________
102 void AliPHOSLoader::CleanFolders()
105 AliLoader::CleanFolders();
108 //____________________________________________________________________________
109 Int_t AliPHOSLoader::SetEvent()
111 //Cleans loaded stuff and and sets Files and Directories
112 // do not post any data to folder/tasks
115 Int_t retval = AliLoader::SetEvent();
118 Error("SetEvent","AliLoader::SetEvent returned error");
123 if (Hits()) Hits()->Clear();
124 if (SDigits()) SDigits()->Clear();
125 if (Digits()) Digits()->Clear();
126 if (EmcRecPoints()) EmcRecPoints()->Clear();
127 if (CpvRecPoints()) CpvRecPoints()->Clear();
128 if (TrackSegments()) TrackSegments()->Clear();
129 if (RecParticles()) RecParticles()->Clear();
134 //____________________________________________________________________________
135 Int_t AliPHOSLoader::GetEvent()
137 //Overloads GetEvent method called by AliRunLoader::GetEvent(Int_t) method
138 //to add Rec Particles specific for PHOS
140 //First call the original method to get whatever from std. setup is needed
143 retval = AliLoader::GetEvent();
146 Error("GetEvent","AliLoader::GetEvent returned error");
150 if (GetHitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadHits();
151 if (GetSDigitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadSDigits();
152 if (GetDigitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadDigits();
153 if (GetRecPointsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadRecPoints();
154 if (GetTracksDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadTracks();
155 if (GetRecParticlesDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadRecParticles();
158 //Now, check if RecPart were loaded
162 //____________________________________________________________________________
163 const AliPHOS * AliPHOSLoader::PHOS()
165 // returns the PHOS object
166 AliPHOS * phos = dynamic_cast<AliPHOS*>(GetModulesFolder()->FindObject(fDetectorName));
169 cout << "WARNING: AliPHOSLoader::PHOS -> PHOS module not found in Folders" << endl ;
173 //____________________________________________________________________________
174 const AliPHOSGeometry * AliPHOSLoader::PHOSGeometry()
176 // Return PHOS geometry
177 AliPHOSGeometry * rv = 0 ;
179 rv = PHOS()->GetGeometry();
184 //____________________________________________________________________________
185 Int_t AliPHOSLoader::LoadHits(Option_t* opt)
187 //------- Hits ----------------------
188 //Overload (extends) LoadHits implemented in AliLoader
192 //First call the AliLoader's method to send the TreeH to folder
193 res = AliLoader::LoadHits(opt);
197 Error("LoadHits","AliLoader::LoadHits returned error");
201 //read the data from tree in folder and send it to folder
207 //____________________________________________________________________________
208 Int_t AliPHOSLoader::LoadSDigits(Option_t* opt)
210 //---------- SDigits -------------------------
212 //First call the AliLoader's method to send the TreeS to folder
213 res = AliLoader::LoadSDigits(opt);
216 Error("PostSDigits","AliLoader::LoadSDigits returned error");
219 return ReadSDigits();
222 //____________________________________________________________________________
223 Int_t AliPHOSLoader::LoadDigits(Option_t* opt)
225 //---------- Digits -------------------------
227 //First call the AliLoader's method to send the TreeS to folder
228 res = AliLoader::LoadDigits(opt);
231 Error("LoadDigits","AliLoader::LoadDigits returned error");
236 //____________________________________________________________________________
237 Int_t AliPHOSLoader::LoadRecPoints(Option_t* opt)
239 // -------------- RecPoints -------------------------------------------
241 //First call the AliLoader's method to send the TreeR to folder
242 res = AliLoader::LoadRecPoints(opt);
245 Error("LoadRecPoints","AliLoader::LoadRecPoints returned error");
249 TFolder * phosFolder = GetDetectorDataFolder();
250 if ( phosFolder == 0x0 )
252 Error("PostDigits","Can not get detector data folder");
255 return ReadRecPoints();
257 //____________________________________________________________________________
259 Int_t AliPHOSLoader::LoadTracks(Option_t* opt)
261 //Loads Tracks: Open File, Reads Tree and posts, Read Data and Posts
262 if (GetDebug()) Info("LoadTracks","opt = %s",opt);
264 res = AliLoader::LoadTracks(opt);
267 Error("LoadTracks","AliLoader::LoadTracks returned error");
273 //____________________________________________________________________________
274 Int_t AliPHOSLoader::LoadRecParticles(Option_t* opt)
276 // -------------- RecPoints -------------------------------------------
278 //First call the AliLoader's method to send the TreeT to folder
279 res = AliLoader::LoadRecParticles(opt);
282 Error("LoadRecParticles","AliLoader::LoadRecParticles returned error");
285 return ReadRecParticles();
288 //____________________________________________________________________________
290 Int_t AliPHOSLoader::PostHits()
292 // -------------- Hits -------------------------------------------
293 Int_t reval = AliLoader::PostHits();
296 Error("PostHits","AliLoader:: returned error");
301 //____________________________________________________________________________
303 Int_t AliPHOSLoader::PostSDigits()
305 // -------------- SDigits -------------------------------------------
306 Int_t reval = AliLoader::PostSDigits();
309 Error("PostSDigits","AliLoader::PostSDigits returned error");
312 return ReadSDigits();
314 //____________________________________________________________________________
316 Int_t AliPHOSLoader::PostDigits()
318 // -------------- Digits -------------------------------------------
319 Int_t reval = AliLoader::PostDigits();
322 Error("PostDigits","AliLoader::PostDigits returned error");
327 //____________________________________________________________________________
329 Int_t AliPHOSLoader::PostRecPoints()
331 // -------------- RecPoints -------------------------------------------
332 Int_t reval = AliLoader::PostRecPoints();
335 Error("PostRecPoints","AliLoader::PostRecPoints returned error");
338 return ReadRecPoints();
341 //____________________________________________________________________________
343 Int_t AliPHOSLoader::PostRecParticles()
345 // -------------- RecParticles -------------------------------------------
346 Int_t reval = AliLoader::PostRecParticles();
349 Error("PostRecParticles","AliLoader::PostRecParticles returned error");
352 return ReadRecParticles();
354 //____________________________________________________________________________
356 Int_t AliPHOSLoader::PostTracks()
358 // -------------- Tracks -------------------------------------------
359 Int_t reval = AliLoader::PostTracks();
362 Error("PostTracks","AliLoader::PostTracks returned error");
367 //____________________________________________________________________________
371 //____________________________________________________________________________
372 Int_t AliPHOSLoader::ReadHits()
374 // If there is no Clones Array in folder creates it and sends to folder
375 // then tries to read
376 // Reads the first entry of PHOS branch in hit tree TreeH()
377 // Reads data from TreeH and stores it in TClonesArray that sits in DetectorDataFolder
379 TObject** hitref = HitsRef();
386 TClonesArray* hits = dynamic_cast<TClonesArray*>(*hitref);
388 TTree* treeh = TreeH();
392 Error("ReadHits"," Cannot read TreeH from folder");
396 TBranch * hitsbranch = treeh->GetBranch(fDetectorName);
399 Error("ReadHits"," Cannot find branch PHOS");
403 if (GetDebug()) Info("ReadHits","Reading Hits");
405 if (hitsbranch->GetEntries() > 1)
407 TClonesArray * tempo = new TClonesArray("AliPHOSHit",1000);
409 hitsbranch->SetAddress(&tempo);
412 for (i = 0 ; i < hitsbranch->GetEntries(); i++)
414 hitsbranch->GetEntry(i) ;
416 for ( j = 0 ; j < tempo->GetEntries() ; j++)
418 AliPHOSHit* hit = (AliPHOSHit*)tempo->At(j);
419 new((*hits)[index]) AliPHOSHit( *hit ) ;
427 hitsbranch->SetAddress(hitref);
428 hitsbranch->GetEntry(0) ;
433 //____________________________________________________________________________
434 Int_t AliPHOSLoader::ReadSDigits()
436 // Read the summable digits tree TreeS():
437 // Check if TClones is in folder
438 // if not create and add to folder
439 // connect to tree if available
442 TObject** sdref = SDigitsRef();
446 sdref = SDigitsRef();
449 TTree * treeS = TreeS();
452 //May happen if file is truncated or new in LoadSDigits
453 //Error("ReadSDigits","There is no SDigit Tree");
457 TBranch * branch = treeS->GetBranch(fDetectorName);
459 {//easy, maybe just a new tree
460 //Error("ReadSDigits"," Cannot find branch PHOS");
464 branch->SetAddress(SDigitsRef());
469 //____________________________________________________________________________
470 Int_t AliPHOSLoader::ReadDigits()
472 // Read the summable digits tree TreeS():
473 // Check if TClones is in folder
474 // if not create and add to folder
475 // connect to tree if available
478 TObject** dref = DigitsRef();
480 {//if there is not array in folder, create it and put it there
485 TTree * treeD = TreeD();
488 //May happen if file is truncated or new in LoadSDigits
489 //Error("ReadDigits","There is no Digit Tree");
493 TBranch * branch = treeD->GetBranch(fDetectorName);
495 {//easy, maybe just a new tree
496 //Error("ReadDigits"," Cannot find branch ",fDetectorName.Data());
500 branch->SetAddress(dref);//connect branch to buffer sitting in folder
501 branch->GetEntry(0);//get first event
506 //____________________________________________________________________________
508 void AliPHOSLoader::Track(Int_t itrack)
510 // Read the first entry of PHOS branch in hit tree gAlice->TreeH()
515 Error("Track","Can not load hits.");
520 TBranch * hitsbranch = dynamic_cast<TBranch*>(TreeH()->GetListOfBranches()->FindObject("PHOS")) ;
523 cout << "WARNING: AliPHOSLoader::ReadTreeH -> Cannot find branch PHOS" << endl ;
526 if(!Hits()) PostHits();
528 hitsbranch->SetAddress(HitsRef());
529 hitsbranch->GetEntry(itrack);
532 //____________________________________________________________________________
533 void AliPHOSLoader::ReadTreeQA()
535 // Read the digit tree gAlice->TreeQA()
536 // so far only PHOS knows about this Tree
538 if(PHOS()->TreeQA()== 0){
539 cerr << "ERROR: AliPHOSLoader::ReadTreeQA: can not read TreeQA " << endl ;
543 TBranch * qabranch = PHOS()->TreeQA()->GetBranch("PHOS");
546 cout << "WARNING: AliPHOSLoader::ReadTreeQA -> Cannot find QA Alarms for PHOS" << endl ;
550 // if(!Alarms()) PostQA();
552 qabranch->SetAddress(AlarmsRef()) ;
554 qabranch->GetEntry(0) ;
559 //____________________________________________________________________________
560 Int_t AliPHOSLoader::ReadRecPoints()
562 //Creates and posts to folder an array container,
563 //connects branch in tree (if exists), and reads data to array
565 MakeRecPointsArray();
567 TObjArray * cpva = 0x0 ;
568 TObjArray * emca = 0x0 ;
570 TTree * treeR = TreeR();
574 //May happen if file is truncated or new in LoadSDigits
579 TBranch * emcbranch = treeR->GetBranch(fgkEmcRecPointsBranchName);
581 if (emcbranch == 0x0)
583 Error("ReadRecPoints","Can not get branch with EMC Rec. Points named %s",fgkEmcRecPointsBranchName.Data());
588 emcbranch->SetAddress(&emca) ;
589 emcbranch->GetEntry(0) ;
591 TBranch * cpvbranch = treeR->GetBranch(fgkCpvRecPointsBranchName);
592 if (cpvbranch == 0x0)
594 Error("ReadRecPoints","Can not get branch with CPV Rec. Points named %s",fgkCpvRecPointsBranchName.Data());
599 cpvbranch->SetAddress(&cpva);
600 cpvbranch->GetEntry(0) ;
604 Int_t maxemc = emca->GetEntries() ;
605 for ( ii= 0 ; ii < maxemc ; ii++ )
606 EmcRecPoints()->Add(emca->At(ii)) ;
608 Int_t maxcpv = cpva->GetEntries() ;
609 for ( ii= 0 ; ii < maxcpv ; ii++ )
610 CpvRecPoints()->Add(cpva->At(ii)) ;
615 //____________________________________________________________________________
616 Int_t AliPHOSLoader::ReadTracks()
618 //Creates and posts to folder an array container,
619 //connects branch in tree (if exists), and reads data to arry
621 TObject** trkref = TracksRef();
623 {//Create and post array
624 MakeTrackSegmentsArray();
625 trkref = TracksRef();
628 TTree * treeT = TreeT();
631 //May happen if file is truncated or new in LoadSDigits, or the file is in update mode,
632 //but tracking was not performed yet for a current event
633 //Error("ReadTracks","There is no Tree with Tracks");
637 TBranch * branch = treeT->GetBranch(fgkTrackSegmentsBranchName);
639 {//easy, maybe just a new tree
640 Error("ReadTracks"," Cannot find branch named %s",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 // Error("ReadRecParticles","There is no Tree with Tracks and Reconstructed Particles");
675 TBranch * branch = treeP->GetBranch(fgkRecParticlesBranchName);
677 {//easy, maybe just a new tree
678 Error("ReadRecParticles"," Cannot find branch %s",fgkRecParticlesBranchName.Data());
682 branch->SetAddress(recpartref);//connect branch to buffer sitting in folder
683 branch->GetEntry(0);//get first event
689 AliPHOSGeometry* AliPHOSLoader::GetPHOSGeometry()
691 //returns PHOS geometry from gAlice
692 //static Method used by some classes where it is not convienient to pass eventfoldername
695 AliPHOS* phos=dynamic_cast<AliPHOS*>(gAlice->GetDetector("PHOS"));
698 return phos->GetGeometry();
700 /***************************************************************************************/
702 AliPHOSLoader* AliPHOSLoader::GetPHOSLoader(const char* eventfoldername)
704 // Return PHOS loader
705 AliRunLoader* rn = AliRunLoader::GetRunLoader(eventfoldername);
708 cerr<<"Error: <AliPHOSLoader::GetPHOSLoader>: "
709 << "Can not find Run Loader in folder "<<eventfoldername<<endl;
712 return dynamic_cast<AliPHOSLoader*>(rn->GetLoader("PHOSLoader"));
714 /***************************************************************************************/
716 Bool_t AliPHOSLoader::BranchExists(const TString& recName)
718 // Check if a branch named redName exists
719 if (fBranchTitle.IsNull()) return kFALSE;
720 TString dataname, zername ;
722 if(recName == "SDigits")
725 dataname = GetDetectorName();
726 zername = "AliPHOSSDigitizer" ;
729 if(recName == "Digits"){
731 dataname = GetDetectorName();
732 zername = "AliPHOSDigitizer" ;
735 if(recName == "RecPoints"){
737 dataname = fgkEmcRecPointsBranchName;
738 zername = "AliPHOSClusterizer" ;
741 if(recName == "TrackSegments"){
743 dataname = fgkTrackSegmentsBranchName;
744 zername = "AliPHOSTrackSegmentMaker";
747 if(recName == "RecParticles"){
749 dataname = fgkRecParticlesBranchName;
750 zername = "AliPHOSPID";
759 TObjArray * lob = static_cast<TObjArray*>(tree->GetListOfBranches()) ;
761 TBranch * branch = 0 ;
762 TString titleName(fBranchTitle);
765 while ((branch = (static_cast<TBranch*>(next())))) {
766 TString branchName(branch->GetName() ) ;
767 TString branchTitle(branch->GetTitle() ) ;
768 if ( branchName.BeginsWith(dataname) && branchTitle.BeginsWith(fBranchTitle) ){
769 Warning("BranchExists","branch %s with title %s ",dataname.Data(),fBranchTitle.Data());
772 if ( branchName.BeginsWith(zername) && branchTitle.BeginsWith(titleName) ){
773 Warning("BranchExists","branch AliPHOS... with title %s ",branch->GetTitle());
781 void AliPHOSLoader::SetBranchTitle(const TString& btitle)
784 if (btitle.CompareTo(fBranchTitle) == 0) return;
785 fBranchTitle = btitle;
788 //____________________________________________________________________________
790 void AliPHOSLoader::CleanHits()
793 AliLoader::CleanHits();
795 TClonesArray* hits = Hits();
796 if (hits) hits->Clear();
798 //____________________________________________________________________________
800 void AliPHOSLoader::CleanSDigits()
802 // Clean SDigits array
803 AliLoader::CleanSDigits();
804 TClonesArray* sdigits = SDigits();
805 if (sdigits) sdigits->Clear();
808 //____________________________________________________________________________
810 void AliPHOSLoader::CleanDigits()
812 // Clean Digits array
813 AliLoader::CleanDigits();
814 TClonesArray* digits = Digits();
815 if (digits) digits->Clear();
817 //____________________________________________________________________________
819 void AliPHOSLoader::CleanRecPoints()
821 // Clean RecPoints array
822 AliLoader::CleanRecPoints();
823 TObjArray* recpoints = EmcRecPoints();
824 if (recpoints) recpoints->Clear();
825 recpoints = CpvRecPoints();
826 if (recpoints) recpoints->Clear();
828 //____________________________________________________________________________
830 void AliPHOSLoader::CleanTracks()
832 //Cleans Tracks stuff
833 AliLoader::CleanTracks();//tree
835 //and clear the array
836 TClonesArray* tracks = TrackSegments();
837 if (tracks) tracks->Clear();
840 //____________________________________________________________________________
842 void AliPHOSLoader::CleanRecParticles()
844 // Clean RecParticles array
845 TClonesArray *recpar = RecParticles();
846 if (recpar) recpar->Clear();
850 //____________________________________________________________________________
852 void AliPHOSLoader::ReadCalibrationDB(const char * database,const char * filename)
854 // Read calibration data base from file
855 if(fcdb && (strcmp(database,fcdb->GetTitle())==0))
858 TFile * file = gROOT->GetFile(filename) ;
860 file = TFile::Open(filename);
862 Error ("ReadCalibrationDB", "Cannot open file %s", filename) ;
867 fcdb = dynamic_cast<AliPHOSCalibrationDB *>(file->Get("AliPHOSCalibrationDB")) ;
869 Error ("ReadCalibrationDB", "No database %s in file %s", database, filename) ;
871 //____________________________________________________________________________
873 // AliPHOSSDigitizer* AliPHOSLoader::PHOSSDigitizer()
875 // //return PHOS SDigitizer
876 // return dynamic_cast<AliPHOSSDigitizer*>(SDigitizer()) ;
879 //____________________________________________________________________________
880 void AliPHOSLoader::MakeHitsArray()
882 // Add Hits array to the data folder
884 TClonesArray* hits = new TClonesArray("AliPHOSHit",1000);
885 hits->SetName(fgkHitsName);
886 GetDetectorDataFolder()->Add(hits);
889 //____________________________________________________________________________
890 void AliPHOSLoader::MakeSDigitsArray()
892 // Add SDigits array to the data folder
893 if ( SDigits()) return;
894 TClonesArray* sdigits = new TClonesArray("AliPHOSDigit",1);
895 sdigits->SetName(fgkSDigitsName);
896 GetDetectorDataFolder()->Add(sdigits);
899 //____________________________________________________________________________
900 void AliPHOSLoader::MakeDigitsArray()
902 // Add Digits array to the data folder
903 if ( Digits()) return;
904 TClonesArray* digits = new TClonesArray("AliPHOSDigit",1);
905 digits->SetName(fgkDigitsName);
906 GetDetectorDataFolder()->Add(digits);
910 //____________________________________________________________________________
911 void AliPHOSLoader::MakeRecPointsArray()
913 // Add RecPoints array to the data folder
914 if ( EmcRecPoints() == 0x0)
916 if (GetDebug()>9) Info("MakeRecPointsArray","Making array for EMC");
917 TObjArray* emc = new TObjArray(100) ;
918 emc->SetName(fgkEmcRecPointsName) ;
919 GetDetectorDataFolder()->Add(emc);
922 if ( CpvRecPoints() == 0x0)
924 if (GetDebug()>9) Info("MakeRecPointsArray","Making array for CPV");
925 TObjArray* cpv = new TObjArray(100) ;
926 cpv->SetName(fgkCpvRecPointsName);
927 GetDetectorDataFolder()->Add(cpv);
931 //____________________________________________________________________________
932 void AliPHOSLoader::MakeTrackSegmentsArray()
934 // Add TrackSegments array to the data folder
935 if ( TrackSegments()) return;
936 TClonesArray * ts = new TClonesArray("AliPHOSTrackSegment",100) ;
937 ts->SetName(fgkTracksName);
938 GetDetectorDataFolder()->Add(ts);
942 //____________________________________________________________________________
943 void AliPHOSLoader::MakeRecParticlesArray()
945 // Add RecParticles array to the data folder
946 if ( RecParticles()) return;
947 TClonesArray * rp = new TClonesArray("AliPHOSRecParticle",100) ;
948 rp->SetName(fgkRecParticlesName);
949 GetDetectorDataFolder()->Add(rp);