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"
56 ClassImp(AliPHOSLoader)
59 const TString AliPHOSLoader::fgkHitsName("HITS");//Name for TClonesArray with hits from one event
60 const TString AliPHOSLoader::fgkSDigitsName("SDIGITS");//Name for TClonesArray
61 const TString AliPHOSLoader::fgkDigitsName("DIGITS");//Name for TClonesArray
62 const TString AliPHOSLoader::fgkEmcRecPointsName("EMCRECPOINTS");//Name for TClonesArray
63 const TString AliPHOSLoader::fgkCpvRecPointsName("CPVRECPOINTS");//Name for TClonesArray
64 const TString AliPHOSLoader::fgkTracksName("TRACKS");//Name for TClonesArray
65 const TString AliPHOSLoader::fgkRecParticlesName("RECPARTICLES");//Name for TClonesArray
67 const TString AliPHOSLoader::fgkEmcRecPointsBranchName("PHOSEmcRP");//Name for branch with EMC Reconstructed Points
68 const TString AliPHOSLoader::fgkCpvRecPointsBranchName("PHOSCpvRP");//Name for branch with CPV Reconstructed Points
69 const TString AliPHOSLoader::fgkTrackSegmentsBranchName("PHOSTS");//Name for branch with TrackSegments
70 const TString AliPHOSLoader::fgkRecParticlesBranchName("PHOSRP");//Name for branch with Reconstructed Particles
71 //____________________________________________________________________________
72 AliPHOSLoader::AliPHOSLoader()
76 //____________________________________________________________________________
77 AliPHOSLoader::AliPHOSLoader(const Char_t *detname,const Char_t *eventfoldername):
78 AliLoader(detname,eventfoldername)
82 //____________________________________________________________________________
84 AliPHOSLoader::~AliPHOSLoader()
86 //remove and delete arrays
88 Clean(fgkSDigitsName);
90 Clean(fgkEmcRecPointsName);
91 Clean(fgkCpvRecPointsName);
93 Clean(fgkRecParticlesName);
95 //____________________________________________________________________________
97 void AliPHOSLoader::CleanFolders()
100 AliLoader::CleanFolders();
102 //____________________________________________________________________________
104 Int_t AliPHOSLoader::SetEvent()
106 //Cleans loaded stuff and and sets Files and Directories
107 // do not post any data to folder/tasks
110 Int_t retval = AliLoader::SetEvent();
113 Error("SetEvent","AliLoader::SetEvent returned error");
118 if (Hits()) Hits()->Clear();
119 if (SDigits()) SDigits()->Clear();
120 if (Digits()) Digits()->Clear();
121 if (EmcRecPoints()) EmcRecPoints()->Clear();
122 if (CpvRecPoints()) CpvRecPoints()->Clear();
123 if (TrackSegments()) TrackSegments()->Clear();
124 if (RecParticles()) RecParticles()->Clear();
128 //____________________________________________________________________________
130 Int_t AliPHOSLoader::GetEvent()
132 //Overloads GetEvent method called by AliRunLoader::GetEvent(Int_t) method
133 //to add Rec Particles specific for PHOS
135 //First call the original method to get whatever from std. setup is needed
138 retval = AliLoader::GetEvent();
141 Error("GetEvent","AliLoader::GetEvent returned error");
145 if (GetHitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadHits();
146 if (GetSDigitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadSDigits();
147 if (GetDigitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadDigits();
148 if (GetRecPointsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadRecPoints();
149 if (GetTracksDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadTracks();
150 if (GetRecParticlesDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadRecParticles();
153 //Now, check if RecPart were loaded
156 //____________________________________________________________________________
159 //____________________________________________________________________________
160 const AliPHOS * AliPHOSLoader::PHOS()
162 // returns the PHOS object
163 AliPHOS * phos = dynamic_cast<AliPHOS*>(GetModulesFolder()->FindObject(fDetectorName));
166 cout << "WARNING: AliPHOSLoader::PHOS -> PHOS module not found in Folders" << endl ;
170 //____________________________________________________________________________
171 const AliPHOSGeometry * AliPHOSLoader::PHOSGeometry()
173 // Return PHOS geometry
174 AliPHOSGeometry * rv = 0 ;
176 rv = PHOS()->GetGeometry();
181 //____________________________________________________________________________
182 Int_t AliPHOSLoader::LoadHits(Option_t* opt)
184 //------- Hits ----------------------
185 //Overload (extends) LoadHits implemented in AliLoader
189 //First call the AliLoader's method to send the TreeH to folder
190 res = AliLoader::LoadHits(opt);
194 Error("LoadHits","AliLoader::LoadHits returned error");
198 //read the data from tree in folder and send it to folder
204 //____________________________________________________________________________
205 Int_t AliPHOSLoader::LoadSDigits(Option_t* opt)
207 //---------- SDigits -------------------------
209 //First call the AliLoader's method to send the TreeS to folder
210 res = AliLoader::LoadSDigits(opt);
213 Error("PostSDigits","AliLoader::LoadSDigits returned error");
216 return ReadSDigits();
219 //____________________________________________________________________________
220 Int_t AliPHOSLoader::LoadDigits(Option_t* opt)
222 //---------- Digits -------------------------
224 //First call the AliLoader's method to send the TreeS to folder
225 res = AliLoader::LoadDigits(opt);
228 Error("LoadDigits","AliLoader::LoadDigits returned error");
233 //____________________________________________________________________________
234 Int_t AliPHOSLoader::LoadRecPoints(Option_t* opt)
236 // -------------- RecPoints -------------------------------------------
238 //First call the AliLoader's method to send the TreeR to folder
239 res = AliLoader::LoadRecPoints(opt);
242 Error("LoadRecPoints","AliLoader::LoadRecPoints returned error");
246 TFolder * phosFolder = GetDetectorDataFolder();
247 if ( phosFolder == 0x0 )
249 Error("PostDigits","Can not get detector data folder");
252 return ReadRecPoints();
254 //____________________________________________________________________________
256 Int_t AliPHOSLoader::LoadTracks(Option_t* opt)
258 //Loads Tracks: Open File, Reads Tree and posts, Read Data and Posts
259 if (GetDebug()) Info("LoadTracks","opt = %s",opt);
261 res = AliLoader::LoadTracks(opt);
264 Error("LoadTracks","AliLoader::LoadTracks returned error");
270 //____________________________________________________________________________
271 Int_t AliPHOSLoader::LoadRecParticles(Option_t* opt)
273 // -------------- RecPoints -------------------------------------------
275 //First call the AliLoader's method to send the TreeT to folder
276 res = AliLoader::LoadRecParticles(opt);
279 Error("LoadRecParticles","AliLoader::LoadRecParticles returned error");
282 return ReadRecParticles();
285 //____________________________________________________________________________
287 Int_t AliPHOSLoader::PostHits()
289 // -------------- Hits -------------------------------------------
290 Int_t reval = AliLoader::PostHits();
293 Error("PostHits","AliLoader:: returned error");
298 //____________________________________________________________________________
300 Int_t AliPHOSLoader::PostSDigits()
302 // -------------- SDigits -------------------------------------------
303 Int_t reval = AliLoader::PostSDigits();
306 Error("PostSDigits","AliLoader::PostSDigits returned error");
309 return ReadSDigits();
311 //____________________________________________________________________________
313 Int_t AliPHOSLoader::PostDigits()
315 // -------------- Digits -------------------------------------------
316 Int_t reval = AliLoader::PostDigits();
319 Error("PostDigits","AliLoader::PostDigits returned error");
324 //____________________________________________________________________________
326 Int_t AliPHOSLoader::PostRecPoints()
328 // -------------- RecPoints -------------------------------------------
329 Int_t reval = AliLoader::PostRecPoints();
332 Error("PostRecPoints","AliLoader::PostRecPoints returned error");
335 return ReadRecPoints();
338 //____________________________________________________________________________
340 Int_t AliPHOSLoader::PostRecParticles()
342 // -------------- RecParticles -------------------------------------------
343 Int_t reval = AliLoader::PostRecParticles();
346 Error("PostRecParticles","AliLoader::PostRecParticles returned error");
349 return ReadRecParticles();
351 //____________________________________________________________________________
353 Int_t AliPHOSLoader::PostTracks()
355 // -------------- Tracks -------------------------------------------
356 Int_t reval = AliLoader::PostTracks();
359 Error("PostTracks","AliLoader::PostTracks returned error");
364 //____________________________________________________________________________
368 //____________________________________________________________________________
369 Int_t AliPHOSLoader::ReadHits()
371 // If there is no Clones Array in folder creates it and sends to folder
372 // then tries to read
373 // Reads the first entry of PHOS branch in hit tree TreeH()
374 // Reads data from TreeH and stores it in TClonesArray that sits in DetectorDataFolder
376 TObject** hitref = HitsRef();
383 TClonesArray* hits = dynamic_cast<TClonesArray*>(*hitref);
385 TTree* treeh = TreeH();
389 Error("ReadHits"," Cannot read TreeH from folder");
393 TBranch * hitsbranch = treeh->GetBranch(fDetectorName);
396 Error("ReadHits"," Cannot find branch PHOS");
400 if (GetDebug()) Info("ReadHits","Reading Hits");
402 if (hitsbranch->GetEntries() > 1)
404 TClonesArray * tempo = new TClonesArray("AliPHOSHit",1000);
406 hitsbranch->SetAddress(&tempo);
409 for (i = 0 ; i < hitsbranch->GetEntries(); i++)
411 hitsbranch->GetEntry(i) ;
413 for ( j = 0 ; j < tempo->GetEntries() ; j++)
415 AliPHOSHit* hit = (AliPHOSHit*)tempo->At(j);
416 new((*hits)[index]) AliPHOSHit( *hit ) ;
424 hitsbranch->SetAddress(hitref);
425 hitsbranch->GetEntry(0) ;
430 //____________________________________________________________________________
431 Int_t AliPHOSLoader::ReadSDigits()
433 // Read the summable digits tree TreeS():
434 // Check if TClones is in folder
435 // if not create and add to folder
436 // connect to tree if available
439 TObject** sdref = SDigitsRef();
443 sdref = SDigitsRef();
446 TTree * treeS = TreeS();
449 //May happen if file is truncated or new in LoadSDigits
450 //Error("ReadSDigits","There is no SDigit Tree");
454 TBranch * branch = treeS->GetBranch(fDetectorName);
456 {//easy, maybe just a new tree
457 //Error("ReadSDigits"," Cannot find branch PHOS");
461 branch->SetAddress(SDigitsRef());
466 //____________________________________________________________________________
467 Int_t AliPHOSLoader::ReadDigits()
469 // Read the summable digits tree TreeS():
470 // Check if TClones is in folder
471 // if not create and add to folder
472 // connect to tree if available
475 TObject** dref = DigitsRef();
477 {//if there is not array in folder, create it and put it there
482 TTree * treeD = TreeD();
485 //May happen if file is truncated or new in LoadSDigits
486 //Error("ReadDigits","There is no Digit Tree");
490 TBranch * branch = treeD->GetBranch(fDetectorName);
492 {//easy, maybe just a new tree
493 //Error("ReadDigits"," Cannot find branch ",fDetectorName.Data());
497 branch->SetAddress(dref);//connect branch to buffer sitting in folder
498 branch->GetEntry(0);//get first event
503 //____________________________________________________________________________
505 void AliPHOSLoader::Track(Int_t itrack)
507 // Read the first entry of PHOS branch in hit tree gAlice->TreeH()
512 Error("Track","Can not load hits.");
517 TBranch * hitsbranch = dynamic_cast<TBranch*>(TreeH()->GetListOfBranches()->FindObject("PHOS")) ;
520 cout << "WARNING: AliPHOSLoader::ReadTreeH -> Cannot find branch PHOS" << endl ;
523 if(!Hits()) PostHits();
525 hitsbranch->SetAddress(HitsRef());
526 hitsbranch->GetEntry(itrack);
529 //____________________________________________________________________________
530 void AliPHOSLoader::ReadTreeQA()
532 // Read the digit tree gAlice->TreeQA()
533 // so far only PHOS knows about this Tree
535 if(PHOS()->TreeQA()== 0){
536 cerr << "ERROR: AliPHOSLoader::ReadTreeQA: can not read TreeQA " << endl ;
540 TBranch * qabranch = PHOS()->TreeQA()->GetBranch("PHOS");
543 cout << "WARNING: AliPHOSLoader::ReadTreeQA -> Cannot find QA Alarms for PHOS" << endl ;
547 // if(!Alarms()) PostQA();
549 qabranch->SetAddress(AlarmsRef()) ;
551 qabranch->GetEntry(0) ;
556 //____________________________________________________________________________
557 Int_t AliPHOSLoader::ReadRecPoints()
559 //Creates and posts to folder an array container,
560 //connects branch in tree (if exists), and reads data to array
562 MakeRecPointsArray();
564 TObjArray * cpva = 0x0 ;
565 TObjArray * emca = 0x0 ;
567 TTree * treeR = TreeR();
571 //May happen if file is truncated or new in LoadSDigits
576 TBranch * emcbranch = treeR->GetBranch(fgkEmcRecPointsBranchName);
578 if (emcbranch == 0x0)
580 Error("ReadRecPoints","Can not get branch with EMC Rec. Points named %s",fgkEmcRecPointsBranchName.Data());
585 emcbranch->SetAddress(&emca) ;
586 emcbranch->GetEntry(0) ;
588 TBranch * cpvbranch = treeR->GetBranch(fgkCpvRecPointsBranchName);
589 if (cpvbranch == 0x0)
591 Error("ReadRecPoints","Can not get branch with CPV Rec. Points named %s",fgkCpvRecPointsBranchName.Data());
596 cpvbranch->SetAddress(&cpva);
597 cpvbranch->GetEntry(0) ;
601 Int_t maxemc = emca->GetEntries() ;
602 for ( ii= 0 ; ii < maxemc ; ii++ )
603 EmcRecPoints()->Add(emca->At(ii)) ;
605 Int_t maxcpv = cpva->GetEntries() ;
606 for ( ii= 0 ; ii < maxcpv ; ii++ )
607 CpvRecPoints()->Add(cpva->At(ii)) ;
612 //____________________________________________________________________________
613 Int_t AliPHOSLoader::ReadTracks()
615 //Creates and posts to folder an array container,
616 //connects branch in tree (if exists), and reads data to arry
618 TObject** trkref = TracksRef();
620 {//Create and post array
621 MakeTrackSegmentsArray();
622 trkref = TracksRef();
625 TTree * treeT = TreeT();
628 //May happen if file is truncated or new in LoadSDigits, or the file is in update mode,
629 //but tracking was not performed yet for a current event
630 //Error("ReadTracks","There is no Tree with Tracks");
634 TBranch * branch = treeT->GetBranch(fgkTrackSegmentsBranchName);
636 {//easy, maybe just a new tree
637 Error("ReadTracks"," Cannot find branch named %s",fgkTrackSegmentsBranchName.Data());
641 branch->SetAddress(trkref);//connect branch to buffer sitting in folder
642 branch->GetEntry(0);//get first event
646 //____________________________________________________________________________
648 Int_t AliPHOSLoader::ReadRecParticles()
650 //Reads Reconstructed Particles from file
651 //Creates and posts to folder an array container,
652 //connects branch in tree (if exists), and reads data to arry
654 TObject** recpartref = RecParticlesRef();
656 if ( recpartref == 0x0 )
657 {//Create and post array
658 MakeRecParticlesArray();
659 recpartref = RecParticlesRef();
662 TTree * treeP = TreeP();
665 //May happen if file is truncated or new in LoadSDigits,
666 //or the file is in update mode,
667 //but tracking was not performed yet for a current event
668 // Error("ReadRecParticles","There is no Tree with Tracks and Reconstructed Particles");
672 TBranch * branch = treeP->GetBranch(fgkRecParticlesBranchName);
674 {//easy, maybe just a new tree
675 Error("ReadRecParticles"," Cannot find branch %s",fgkRecParticlesBranchName.Data());
679 branch->SetAddress(recpartref);//connect branch to buffer sitting in folder
680 branch->GetEntry(0);//get first event
686 AliPHOSGeometry* AliPHOSLoader::GetPHOSGeometry()
688 //returns PHOS geometry from gAlice
689 //static Method used by some classes where it is not convienient to pass eventfoldername
692 AliPHOS* phos=dynamic_cast<AliPHOS*>(gAlice->GetDetector("PHOS"));
695 return phos->GetGeometry();
697 /***************************************************************************************/
699 AliPHOSLoader* AliPHOSLoader::GetPHOSLoader(const char* eventfoldername)
701 // Return PHOS loader
702 AliRunLoader* rn = AliRunLoader::GetRunLoader(eventfoldername);
705 cerr<<"Error: <AliPHOSLoader::GetPHOSLoader>: "
706 << "Can not find Run Loader in folder "<<eventfoldername<<endl;
709 return dynamic_cast<AliPHOSLoader*>(rn->GetLoader("PHOSLoader"));
711 /***************************************************************************************/
713 Bool_t AliPHOSLoader::BranchExists(const TString& recName)
715 // Check if a branch named redName exists
716 if (fBranchTitle.IsNull()) return kFALSE;
717 TString dataname, zername ;
719 if(recName == "SDigits")
722 dataname = GetDetectorName();
723 zername = "AliPHOSSDigitizer" ;
726 if(recName == "Digits"){
728 dataname = GetDetectorName();
729 zername = "AliPHOSDigitizer" ;
732 if(recName == "RecPoints"){
734 dataname = fgkEmcRecPointsBranchName;
735 zername = "AliPHOSClusterizer" ;
738 if(recName == "TrackSegments"){
740 dataname = fgkTrackSegmentsBranchName;
741 zername = "AliPHOSTrackSegmentMaker";
744 if(recName == "RecParticles"){
746 dataname = fgkRecParticlesBranchName;
747 zername = "AliPHOSPID";
756 TObjArray * lob = static_cast<TObjArray*>(tree->GetListOfBranches()) ;
758 TBranch * branch = 0 ;
759 TString titleName(fBranchTitle);
762 while ((branch = (static_cast<TBranch*>(next())))) {
763 TString branchName(branch->GetName() ) ;
764 TString branchTitle(branch->GetTitle() ) ;
765 if ( branchName.BeginsWith(dataname) && branchTitle.BeginsWith(fBranchTitle) ){
766 Warning("BranchExists","branch %s with title %s ",dataname.Data(),fBranchTitle.Data());
769 if ( branchName.BeginsWith(zername) && branchTitle.BeginsWith(titleName) ){
770 Warning("BranchExists","branch AliPHOS... with title %s ",branch->GetTitle());
778 void AliPHOSLoader::SetBranchTitle(const TString& btitle)
781 if (btitle.CompareTo(fBranchTitle) == 0) return;
782 fBranchTitle = btitle;
785 //____________________________________________________________________________
787 void AliPHOSLoader::CleanHits()
790 AliLoader::CleanHits();
792 TClonesArray* hits = Hits();
793 if (hits) hits->Clear();
795 //____________________________________________________________________________
797 void AliPHOSLoader::CleanSDigits()
799 // Clean SDigits array
800 AliLoader::CleanSDigits();
801 TClonesArray* sdigits = SDigits();
802 if (sdigits) sdigits->Clear();
805 //____________________________________________________________________________
807 void AliPHOSLoader::CleanDigits()
809 // Clean Digits array
810 AliLoader::CleanDigits();
811 TClonesArray* digits = Digits();
812 if (digits) digits->Clear();
814 //____________________________________________________________________________
816 void AliPHOSLoader::CleanRecPoints()
818 // Clean RecPoints array
819 AliLoader::CleanRecPoints();
820 TObjArray* recpoints = EmcRecPoints();
821 if (recpoints) recpoints->Clear();
822 recpoints = CpvRecPoints();
823 if (recpoints) recpoints->Clear();
825 //____________________________________________________________________________
827 void AliPHOSLoader::CleanTracks()
829 //Cleans Tracks stuff
830 AliLoader::CleanTracks();//tree
832 //and clear the array
833 TClonesArray* tracks = TrackSegments();
834 if (tracks) tracks->Clear();
837 //____________________________________________________________________________
839 void AliPHOSLoader::CleanRecParticles()
841 // Clean RecParticles array
842 TClonesArray *recpar = RecParticles();
843 if (recpar) recpar->Clear();
847 //____________________________________________________________________________
849 void AliPHOSLoader::ReadCalibrationDB(const char * database,const char * filename)
851 // Read calibration data base from file
852 if(fcdb && (strcmp(database,fcdb->GetTitle())==0))
855 TFile * file = gROOT->GetFile(filename) ;
857 file = TFile::Open(filename);
859 Error ("ReadCalibrationDB", "Cannot open file %s", filename) ;
864 fcdb = dynamic_cast<AliPHOSCalibrationDB *>(file->Get("AliPHOSCalibrationDB")) ;
866 Error ("ReadCalibrationDB", "No database %s in file %s", database, filename) ;
868 //____________________________________________________________________________
870 // AliPHOSSDigitizer* AliPHOSLoader::PHOSSDigitizer()
872 // //return PHOS SDigitizer
873 // return dynamic_cast<AliPHOSSDigitizer*>(SDigitizer()) ;
876 //____________________________________________________________________________
877 void AliPHOSLoader::MakeHitsArray()
879 // Add Hits array to the data folder
881 TClonesArray* hits = new TClonesArray("AliPHOSHit",1000);
882 hits->SetName(fgkHitsName);
883 GetDetectorDataFolder()->Add(hits);
886 //____________________________________________________________________________
887 void AliPHOSLoader::MakeSDigitsArray()
889 // Add SDigits array to the data folder
890 if ( SDigits()) return;
891 TClonesArray* sdigits = new TClonesArray("AliPHOSDigit",1);
892 sdigits->SetName(fgkSDigitsName);
893 GetDetectorDataFolder()->Add(sdigits);
896 //____________________________________________________________________________
897 void AliPHOSLoader::MakeDigitsArray()
899 // Add Digits array to the data folder
900 if ( Digits()) return;
901 TClonesArray* digits = new TClonesArray("AliPHOSDigit",1);
902 digits->SetName(fgkDigitsName);
903 GetDetectorDataFolder()->Add(digits);
907 //____________________________________________________________________________
908 void AliPHOSLoader::MakeRecPointsArray()
910 // Add RecPoints array to the data folder
911 if ( EmcRecPoints() == 0x0)
913 if (GetDebug()>9) Info("MakeRecPointsArray","Making array for EMC");
914 TObjArray* emc = new TObjArray(100) ;
915 emc->SetName(fgkEmcRecPointsName) ;
916 GetDetectorDataFolder()->Add(emc);
919 if ( CpvRecPoints() == 0x0)
921 if (GetDebug()>9) Info("MakeRecPointsArray","Making array for CPV");
922 TObjArray* cpv = new TObjArray(100) ;
923 cpv->SetName(fgkCpvRecPointsName);
924 GetDetectorDataFolder()->Add(cpv);
928 //____________________________________________________________________________
929 void AliPHOSLoader::MakeTrackSegmentsArray()
931 // Add TrackSegments array to the data folder
932 if ( TrackSegments()) return;
933 TClonesArray * ts = new TClonesArray("AliPHOSTrackSegment",100) ;
934 ts->SetName(fgkTracksName);
935 GetDetectorDataFolder()->Add(ts);
939 //____________________________________________________________________________
940 void AliPHOSLoader::MakeRecParticlesArray()
942 // Add RecParticles array to the data folder
943 if ( RecParticles()) return;
944 TClonesArray * rp = new TClonesArray("AliPHOSRecParticle",100) ;
945 rp->SetName(fgkRecParticlesName);
946 GetDetectorDataFolder()->Add(rp);