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() ;
100 //____________________________________________________________________________
101 void AliPHOSLoader::CleanFolders()
104 AliLoader::CleanFolders();
107 //____________________________________________________________________________
108 Int_t AliPHOSLoader::SetEvent()
110 //Cleans loaded stuff and and sets Files and Directories
111 // do not post any data to folder/tasks
114 Int_t retval = AliLoader::SetEvent();
117 Error("SetEvent","AliLoader::SetEvent returned error");
122 if (Hits()) Hits()->Clear();
123 if (SDigits()) SDigits()->Clear();
124 if (Digits()) Digits()->Clear();
125 if (EmcRecPoints()) EmcRecPoints()->Clear();
126 if (CpvRecPoints()) CpvRecPoints()->Clear();
127 if (TrackSegments()) TrackSegments()->Clear();
128 if (RecParticles()) RecParticles()->Clear();
133 //____________________________________________________________________________
134 Int_t AliPHOSLoader::GetEvent()
136 //Overloads GetEvent method called by AliRunLoader::GetEvent(Int_t) method
137 //to add Rec Particles specific for PHOS
139 //First call the original method to get whatever from std. setup is needed
142 retval = AliLoader::GetEvent();
145 Error("GetEvent","AliLoader::GetEvent returned error");
149 if (GetHitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadHits();
150 if (GetSDigitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadSDigits();
151 if (GetDigitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadDigits();
152 if (GetRecPointsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadRecPoints();
153 if (GetTracksDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadTracks();
154 if (GetRecParticlesDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadRecParticles();
157 //Now, check if RecPart were loaded
161 //____________________________________________________________________________
162 const AliPHOS * AliPHOSLoader::PHOS()
164 // returns the PHOS object
165 AliPHOS * phos = dynamic_cast<AliPHOS*>(GetModulesFolder()->FindObject(fDetectorName));
168 cout << "WARNING: AliPHOSLoader::PHOS -> PHOS module not found in Folders" << endl ;
172 //____________________________________________________________________________
173 const AliPHOSGeometry * AliPHOSLoader::PHOSGeometry()
175 // Return PHOS geometry
176 AliPHOSGeometry * rv = 0 ;
178 rv = PHOS()->GetGeometry();
183 //____________________________________________________________________________
184 Int_t AliPHOSLoader::LoadHits(Option_t* opt)
186 //------- Hits ----------------------
187 //Overload (extends) LoadHits implemented in AliLoader
191 //First call the AliLoader's method to send the TreeH to folder
192 res = AliLoader::LoadHits(opt);
196 Error("LoadHits","AliLoader::LoadHits returned error");
200 //read the data from tree in folder and send it to folder
206 //____________________________________________________________________________
207 Int_t AliPHOSLoader::LoadSDigits(Option_t* opt)
209 //---------- SDigits -------------------------
211 //First call the AliLoader's method to send the TreeS to folder
212 res = AliLoader::LoadSDigits(opt);
215 Error("PostSDigits","AliLoader::LoadSDigits returned error");
218 return ReadSDigits();
221 //____________________________________________________________________________
222 Int_t AliPHOSLoader::LoadDigits(Option_t* opt)
224 //---------- Digits -------------------------
226 //First call the AliLoader's method to send the TreeS to folder
227 res = AliLoader::LoadDigits(opt);
230 Error("LoadDigits","AliLoader::LoadDigits returned error");
235 //____________________________________________________________________________
236 Int_t AliPHOSLoader::LoadRecPoints(Option_t* opt)
238 // -------------- RecPoints -------------------------------------------
240 //First call the AliLoader's method to send the TreeR to folder
241 res = AliLoader::LoadRecPoints(opt);
244 Error("LoadRecPoints","AliLoader::LoadRecPoints returned error");
248 TFolder * phosFolder = GetDetectorDataFolder();
249 if ( phosFolder == 0x0 )
251 Error("PostDigits","Can not get detector data folder");
254 return ReadRecPoints();
256 //____________________________________________________________________________
258 Int_t AliPHOSLoader::LoadTracks(Option_t* opt)
260 //Loads Tracks: Open File, Reads Tree and posts, Read Data and Posts
261 if (GetDebug()) Info("LoadTracks","opt = %s",opt);
263 res = AliLoader::LoadTracks(opt);
266 Error("LoadTracks","AliLoader::LoadTracks returned error");
272 //____________________________________________________________________________
273 Int_t AliPHOSLoader::LoadRecParticles(Option_t* opt)
275 // -------------- RecPoints -------------------------------------------
277 //First call the AliLoader's method to send the TreeT to folder
278 res = AliLoader::LoadRecParticles(opt);
281 Error("LoadRecParticles","AliLoader::LoadRecParticles returned error");
284 return ReadRecParticles();
287 //____________________________________________________________________________
289 Int_t AliPHOSLoader::PostHits()
291 // -------------- Hits -------------------------------------------
292 Int_t reval = AliLoader::PostHits();
295 Error("PostHits","AliLoader:: returned error");
300 //____________________________________________________________________________
302 Int_t AliPHOSLoader::PostSDigits()
304 // -------------- SDigits -------------------------------------------
305 Int_t reval = AliLoader::PostSDigits();
308 Error("PostSDigits","AliLoader::PostSDigits returned error");
311 return ReadSDigits();
313 //____________________________________________________________________________
315 Int_t AliPHOSLoader::PostDigits()
317 // -------------- Digits -------------------------------------------
318 Int_t reval = AliLoader::PostDigits();
321 Error("PostDigits","AliLoader::PostDigits returned error");
326 //____________________________________________________________________________
328 Int_t AliPHOSLoader::PostRecPoints()
330 // -------------- RecPoints -------------------------------------------
331 Int_t reval = AliLoader::PostRecPoints();
334 Error("PostRecPoints","AliLoader::PostRecPoints returned error");
337 return ReadRecPoints();
340 //____________________________________________________________________________
342 Int_t AliPHOSLoader::PostRecParticles()
344 // -------------- RecParticles -------------------------------------------
345 Int_t reval = AliLoader::PostRecParticles();
348 Error("PostRecParticles","AliLoader::PostRecParticles returned error");
351 return ReadRecParticles();
353 //____________________________________________________________________________
355 Int_t AliPHOSLoader::PostTracks()
357 // -------------- Tracks -------------------------------------------
358 Int_t reval = AliLoader::PostTracks();
361 Error("PostTracks","AliLoader::PostTracks returned error");
366 //____________________________________________________________________________
370 //____________________________________________________________________________
371 Int_t AliPHOSLoader::ReadHits()
373 // If there is no Clones Array in folder creates it and sends to folder
374 // then tries to read
375 // Reads the first entry of PHOS branch in hit tree TreeH()
376 // Reads data from TreeH and stores it in TClonesArray that sits in DetectorDataFolder
378 TObject** hitref = HitsRef();
385 TClonesArray* hits = dynamic_cast<TClonesArray*>(*hitref);
387 TTree* treeh = TreeH();
391 Error("ReadHits"," Cannot read TreeH from folder");
395 TBranch * hitsbranch = treeh->GetBranch(fDetectorName);
398 Error("ReadHits"," Cannot find branch PHOS");
402 if (GetDebug()) Info("ReadHits","Reading Hits");
404 if (hitsbranch->GetEntries() > 1)
406 TClonesArray * tempo = new TClonesArray("AliPHOSHit",1000);
408 hitsbranch->SetAddress(&tempo);
411 for (i = 0 ; i < hitsbranch->GetEntries(); i++)
413 hitsbranch->GetEntry(i) ;
415 for ( j = 0 ; j < tempo->GetEntries() ; j++)
417 AliPHOSHit* hit = (AliPHOSHit*)tempo->At(j);
418 new((*hits)[index]) AliPHOSHit( *hit ) ;
426 hitsbranch->SetAddress(hitref);
427 hitsbranch->GetEntry(0) ;
432 //____________________________________________________________________________
433 Int_t AliPHOSLoader::ReadSDigits()
435 // Read the summable digits tree TreeS():
436 // Check if TClones is in folder
437 // if not create and add to folder
438 // connect to tree if available
441 TObject** sdref = SDigitsRef();
445 sdref = SDigitsRef();
448 TTree * treeS = TreeS();
451 //May happen if file is truncated or new in LoadSDigits
452 //Error("ReadSDigits","There is no SDigit Tree");
456 TBranch * branch = treeS->GetBranch(fDetectorName);
458 {//easy, maybe just a new tree
459 //Error("ReadSDigits"," Cannot find branch PHOS");
463 branch->SetAddress(SDigitsRef());
468 //____________________________________________________________________________
469 Int_t AliPHOSLoader::ReadDigits()
471 // Read the summable digits tree TreeS():
472 // Check if TClones is in folder
473 // if not create and add to folder
474 // connect to tree if available
477 TObject** dref = DigitsRef();
479 {//if there is not array in folder, create it and put it there
484 TTree * treeD = TreeD();
487 //May happen if file is truncated or new in LoadSDigits
488 //Error("ReadDigits","There is no Digit Tree");
492 TBranch * branch = treeD->GetBranch(fDetectorName);
494 {//easy, maybe just a new tree
495 //Error("ReadDigits"," Cannot find branch ",fDetectorName.Data());
499 branch->SetAddress(dref);//connect branch to buffer sitting in folder
500 branch->GetEntry(0);//get first event
505 //____________________________________________________________________________
507 void AliPHOSLoader::Track(Int_t itrack)
509 // Read the first entry of PHOS branch in hit tree gAlice->TreeH()
514 Error("Track","Can not load hits.");
519 TBranch * hitsbranch = dynamic_cast<TBranch*>(TreeH()->GetListOfBranches()->FindObject("PHOS")) ;
522 cout << "WARNING: AliPHOSLoader::ReadTreeH -> Cannot find branch PHOS" << endl ;
525 if(!Hits()) PostHits();
527 hitsbranch->SetAddress(HitsRef());
528 hitsbranch->GetEntry(itrack);
531 //____________________________________________________________________________
532 void AliPHOSLoader::ReadTreeQA()
534 // Read the digit tree gAlice->TreeQA()
535 // so far only PHOS knows about this Tree
537 if(PHOS()->TreeQA()== 0){
538 cerr << "ERROR: AliPHOSLoader::ReadTreeQA: can not read TreeQA " << endl ;
542 TBranch * qabranch = PHOS()->TreeQA()->GetBranch("PHOS");
545 cout << "WARNING: AliPHOSLoader::ReadTreeQA -> Cannot find QA Alarms for PHOS" << endl ;
549 // if(!Alarms()) PostQA();
551 qabranch->SetAddress(AlarmsRef()) ;
553 qabranch->GetEntry(0) ;
558 //____________________________________________________________________________
559 Int_t AliPHOSLoader::ReadRecPoints()
561 //Creates and posts to folder an array container,
562 //connects branch in tree (if exists), and reads data to array
564 MakeRecPointsArray();
566 TObjArray * cpva = 0x0 ;
567 TObjArray * emca = 0x0 ;
569 TTree * treeR = TreeR();
573 //May happen if file is truncated or new in LoadSDigits
578 TBranch * emcbranch = treeR->GetBranch(fgkEmcRecPointsBranchName);
580 if (emcbranch == 0x0)
582 Error("ReadRecPoints","Can not get branch with EMC Rec. Points named %s",fgkEmcRecPointsBranchName.Data());
587 emcbranch->SetAddress(&emca) ;
588 emcbranch->GetEntry(0) ;
590 TBranch * cpvbranch = treeR->GetBranch(fgkCpvRecPointsBranchName);
591 if (cpvbranch == 0x0)
593 Error("ReadRecPoints","Can not get branch with CPV Rec. Points named %s",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 //Error("ReadTracks","There is no Tree with Tracks");
636 TBranch * branch = treeT->GetBranch(fgkTrackSegmentsBranchName);
638 {//easy, maybe just a new tree
639 Error("ReadTracks"," Cannot find branch named %s",fgkTrackSegmentsBranchName.Data());
643 branch->SetAddress(trkref);//connect branch to buffer sitting in folder
644 branch->GetEntry(0);//get first event
648 //____________________________________________________________________________
650 Int_t AliPHOSLoader::ReadRecParticles()
652 //Reads Reconstructed Particles from file
653 //Creates and posts to folder an array container,
654 //connects branch in tree (if exists), and reads data to arry
656 TObject** recpartref = RecParticlesRef();
658 if ( recpartref == 0x0 )
659 {//Create and post array
660 MakeRecParticlesArray();
661 recpartref = RecParticlesRef();
664 TTree * treeP = TreeP();
667 //May happen if file is truncated or new in LoadSDigits,
668 //or the file is in update mode,
669 //but tracking was not performed yet for a current event
670 // Error("ReadRecParticles","There is no Tree with Tracks and Reconstructed Particles");
674 TBranch * branch = treeP->GetBranch(fgkRecParticlesBranchName);
676 {//easy, maybe just a new tree
677 Error("ReadRecParticles"," Cannot find branch %s",fgkRecParticlesBranchName.Data());
681 branch->SetAddress(recpartref);//connect branch to buffer sitting in folder
682 branch->GetEntry(0);//get first event
688 AliPHOSGeometry* AliPHOSLoader::GetPHOSGeometry()
690 //returns PHOS geometry from gAlice
691 //static Method used by some classes where it is not convienient to pass eventfoldername
694 AliPHOS* phos=dynamic_cast<AliPHOS*>(gAlice->GetDetector("PHOS"));
697 return phos->GetGeometry();
699 /***************************************************************************************/
701 AliPHOSLoader* AliPHOSLoader::GetPHOSLoader(const char* eventfoldername)
703 // Return PHOS loader
704 AliRunLoader* rn = AliRunLoader::GetRunLoader(eventfoldername);
707 cerr<<"Error: <AliPHOSLoader::GetPHOSLoader>: "
708 << "Can not find Run Loader in folder "<<eventfoldername<<endl;
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 Warning("BranchExists","branch %s with title %s ",dataname.Data(),fBranchTitle.Data());
771 if ( branchName.BeginsWith(zername) && branchTitle.BeginsWith(titleName) ){
772 Warning("BranchExists","branch AliPHOS... with title %s ",branch->GetTitle());
780 void AliPHOSLoader::SetBranchTitle(const TString& btitle)
783 if (btitle.CompareTo(fBranchTitle) == 0) return;
784 fBranchTitle = btitle;
787 //____________________________________________________________________________
789 void AliPHOSLoader::CleanHits()
792 AliLoader::CleanHits();
794 TClonesArray* hits = Hits();
795 if (hits) hits->Clear();
797 //____________________________________________________________________________
799 void AliPHOSLoader::CleanSDigits()
801 // Clean SDigits array
802 AliLoader::CleanSDigits();
803 TClonesArray* sdigits = SDigits();
804 if (sdigits) sdigits->Clear();
807 //____________________________________________________________________________
809 void AliPHOSLoader::CleanDigits()
811 // Clean Digits array
812 AliLoader::CleanDigits();
813 TClonesArray* digits = Digits();
814 if (digits) digits->Clear();
816 //____________________________________________________________________________
818 void AliPHOSLoader::CleanRecPoints()
820 // Clean RecPoints array
821 AliLoader::CleanRecPoints();
822 TObjArray* recpoints = EmcRecPoints();
823 if (recpoints) recpoints->Clear();
824 recpoints = CpvRecPoints();
825 if (recpoints) recpoints->Clear();
827 //____________________________________________________________________________
829 void AliPHOSLoader::CleanTracks()
831 //Cleans Tracks stuff
832 AliLoader::CleanTracks();//tree
834 //and clear the array
835 TClonesArray* tracks = TrackSegments();
836 if (tracks) tracks->Clear();
839 //____________________________________________________________________________
841 void AliPHOSLoader::CleanRecParticles()
843 // Clean RecParticles array
844 TClonesArray *recpar = RecParticles();
845 if (recpar) recpar->Clear();
849 //____________________________________________________________________________
851 void AliPHOSLoader::ReadCalibrationDB(const char * database,const char * filename)
853 // Read calibration data base from file
854 if(fcdb && (strcmp(database,fcdb->GetTitle())==0))
857 TFile * file = gROOT->GetFile(filename) ;
859 file = TFile::Open(filename);
861 Error ("ReadCalibrationDB", "Cannot open file %s", filename) ;
866 fcdb = dynamic_cast<AliPHOSCalibrationDB *>(file->Get("AliPHOSCalibrationDB")) ;
868 Error ("ReadCalibrationDB", "No database %s in file %s", database, filename) ;
870 //____________________________________________________________________________
872 // AliPHOSSDigitizer* AliPHOSLoader::PHOSSDigitizer()
874 // //return PHOS SDigitizer
875 // return dynamic_cast<AliPHOSSDigitizer*>(SDigitizer()) ;
878 //____________________________________________________________________________
879 void AliPHOSLoader::MakeHitsArray()
881 // Add Hits array to the data folder
883 TClonesArray* hits = new TClonesArray("AliPHOSHit",1000);
884 hits->SetName(fgkHitsName);
885 GetDetectorDataFolder()->Add(hits);
888 //____________________________________________________________________________
889 void AliPHOSLoader::MakeSDigitsArray()
891 // Add SDigits array to the data folder
892 if ( SDigits()) return;
893 TClonesArray* sdigits = new TClonesArray("AliPHOSDigit",1);
894 sdigits->SetName(fgkSDigitsName);
895 GetDetectorDataFolder()->Add(sdigits);
898 //____________________________________________________________________________
899 void AliPHOSLoader::MakeDigitsArray()
901 // Add Digits array to the data folder
902 if ( Digits()) return;
903 TClonesArray* digits = new TClonesArray("AliPHOSDigit",1);
904 digits->SetName(fgkDigitsName);
905 GetDetectorDataFolder()->Add(digits);
909 //____________________________________________________________________________
910 void AliPHOSLoader::MakeRecPointsArray()
912 // Add RecPoints array to the data folder
913 if ( EmcRecPoints() == 0x0)
915 if (GetDebug()>9) Info("MakeRecPointsArray","Making array for EMC");
916 TObjArray* emc = new TObjArray(100) ;
917 emc->SetName(fgkEmcRecPointsName) ;
918 GetDetectorDataFolder()->Add(emc);
921 if ( CpvRecPoints() == 0x0)
923 if (GetDebug()>9) Info("MakeRecPointsArray","Making array for CPV");
924 TObjArray* cpv = new TObjArray(100) ;
925 cpv->SetName(fgkCpvRecPointsName);
926 GetDetectorDataFolder()->Add(cpv);
930 //____________________________________________________________________________
931 void AliPHOSLoader::MakeTrackSegmentsArray()
933 // Add TrackSegments array to the data folder
934 if ( TrackSegments()) return;
935 TClonesArray * ts = new TClonesArray("AliPHOSTrackSegment",100) ;
936 ts->SetName(fgkTracksName);
937 GetDetectorDataFolder()->Add(ts);
941 //____________________________________________________________________________
942 void AliPHOSLoader::MakeRecParticlesArray()
944 // Add RecParticles array to the data folder
945 if ( RecParticles()) return;
946 TClonesArray * rp = new TClonesArray("AliPHOSRecParticle",100) ;
947 rp->SetName(fgkRecParticlesName);
948 GetDetectorDataFolder()->Add(rp);