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);
96 // set to 0x0 the objgetter in AliGetter ... weird isn it !
97 AliPHOSGetter * gime = AliPHOSGetter::Instance() ; // (AliLoader::GetRunLoader()->GetFileName()).Data()) ;
102 //____________________________________________________________________________
103 void AliPHOSLoader::CleanFolders()
106 AliLoader::CleanFolders();
109 //____________________________________________________________________________
110 Int_t AliPHOSLoader::SetEvent()
112 //Cleans loaded stuff and and sets Files and Directories
113 // do not post any data to folder/tasks
116 Int_t retval = AliLoader::SetEvent();
119 Error("SetEvent","AliLoader::SetEvent returned error");
124 if (Hits()) Hits()->Clear();
125 if (SDigits()) SDigits()->Clear();
126 if (Digits()) Digits()->Clear();
127 if (EmcRecPoints()) EmcRecPoints()->Clear();
128 if (CpvRecPoints()) CpvRecPoints()->Clear();
129 if (TrackSegments()) TrackSegments()->Clear();
130 if (RecParticles()) RecParticles()->Clear();
135 //____________________________________________________________________________
136 Int_t AliPHOSLoader::GetEvent()
138 //Overloads GetEvent method called by AliRunLoader::GetEvent(Int_t) method
139 //to add Rec Particles specific for PHOS
141 //First call the original method to get whatever from std. setup is needed
144 retval = AliLoader::GetEvent();
147 Error("GetEvent","AliLoader::GetEvent returned error");
151 if (GetHitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadHits();
152 if (GetSDigitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadSDigits();
153 if (GetDigitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadDigits();
154 if (GetRecPointsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadRecPoints();
155 if (GetTracksDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadTracks();
156 if (GetRecParticlesDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadRecParticles();
159 //Now, check if RecPart were loaded
163 //____________________________________________________________________________
164 const AliPHOS * AliPHOSLoader::PHOS()
166 // returns the PHOS object
167 AliPHOS * phos = dynamic_cast<AliPHOS*>(GetModulesFolder()->FindObject(fDetectorName));
170 cout << "WARNING: AliPHOSLoader::PHOS -> PHOS module not found in Folders" << endl ;
174 //____________________________________________________________________________
175 const AliPHOSGeometry * AliPHOSLoader::PHOSGeometry()
177 // Return PHOS geometry
178 AliPHOSGeometry * rv = 0 ;
180 rv = PHOS()->GetGeometry();
185 //____________________________________________________________________________
186 Int_t AliPHOSLoader::LoadHits(Option_t* opt)
188 //------- Hits ----------------------
189 //Overload (extends) LoadHits implemented in AliLoader
193 //First call the AliLoader's method to send the TreeH to folder
194 res = AliLoader::LoadHits(opt);
198 Error("LoadHits","AliLoader::LoadHits returned error");
202 //read the data from tree in folder and send it to folder
208 //____________________________________________________________________________
209 Int_t AliPHOSLoader::LoadSDigits(Option_t* opt)
211 //---------- SDigits -------------------------
213 //First call the AliLoader's method to send the TreeS to folder
214 res = AliLoader::LoadSDigits(opt);
217 Error("PostSDigits","AliLoader::LoadSDigits returned error");
220 return ReadSDigits();
223 //____________________________________________________________________________
224 Int_t AliPHOSLoader::LoadDigits(Option_t* opt)
226 //---------- Digits -------------------------
228 //First call the AliLoader's method to send the TreeS to folder
229 res = AliLoader::LoadDigits(opt);
232 Error("LoadDigits","AliLoader::LoadDigits returned error");
237 //____________________________________________________________________________
238 Int_t AliPHOSLoader::LoadRecPoints(Option_t* opt)
240 // -------------- RecPoints -------------------------------------------
242 //First call the AliLoader's method to send the TreeR to folder
243 res = AliLoader::LoadRecPoints(opt);
246 Error("LoadRecPoints","AliLoader::LoadRecPoints returned error");
250 TFolder * phosFolder = GetDetectorDataFolder();
251 if ( phosFolder == 0x0 )
253 Error("PostDigits","Can not get detector data folder");
256 return ReadRecPoints();
258 //____________________________________________________________________________
260 Int_t AliPHOSLoader::LoadTracks(Option_t* opt)
262 //Loads Tracks: Open File, Reads Tree and posts, Read Data and Posts
263 if (GetDebug()) Info("LoadTracks","opt = %s",opt);
265 res = AliLoader::LoadTracks(opt);
268 Error("LoadTracks","AliLoader::LoadTracks returned error");
274 //____________________________________________________________________________
275 Int_t AliPHOSLoader::LoadRecParticles(Option_t* opt)
277 // -------------- RecPoints -------------------------------------------
279 //First call the AliLoader's method to send the TreeT to folder
280 res = AliLoader::LoadRecParticles(opt);
283 Error("LoadRecParticles","AliLoader::LoadRecParticles returned error");
286 return ReadRecParticles();
289 //____________________________________________________________________________
291 Int_t AliPHOSLoader::PostHits()
293 // -------------- Hits -------------------------------------------
294 Int_t reval = AliLoader::PostHits();
297 Error("PostHits","AliLoader:: returned error");
302 //____________________________________________________________________________
304 Int_t AliPHOSLoader::PostSDigits()
306 // -------------- SDigits -------------------------------------------
307 Int_t reval = AliLoader::PostSDigits();
310 Error("PostSDigits","AliLoader::PostSDigits returned error");
313 return ReadSDigits();
315 //____________________________________________________________________________
317 Int_t AliPHOSLoader::PostDigits()
319 // -------------- Digits -------------------------------------------
320 Int_t reval = AliLoader::PostDigits();
323 Error("PostDigits","AliLoader::PostDigits returned error");
328 //____________________________________________________________________________
330 Int_t AliPHOSLoader::PostRecPoints()
332 // -------------- RecPoints -------------------------------------------
333 Int_t reval = AliLoader::PostRecPoints();
336 Error("PostRecPoints","AliLoader::PostRecPoints returned error");
339 return ReadRecPoints();
342 //____________________________________________________________________________
344 Int_t AliPHOSLoader::PostRecParticles()
346 // -------------- RecParticles -------------------------------------------
347 Int_t reval = AliLoader::PostRecParticles();
350 Error("PostRecParticles","AliLoader::PostRecParticles returned error");
353 return ReadRecParticles();
355 //____________________________________________________________________________
357 Int_t AliPHOSLoader::PostTracks()
359 // -------------- Tracks -------------------------------------------
360 Int_t reval = AliLoader::PostTracks();
363 Error("PostTracks","AliLoader::PostTracks returned error");
368 //____________________________________________________________________________
372 //____________________________________________________________________________
373 Int_t AliPHOSLoader::ReadHits()
375 // If there is no Clones Array in folder creates it and sends to folder
376 // then tries to read
377 // Reads the first entry of PHOS branch in hit tree TreeH()
378 // Reads data from TreeH and stores it in TClonesArray that sits in DetectorDataFolder
380 TObject** hitref = HitsRef();
387 TClonesArray* hits = dynamic_cast<TClonesArray*>(*hitref);
389 TTree* treeh = TreeH();
393 Error("ReadHits"," Cannot read TreeH from folder");
397 TBranch * hitsbranch = treeh->GetBranch(fDetectorName);
400 Error("ReadHits"," Cannot find branch PHOS");
404 if (GetDebug()) Info("ReadHits","Reading Hits");
406 if (hitsbranch->GetEntries() > 1)
408 TClonesArray * tempo = new TClonesArray("AliPHOSHit",1000);
410 hitsbranch->SetAddress(&tempo);
413 for (i = 0 ; i < hitsbranch->GetEntries(); i++)
415 hitsbranch->GetEntry(i) ;
417 for ( j = 0 ; j < tempo->GetEntries() ; j++)
419 AliPHOSHit* hit = (AliPHOSHit*)tempo->At(j);
420 new((*hits)[index]) AliPHOSHit( *hit ) ;
428 hitsbranch->SetAddress(hitref);
429 hitsbranch->GetEntry(0) ;
434 //____________________________________________________________________________
435 Int_t AliPHOSLoader::ReadSDigits()
437 // Read the summable digits tree TreeS():
438 // Check if TClones is in folder
439 // if not create and add to folder
440 // connect to tree if available
443 TObject** sdref = SDigitsRef();
447 sdref = SDigitsRef();
450 TTree * treeS = TreeS();
453 //May happen if file is truncated or new in LoadSDigits
454 //Error("ReadSDigits","There is no SDigit Tree");
458 TBranch * branch = treeS->GetBranch(fDetectorName);
460 {//easy, maybe just a new tree
461 //Error("ReadSDigits"," Cannot find branch PHOS");
465 branch->SetAddress(SDigitsRef());
470 //____________________________________________________________________________
471 Int_t AliPHOSLoader::ReadDigits()
473 // Read the summable digits tree TreeS():
474 // Check if TClones is in folder
475 // if not create and add to folder
476 // connect to tree if available
479 TObject** dref = DigitsRef();
481 {//if there is not array in folder, create it and put it there
486 TTree * treeD = TreeD();
489 //May happen if file is truncated or new in LoadSDigits
490 //Error("ReadDigits","There is no Digit Tree");
494 TBranch * branch = treeD->GetBranch(fDetectorName);
496 {//easy, maybe just a new tree
497 //Error("ReadDigits"," Cannot find branch ",fDetectorName.Data());
501 branch->SetAddress(dref);//connect branch to buffer sitting in folder
502 branch->GetEntry(0);//get first event
507 //____________________________________________________________________________
509 void AliPHOSLoader::Track(Int_t itrack)
511 // Read the first entry of PHOS branch in hit tree gAlice->TreeH()
516 Error("Track","Can not load hits.");
521 TBranch * hitsbranch = dynamic_cast<TBranch*>(TreeH()->GetListOfBranches()->FindObject("PHOS")) ;
524 cout << "WARNING: AliPHOSLoader::ReadTreeH -> Cannot find branch PHOS" << endl ;
527 if(!Hits()) PostHits();
529 hitsbranch->SetAddress(HitsRef());
530 hitsbranch->GetEntry(itrack);
533 //____________________________________________________________________________
534 void AliPHOSLoader::ReadTreeQA()
536 // Read the digit tree gAlice->TreeQA()
537 // so far only PHOS knows about this Tree
539 if(PHOS()->TreeQA()== 0){
540 cerr << "ERROR: AliPHOSLoader::ReadTreeQA: can not read TreeQA " << endl ;
544 TBranch * qabranch = PHOS()->TreeQA()->GetBranch("PHOS");
547 cout << "WARNING: AliPHOSLoader::ReadTreeQA -> Cannot find QA Alarms for PHOS" << endl ;
551 // if(!Alarms()) PostQA();
553 qabranch->SetAddress(AlarmsRef()) ;
555 qabranch->GetEntry(0) ;
560 //____________________________________________________________________________
561 Int_t AliPHOSLoader::ReadRecPoints()
563 //Creates and posts to folder an array container,
564 //connects branch in tree (if exists), and reads data to array
566 MakeRecPointsArray();
568 TObjArray * cpva = 0x0 ;
569 TObjArray * emca = 0x0 ;
571 TTree * treeR = TreeR();
575 //May happen if file is truncated or new in LoadSDigits
580 TBranch * emcbranch = treeR->GetBranch(fgkEmcRecPointsBranchName);
582 if (emcbranch == 0x0)
584 Error("ReadRecPoints","Can not get branch with EMC Rec. Points named %s",fgkEmcRecPointsBranchName.Data());
589 emcbranch->SetAddress(&emca) ;
590 emcbranch->GetEntry(0) ;
592 TBranch * cpvbranch = treeR->GetBranch(fgkCpvRecPointsBranchName);
593 if (cpvbranch == 0x0)
595 Error("ReadRecPoints","Can not get branch with CPV Rec. Points named %s",fgkCpvRecPointsBranchName.Data());
600 cpvbranch->SetAddress(&cpva);
601 cpvbranch->GetEntry(0) ;
605 Int_t maxemc = emca->GetEntries() ;
606 for ( ii= 0 ; ii < maxemc ; ii++ )
607 EmcRecPoints()->Add(emca->At(ii)) ;
609 Int_t maxcpv = cpva->GetEntries() ;
610 for ( ii= 0 ; ii < maxcpv ; ii++ )
611 CpvRecPoints()->Add(cpva->At(ii)) ;
616 //____________________________________________________________________________
617 Int_t AliPHOSLoader::ReadTracks()
619 //Creates and posts to folder an array container,
620 //connects branch in tree (if exists), and reads data to arry
622 TObject** trkref = TracksRef();
624 {//Create and post array
625 MakeTrackSegmentsArray();
626 trkref = TracksRef();
629 TTree * treeT = TreeT();
632 //May happen if file is truncated or new in LoadSDigits, or the file is in update mode,
633 //but tracking was not performed yet for a current event
634 //Error("ReadTracks","There is no Tree with Tracks");
638 TBranch * branch = treeT->GetBranch(fgkTrackSegmentsBranchName);
640 {//easy, maybe just a new tree
641 Error("ReadTracks"," Cannot find branch named %s",fgkTrackSegmentsBranchName.Data());
645 branch->SetAddress(trkref);//connect branch to buffer sitting in folder
646 branch->GetEntry(0);//get first event
650 //____________________________________________________________________________
652 Int_t AliPHOSLoader::ReadRecParticles()
654 //Reads Reconstructed Particles from file
655 //Creates and posts to folder an array container,
656 //connects branch in tree (if exists), and reads data to arry
658 TObject** recpartref = RecParticlesRef();
660 if ( recpartref == 0x0 )
661 {//Create and post array
662 MakeRecParticlesArray();
663 recpartref = RecParticlesRef();
666 TTree * treeP = TreeP();
669 //May happen if file is truncated or new in LoadSDigits,
670 //or the file is in update mode,
671 //but tracking was not performed yet for a current event
672 // Error("ReadRecParticles","There is no Tree with Tracks and Reconstructed Particles");
676 TBranch * branch = treeP->GetBranch(fgkRecParticlesBranchName);
678 {//easy, maybe just a new tree
679 Error("ReadRecParticles"," Cannot find branch %s",fgkRecParticlesBranchName.Data());
683 branch->SetAddress(recpartref);//connect branch to buffer sitting in folder
684 branch->GetEntry(0);//get first event
690 AliPHOSGeometry* AliPHOSLoader::GetPHOSGeometry()
692 //returns PHOS geometry from gAlice
693 //static Method used by some classes where it is not convienient to pass eventfoldername
696 AliPHOS* phos=dynamic_cast<AliPHOS*>(gAlice->GetDetector("PHOS"));
699 return phos->GetGeometry();
701 /***************************************************************************************/
703 AliPHOSLoader* AliPHOSLoader::GetPHOSLoader(const char* eventfoldername)
705 // Return PHOS loader
706 AliRunLoader* rn = AliRunLoader::GetRunLoader(eventfoldername);
709 cerr<<"Error: <AliPHOSLoader::GetPHOSLoader>: "
710 << "Can not find Run Loader in folder "<<eventfoldername<<endl;
713 return dynamic_cast<AliPHOSLoader*>(rn->GetLoader("PHOSLoader"));
715 /***************************************************************************************/
717 Bool_t AliPHOSLoader::BranchExists(const TString& recName)
719 // Check if a branch named redName exists
720 if (fBranchTitle.IsNull()) return kFALSE;
721 TString dataname, zername ;
723 if(recName == "SDigits")
726 dataname = GetDetectorName();
727 zername = "AliPHOSSDigitizer" ;
730 if(recName == "Digits"){
732 dataname = GetDetectorName();
733 zername = "AliPHOSDigitizer" ;
736 if(recName == "RecPoints"){
738 dataname = fgkEmcRecPointsBranchName;
739 zername = "AliPHOSClusterizer" ;
742 if(recName == "TrackSegments"){
744 dataname = fgkTrackSegmentsBranchName;
745 zername = "AliPHOSTrackSegmentMaker";
748 if(recName == "RecParticles"){
750 dataname = fgkRecParticlesBranchName;
751 zername = "AliPHOSPID";
760 TObjArray * lob = static_cast<TObjArray*>(tree->GetListOfBranches()) ;
762 TBranch * branch = 0 ;
763 TString titleName(fBranchTitle);
766 while ((branch = (static_cast<TBranch*>(next())))) {
767 TString branchName(branch->GetName() ) ;
768 TString branchTitle(branch->GetTitle() ) ;
769 if ( branchName.BeginsWith(dataname) && branchTitle.BeginsWith(fBranchTitle) ){
770 Warning("BranchExists","branch %s with title %s ",dataname.Data(),fBranchTitle.Data());
773 if ( branchName.BeginsWith(zername) && branchTitle.BeginsWith(titleName) ){
774 Warning("BranchExists","branch AliPHOS... with title %s ",branch->GetTitle());
782 void AliPHOSLoader::SetBranchTitle(const TString& btitle)
785 if (btitle.CompareTo(fBranchTitle) == 0) return;
786 fBranchTitle = btitle;
789 //____________________________________________________________________________
791 void AliPHOSLoader::CleanHits()
794 AliLoader::CleanHits();
796 TClonesArray* hits = Hits();
797 if (hits) hits->Clear();
799 //____________________________________________________________________________
801 void AliPHOSLoader::CleanSDigits()
803 // Clean SDigits array
804 AliLoader::CleanSDigits();
805 TClonesArray* sdigits = SDigits();
806 if (sdigits) sdigits->Clear();
809 //____________________________________________________________________________
811 void AliPHOSLoader::CleanDigits()
813 // Clean Digits array
814 AliLoader::CleanDigits();
815 TClonesArray* digits = Digits();
816 if (digits) digits->Clear();
818 //____________________________________________________________________________
820 void AliPHOSLoader::CleanRecPoints()
822 // Clean RecPoints array
823 AliLoader::CleanRecPoints();
824 TObjArray* recpoints = EmcRecPoints();
825 if (recpoints) recpoints->Clear();
826 recpoints = CpvRecPoints();
827 if (recpoints) recpoints->Clear();
829 //____________________________________________________________________________
831 void AliPHOSLoader::CleanTracks()
833 //Cleans Tracks stuff
834 AliLoader::CleanTracks();//tree
836 //and clear the array
837 TClonesArray* tracks = TrackSegments();
838 if (tracks) tracks->Clear();
841 //____________________________________________________________________________
843 void AliPHOSLoader::CleanRecParticles()
845 // Clean RecParticles array
846 TClonesArray *recpar = RecParticles();
847 if (recpar) recpar->Clear();
851 //____________________________________________________________________________
853 void AliPHOSLoader::ReadCalibrationDB(const char * database,const char * filename)
855 // Read calibration data base from file
856 if(fcdb && (strcmp(database,fcdb->GetTitle())==0))
859 TFile * file = gROOT->GetFile(filename) ;
861 file = TFile::Open(filename);
863 Error ("ReadCalibrationDB", "Cannot open file %s", filename) ;
868 fcdb = dynamic_cast<AliPHOSCalibrationDB *>(file->Get("AliPHOSCalibrationDB")) ;
870 Error ("ReadCalibrationDB", "No database %s in file %s", database, filename) ;
872 //____________________________________________________________________________
874 // AliPHOSSDigitizer* AliPHOSLoader::PHOSSDigitizer()
876 // //return PHOS SDigitizer
877 // return dynamic_cast<AliPHOSSDigitizer*>(SDigitizer()) ;
880 //____________________________________________________________________________
881 void AliPHOSLoader::MakeHitsArray()
883 // Add Hits array to the data folder
885 TClonesArray* hits = new TClonesArray("AliPHOSHit",1000);
886 hits->SetName(fgkHitsName);
887 GetDetectorDataFolder()->Add(hits);
890 //____________________________________________________________________________
891 void AliPHOSLoader::MakeSDigitsArray()
893 // Add SDigits array to the data folder
894 if ( SDigits()) return;
895 TClonesArray* sdigits = new TClonesArray("AliPHOSDigit",1);
896 sdigits->SetName(fgkSDigitsName);
897 GetDetectorDataFolder()->Add(sdigits);
900 //____________________________________________________________________________
901 void AliPHOSLoader::MakeDigitsArray()
903 // Add Digits array to the data folder
904 if ( Digits()) return;
905 TClonesArray* digits = new TClonesArray("AliPHOSDigit",1);
906 digits->SetName(fgkDigitsName);
907 GetDetectorDataFolder()->Add(digits);
911 //____________________________________________________________________________
912 void AliPHOSLoader::MakeRecPointsArray()
914 // Add RecPoints array to the data folder
915 if ( EmcRecPoints() == 0x0)
917 if (GetDebug()>9) Info("MakeRecPointsArray","Making array for EMC");
918 TObjArray* emc = new TObjArray(100) ;
919 emc->SetName(fgkEmcRecPointsName) ;
920 GetDetectorDataFolder()->Add(emc);
923 if ( CpvRecPoints() == 0x0)
925 if (GetDebug()>9) Info("MakeRecPointsArray","Making array for CPV");
926 TObjArray* cpv = new TObjArray(100) ;
927 cpv->SetName(fgkCpvRecPointsName);
928 GetDetectorDataFolder()->Add(cpv);
932 //____________________________________________________________________________
933 void AliPHOSLoader::MakeTrackSegmentsArray()
935 // Add TrackSegments array to the data folder
936 if ( TrackSegments()) return;
937 TClonesArray * ts = new TClonesArray("AliPHOSTrackSegment",100) ;
938 ts->SetName(fgkTracksName);
939 GetDetectorDataFolder()->Add(ts);
943 //____________________________________________________________________________
944 void AliPHOSLoader::MakeRecParticlesArray()
946 // Add RecParticles array to the data folder
947 if ( RecParticles()) return;
948 TClonesArray * rp = new TClonesArray("AliPHOSRecParticle",100) ;
949 rp->SetName(fgkRecParticlesName);
950 GetDetectorDataFolder()->Add(rp);