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.14 2005/05/28 14:19:04 schutz
22 * Compilation warnings fixed by T.P.
26 //_________________________________________________________________________
27 // A singleton. This class should be used in the analysis stage to get
28 // reconstructed objects: Digits, RecPoints, TrackSegments and RecParticles,
29 // instead of directly reading them from galice.root file. This container
30 // ensures, that one reads Digits, made of these particular digits, RecPoints,
31 // made of these particular RecPoints, TrackSegments and RecParticles.
32 // This becomes non trivial if there are several identical branches, produced with
33 // different set of parameters.
35 // An example of how to use (see also class AliPHOSAnalyser):
36 // for(Int_t irecp = 0; irecp < gime->NRecParticles() ; irecp++)
37 // AliPHOSRecParticle * part = gime->RecParticle(1) ;
39 // please->GetEvent(event) ; // reads new event from galice.root
41 //*-- Author: Yves Schutz (SUBATECH) & Dmitri Peressounko (RRC KI & SUBATECH)
42 //*-- Completely redesigned by Dmitri Peressounko March 2001
44 //*-- YS June 2001 : renamed the original AliPHOSIndexToObject and make
45 //*-- systematic usage of TFolders without changing the interface
46 //////////////////////////////////////////////////////////////////////////////
49 // --- ROOT system ---
55 // --- Standard library ---
57 // --- AliRoot header files ---
58 #include "AliObjectLoader.h"
60 #include "AliPHOSLoader.h"
62 #include "AliPHOSHit.h"
63 #include "AliPHOSCalibrationDB.h"
64 #include "AliPHOSGetter.h"
66 ClassImp(AliPHOSLoader)
69 const TString AliPHOSLoader::fgkHitsName("HITS");//Name for TClonesArray with hits from one event
70 const TString AliPHOSLoader::fgkSDigitsName("SDIGITS");//Name for TClonesArray
71 const TString AliPHOSLoader::fgkDigitsName("DIGITS");//Name for TClonesArray
72 const TString AliPHOSLoader::fgkEmcRecPointsName("EMCRECPOINTS");//Name for TClonesArray
73 const TString AliPHOSLoader::fgkCpvRecPointsName("CPVRECPOINTS");//Name for TClonesArray
74 const TString AliPHOSLoader::fgkTracksName("TRACKS");//Name for TClonesArray
75 const TString AliPHOSLoader::fgkRecParticlesName("RECPARTICLES");//Name for TClonesArray
77 const TString AliPHOSLoader::fgkEmcRecPointsBranchName("PHOSEmcRP");//Name for branch with EMC Reconstructed Points
78 const TString AliPHOSLoader::fgkCpvRecPointsBranchName("PHOSCpvRP");//Name for branch with CPV Reconstructed Points
79 const TString AliPHOSLoader::fgkTrackSegmentsBranchName("PHOSTS");//Name for branch with TrackSegments
80 const TString AliPHOSLoader::fgkRecParticlesBranchName("PHOSRP");//Name for branch with Reconstructed Particles
81 //____________________________________________________________________________
82 AliPHOSLoader::AliPHOSLoader()
86 //____________________________________________________________________________
87 AliPHOSLoader::AliPHOSLoader(const Char_t *detname,const Char_t *eventfoldername):
88 AliLoader(detname,eventfoldername)
92 //____________________________________________________________________________
94 AliPHOSLoader::~AliPHOSLoader()
96 //remove and delete arrays
98 Clean(fgkSDigitsName);
100 Clean(fgkEmcRecPointsName);
101 Clean(fgkCpvRecPointsName);
102 Clean(fgkTracksName);
103 Clean(fgkRecParticlesName);
105 // set to 0x0 the objgetter in AliGetter ... weird isn it !
106 AliPHOSGetter * gime = AliPHOSGetter::Instance() ; // (AliLoader::GetRunLoader()->GetFileName()).Data()) ;
111 //____________________________________________________________________________
112 void AliPHOSLoader::CleanFolders()
115 AliLoader::CleanFolders();
118 //____________________________________________________________________________
119 Int_t AliPHOSLoader::SetEvent()
121 //Cleans loaded stuff and and sets Files and Directories
122 // do not post any data to folder/tasks
125 Int_t retval = AliLoader::SetEvent();
128 AliError("returned error");
133 if (Hits()) Hits()->Clear();
134 if (SDigits()) SDigits()->Clear();
135 if (Digits()) Digits()->Clear();
136 if (EmcRecPoints()) EmcRecPoints()->Clear();
137 if (CpvRecPoints()) CpvRecPoints()->Clear();
138 if (TrackSegments()) TrackSegments()->Clear();
139 if (RecParticles()) RecParticles()->Clear();
144 //____________________________________________________________________________
145 Int_t AliPHOSLoader::GetEvent()
147 //Overloads GetEvent method called by AliRunLoader::GetEvent(Int_t) method
148 //to add Rec Particles specific for PHOS
150 //First call the original method to get whatever from std. setup is needed
153 retval = AliLoader::GetEvent();
156 AliError("returned error");
160 if (GetHitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadHits();
161 if (GetSDigitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadSDigits();
162 if (GetDigitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadDigits();
163 if (GetRecPointsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadRecPoints();
164 if (GetTracksDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadTracks();
165 if (GetRecParticlesDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadRecParticles();
168 //Now, check if RecPart were loaded
172 //____________________________________________________________________________
173 const AliPHOS * AliPHOSLoader::PHOS()
175 // returns the PHOS object
176 AliPHOS * phos = dynamic_cast<AliPHOS*>(GetModulesFolder()->FindObject(fDetectorName));
179 cout << "WARNING: AliPHOSLoader::PHOS -> PHOS module not found in Folders" << endl ;
183 //____________________________________________________________________________
184 const AliPHOSGeometry * AliPHOSLoader::PHOSGeometry()
186 // Return PHOS geometry
187 AliPHOSGeometry * rv = 0 ;
189 rv = PHOS()->GetGeometry();
194 //____________________________________________________________________________
195 Int_t AliPHOSLoader::LoadHits(Option_t* opt)
197 //------- Hits ----------------------
198 //Overload (extends) LoadHits implemented in AliLoader
202 //First call the AliLoader's method to send the TreeH to folder
203 res = AliLoader::LoadHits(opt);
207 AliError("returned error");
211 //read the data from tree in folder and send it to folder
217 //____________________________________________________________________________
218 Int_t AliPHOSLoader::LoadSDigits(Option_t* opt)
220 //---------- SDigits -------------------------
222 //First call the AliLoader's method to send the TreeS to folder
223 res = AliLoader::LoadSDigits(opt);
226 AliError("returned error");
229 return ReadSDigits();
232 //____________________________________________________________________________
233 Int_t AliPHOSLoader::LoadDigits(Option_t* opt)
235 //---------- Digits -------------------------
237 //First call the AliLoader's method to send the TreeS to folder
238 res = AliLoader::LoadDigits(opt);
241 AliError("returned error");
246 //____________________________________________________________________________
247 Int_t AliPHOSLoader::LoadRecPoints(Option_t* opt)
249 // -------------- RecPoints -------------------------------------------
251 //First call the AliLoader's method to send the TreeR to folder
252 res = AliLoader::LoadRecPoints(opt);
255 AliError("returned error");
259 TFolder * phosFolder = GetDetectorDataFolder();
260 if ( phosFolder == 0x0 )
262 AliError("Can not get detector data folder");
265 return ReadRecPoints();
267 //____________________________________________________________________________
269 Int_t AliPHOSLoader::LoadTracks(Option_t* opt)
271 //Loads Tracks: Open File, Reads Tree and posts, Read Data and Posts
272 AliDebug(1, Form("opt = %s",opt));
274 res = AliLoader::LoadTracks(opt);
277 AliError("returned error");
283 //____________________________________________________________________________
284 Int_t AliPHOSLoader::LoadRecParticles(Option_t* opt)
286 // -------------- RecPoints -------------------------------------------
288 //First call the AliLoader's method to send the TreeT to folder
289 res = AliLoader::LoadRecParticles(opt);
292 AliError("returned error");
295 return ReadRecParticles();
298 //____________________________________________________________________________
299 //PostHits etc. PostXXX must be const - not to hide virtual functions
300 //from base class AliLoader, but they call non-constant functions ReadXXX
301 //so I have to const_cast this pointer
302 Int_t AliPHOSLoader::PostHits()const
304 // -------------- Hits -------------------------------------------
305 Int_t reval = AliLoader::PostHits();
308 AliError("returned error");
312 return const_cast<AliPHOSLoader *>(this)->ReadHits();
314 //____________________________________________________________________________
316 Int_t AliPHOSLoader::PostSDigits()const
318 // -------------- SDigits -------------------------------------------
319 Int_t reval = AliLoader::PostSDigits();
322 AliError("returned error");
325 return const_cast<AliPHOSLoader *>(this)->ReadSDigits();
327 //____________________________________________________________________________
329 Int_t AliPHOSLoader::PostDigits()const
331 // -------------- Digits -------------------------------------------
332 Int_t reval = AliLoader::PostDigits();
335 AliError("returned error");
338 return const_cast<AliPHOSLoader *>(this)->ReadDigits();
340 //____________________________________________________________________________
342 Int_t AliPHOSLoader::PostRecPoints()const
344 // -------------- RecPoints -------------------------------------------
345 Int_t reval = AliLoader::PostRecPoints();
348 AliError("returned error");
351 return const_cast<AliPHOSLoader *>(this)->ReadRecPoints();
354 //____________________________________________________________________________
356 Int_t AliPHOSLoader::PostRecParticles()const
358 // -------------- RecParticles -------------------------------------------
359 Int_t reval = AliLoader::PostRecParticles();
362 AliError("returned error");
365 return const_cast<AliPHOSLoader *>(this)->ReadRecParticles();
367 //____________________________________________________________________________
369 Int_t AliPHOSLoader::PostTracks()const
371 // -------------- Tracks -------------------------------------------
372 Int_t reval = AliLoader::PostTracks();
375 AliError("returned error");
378 return const_cast<AliPHOSLoader *>(this)->ReadTracks();
380 //____________________________________________________________________________
384 //____________________________________________________________________________
385 Int_t AliPHOSLoader::ReadHits()
387 // If there is no Clones Array in folder creates it and sends to folder
388 // then tries to read
389 // Reads the first entry of PHOS branch in hit tree TreeH()
390 // Reads data from TreeH and stores it in TClonesArray that sits in DetectorDataFolder
392 TObject** hitref = HitsRef();
399 TClonesArray* hits = dynamic_cast<TClonesArray*>(*hitref);
401 TTree* treeh = TreeH();
405 AliError("Cannot read TreeH from folder");
409 TBranch * hitsbranch = treeh->GetBranch(fDetectorName);
412 AliError("Cannot find branch PHOS");
416 AliDebug(1, "Reading Hits");
418 if (hitsbranch->GetEntries() > 1)
420 TClonesArray * tempo = new TClonesArray("AliPHOSHit",1000);
422 hitsbranch->SetAddress(&tempo);
425 for (i = 0 ; i < hitsbranch->GetEntries(); i++)
427 hitsbranch->GetEntry(i) ;
429 for ( j = 0 ; j < tempo->GetEntries() ; j++)
431 AliPHOSHit* hit = (AliPHOSHit*)tempo->At(j);
432 new((*hits)[index]) AliPHOSHit( *hit ) ;
441 hitsbranch->SetAddress(hitref);
442 hitsbranch->GetEntry(0) ;
447 //____________________________________________________________________________
448 Int_t AliPHOSLoader::ReadSDigits()
450 // Read the summable digits tree TreeS():
451 // Check if TClones is in folder
452 // if not create and add to folder
453 // connect to tree if available
456 TObject** sdref = SDigitsRef();
460 sdref = SDigitsRef();
463 TTree * treeS = TreeS();
466 //May happen if file is truncated or new in LoadSDigits
467 //AliError("There is no SDigit Tree");
471 TBranch * branch = treeS->GetBranch(fDetectorName);
473 {//easy, maybe just a new tree
474 //AliError("Cannot find branch PHOS");
478 branch->SetAddress(SDigitsRef());
483 //____________________________________________________________________________
484 Int_t AliPHOSLoader::ReadDigits()
486 // Read the summable digits tree TreeS():
487 // Check if TClones is in folder
488 // if not create and add to folder
489 // connect to tree if available
492 TObject** dref = DigitsRef();
494 {//if there is not array in folder, create it and put it there
499 TTree * treeD = TreeD();
502 //May happen if file is truncated or new in LoadSDigits
503 //AliError("There is no Digit Tree");
507 TBranch * branch = treeD->GetBranch(fDetectorName);
509 {//easy, maybe just a new tree
510 //AliError("Cannot find branch ",fDetectorName.Data());
514 branch->SetAddress(dref);//connect branch to buffer sitting in folder
515 branch->GetEntry(0);//get first event
520 //____________________________________________________________________________
522 void AliPHOSLoader::Track(Int_t itrack)
524 // Read the first entry of PHOS branch in hit tree gAlice->TreeH()
529 AliError("Can not load hits.");
534 TBranch * hitsbranch = dynamic_cast<TBranch*>(TreeH()->GetListOfBranches()->FindObject("PHOS")) ;
537 cout << "WARNING: AliPHOSLoader::ReadTreeH -> Cannot find branch PHOS" << endl ;
540 if(!Hits()) PostHits();
542 hitsbranch->SetAddress(HitsRef());
543 hitsbranch->GetEntry(itrack);
547 //____________________________________________________________________________
548 Int_t AliPHOSLoader::ReadRecPoints()
550 //Creates and posts to folder an array container,
551 //connects branch in tree (if exists), and reads data to array
553 MakeRecPointsArray();
555 TObjArray * cpva = 0x0 ;
556 TObjArray * emca = 0x0 ;
558 TTree * treeR = TreeR();
562 //May happen if file is truncated or new in LoadSDigits
567 TBranch * emcbranch = treeR->GetBranch(fgkEmcRecPointsBranchName);
569 if (emcbranch == 0x0)
571 AliError(Form("Can not get branch with EMC Rec. Points named %s",
572 fgkEmcRecPointsBranchName.Data()));
577 emcbranch->SetAddress(&emca) ;
578 emcbranch->GetEntry(0) ;
580 TBranch * cpvbranch = treeR->GetBranch(fgkCpvRecPointsBranchName);
581 if (cpvbranch == 0x0)
583 AliError(Form("Can not get branch with CPV Rec. Points named %s",
584 fgkCpvRecPointsBranchName.Data()));
589 cpvbranch->SetAddress(&cpva);
590 cpvbranch->GetEntry(0) ;
594 Int_t maxemc = emca->GetEntries() ;
595 for ( ii= 0 ; ii < maxemc ; ii++ )
596 EmcRecPoints()->Add(emca->At(ii)) ;
598 Int_t maxcpv = cpva->GetEntries() ;
599 for ( ii= 0 ; ii < maxcpv ; ii++ )
600 CpvRecPoints()->Add(cpva->At(ii)) ;
605 //____________________________________________________________________________
606 Int_t AliPHOSLoader::ReadTracks()
608 //Creates and posts to folder an array container,
609 //connects branch in tree (if exists), and reads data to arry
611 TObject** trkref = TracksRef();
613 {//Create and post array
614 MakeTrackSegmentsArray();
615 trkref = TracksRef();
618 TTree * treeT = TreeT();
621 //May happen if file is truncated or new in LoadSDigits, or the file is in update mode,
622 //but tracking was not performed yet for a current event
623 //AliError("There is no Tree with Tracks");
627 TBranch * branch = treeT->GetBranch(fgkTrackSegmentsBranchName);
629 {//easy, maybe just a new tree
630 AliError(Form("Cannot find branch named %s",
631 fgkTrackSegmentsBranchName.Data()));
635 branch->SetAddress(trkref);//connect branch to buffer sitting in folder
636 branch->GetEntry(0);//get first event
640 //____________________________________________________________________________
642 Int_t AliPHOSLoader::ReadRecParticles()
644 //Reads Reconstructed Particles from file
645 //Creates and posts to folder an array container,
646 //connects branch in tree (if exists), and reads data to arry
648 TObject** recpartref = RecParticlesRef();
650 if ( recpartref == 0x0 )
651 {//Create and post array
652 MakeRecParticlesArray();
653 recpartref = RecParticlesRef();
656 TTree * treeP = TreeP();
659 //May happen if file is truncated or new in LoadSDigits,
660 //or the file is in update mode,
661 //but tracking was not performed yet for a current event
662 // AliError("There is no Tree with Tracks and Reconstructed Particles");
666 TBranch * branch = treeP->GetBranch(fgkRecParticlesBranchName);
668 {//easy, maybe just a new tree
669 AliError(Form("Cannot find branch %s",
670 fgkRecParticlesBranchName.Data()));
674 branch->SetAddress(recpartref);//connect branch to buffer sitting in folder
675 branch->GetEntry(0);//get first event
681 AliPHOSGeometry* AliPHOSLoader::GetPHOSGeometry()
683 //returns PHOS geometry from gAlice
684 //static Method used by some classes where it is not convienient to pass eventfoldername
687 AliPHOS* phos=dynamic_cast<AliPHOS*>(gAlice->GetDetector("PHOS"));
690 return phos->GetGeometry();
692 /***************************************************************************************/
694 AliPHOSLoader* AliPHOSLoader::GetPHOSLoader(const char* eventfoldername)
696 // Return PHOS loader
697 AliRunLoader* rn = AliRunLoader::GetRunLoader(eventfoldername);
699 printf("Can not find Run Loader in folder %s", eventfoldername);
702 return dynamic_cast<AliPHOSLoader*>(rn->GetLoader("PHOSLoader"));
704 /***************************************************************************************/
706 Bool_t AliPHOSLoader::BranchExists(const TString& recName)
708 // Check if a branch named redName exists
709 if (fBranchTitle.IsNull()) return kFALSE;
710 TString dataname, zername ;
712 if(recName == "SDigits")
715 dataname = GetDetectorName();
716 zername = "AliPHOSSDigitizer" ;
719 if(recName == "Digits"){
721 dataname = GetDetectorName();
722 zername = "AliPHOSDigitizer" ;
725 if(recName == "RecPoints"){
727 dataname = fgkEmcRecPointsBranchName;
728 zername = "AliPHOSClusterizer" ;
731 if(recName == "TrackSegments"){
733 dataname = fgkTrackSegmentsBranchName;
734 zername = "AliPHOSTrackSegmentMaker";
737 if(recName == "RecParticles"){
739 dataname = fgkRecParticlesBranchName;
740 zername = "AliPHOSPID";
749 TObjArray * lob = static_cast<TObjArray*>(tree->GetListOfBranches()) ;
751 TBranch * branch = 0 ;
752 TString titleName(fBranchTitle);
755 while ((branch = (static_cast<TBranch*>(next())))) {
756 TString branchName(branch->GetName() ) ;
757 TString branchTitle(branch->GetTitle() ) ;
758 if ( branchName.BeginsWith(dataname) && branchTitle.BeginsWith(fBranchTitle) ){
759 AliWarning(Form("branch %s with title %s ",
760 dataname.Data(),fBranchTitle.Data()));
763 if ( branchName.BeginsWith(zername) && branchTitle.BeginsWith(titleName) ){
764 AliWarning(Form("branch AliPHOS... with title %s ",
765 branch->GetTitle()));
773 void AliPHOSLoader::SetBranchTitle(const TString& btitle)
776 if (btitle.CompareTo(fBranchTitle) == 0) return;
777 fBranchTitle = btitle;
781 //____________________________________________________________________________
782 //Again, must be const not to hide virtual functions from AliLoader
783 //but there are calls to non-const functions, so I have to const_cast this pointer
784 void AliPHOSLoader::CleanHits()const
787 AliLoader::CleanHits();
789 TClonesArray* hits = const_cast<AliPHOSLoader *>(this)->Hits();
790 if (hits) hits->Clear();
792 //____________________________________________________________________________
794 void AliPHOSLoader::CleanSDigits()const
796 // Clean SDigits array
797 AliLoader::CleanSDigits();
798 TClonesArray* sdigits = const_cast<AliPHOSLoader *>(this)->SDigits();
799 if (sdigits) sdigits->Clear();
802 //____________________________________________________________________________
804 void AliPHOSLoader::CleanDigits()const
806 // Clean Digits array
807 AliLoader::CleanDigits();
808 TClonesArray* digits = const_cast<AliPHOSLoader *>(this)->Digits();
809 if (digits) digits->Clear();
811 //____________________________________________________________________________
813 void AliPHOSLoader::CleanRecPoints()const
815 // Clean RecPoints array
816 AliLoader::CleanRecPoints();
817 TObjArray* recpoints = const_cast<AliPHOSLoader *>(this)->EmcRecPoints();
818 if (recpoints) recpoints->Clear();
819 recpoints = const_cast<AliPHOSLoader *>(this)->CpvRecPoints();
820 if (recpoints) recpoints->Clear();
822 //____________________________________________________________________________
824 void AliPHOSLoader::CleanTracks()const
826 //Cleans Tracks stuff
827 AliLoader::CleanTracks();//tree
829 //and clear the array
830 TClonesArray* tracks = const_cast<AliPHOSLoader *>(this)->TrackSegments();
831 if (tracks) tracks->Clear();
834 //____________________________________________________________________________
836 void AliPHOSLoader::CleanRecParticles()
838 // Clean RecParticles array
839 TClonesArray *recpar = RecParticles();
840 if (recpar) recpar->Clear();
844 //____________________________________________________________________________
846 void AliPHOSLoader::ReadCalibrationDB(const char * database,const char * filename)
848 // Read calibration data base from file
849 if(fcdb && (strcmp(database,fcdb->GetTitle())==0))
852 TFile * file = gROOT->GetFile(filename) ;
854 file = TFile::Open(filename);
856 AliError(Form("Cannot open file %s", filename)) ;
861 fcdb = dynamic_cast<AliPHOSCalibrationDB *>(file->Get("AliPHOSCalibrationDB")) ;
863 AliError(Form("No database %s in file %s", database, filename)) ;
865 //____________________________________________________________________________
867 // AliPHOSSDigitizer* AliPHOSLoader::PHOSSDigitizer()
869 // //return PHOS SDigitizer
870 // return dynamic_cast<AliPHOSSDigitizer*>(SDigitizer()) ;
873 //____________________________________________________________________________
874 void AliPHOSLoader::MakeHitsArray()
876 // Add Hits array to the data folder
878 TClonesArray* hits = new TClonesArray("AliPHOSHit",1000);
879 hits->SetName(fgkHitsName);
880 GetDetectorDataFolder()->Add(hits);
883 //____________________________________________________________________________
884 void AliPHOSLoader::MakeSDigitsArray()
886 // Add SDigits array to the data folder
887 if ( SDigits()) return;
888 TClonesArray* sdigits = new TClonesArray("AliPHOSDigit",1);
889 sdigits->SetName(fgkSDigitsName);
890 GetDetectorDataFolder()->Add(sdigits);
893 //____________________________________________________________________________
894 void AliPHOSLoader::MakeDigitsArray()
896 // Add Digits array to the data folder
897 if ( Digits()) return;
898 TClonesArray* digits = new TClonesArray("AliPHOSDigit",1);
899 digits->SetName(fgkDigitsName);
900 GetDetectorDataFolder()->Add(digits);
904 //____________________________________________________________________________
905 void AliPHOSLoader::MakeRecPointsArray()
907 // Add RecPoints array to the data folder
908 if ( EmcRecPoints() == 0x0)
910 AliDebug(9, "Making array for EMC");
911 TObjArray* emc = new TObjArray(100) ;
912 emc->SetName(fgkEmcRecPointsName) ;
913 GetDetectorDataFolder()->Add(emc);
916 if ( CpvRecPoints() == 0x0)
918 AliDebug(9, "Making array for CPV");
919 TObjArray* cpv = new TObjArray(100) ;
920 cpv->SetName(fgkCpvRecPointsName);
921 GetDetectorDataFolder()->Add(cpv);
925 //____________________________________________________________________________
926 void AliPHOSLoader::MakeTrackSegmentsArray()
928 // Add TrackSegments array to the data folder
929 if ( TrackSegments()) return;
930 TClonesArray * ts = new TClonesArray("AliPHOSTrackSegment",100) ;
931 ts->SetName(fgkTracksName);
932 GetDetectorDataFolder()->Add(ts);
936 //____________________________________________________________________________
937 void AliPHOSLoader::MakeRecParticlesArray()
939 // Add RecParticles array to the data folder
940 if ( RecParticles()) return;
941 TClonesArray * rp = new TClonesArray("AliPHOSRecParticle",100) ;
942 rp->SetName(fgkRecParticlesName);
943 GetDetectorDataFolder()->Add(rp);