1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 /* History of cvs commits:
21 * Revision 1.18 2006/08/28 10:01:56 kharlov
22 * Effective C++ warnings fixed (Timur Pocheptsov)
24 * Revision 1.17 2006/08/25 16:00:53 kharlov
25 * Compliance with Effective C++AliPHOSHit.cxx
27 * Revision 1.16 2006/08/01 12:15:04 cvetan
28 * Adding a constructor from TFolder. Needed by AliReconstruction plugin scheme
30 * Revision 1.15 2005/07/12 20:07:35 hristov
31 * Changes needed to run simulation and reconstrruction in the same AliRoot session
33 * Revision 1.14 2005/05/28 14:19:04 schutz
34 * Compilation warnings fixed by T.P.
38 //_________________________________________________________________________
39 // A singleton. This class should be used in the analysis stage to get
40 // reconstructed objects: Digits, RecPoints, TrackSegments and RecParticles,
41 // instead of directly reading them from galice.root file. This container
42 // ensures, that one reads Digits, made of these particular digits, RecPoints,
43 // made of these particular RecPoints, TrackSegments and RecParticles.
44 // This becomes non trivial if there are several identical branches, produced with
45 // different set of parameters.
47 // An example of how to use (see also class AliPHOSAnalyser):
48 // for(Int_t irecp = 0; irecp < gime->NRecParticles() ; irecp++)
49 // AliPHOSRecParticle * part = gime->RecParticle(1) ;
51 // please->GetEvent(event) ; // reads new event from galice.root
53 //-- Author: Yves Schutz (SUBATECH) & Dmitri Peressounko (RRC KI & SUBATECH)
54 //-- Completely redesigned by Dmitri Peressounko March 2001
56 //-- YS June 2001 : renamed the original AliPHOSIndexToObject and make
57 //-- systematic usage of TFolders without changing the interface
58 //////////////////////////////////////////////////////////////////////////////
61 // --- ROOT system ---
67 // --- Standard library ---
69 // --- AliRoot header files ---
70 #include "AliObjectLoader.h"
72 #include "AliPHOSLoader.h"
74 #include "AliPHOSHit.h"
75 #include "AliPHOSCalibrationDB.h"
77 ClassImp(AliPHOSLoader)
80 const TString AliPHOSLoader::fgkHitsName("HITS");//Name for TClonesArray with hits from one event
81 const TString AliPHOSLoader::fgkSDigitsName("SDIGITS");//Name for TClonesArray
82 const TString AliPHOSLoader::fgkDigitsName("DIGITS");//Name for TClonesArray
83 const TString AliPHOSLoader::fgkEmcRecPointsName("EMCRECPOINTS");//Name for TClonesArray
84 const TString AliPHOSLoader::fgkCpvRecPointsName("CPVRECPOINTS");//Name for TClonesArray
85 const TString AliPHOSLoader::fgkTracksName("TRACKS");//Name for TClonesArray
86 const TString AliPHOSLoader::fgkRecParticlesName("RECPARTICLES");//Name for TClonesArray
88 const TString AliPHOSLoader::fgkEmcRecPointsBranchName("PHOSEmcRP");//Name for branch with EMC Reconstructed Points
89 const TString AliPHOSLoader::fgkCpvRecPointsBranchName("PHOSCpvRP");//Name for branch with CPV Reconstructed Points
90 const TString AliPHOSLoader::fgkTrackSegmentsBranchName("PHOSTS");//Name for branch with TrackSegments
91 const TString AliPHOSLoader::fgkRecParticlesBranchName("PHOSRP");//Name for branch with Reconstructed Particles
92 //____________________________________________________________________________
93 AliPHOSLoader::AliPHOSLoader() : fBranchTitle(), fcdb(0), fDebug(0), fTmpHits(0x0)
96 fTmpHits = new TClonesArray("AliPHOSHit",1000);
98 //____________________________________________________________________________
99 AliPHOSLoader::AliPHOSLoader(const Char_t *detname,const Char_t *eventfoldername) :
100 AliLoader(detname, eventfoldername),
101 fBranchTitle(), fcdb(0), fDebug(0), fTmpHits(0x0)
105 //____________________________________________________________________________
106 AliPHOSLoader::AliPHOSLoader(const Char_t *detname,TFolder *topfolder):
107 AliLoader(detname,topfolder),
108 fBranchTitle(), fcdb(0), fDebug(0), fTmpHits(0x0)
112 fTmpHits = new TClonesArray("AliPHOSHit",1000);
115 //____________________________________________________________________________
117 AliPHOSLoader::~AliPHOSLoader()
119 //remove and delete arrays
121 Clean(fgkSDigitsName);
122 Clean(fgkDigitsName);
123 Clean(fgkEmcRecPointsName);
124 Clean(fgkCpvRecPointsName);
125 Clean(fgkTracksName);
126 Clean(fgkRecParticlesName);
130 //____________________________________________________________________________
131 void AliPHOSLoader::CleanFolders()
134 AliLoader::CleanFolders();
137 //____________________________________________________________________________
138 Int_t AliPHOSLoader::SetEvent()
140 //Cleans loaded stuff and and sets Files and Directories
141 // do not post any data to folder/tasks
144 Int_t retval = AliLoader::SetEvent();
147 AliError("returned error");
152 if (Hits()) Hits()->Clear();
153 if (SDigits()) SDigits()->Clear();
154 if (Digits()) Digits()->Clear();
155 if (EmcRecPoints()) EmcRecPoints()->Clear();
156 if (CpvRecPoints()) CpvRecPoints()->Clear();
157 if (TrackSegments()) TrackSegments()->Clear();
158 if (RecParticles()) RecParticles()->Clear();
163 //____________________________________________________________________________
164 Int_t AliPHOSLoader::GetEvent()
166 //Overloads GetEvent method called by AliRunLoader::GetEvent(Int_t) method
167 //to add Rec Particles specific for PHOS
169 //First call the original method to get whatever from std. setup is needed
172 retval = AliLoader::GetEvent();
175 AliError("returned error");
179 if (GetHitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadHits();
180 if (GetSDigitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadSDigits();
181 if (GetDigitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadDigits();
182 if (GetRecPointsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadRecPoints();
183 if (GetTracksDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadTracks();
184 if (GetRecParticlesDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadRecParticles();
187 //Now, check if RecPart were loaded
191 // //____________________________________________________________________________
192 // const AliPHOS * AliPHOSLoader::PHOS()
194 // // returns the PHOS object
195 // AliPHOS * phos = dynamic_cast<AliPHOS*>(GetModulesFolder()->FindObject(fDetectorName));
198 // cout << "WARNING: AliPHOSLoader::PHOS -> PHOS module not found in Folders" << endl ;
202 //____________________________________________________________________________
203 Int_t AliPHOSLoader::LoadHits(Option_t* opt)
205 //------- Hits ----------------------
206 //Overload (extends) LoadHits implemented in AliLoader
210 //First call the AliLoader's method to send the TreeH to folder
211 res = AliLoader::LoadHits(opt);
215 AliError("returned error");
219 //read the data from tree in folder and send it to folder
225 //____________________________________________________________________________
226 Int_t AliPHOSLoader::LoadSDigits(Option_t* opt)
228 //---------- SDigits -------------------------
230 //First call the AliLoader's method to send the TreeS to folder
231 res = AliLoader::LoadSDigits(opt);
234 AliError("returned error");
237 return ReadSDigits();
240 //____________________________________________________________________________
241 Int_t AliPHOSLoader::LoadDigits(Option_t* opt)
243 //---------- Digits -------------------------
245 //First call the AliLoader's method to send the TreeS to folder
246 res = AliLoader::LoadDigits(opt);
249 AliError("returned error");
254 //____________________________________________________________________________
255 Int_t AliPHOSLoader::LoadRecPoints(Option_t* opt)
257 // -------------- RecPoints -------------------------------------------
259 //First call the AliLoader's method to send the TreeR to folder
260 res = AliLoader::LoadRecPoints(opt);
263 AliError("returned error");
267 TFolder * phosFolder = GetDetectorDataFolder();
268 if ( phosFolder == 0x0 )
270 AliError("Can not get detector data folder");
273 return ReadRecPoints();
275 //____________________________________________________________________________
277 Int_t AliPHOSLoader::LoadTracks(Option_t* opt)
279 //Loads Tracks: Open File, Reads Tree and posts, Read Data and Posts
280 AliDebug(1, Form("opt = %s",opt));
282 res = AliLoader::LoadTracks(opt);
285 AliError("returned error");
291 //____________________________________________________________________________
292 Int_t AliPHOSLoader::LoadRecParticles(Option_t* opt)
294 // -------------- RecPoints -------------------------------------------
296 //First call the AliLoader's method to send the TreeT to folder
297 res = AliLoader::LoadRecParticles(opt);
300 AliError("returned error");
303 return ReadRecParticles();
306 //____________________________________________________________________________
307 //PostHits etc. PostXXX must be const - not to hide virtual functions
308 //from base class AliLoader, but they call non-constant functions ReadXXX
309 //so I have to const_cast this pointer
310 Int_t AliPHOSLoader::PostHits()const
312 // -------------- Hits -------------------------------------------
313 Int_t reval = AliLoader::PostHits();
316 AliError("returned error");
320 return const_cast<AliPHOSLoader *>(this)->ReadHits();
322 //____________________________________________________________________________
324 Int_t AliPHOSLoader::PostSDigits()const
326 // -------------- SDigits -------------------------------------------
327 Int_t reval = AliLoader::PostSDigits();
330 AliError("returned error");
333 return const_cast<AliPHOSLoader *>(this)->ReadSDigits();
335 //____________________________________________________________________________
337 Int_t AliPHOSLoader::PostDigits()const
339 // -------------- Digits -------------------------------------------
340 Int_t reval = AliLoader::PostDigits();
343 AliError("returned error");
346 return const_cast<AliPHOSLoader *>(this)->ReadDigits();
348 //____________________________________________________________________________
350 Int_t AliPHOSLoader::PostRecPoints()const
352 // -------------- RecPoints -------------------------------------------
353 Int_t reval = AliLoader::PostRecPoints();
356 AliError("returned error");
359 return const_cast<AliPHOSLoader *>(this)->ReadRecPoints();
362 //____________________________________________________________________________
364 Int_t AliPHOSLoader::PostRecParticles()const
366 // -------------- RecParticles -------------------------------------------
367 Int_t reval = AliLoader::PostRecParticles();
370 AliError("returned error");
373 return const_cast<AliPHOSLoader *>(this)->ReadRecParticles();
375 //____________________________________________________________________________
377 Int_t AliPHOSLoader::PostTracks()const
379 // -------------- Tracks -------------------------------------------
380 Int_t reval = AliLoader::PostTracks();
383 AliError("returned error");
386 return const_cast<AliPHOSLoader *>(this)->ReadTracks();
388 //____________________________________________________________________________
392 //____________________________________________________________________________
393 Int_t AliPHOSLoader::ReadHits()
395 // If there is no Clones Array in folder creates it and sends to folder
396 // then tries to read
397 // Reads the first entry of PHOS branch in hit tree TreeH()
398 // Reads data from TreeH and stores it in TClonesArray that sits in DetectorDataFolder
400 TObject** hitref = HitsRef();
406 TClonesArray* hits = dynamic_cast<TClonesArray*>(*hitref);
408 TTree* treeh = TreeH();
411 AliError("Cannot read TreeH from folder");
415 TBranch * hitsbranch = treeh->GetBranch(fDetectorName);
416 if (hitsbranch == 0) {
417 AliError("Cannot find branch PHOS");
421 AliDebug(1, "Reading Hits");
423 if (hitsbranch->GetEntries() > 1) {
425 hitsbranch->SetAddress(&fTmpHits);
427 for (Int_t i = 0 ; i < hitsbranch->GetEntries(); i++) {
428 hitsbranch->GetEntry(i) ;
429 for (Int_t j = 0 ; j < fTmpHits->GetEntriesFast() ; j++) {
430 AliPHOSHit* hit = (AliPHOSHit*)fTmpHits->At(j);
431 new((*hits)[index]) AliPHOSHit( *hit ) ;
438 hitsbranch->SetAddress(hitref);
439 hitsbranch->GetEntry(0) ;
444 //____________________________________________________________________________
445 Int_t AliPHOSLoader::ReadSDigits()
447 // Read the summable digits tree TreeS():
448 // Check if TClones is in folder
449 // if not create and add to folder
450 // connect to tree if available
453 TObject** sdref = SDigitsRef();
457 sdref = SDigitsRef();
460 TTree * treeS = TreeS();
463 //May happen if file is truncated or new in LoadSDigits
464 //AliError("There is no SDigit Tree");
468 TBranch * branch = treeS->GetBranch(fDetectorName);
470 {//easy, maybe just a new tree
471 //AliError("Cannot find branch PHOS");
475 branch->SetAddress(SDigitsRef());
480 //____________________________________________________________________________
481 Int_t AliPHOSLoader::ReadDigits()
483 // Read the summable digits tree TreeS():
484 // Check if TClones is in folder
485 // if not create and add to folder
486 // connect to tree if available
489 TObject** dref = DigitsRef();
491 {//if there is not array in folder, create it and put it there
496 TTree * treeD = TreeD();
499 //May happen if file is truncated or new in LoadSDigits
500 //AliError("There is no Digit Tree");
504 TBranch * branch = treeD->GetBranch(fDetectorName);
506 {//easy, maybe just a new tree
507 //AliError("Cannot find branch ",fDetectorName.Data());
511 branch->SetAddress(dref);//connect branch to buffer sitting in folder
512 branch->GetEntry(0);//get first event
517 //____________________________________________________________________________
519 void AliPHOSLoader::Track(Int_t itrack)
521 // Read the first entry of PHOS branch in hit tree gAlice->TreeH()
526 AliError("Can not load hits.");
531 TBranch * hitsbranch = dynamic_cast<TBranch*>(TreeH()->GetListOfBranches()->FindObject("PHOS")) ;
534 cout << "WARNING: AliPHOSLoader::ReadTreeH -> Cannot find branch PHOS" << endl ;
537 if(!Hits()) PostHits();
539 hitsbranch->SetAddress(HitsRef());
540 hitsbranch->GetEntry(itrack);
544 //____________________________________________________________________________
545 Int_t AliPHOSLoader::ReadRecPoints()
547 //Creates and posts to folder an array container,
548 //connects branch in tree (if exists), and reads data to array
550 MakeRecPointsArray();
552 TObjArray * cpva = 0x0 ;
553 TObjArray * emca = 0x0 ;
555 TTree * treeR = TreeR();
559 //May happen if file is truncated or new in LoadSDigits
564 TBranch * emcbranch = treeR->GetBranch(fgkEmcRecPointsBranchName);
566 if (emcbranch == 0x0)
568 AliError(Form("Can not get branch with EMC Rec. Points named %s",
569 fgkEmcRecPointsBranchName.Data()));
574 emcbranch->SetAddress(&emca) ;
575 emcbranch->GetEntry(0) ;
577 TBranch * cpvbranch = treeR->GetBranch(fgkCpvRecPointsBranchName);
578 if (cpvbranch == 0x0)
580 AliError(Form("Can not get branch with CPV Rec. Points named %s",
581 fgkCpvRecPointsBranchName.Data()));
586 cpvbranch->SetAddress(&cpva);
587 cpvbranch->GetEntry(0) ;
591 Int_t maxemc = emca->GetEntries() ;
592 for ( ii= 0 ; ii < maxemc ; ii++ )
593 EmcRecPoints()->Add(emca->At(ii)) ;
595 Int_t maxcpv = cpva->GetEntries() ;
596 for ( ii= 0 ; ii < maxcpv ; ii++ )
597 CpvRecPoints()->Add(cpva->At(ii)) ;
602 //____________________________________________________________________________
603 Int_t AliPHOSLoader::ReadTracks()
605 //Creates and posts to folder an array container,
606 //connects branch in tree (if exists), and reads data to arry
608 TObject** trkref = TracksRef();
610 {//Create and post array
611 MakeTrackSegmentsArray();
612 trkref = TracksRef();
615 TTree * treeT = TreeT();
618 //May happen if file is truncated or new in LoadSDigits, or the file is in update mode,
619 //but tracking was not performed yet for a current event
620 //AliError("There is no Tree with Tracks");
624 TBranch * branch = treeT->GetBranch(fgkTrackSegmentsBranchName);
625 // AliInfo(Form("Branch named %s is opened: 0x%z",
626 // fgkTrackSegmentsBranchName.Data(),branch));
628 {//easy, maybe just a new tree
629 AliError(Form("Cannot find branch named %s",
630 fgkTrackSegmentsBranchName.Data()));
634 branch->SetAddress(trkref);//connect branch to buffer sitting in folder
635 branch->GetEntry(0);//get first event
639 //____________________________________________________________________________
641 Int_t AliPHOSLoader::ReadRecParticles()
643 //Reads Reconstructed Particles from file
644 //Creates and posts to folder an array container,
645 //connects branch in tree (if exists), and reads data to arry
647 TObject** recpartref = RecParticlesRef();
649 if ( recpartref == 0x0 )
650 {//Create and post array
651 MakeRecParticlesArray();
652 recpartref = RecParticlesRef();
655 TTree * treeP = TreeP();
658 //May happen if file is truncated or new in LoadSDigits,
659 //or the file is in update mode,
660 //but tracking was not performed yet for a current event
661 // AliError("There is no Tree with Tracks and Reconstructed Particles");
665 TBranch * branch = treeP->GetBranch(fgkRecParticlesBranchName);
667 {//easy, maybe just a new tree
668 AliError(Form("Cannot find branch %s",
669 fgkRecParticlesBranchName.Data()));
673 branch->SetAddress(recpartref);//connect branch to buffer sitting in folder
674 branch->GetEntry(0);//get first event
680 /***************************************************************************************/
682 AliPHOSLoader* AliPHOSLoader::GetPHOSLoader(const char* eventfoldername)
684 // Return PHOS loader
685 AliRunLoader* rn = AliRunLoader::GetRunLoader(eventfoldername);
687 printf("Can not find Run Loader in folder %s", eventfoldername);
690 return dynamic_cast<AliPHOSLoader*>(rn->GetLoader("PHOSLoader"));
692 /***************************************************************************************/
694 Bool_t AliPHOSLoader::BranchExists(const TString& recName)
696 // Check if a branch named redName exists
697 if (fBranchTitle.IsNull()) return kFALSE;
698 TString dataname, zername ;
700 if(recName == "SDigits")
703 dataname = GetDetectorName();
704 zername = "AliPHOSSDigitizer" ;
707 if(recName == "Digits"){
709 dataname = GetDetectorName();
710 zername = "AliPHOSDigitizer" ;
713 if(recName == "RecPoints"){
715 dataname = fgkEmcRecPointsBranchName;
716 zername = "AliPHOSClusterizer" ;
719 if(recName == "TrackSegments"){
721 dataname = fgkTrackSegmentsBranchName;
722 zername = "AliPHOSTrackSegmentMaker";
725 if(recName == "RecParticles"){
727 dataname = fgkRecParticlesBranchName;
728 zername = "AliPHOSPID";
737 TObjArray * lob = static_cast<TObjArray*>(tree->GetListOfBranches()) ;
739 TBranch * branch = 0 ;
740 TString titleName(fBranchTitle);
743 while ((branch = (static_cast<TBranch*>(next())))) {
744 TString branchName(branch->GetName() ) ;
745 TString branchTitle(branch->GetTitle() ) ;
746 if ( branchName.BeginsWith(dataname) && branchTitle.BeginsWith(fBranchTitle) ){
747 AliWarning(Form("branch %s with title %s ",
748 dataname.Data(),fBranchTitle.Data()));
751 if ( branchName.BeginsWith(zername) && branchTitle.BeginsWith(titleName) ){
752 AliWarning(Form("branch AliPHOS... with title %s ",
753 branch->GetTitle()));
761 void AliPHOSLoader::SetBranchTitle(const TString& btitle)
764 if (btitle.CompareTo(fBranchTitle) == 0) return;
765 fBranchTitle = btitle;
769 //____________________________________________________________________________
770 //Again, must be const not to hide virtual functions from AliLoader
771 //but there are calls to non-const functions, so I have to const_cast this pointer
772 void AliPHOSLoader::CleanHits()const
775 AliLoader::CleanHits();
777 TClonesArray* hits = const_cast<AliPHOSLoader *>(this)->Hits();
778 if (hits) hits->Clear();
780 //____________________________________________________________________________
782 void AliPHOSLoader::CleanSDigits()const
784 // Clean SDigits array
785 AliLoader::CleanSDigits();
786 TClonesArray* sdigits = const_cast<AliPHOSLoader *>(this)->SDigits();
787 if (sdigits) sdigits->Clear();
790 //____________________________________________________________________________
792 void AliPHOSLoader::CleanDigits()const
794 // Clean Digits array
795 AliLoader::CleanDigits();
796 TClonesArray* digits = const_cast<AliPHOSLoader *>(this)->Digits();
797 if (digits) digits->Clear();
799 //____________________________________________________________________________
801 void AliPHOSLoader::CleanRecPoints()const
803 // Clean RecPoints array
804 AliLoader::CleanRecPoints();
805 TObjArray* recpoints = const_cast<AliPHOSLoader *>(this)->EmcRecPoints();
806 if (recpoints) recpoints->Clear();
807 recpoints = const_cast<AliPHOSLoader *>(this)->CpvRecPoints();
808 if (recpoints) recpoints->Clear();
810 //____________________________________________________________________________
812 void AliPHOSLoader::CleanTracks()const
814 //Cleans Tracks stuff
815 AliLoader::CleanTracks();//tree
817 //and clear the array
818 TClonesArray* tracks = const_cast<AliPHOSLoader *>(this)->TrackSegments();
819 if (tracks) tracks->Clear();
822 //____________________________________________________________________________
824 void AliPHOSLoader::CleanRecParticles()
826 // Clean RecParticles array
827 TClonesArray *recpar = RecParticles();
828 if (recpar) recpar->Clear();
832 //____________________________________________________________________________
834 void AliPHOSLoader::ReadCalibrationDB(const char * database,const char * filename)
836 // Read calibration data base from file
837 if(fcdb && (strcmp(database,fcdb->GetTitle())==0))
840 TFile * file = gROOT->GetFile(filename) ;
842 file = TFile::Open(filename);
844 AliError(Form("Cannot open file %s", filename)) ;
849 fcdb = dynamic_cast<AliPHOSCalibrationDB *>(file->Get("AliPHOSCalibrationDB")) ;
851 AliError(Form("No database %s in file %s", database, filename)) ;
853 //____________________________________________________________________________
855 // AliPHOSSDigitizer* AliPHOSLoader::PHOSSDigitizer()
857 // //return PHOS SDigitizer
858 // return dynamic_cast<AliPHOSSDigitizer*>(SDigitizer()) ;
861 //____________________________________________________________________________
862 void AliPHOSLoader::MakeHitsArray()
864 // Add Hits array to the data folder
866 TClonesArray* hits = new TClonesArray("AliPHOSHit",1000);
867 hits->SetName(fgkHitsName);
868 GetDetectorDataFolder()->Add(hits);
871 //____________________________________________________________________________
872 void AliPHOSLoader::MakeSDigitsArray()
874 // Add SDigits array to the data folder
875 if ( SDigits()) return;
876 TClonesArray* sdigits = new TClonesArray("AliPHOSDigit",1);
877 sdigits->SetName(fgkSDigitsName);
878 GetDetectorDataFolder()->Add(sdigits);
881 //____________________________________________________________________________
882 void AliPHOSLoader::MakeDigitsArray()
884 // Add Digits array to the data folder
885 if ( Digits()) return;
886 TClonesArray* digits = new TClonesArray("AliPHOSDigit",1);
887 digits->SetName(fgkDigitsName);
888 GetDetectorDataFolder()->Add(digits);
892 //____________________________________________________________________________
893 void AliPHOSLoader::MakeRecPointsArray()
895 // Add RecPoints array to the data folder
896 if ( EmcRecPoints() == 0x0)
898 AliDebug(9, "Making array for EMC");
899 TObjArray* emc = new TObjArray(100) ;
900 emc->SetName(fgkEmcRecPointsName) ;
901 GetDetectorDataFolder()->Add(emc);
904 if ( CpvRecPoints() == 0x0)
906 AliDebug(9, "Making array for CPV");
907 TObjArray* cpv = new TObjArray(100) ;
908 cpv->SetName(fgkCpvRecPointsName);
909 GetDetectorDataFolder()->Add(cpv);
913 //____________________________________________________________________________
914 void AliPHOSLoader::MakeTrackSegmentsArray()
916 // Add TrackSegments array to the data folder
917 if ( TrackSegments()) return;
918 TClonesArray * ts = new TClonesArray("AliPHOSTrackSegment",100) ;
919 ts->SetName(fgkTracksName);
920 GetDetectorDataFolder()->Add(ts);
924 //____________________________________________________________________________
925 void AliPHOSLoader::MakeRecParticlesArray()
927 // Add RecParticles array to the data folder
928 if ( RecParticles()) return;
929 TClonesArray * rp = new TClonesArray("AliPHOSRecParticle",100) ;
930 rp->SetName(fgkRecParticlesName);
931 GetDetectorDataFolder()->Add(rp);