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 AliEMCALAnalyser):
28 // for(Int_t irecp = 0; irecp < gime->NRecParticles() ; irecp++)
29 // AliEMCALRecParticle * 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 AliEMCALIndexToObject and make
37 //*-- systematic usage of TFolders without changing the interface
38 //////////////////////////////////////////////////////////////////////////////
41 // --- ROOT system ---
45 // --- Standard library ---
47 // --- AliRoot header files ---
49 #include "AliEMCALLoader.h"
51 #include "AliEMCALHit.h"
52 #include "AliEMCALGetter.h"
54 ClassImp(AliEMCALLoader)
57 const TString AliEMCALLoader::fgkHitsName("HITS");//Name for TClonesArray with hits from one event
58 const TString AliEMCALLoader::fgkSDigitsName("SDIGITS");//Name for TClonesArray
59 const TString AliEMCALLoader::fgkDigitsName("DIGITS");//Name for TClonesArray
60 const TString AliEMCALLoader::fgkECARecPointsName("ECARECPOINTS");//Name for TClonesArray
61 const TString AliEMCALLoader::fgkTracksName("TRACKS");//Name for TClonesArray
62 const TString AliEMCALLoader::fgkRecParticlesName("RECPARTICLES");//Name for TClonesArray
64 const TString AliEMCALLoader::fgkECARecPointsBranchName("EMCALECARP");//Name for branch with ECA Reconstructed Points
65 const TString AliEMCALLoader::fgkTrackSegmentsBranchName("EMCALTS");//Name for branch with TrackSegments
66 const TString AliEMCALLoader::fgkRecParticlesBranchName("EMCALRP");//Name for branch with Reconstructed Particles
68 //____________________________________________________________________________
69 AliEMCALLoader::AliEMCALLoader()
72 fRecParticlesLoaded = kFALSE;
75 //____________________________________________________________________________
76 AliEMCALLoader::AliEMCALLoader(const Char_t *detname,const Char_t *eventfoldername):
77 AliLoader(detname,eventfoldername)
80 fRecParticlesLoaded = kFALSE;
83 //____________________________________________________________________________
84 AliEMCALLoader::~AliEMCALLoader()
86 //remove and delete arrays
88 Clean(fgkSDigitsName);
90 Clean(fgkECARecPointsName);
92 Clean(fgkRecParticlesName);
94 // set to 0x0 the objgetter in AliGetter ... weird isn it !
95 AliEMCALGetter * gime = AliEMCALGetter::Instance() ;
100 //____________________________________________________________________________
101 void AliEMCALLoader::CleanFolders()
104 AliLoader::CleanFolders();
107 //____________________________________________________________________________
108 Int_t AliEMCALLoader::SetEvent()
110 //Cleans loaded stuff and and sets Files and Directories
111 // do not post any data to folder/tasks
114 Int_t retval = AliLoader::SetEvent();
117 Error("SetEvent","AliLoader::SetEvent returned error");
122 if (Hits()) Hits()->Clear();
123 if (SDigits()) SDigits()->Clear();
124 if (Digits()) Digits()->Clear();
125 if (ECARecPoints()) ECARecPoints()->Clear();
126 if (TrackSegments()) TrackSegments()->Clear();
127 if (RecParticles()) RecParticles()->Clear();
132 //____________________________________________________________________________
133 Int_t AliEMCALLoader::GetEvent()
135 //Overloads GetEvent method called by AliRunLoader::GetEvent(Int_t) method
136 //to add Rec Particles specific for EMCAL
138 //First call the original method to get whatever from std. setup is needed
141 retval = AliLoader::GetEvent();
144 Error("GetEvent","AliLoader::GetEvent returned error");
148 if (GetHitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadHits();
149 if (GetSDigitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadSDigits();
150 if (GetDigitsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadDigits();
151 if (GetRecPointsDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadRecPoints();
152 if (GetTracksDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadTracks();
153 if (GetRecParticlesDataLoader()->GetBaseDataLoader()->IsLoaded()) ReadRecParticles();
156 //Now, check if RecPart were loaded
160 //____________________________________________________________________________
161 const AliEMCAL * AliEMCALLoader::EMCAL()
163 // returns the EMCAL object
164 AliEMCAL * emcal = dynamic_cast<AliEMCAL*>(GetModulesFolder()->FindObject(fDetectorName));
167 cout << "WARNING: AliEMCALLoader::EMCAL -> EMCAL module not found in Folders" << endl ;
171 //____________________________________________________________________________
172 const AliEMCALGeometry * AliEMCALLoader::EMCALGeometry()
174 // Gets the EMCAL Geometry object
175 AliEMCALGeometry * rv = 0 ;
177 rv = EMCAL()->GetGeometry();
181 //____________________________________________________________________________
182 Int_t AliEMCALLoader::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
203 //____________________________________________________________________________
204 Int_t AliEMCALLoader::LoadSDigits(Option_t* opt)
206 // Loads the SDigits array in the folder structure
208 //First call the AliLoader's method to send the TreeS to folder
209 res = AliLoader::LoadSDigits(opt);
212 Error("PostSDigits","AliLoader::LoadSDigits returned error");
215 return ReadSDigits();
219 //____________________________________________________________________________
220 Int_t AliEMCALLoader::LoadDigits(Option_t* opt)
222 // Loads the Digits array in the folder structure
225 //First call the AliLoader's method to send the TreeS to folder
226 res = AliLoader::LoadDigits(opt);
229 Error("LoadDigits","AliLoader::LoadDigits returned error");
235 //____________________________________________________________________________
236 Int_t AliEMCALLoader::LoadRecPoints(Option_t* opt)
238 // Loads the RecPoints array in the folder structure
240 //First call the AliLoader's method to send the TreeR to folder
241 res = AliLoader::LoadRecPoints(opt);
244 Error("LoadRecPoints","AliLoader::LoadRecPoints returned error");
248 TFolder * emcalFolder = GetDetectorDataFolder();
249 if ( emcalFolder == 0x0 )
251 Error("LoadRecPoints","Can not get detector data folder");
254 return ReadRecPoints();
257 //____________________________________________________________________________
258 Int_t AliEMCALLoader::LoadTracks(Option_t* opt)
260 //Loads Tracks: Open File, Reads Tree and posts, Read Data and Posts
262 printf("LoadTracks: opt = %s",opt);
265 Warning("LoadTracks","Tracks are already loaded");
269 //First call the AliLoader's method to send the TreeS to folder
270 if (GetTracksDataLoader()->GetBaseLoader(0)->IsLoaded() == kFALSE)
271 {//tracks can be loaded by LoadRecPoints
272 res = AliLoader::LoadTracks(opt);
275 Error("LoadTracks","AliLoader::LoadTracks returned error");
282 Error("LoadTracks","Error occured while reading Tracks");
286 fTracksLoaded = kTRUE;
290 //____________________________________________________________________________
291 Int_t AliEMCALLoader::LoadRecParticles(Option_t* opt)
293 // Loads the RecParticles array in the folder structure
295 //First call the AliLoader's method to send the TreeS to folder
296 res = AliLoader::LoadRecParticles(opt);
299 Error("LoadRecParticles","AliLoader::LoadRecParticles returned error");
303 TFolder * emcalFolder = GetDetectorDataFolder();
304 if ( emcalFolder == 0x0 )
306 Error("PostDigits","Can not get detector data folder");
309 return ReadRecParticles();
312 //____________________________________________________________________________
313 Int_t AliEMCALLoader::PostHits()
315 Int_t reval = AliLoader::PostHits();
318 Error("PostHits","AliLoader:: returned error");
324 //____________________________________________________________________________
325 Int_t AliEMCALLoader::PostSDigits()
327 // Posts the SDigits array to the folder structure
328 Int_t reval = AliLoader::PostSDigits();
331 Error("PostSDigits","AliLoader::PostSDigits returned error");
334 return ReadSDigits();
337 //____________________________________________________________________________
338 Int_t AliEMCALLoader::PostDigits()
340 // Posts the Digits array to the folder structure
341 Int_t reval = AliLoader::PostDigits();
344 Error("PostDigits","AliLoader::PostDigits returned error");
350 //____________________________________________________________________________
351 Int_t AliEMCALLoader::PostRecPoints()
353 // Posts the RecPoints array to the folder structure
354 Int_t reval = AliLoader::PostRecPoints();
357 Error("PostRecPoints","AliLoader::PostRecPoints returned error");
360 return ReadRecPoints();
363 //____________________________________________________________________________
364 Int_t AliEMCALLoader::PostRecParticles()
366 // Posts the RecParticles array to the folder structure
368 Int_t reval = AliLoader::PostRecParticles();
371 Error("PostRecParticles","AliLoader::PostRecParticles returned error");
374 return ReadRecParticles();
377 //____________________________________________________________________________
378 Int_t AliEMCALLoader::PostTracks()
380 // Posts the Tracks array to the folder structure
381 Int_t reval = AliLoader::PostTracks();
384 Error("PostTracks","AliLoader::PostTracks returned error");
390 //____________________________________________________________________________
391 Int_t AliEMCALLoader::ReadHits()
393 // If there is no Clones Array in folder creates it and sends to folder
394 // then tries to read
395 // Reads the first entry of EMCAL branch in hit tree TreeH()
396 // Reads data from TreeH and stores it in TClonesArray that sits in DetectorDataFolder
398 TObject** hitref = HitsRef();
405 TClonesArray* hits = dynamic_cast<TClonesArray*>(*hitref);
407 TTree* treeh = TreeH();
411 Error("ReadHits"," Cannot read TreeH from folder");
415 TBranch * hitsbranch = treeh->GetBranch(fDetectorName);
418 Error("ReadHits"," Cannot find branch EMCAL");
423 printf("ReadHits: Reading Hits");
425 if (hitsbranch->GetEntries() > 1)
427 TClonesArray * tempo = new TClonesArray("AliEMCALHit",1000);
429 hitsbranch->SetAddress(&tempo);
432 for (i = 0 ; i < hitsbranch->GetEntries(); i++)
434 hitsbranch->GetEntry(i) ;
436 for ( j = 0 ; j < tempo->GetEntries() ; j++)
438 AliEMCALHit* hit = (AliEMCALHit*)tempo->At(j);
439 new((*hits)[index]) AliEMCALHit( *hit ) ;
448 hitsbranch->SetAddress(hitref);
449 hitsbranch->GetEntry(0) ;
455 //____________________________________________________________________________
456 Int_t AliEMCALLoader::ReadSDigits()
458 // Read the summable digits tree TreeS():
459 // Check if TClones is in folder
460 // if not create and add to folder
461 // connect to tree if available
464 TObject** sdref = SDigitsRef();
468 sdref = SDigitsRef();
471 TTree * treeS = TreeS();
474 //May happen if file is truncated or new in LoadSDigits
475 //Error("ReadSDigits","There is no SDigit Tree");
479 TBranch * branch = treeS->GetBranch(fDetectorName);
481 {//easy, maybe just a new tree
482 //Error("ReadSDigits"," Cannot find branch EMCAL");
486 branch->SetAddress(SDigitsRef());
491 //____________________________________________________________________________
492 Int_t AliEMCALLoader::ReadDigits()
494 // Read the summable digits tree TreeS():
495 // Check if TClones is in folder
496 // if not create and add to folder
497 // connect to tree if available
500 TObject** dref = DigitsRef();
502 {//if there is not array in folder, create it and put it there
507 TTree * treeD = TreeD();
510 //May happen if file is truncated or new in LoadSDigits
511 //Error("ReadDigits","There is no Digit Tree");
515 TBranch * branch = treeD->GetBranch(fDetectorName);
517 {//easy, maybe just a new tree
518 //Error("ReadDigits"," Cannot find branch ",fDetectorName.Data());
522 branch->SetAddress(dref);//connect branch to buffer sitting in folder
523 branch->GetEntry(0);//get first event
528 //____________________________________________________________________________
529 void AliEMCALLoader::UnloadRecParticles()
531 // Unloads the RecParticles array fromthe folder structure
532 fRecParticlesLoaded = kFALSE;
534 if (fTracksLoaded == kFALSE) UnloadTracks();
537 //____________________________________________________________________________
538 void AliEMCALLoader::UnloadTracks()
540 // Unloads the Tracks array fromthe folder structure
541 CleanTracks();//free the memory
542 //in case RecPart are loaded we can not onload tree and close the file
543 if (fRecParticlesLoaded == kFALSE) AliLoader::UnloadTracks();
544 fTracksLoaded = kFALSE;//mark that nobody needs them
547 //____________________________________________________________________________
548 void AliEMCALLoader::Track(Int_t itrack)
550 // Read the first entry of EMCAL branch in hit tree gAlice->TreeH()
555 Error("Track","Can not load hits.");
560 TBranch * hitsbranch = dynamic_cast<TBranch*>(TreeH()->GetListOfBranches()->FindObject("EMCAL")) ;
563 cout << "WARNING: AliEMCALLoader::ReadTreeH -> Cannot find branch EMCAL" << endl ;
566 if(!Hits()) PostHits();
568 hitsbranch->SetAddress(HitsRef());
569 hitsbranch->GetEntry(itrack);
573 //____________________________________________________________________________
574 Int_t AliEMCALLoader::ReadRecPoints()
576 //Creates and posts to folder an array container,
577 //connects branch in tree (if exists), and reads data to array
579 MakeRecPointsArray();
581 TObjArray * eca = 0x0 ;
583 TTree * treeR = TreeR();
587 //May happen if file is truncated or new in LoadSDigits
593 TBranch * ecabranch = treeR->GetBranch(fgkECARecPointsBranchName);
594 if (ecabranch == 0x0)
596 Error("ReadRecPoints","Can not get branch with ECA Rec. Points named %s",fgkECARecPointsBranchName.Data());
601 ecabranch->SetAddress(&eca);
602 ecabranch->GetEntry(0) ;
608 Int_t maxeca = eca->GetEntries() ;
609 for ( ii= 0 ; ii < maxeca ; ii++ )
610 ECARecPoints()->Add(eca->At(ii)) ;
615 //____________________________________________________________________________
616 Int_t AliEMCALLoader::ReadTracks()
618 //Creates and posts to folder an array container,
619 //connects branch in tree (if exists), and reads data to arry
621 TObject** trkref = TracksRef();
623 {//Create and post array
624 MakeTrackSegmentsArray();
625 trkref = TracksRef();
628 TTree * treeT = TreeT();
631 //May happen if file is truncated or new in LoadSDigits, or the file is in update mode,
632 //but tracking was not performed yet for a current event
633 //Error("ReadTracks","There is no Tree with Tracks");
637 TBranch * branch = treeT->GetBranch(fgkTrackSegmentsBranchName);
639 {//easy, maybe just a new tree
640 Error("ReadTracks"," Cannot find branch named %s",fgkTrackSegmentsBranchName.Data());
644 branch->SetAddress(trkref);//connect branch to buffer sitting in folder
645 branch->GetEntry(0);//get first event
650 //____________________________________________________________________________
651 Int_t AliEMCALLoader::ReadRecParticles()
653 //Reads Reconstructed Particles from file
654 //Creates and posts to folder an array container,
655 //connects branch in tree (if exists), and reads data to arry
657 TObject** recpartref = RecParticlesRef();
659 if ( recpartref == 0x0 )
660 {//Create and post array
661 MakeRecParticlesArray();
662 recpartref = RecParticlesRef();
665 TTree * treeP = TreeP();
668 //May happen if file is truncated or new in LoadSDigits,
669 //or the file is in update mode,
670 //but tracking was not performed yet for a current event
671 // Error("ReadRecParticles","There is no Tree with Tracks and Reconstructed Particles");
675 TBranch * branch = treeP->GetBranch(fgkRecParticlesBranchName);
677 {//easy, maybe just a new tree
678 Error("ReadRecParticles"," Cannot find branch %s",fgkRecParticlesBranchName.Data());
682 branch->SetAddress(recpartref);//connect branch to buffer sitting in folder
683 branch->GetEntry(0);//get first event
688 //____________________________________________________________________________
689 AliEMCALGeometry* AliEMCALLoader::GetEMCALGeometry()
691 //returns EMCAL geometry from gAlice
692 //static Method used by some classes where it is not convienient to pass eventfoldername
695 AliEMCAL* emcal=dynamic_cast<AliEMCAL*>(gAlice->GetDetector("EMCAL"));
698 return emcal->GetGeometry();
701 //____________________________________________________________________________
702 AliEMCALLoader* AliEMCALLoader::GetEMCALLoader(const char* eventfoldername)
704 // Get an instance of the EMCALLoader object
705 AliRunLoader* rn = AliRunLoader::GetRunLoader(eventfoldername);
708 cerr<<"Error: <AliEMCALLoader::GetEMCALLoader>: "
709 << "Can not find Run Loader in folder "<<eventfoldername<<endl;
712 return dynamic_cast<AliEMCALLoader*>(rn->GetLoader("EMCALLoader"));
715 //____________________________________________________________________________
716 Bool_t AliEMCALLoader::BranchExists(const TString& recName)
718 if (fBranchTitle.IsNull()) return kFALSE;
719 TString dataname, zername ;
721 if(recName == "SDigits") {
723 dataname = GetDetectorName();
724 zername = "AliEMCALSDigitizer" ;
726 else if(recName == "Digits"){
728 dataname = GetDetectorName();
729 zername = "AliEMCALDigitizer" ;
731 else if(recName == "ECARecPoints"){
733 dataname = fgkECARecPointsBranchName;
734 zername = "AliEMCALClusterizer" ;
736 else if(recName == "TrackSegments"){
738 dataname = fgkTrackSegmentsBranchName;
739 zername = "AliEMCALTrackSegmentMaker";
741 else if(recName == "RecParticles"){
743 dataname = fgkRecParticlesBranchName;
744 zername = "AliEMCALPID";
752 TObjArray * lob = static_cast<TObjArray*>(tree->GetListOfBranches()) ;
754 TBranch * branch = 0 ;
755 TString titleName(fBranchTitle);
758 while ((branch = (static_cast<TBranch*>(next())))) {
759 TString branchName(branch->GetName() ) ;
760 TString branchTitle(branch->GetTitle() ) ;
761 if ( branchName.BeginsWith(dataname) && branchTitle.BeginsWith(fBranchTitle) ){
762 Warning("BranchExists","branch %s with title %s ",dataname.Data(),fBranchTitle.Data());
765 if ( branchName.BeginsWith(zername) && branchTitle.BeginsWith(titleName) ){
766 Warning("BranchExists","branch AliEMCAL... with title %s ",branch->GetTitle());
774 //____________________________________________________________________________
775 void AliEMCALLoader::SetBranchTitle(const TString& btitle)
777 // Gives a name to a branch in the folder structure
778 if (btitle.CompareTo(fBranchTitle) == 0) return;
779 fBranchTitle = btitle;
783 //____________________________________________________________________________
784 void AliEMCALLoader::CleanHits()
786 AliLoader::CleanHits();
788 TClonesArray* hits = Hits();
793 //____________________________________________________________________________
794 void AliEMCALLoader::CleanSDigits()
796 // Cleans the SDigits array in the folder structure
797 AliLoader::CleanSDigits();
798 TClonesArray* sdigits = SDigits();
799 if (sdigits) sdigits->Clear();
802 //____________________________________________________________________________
804 void AliEMCALLoader::CleanDigits()
806 // Cleans the Digits array in the folder structure
807 AliLoader::CleanDigits();
808 TClonesArray* digits = Digits();
809 if (digits) digits->Clear();
812 //____________________________________________________________________________
813 void AliEMCALLoader::CleanRecPoints()
815 // Cleans the RecPoints array in the folder structure
816 AliLoader::CleanRecPoints();
817 TObjArray* recpoints = ECARecPoints();
818 if (recpoints) recpoints->Clear();
822 //____________________________________________________________________________
823 void AliEMCALLoader::CleanTracks()
825 // Cleans the Tracks array in the folder structure
826 AliLoader::CleanTracks();//tree
827 //and clear the array
828 TClonesArray* tracks = TrackSegments();
833 //____________________________________________________________________________
834 void AliEMCALLoader::CleanRecParticles()
836 // Cleans the RecParticles array in the folder structure
837 TClonesArray *recpar = RecParticles();
842 //____________________________________________________________________________
843 // void AliEMCALLoader::ReadCalibrationDB(const char * database,const char * filename)
846 // if(fcdb && (strcmp(database,fcdb->GetTitle())==0))
849 // TFile * file = gROOT->GetFile(filename) ;
851 // file = TFile::Open(filename);
853 // Error ("ReadCalibrationDB", "Cannot open file %s", filename) ;
858 // fcdb = dynamic_cast<AliEMCALCalibrationDB *>(file->Get("AliEMCALCalibrationDB")) ;
860 // Error ("ReadCalibrationDB", "No database %s in file %s", database, filename) ;
862 //____________________________________________________________________________
864 // AliEMCALSDigitizer* AliEMCALLoader::EMCALSDigitizer()
866 // //return EMCAL SDigitizer
867 // return dynamic_cast<AliEMCALSDigitizer*>(SDigitizer()) ;
870 //____________________________________________________________________________
871 void AliEMCALLoader::MakeHitsArray()
873 // Create the array for Hits
875 TClonesArray* hits = new TClonesArray("AliEMCALHit",1000);
876 hits->SetName(fgkHitsName);
877 GetDetectorDataFolder()->Add(hits);
880 //____________________________________________________________________________
881 void AliEMCALLoader::MakeSDigitsArray()
883 // Create the array for SDigits
884 if ( SDigits()) return;
885 TClonesArray* sdigits = new TClonesArray("AliEMCALDigit",1);
886 sdigits->SetName(fgkSDigitsName);
887 GetDetectorDataFolder()->Add(sdigits);
890 //____________________________________________________________________________
891 void AliEMCALLoader::MakeDigitsArray()
893 // Create the array for Digits
894 if ( Digits()) return;
895 TClonesArray* digits = new TClonesArray("AliEMCALDigit",1);
896 digits->SetName(fgkDigitsName);
897 GetDetectorDataFolder()->Add(digits);
901 //____________________________________________________________________________
902 void AliEMCALLoader::MakeRecPointsArray()
904 if ( ECARecPoints() == 0x0) {
906 printf("MakeRecPointsArray: Making array for ECA");
907 TObjArray* eca = new TObjArray(100) ;
908 eca->SetName(fgkECARecPointsName) ;
909 GetDetectorDataFolder()->Add(eca);
913 //____________________________________________________________________________
914 void AliEMCALLoader::MakeTrackSegmentsArray()
916 // Create the array for TrackSegments
917 if ( TrackSegments())
919 TClonesArray * ts = new TClonesArray("AliEMCALTrackSegment",100) ;
920 ts->SetName(fgkTracksName);
921 GetDetectorDataFolder()->Add(ts);
924 //____________________________________________________________________________
925 void AliEMCALLoader::MakeRecParticlesArray()
927 // Create the array for RecParticles
928 if ( RecParticles()) return;
929 TClonesArray * rp = new TClonesArray("AliEMCALRecParticle",100) ;
930 rp->SetName(fgkRecParticlesName);
931 GetDetectorDataFolder()->Add(rp);