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 ---
46 #include "TObjString.h"
48 #include "TParticle.h"
50 // --- Standard library ---
51 #include <Riostream.h>
53 // --- AliRoot header files ---
56 #include "AliConfig.h"
57 #include "AliDataLoader.h"
58 #include "AliPHOSLoader.h"
60 #include "AliPHOSDigitizer.h"
61 #include "AliPHOSSDigitizer.h"
62 #include "AliPHOSClusterizer.h"
63 #include "AliPHOSClusterizerv1.h"
64 #include "AliPHOSTrackSegmentMaker.h"
65 #include "AliPHOSTrackSegmentMakerv1.h"
66 #include "AliPHOSTrackSegment.h"
67 #include "AliPHOSPID.h"
68 #include "AliPHOSPIDv1.h"
69 #include "AliPHOSGeometry.h"
70 #include "AliPHOSCalibrationDB.h"
72 ClassImp(AliPHOSLoader)
75 const TString AliPHOSLoader::fgkHitsName("HITS");//Name for TClonesArray with hits from one event
76 const TString AliPHOSLoader::fgkSDigitsName("SDIGITS");//Name for TClonesArray
77 const TString AliPHOSLoader::fgkDigitsName("DIGITS");//Name for TClonesArray
78 const TString AliPHOSLoader::fgkEmcRecPointsName("EMCRECPOINTS");//Name for TClonesArray
79 const TString AliPHOSLoader::fgkCpvRecPointsName("CPVRECPOINTS");//Name for TClonesArray
80 const TString AliPHOSLoader::fgkTracksName("TRACKS");//Name for TClonesArray
81 const TString AliPHOSLoader::fgkRecParticlesName("RECPARTICLES");//Name for TClonesArray
83 const TString AliPHOSLoader::fgkEmcRecPointsBranchName("PHOSEmcRP");//Name for branch with EMC Reconstructed Points
84 const TString AliPHOSLoader::fgkCpvRecPointsBranchName("PHOSCpvRP");//Name for branch with CPV Reconstructed Points
85 const TString AliPHOSLoader::fgkTrackSegmentsBranchName("PHOSTS");//Name for branch with TrackSegments
86 const TString AliPHOSLoader::fgkRecParticlesBranchName("PHOSRP");//Name for branch with Reconstructed Particles
87 //____________________________________________________________________________
88 AliPHOSLoader::AliPHOSLoader()
92 //____________________________________________________________________________
93 AliPHOSLoader::AliPHOSLoader(const Char_t *detname,const Char_t *eventfoldername):
94 AliLoader(detname,eventfoldername)
98 //____________________________________________________________________________
100 AliPHOSLoader::~AliPHOSLoader()
102 //remove and delete arrays
104 Clean(fgkSDigitsName);
105 Clean(fgkDigitsName);
106 Clean(fgkEmcRecPointsName);
107 Clean(fgkCpvRecPointsName);
108 Clean(fgkTracksName);
109 Clean(fgkRecParticlesName);
111 //____________________________________________________________________________
113 void AliPHOSLoader::CleanFolders()
116 AliLoader::CleanFolders();
118 //____________________________________________________________________________
120 Int_t AliPHOSLoader::SetEvent()
122 //Cleans loaded stuff and and sets Files and Directories
123 // do not post any data to folder/tasks
126 Int_t retval = AliLoader::SetEvent();
129 Error("SetEvent","AliLoader::SetEvent returned error");
134 if (Hits()) Hits()->Clear();
135 if (SDigits()) SDigits()->Clear();
136 if (Digits()) Digits()->Clear();
137 if (EmcRecPoints()) EmcRecPoints()->Clear();
138 if (CpvRecPoints()) CpvRecPoints()->Clear();
139 if (TrackSegments()) TrackSegments()->Clear();
140 if (RecParticles()) RecParticles()->Clear();
144 //____________________________________________________________________________
146 Int_t AliPHOSLoader::GetEvent()
148 //Overloads GetEvent method called by AliRunLoader::GetEvent(Int_t) method
149 //to add Rec Particles specific for PHOS
151 //First call the original method to get whatever from std. setup is needed
154 retval = AliLoader::GetEvent();
157 Error("GetEvent","AliLoader::GetEvent returned error");
161 if (GetHitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadHits();
162 if (GetSDigitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadSDigits();
163 if (GetDigitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadDigits();
164 if (GetRecPointsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadRecPoints();
165 if (GetTracksDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadTracks();
166 if (GetRecParticlesDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadRecParticles();
169 //Now, check if RecPart were loaded
172 //____________________________________________________________________________
175 //____________________________________________________________________________
176 const AliPHOS * AliPHOSLoader::PHOS()
178 // returns the PHOS object
179 AliPHOS * phos = dynamic_cast<AliPHOS*>(GetModulesFolder()->FindObject(fDetectorName));
182 cout << "WARNING: AliPHOSLoader::PHOS -> PHOS module not found in Folders" << endl ;
186 //____________________________________________________________________________
187 const AliPHOSGeometry * AliPHOSLoader::PHOSGeometry()
189 AliPHOSGeometry * rv = 0 ;
191 rv = PHOS()->GetGeometry();
196 //____________________________________________________________________________
197 Int_t AliPHOSLoader::LoadHits(Option_t* opt)
199 //------- Hits ----------------------
200 //Overload (extends) LoadHits implemented in AliLoader
204 //First call the AliLoader's method to send the TreeH to folder
205 res = AliLoader::LoadHits(opt);
209 Error("LoadHits","AliLoader::LoadHits returned error");
213 //read the data from tree in folder and send it to folder
219 //____________________________________________________________________________
220 Int_t AliPHOSLoader::LoadSDigits(Option_t* opt)
221 { //---------- SDigits -------------------------
223 //First call the AliLoader's method to send the TreeS to folder
224 res = AliLoader::LoadSDigits(opt);
227 Error("PostSDigits","AliLoader::LoadSDigits returned error");
230 return ReadSDigits();
233 //____________________________________________________________________________
234 Int_t AliPHOSLoader::LoadDigits(Option_t* opt)
237 //First call the AliLoader's method to send the TreeS to folder
238 res = AliLoader::LoadDigits(opt);
241 Error("LoadDigits","AliLoader::LoadDigits returned error");
246 //____________________________________________________________________________
247 Int_t AliPHOSLoader::LoadRecPoints(Option_t* opt)
248 { // -------------- RecPoints -------------------------------------------
250 //First call the AliLoader's method to send the TreeR to folder
251 res = AliLoader::LoadRecPoints(opt);
254 Error("LoadRecPoints","AliLoader::LoadRecPoints returned error");
258 TFolder * phosFolder = GetDetectorDataFolder();
259 if ( phosFolder == 0x0 )
261 Error("PostDigits","Can not get detector data folder");
264 return ReadRecPoints();
266 //____________________________________________________________________________
268 Int_t AliPHOSLoader::LoadTracks(Option_t* opt)
270 //Loads Tracks: Open File, Reads Tree and posts, Read Data and Posts
271 if (GetDebug()) Info("LoadTracks","opt = %s",opt);
273 res = AliLoader::LoadTracks(opt);
276 Error("LoadTracks","AliLoader::LoadTracks returned error");
282 //____________________________________________________________________________
283 Int_t AliPHOSLoader::LoadRecParticles(Option_t* opt)
284 { // -------------- RecPoints -------------------------------------------
286 //First call the AliLoader's method to send the TreeT to folder
287 res = AliLoader::LoadRecParticles(opt);
290 Error("LoadRecParticles","AliLoader::LoadRecParticles returned error");
293 return ReadRecParticles();
296 //____________________________________________________________________________
298 Int_t AliPHOSLoader::PostHits()
300 Int_t reval = AliLoader::PostHits();
303 Error("PostHits","AliLoader:: returned error");
308 //____________________________________________________________________________
310 Int_t AliPHOSLoader::PostSDigits()
312 Int_t reval = AliLoader::PostSDigits();
315 Error("PostSDigits","AliLoader::PostSDigits returned error");
318 return ReadSDigits();
320 //____________________________________________________________________________
322 Int_t AliPHOSLoader::PostDigits()
324 Int_t reval = AliLoader::PostDigits();
327 Error("PostDigits","AliLoader::PostDigits returned error");
332 //____________________________________________________________________________
334 Int_t AliPHOSLoader::PostRecPoints()
336 Int_t reval = AliLoader::PostRecPoints();
339 Error("PostRecPoints","AliLoader::PostRecPoints returned error");
342 return ReadRecPoints();
345 //____________________________________________________________________________
347 Int_t AliPHOSLoader::PostRecParticles()
349 Int_t reval = AliLoader::PostRecParticles();
352 Error("PostRecParticles","AliLoader::PostRecParticles returned error");
355 return ReadRecParticles();
357 //____________________________________________________________________________
359 Int_t AliPHOSLoader::PostTracks()
361 Int_t reval = AliLoader::PostTracks();
364 Error("PostTracks","AliLoader::PostTracks returned error");
369 //____________________________________________________________________________
373 //____________________________________________________________________________
374 Int_t AliPHOSLoader::ReadHits()
376 // If there is no Clones Array in folder creates it and sends to folder
377 // then tries to read
378 // Reads the first entry of PHOS branch in hit tree TreeH()
379 // Reads data from TreeH and stores it in TClonesArray that sits in DetectorDataFolder
381 TObject** hitref = HitsRef();
388 TClonesArray* hits = dynamic_cast<TClonesArray*>(*hitref);
390 TTree* treeh = TreeH();
394 Error("ReadHits"," Cannot read TreeH from folder");
398 TBranch * hitsbranch = treeh->GetBranch(fDetectorName);
401 Error("ReadHits"," Cannot find branch PHOS");
405 if (GetDebug()) Info("ReadHits","Reading Hits");
407 if (hitsbranch->GetEntries() > 1)
409 TClonesArray * tempo = new TClonesArray("AliPHOSHit",1000);
411 hitsbranch->SetAddress(&tempo);
414 for (i = 0 ; i < hitsbranch->GetEntries(); i++)
416 hitsbranch->GetEntry(i) ;
418 for ( j = 0 ; j < tempo->GetEntries() ; j++)
420 AliPHOSHit* hit = (AliPHOSHit*)tempo->At(j);
421 new((*hits)[index]) AliPHOSHit( *hit ) ;
429 hitsbranch->SetAddress(hitref);
430 hitsbranch->GetEntry(0) ;
435 //____________________________________________________________________________
436 Int_t AliPHOSLoader::ReadSDigits()
438 // Read the summable digits tree TreeS():
439 // Check if TClones is in folder
440 // if not create and add to folder
441 // connect to tree if available
444 TObject** sdref = SDigitsRef();
448 sdref = SDigitsRef();
451 TTree * treeS = TreeS();
454 //May happen if file is truncated or new in LoadSDigits
455 //Error("ReadSDigits","There is no SDigit Tree");
459 TBranch * branch = treeS->GetBranch(fDetectorName);
461 {//easy, maybe just a new tree
462 //Error("ReadSDigits"," Cannot find branch PHOS");
466 branch->SetAddress(SDigitsRef());
471 //____________________________________________________________________________
472 Int_t AliPHOSLoader::ReadDigits()
474 // Read the summable digits tree TreeS():
475 // Check if TClones is in folder
476 // if not create and add to folder
477 // connect to tree if available
480 TObject** dref = DigitsRef();
482 {//if there is not array in folder, create it and put it there
487 TTree * treeD = TreeD();
490 //May happen if file is truncated or new in LoadSDigits
491 //Error("ReadDigits","There is no Digit Tree");
495 TBranch * branch = treeD->GetBranch(fDetectorName);
497 {//easy, maybe just a new tree
498 //Error("ReadDigits"," Cannot find branch ",fDetectorName.Data());
502 branch->SetAddress(dref);//connect branch to buffer sitting in folder
503 branch->GetEntry(0);//get first event
508 //____________________________________________________________________________
510 void AliPHOSLoader::Track(Int_t itrack)
512 // Read the first entry of PHOS branch in hit tree gAlice->TreeH()
517 Error("Track","Can not load hits.");
522 TBranch * hitsbranch = dynamic_cast<TBranch*>(TreeH()->GetListOfBranches()->FindObject("PHOS")) ;
525 cout << "WARNING: AliPHOSLoader::ReadTreeH -> Cannot find branch PHOS" << endl ;
528 if(!Hits()) PostHits();
530 hitsbranch->SetAddress(HitsRef());
531 hitsbranch->GetEntry(itrack);
534 //____________________________________________________________________________
535 void AliPHOSLoader::ReadTreeQA()
537 // Read the digit tree gAlice->TreeQA()
538 // so far only PHOS knows about this Tree
540 if(PHOS()->TreeQA()== 0){
541 cerr << "ERROR: AliPHOSLoader::ReadTreeQA: can not read TreeQA " << endl ;
545 TBranch * qabranch = PHOS()->TreeQA()->GetBranch("PHOS");
548 cout << "WARNING: AliPHOSLoader::ReadTreeQA -> Cannot find QA Alarms for PHOS" << endl ;
552 // if(!Alarms()) PostQA();
554 qabranch->SetAddress(AlarmsRef()) ;
556 qabranch->GetEntry(0) ;
561 //____________________________________________________________________________
562 Int_t AliPHOSLoader::ReadRecPoints()
564 //Creates and posts to folder an array container,
565 //connects branch in tree (if exists), and reads data to array
567 MakeRecPointsArray();
569 TObjArray * cpva = 0x0 ;
570 TObjArray * emca = 0x0 ;
572 TTree * treeR = TreeR();
576 //May happen if file is truncated or new in LoadSDigits
581 TBranch * emcbranch = treeR->GetBranch(fgkEmcRecPointsBranchName);
583 if (emcbranch == 0x0)
585 Error("ReadRecPoints","Can not get branch with EMC Rec. Points named %s",fgkEmcRecPointsBranchName.Data());
590 emcbranch->SetAddress(&emca) ;
591 emcbranch->GetEntry(0) ;
593 TBranch * cpvbranch = treeR->GetBranch(fgkCpvRecPointsBranchName);
594 if (cpvbranch == 0x0)
596 Error("ReadRecPoints","Can not get branch with CPV Rec. Points named %s",fgkCpvRecPointsBranchName.Data());
601 cpvbranch->SetAddress(&cpva);
602 cpvbranch->GetEntry(0) ;
606 Int_t maxemc = emca->GetEntries() ;
607 for ( ii= 0 ; ii < maxemc ; ii++ )
608 EmcRecPoints()->Add(emca->At(ii)) ;
610 Int_t maxcpv = cpva->GetEntries() ;
611 for ( ii= 0 ; ii < maxcpv ; ii++ )
612 CpvRecPoints()->Add(cpva->At(ii)) ;
617 //____________________________________________________________________________
618 Int_t AliPHOSLoader::ReadTracks()
620 //Creates and posts to folder an array container,
621 //connects branch in tree (if exists), and reads data to arry
623 TObject** trkref = TracksRef();
625 {//Create and post array
626 MakeTrackSegmentsArray();
627 trkref = TracksRef();
630 TTree * treeT = TreeT();
633 //May happen if file is truncated or new in LoadSDigits, or the file is in update mode,
634 //but tracking was not performed yet for a current event
635 //Error("ReadTracks","There is no Tree with Tracks");
639 TBranch * branch = treeT->GetBranch(fgkTrackSegmentsBranchName);
641 {//easy, maybe just a new tree
642 Error("ReadTracks"," Cannot find branch named %s",fgkTrackSegmentsBranchName.Data());
646 branch->SetAddress(trkref);//connect branch to buffer sitting in folder
647 branch->GetEntry(0);//get first event
651 //____________________________________________________________________________
653 Int_t AliPHOSLoader::ReadRecParticles()
655 //Reads Reconstructed Particles from file
656 //Creates and posts to folder an array container,
657 //connects branch in tree (if exists), and reads data to arry
659 TObject** recpartref = RecParticlesRef();
661 if ( recpartref == 0x0 )
662 {//Create and post array
663 MakeRecParticlesArray();
664 recpartref = RecParticlesRef();
667 TTree * treeP = TreeP();
670 //May happen if file is truncated or new in LoadSDigits,
671 //or the file is in update mode,
672 //but tracking was not performed yet for a current event
673 // Error("ReadRecParticles","There is no Tree with Tracks and Reconstructed Particles");
677 TBranch * branch = treeP->GetBranch(fgkRecParticlesBranchName);
679 {//easy, maybe just a new tree
680 Error("ReadRecParticles"," Cannot find branch %s",fgkRecParticlesBranchName.Data());
684 branch->SetAddress(recpartref);//connect branch to buffer sitting in folder
685 branch->GetEntry(0);//get first event
691 AliPHOSGeometry* AliPHOSLoader::GetPHOSGeometry()
693 //returns PHOS geometry from gAlice
694 //static Method used by some classes where it is not convienient to pass eventfoldername
697 AliPHOS* phos=dynamic_cast<AliPHOS*>(gAlice->GetDetector("PHOS"));
700 return phos->GetGeometry();
702 /***************************************************************************************/
704 AliPHOSLoader* AliPHOSLoader::GetPHOSLoader(const char* eventfoldername)
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 if (fBranchTitle.IsNull()) return kFALSE;
720 TString dataname, zername ;
722 if(recName == "SDigits")
725 dataname = GetDetectorName();
726 zername = "AliPHOSSDigitizer" ;
729 if(recName == "Digits"){
731 dataname = GetDetectorName();
732 zername = "AliPHOSDigitizer" ;
735 if(recName == "RecPoints"){
737 dataname = fgkEmcRecPointsBranchName;
738 zername = "AliPHOSClusterizer" ;
741 if(recName == "TrackSegments"){
743 dataname = fgkTrackSegmentsBranchName;
744 zername = "AliPHOSTrackSegmentMaker";
747 if(recName == "RecParticles"){
749 dataname = fgkRecParticlesBranchName;
750 zername = "AliPHOSPID";
759 TObjArray * lob = static_cast<TObjArray*>(tree->GetListOfBranches()) ;
761 TBranch * branch = 0 ;
762 TString titleName(fBranchTitle);
765 while ((branch = (static_cast<TBranch*>(next())))) {
766 TString branchName(branch->GetName() ) ;
767 TString branchTitle(branch->GetTitle() ) ;
768 if ( branchName.BeginsWith(dataname) && branchTitle.BeginsWith(fBranchTitle) ){
769 Warning("BranchExists","branch %s with title %s ",dataname.Data(),fBranchTitle.Data());
772 if ( branchName.BeginsWith(zername) && branchTitle.BeginsWith(titleName) ){
773 Warning("BranchExists","branch AliPHOS... with title %s ",branch->GetTitle());
781 void AliPHOSLoader::SetBranchTitle(const TString& btitle)
783 if (btitle.CompareTo(fBranchTitle) == 0) return;
784 fBranchTitle = btitle;
787 //____________________________________________________________________________
789 void AliPHOSLoader::CleanHits()
791 AliLoader::CleanHits();
793 TClonesArray* hits = Hits();
794 if (hits) hits->Clear();
796 //____________________________________________________________________________
798 void AliPHOSLoader::CleanSDigits()
800 AliLoader::CleanSDigits();
801 TClonesArray* sdigits = SDigits();
802 if (sdigits) sdigits->Clear();
805 //____________________________________________________________________________
807 void AliPHOSLoader::CleanDigits()
809 AliLoader::CleanDigits();
810 TClonesArray* digits = Digits();
811 if (digits) digits->Clear();
813 //____________________________________________________________________________
815 void AliPHOSLoader::CleanRecPoints()
817 AliLoader::CleanRecPoints();
818 TObjArray* recpoints = EmcRecPoints();
819 if (recpoints) recpoints->Clear();
820 recpoints = CpvRecPoints();
821 if (recpoints) recpoints->Clear();
823 //____________________________________________________________________________
825 void AliPHOSLoader::CleanTracks()
827 //Cleans Tracks stuff
829 AliLoader::CleanTracks();//tree
831 //and clear the array
832 TClonesArray* tracks = TrackSegments();
833 if (tracks) tracks->Clear();
836 //____________________________________________________________________________
838 void AliPHOSLoader::CleanRecParticles()
841 TClonesArray *recpar = RecParticles();
842 if (recpar) recpar->Clear();
846 //____________________________________________________________________________
848 void AliPHOSLoader::ReadCalibrationDB(const char * database,const char * filename)
851 if(fcdb && (strcmp(database,fcdb->GetTitle())==0))
854 TFile * file = gROOT->GetFile(filename) ;
856 file = TFile::Open(filename);
858 Error ("ReadCalibrationDB", "Cannot open file %s", filename) ;
863 fcdb = dynamic_cast<AliPHOSCalibrationDB *>(file->Get("AliPHOSCalibrationDB")) ;
865 Error ("ReadCalibrationDB", "No database %s in file %s", database, filename) ;
867 //____________________________________________________________________________
869 // AliPHOSSDigitizer* AliPHOSLoader::PHOSSDigitizer()
871 // //return PHOS SDigitizer
872 // return dynamic_cast<AliPHOSSDigitizer*>(SDigitizer()) ;
875 //____________________________________________________________________________
876 void AliPHOSLoader::MakeHitsArray()
879 TClonesArray* hits = new TClonesArray("AliPHOSHit",1000);
880 hits->SetName(fgkHitsName);
881 GetDetectorDataFolder()->Add(hits);
884 //____________________________________________________________________________
885 void AliPHOSLoader::MakeSDigitsArray()
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 if ( Digits()) return;
897 TClonesArray* digits = new TClonesArray("AliPHOSDigit",1);
898 digits->SetName(fgkDigitsName);
899 GetDetectorDataFolder()->Add(digits);
903 //____________________________________________________________________________
904 void AliPHOSLoader::MakeRecPointsArray()
906 if ( EmcRecPoints() == 0x0)
908 if (GetDebug()>9) Info("MakeRecPointsArray","Making array for EMC");
909 TObjArray* emc = new TObjArray(100) ;
910 emc->SetName(fgkEmcRecPointsName) ;
911 GetDetectorDataFolder()->Add(emc);
914 if ( CpvRecPoints() == 0x0)
916 if (GetDebug()>9) Info("MakeRecPointsArray","Making array for CPV");
917 TObjArray* cpv = new TObjArray(100) ;
918 cpv->SetName(fgkCpvRecPointsName);
919 GetDetectorDataFolder()->Add(cpv);
923 //____________________________________________________________________________
924 void AliPHOSLoader::MakeTrackSegmentsArray()
926 if ( TrackSegments()) return;
927 TClonesArray * ts = new TClonesArray("AliPHOSTrackSegment",100) ;
928 ts->SetName(fgkTracksName);
929 GetDetectorDataFolder()->Add(ts);
933 //____________________________________________________________________________
934 void AliPHOSLoader::MakeRecParticlesArray()
936 if ( RecParticles()) return;
937 TClonesArray * rp = new TClonesArray("AliPHOSRecParticle",100) ;
938 rp->SetName(fgkRecParticlesName);
939 GetDetectorDataFolder()->Add(rp);