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()
316 Int_t reval = AliLoader::PostHits();
319 Error("PostHits","AliLoader:: returned error");
325 //____________________________________________________________________________
326 Int_t AliEMCALLoader::PostSDigits()
328 // Posts the SDigits array to the folder structure
329 Int_t reval = AliLoader::PostSDigits();
332 Error("PostSDigits","AliLoader::PostSDigits returned error");
335 return ReadSDigits();
338 //____________________________________________________________________________
339 Int_t AliEMCALLoader::PostDigits()
341 // Posts the Digits array to the folder structure
342 Int_t reval = AliLoader::PostDigits();
345 Error("PostDigits","AliLoader::PostDigits returned error");
351 //____________________________________________________________________________
352 Int_t AliEMCALLoader::PostRecPoints()
354 // Posts the RecPoints array to the folder structure
355 Int_t reval = AliLoader::PostRecPoints();
358 Error("PostRecPoints","AliLoader::PostRecPoints returned error");
361 return ReadRecPoints();
364 //____________________________________________________________________________
365 Int_t AliEMCALLoader::PostRecParticles()
367 // Posts the RecParticles array to the folder structure
369 Int_t reval = AliLoader::PostRecParticles();
372 Error("PostRecParticles","AliLoader::PostRecParticles returned error");
375 return ReadRecParticles();
378 //____________________________________________________________________________
379 Int_t AliEMCALLoader::PostTracks()
381 // Posts the Tracks array to the folder structure
382 Int_t reval = AliLoader::PostTracks();
385 Error("PostTracks","AliLoader::PostTracks returned error");
391 //____________________________________________________________________________
392 Int_t AliEMCALLoader::ReadHits()
394 // If there is no Clones Array in folder creates it and sends to folder
395 // then tries to read
396 // Reads the first entry of EMCAL branch in hit tree TreeH()
397 // Reads data from TreeH and stores it in TClonesArray that sits in DetectorDataFolder
399 TObject** hitref = HitsRef();
406 TClonesArray* hits = dynamic_cast<TClonesArray*>(*hitref);
408 TTree* treeh = TreeH();
412 Error("ReadHits"," Cannot read TreeH from folder");
416 TBranch * hitsbranch = treeh->GetBranch(fDetectorName);
419 Error("ReadHits"," Cannot find branch EMCAL");
424 printf("ReadHits: Reading Hits");
426 if (hitsbranch->GetEntries() > 1)
428 TClonesArray * tempo = new TClonesArray("AliEMCALHit",1000);
430 hitsbranch->SetAddress(&tempo);
433 for (i = 0 ; i < hitsbranch->GetEntries(); i++)
435 hitsbranch->GetEntry(i) ;
437 for ( j = 0 ; j < tempo->GetEntries() ; j++)
439 AliEMCALHit* hit = (AliEMCALHit*)tempo->At(j);
440 new((*hits)[index]) AliEMCALHit( *hit ) ;
449 hitsbranch->SetAddress(hitref);
450 hitsbranch->GetEntry(0) ;
456 //____________________________________________________________________________
457 Int_t AliEMCALLoader::ReadSDigits()
459 // Read the summable digits tree TreeS():
460 // Check if TClones is in folder
461 // if not create and add to folder
462 // connect to tree if available
465 TObject** sdref = SDigitsRef();
469 sdref = SDigitsRef();
472 TTree * treeS = TreeS();
475 //May happen if file is truncated or new in LoadSDigits
476 //Error("ReadSDigits","There is no SDigit Tree");
480 TBranch * branch = treeS->GetBranch(fDetectorName);
482 {//easy, maybe just a new tree
483 //Error("ReadSDigits"," Cannot find branch EMCAL");
487 branch->SetAddress(SDigitsRef());
492 //____________________________________________________________________________
493 Int_t AliEMCALLoader::ReadDigits()
495 // Read the summable digits tree TreeS():
496 // Check if TClones is in folder
497 // if not create and add to folder
498 // connect to tree if available
501 TObject** dref = DigitsRef();
503 {//if there is not array in folder, create it and put it there
508 TTree * treeD = TreeD();
511 //May happen if file is truncated or new in LoadSDigits
512 //Error("ReadDigits","There is no Digit Tree");
516 TBranch * branch = treeD->GetBranch(fDetectorName);
518 {//easy, maybe just a new tree
519 //Error("ReadDigits"," Cannot find branch ",fDetectorName.Data());
523 branch->SetAddress(dref);//connect branch to buffer sitting in folder
524 branch->GetEntry(0);//get first event
529 //____________________________________________________________________________
530 void AliEMCALLoader::UnloadRecParticles()
532 // Unloads the RecParticles array fromthe folder structure
533 fRecParticlesLoaded = kFALSE;
535 if (fTracksLoaded == kFALSE) UnloadTracks();
538 //____________________________________________________________________________
539 void AliEMCALLoader::UnloadTracks()
541 // Unloads the Tracks array fromthe folder structure
542 CleanTracks();//free the memory
543 //in case RecPart are loaded we can not onload tree and close the file
544 if (fRecParticlesLoaded == kFALSE) AliLoader::UnloadTracks();
545 fTracksLoaded = kFALSE;//mark that nobody needs them
548 //____________________________________________________________________________
549 void AliEMCALLoader::Track(Int_t itrack)
551 // Read the first entry of EMCAL branch in hit tree gAlice->TreeH()
556 Error("Track","Can not load hits.");
561 TBranch * hitsbranch = dynamic_cast<TBranch*>(TreeH()->GetListOfBranches()->FindObject("EMCAL")) ;
564 cout << "WARNING: AliEMCALLoader::ReadTreeH -> Cannot find branch EMCAL" << endl ;
567 if(!Hits()) PostHits();
569 hitsbranch->SetAddress(HitsRef());
570 hitsbranch->GetEntry(itrack);
574 //____________________________________________________________________________
575 Int_t AliEMCALLoader::ReadRecPoints()
577 //Creates and posts to folder an array container,
578 //connects branch in tree (if exists), and reads data to array
580 MakeRecPointsArray();
582 TObjArray * eca = 0x0 ;
584 TTree * treeR = TreeR();
588 //May happen if file is truncated or new in LoadSDigits
594 TBranch * ecabranch = treeR->GetBranch(fgkECARecPointsBranchName);
595 if (ecabranch == 0x0)
597 Error("ReadRecPoints","Can not get branch with ECA Rec. Points named %s",fgkECARecPointsBranchName.Data());
602 ecabranch->SetAddress(&eca);
603 ecabranch->GetEntry(0) ;
609 Int_t maxeca = eca->GetEntries() ;
610 for ( ii= 0 ; ii < maxeca ; ii++ )
611 ECARecPoints()->Add(eca->At(ii)) ;
616 //____________________________________________________________________________
617 Int_t AliEMCALLoader::ReadTracks()
619 //Creates and posts to folder an array container,
620 //connects branch in tree (if exists), and reads data to arry
622 TObject** trkref = TracksRef();
624 {//Create and post array
625 MakeTrackSegmentsArray();
626 trkref = TracksRef();
629 TTree * treeT = TreeT();
632 //May happen if file is truncated or new in LoadSDigits, or the file is in update mode,
633 //but tracking was not performed yet for a current event
634 //Error("ReadTracks","There is no Tree with Tracks");
638 TBranch * branch = treeT->GetBranch(fgkTrackSegmentsBranchName);
640 {//easy, maybe just a new tree
641 Error("ReadTracks"," Cannot find branch named %s",fgkTrackSegmentsBranchName.Data());
645 branch->SetAddress(trkref);//connect branch to buffer sitting in folder
646 branch->GetEntry(0);//get first event
651 //____________________________________________________________________________
652 Int_t AliEMCALLoader::ReadRecParticles()
654 //Reads Reconstructed Particles from file
655 //Creates and posts to folder an array container,
656 //connects branch in tree (if exists), and reads data to arry
658 TObject** recpartref = RecParticlesRef();
660 if ( recpartref == 0x0 )
661 {//Create and post array
662 MakeRecParticlesArray();
663 recpartref = RecParticlesRef();
666 TTree * treeP = TreeP();
669 //May happen if file is truncated or new in LoadSDigits,
670 //or the file is in update mode,
671 //but tracking was not performed yet for a current event
672 // Error("ReadRecParticles","There is no Tree with Tracks and Reconstructed Particles");
676 TBranch * branch = treeP->GetBranch(fgkRecParticlesBranchName);
678 {//easy, maybe just a new tree
679 Error("ReadRecParticles"," Cannot find branch %s",fgkRecParticlesBranchName.Data());
683 branch->SetAddress(recpartref);//connect branch to buffer sitting in folder
684 branch->GetEntry(0);//get first event
689 //____________________________________________________________________________
690 AliEMCALGeometry* AliEMCALLoader::GetEMCALGeometry()
692 //returns EMCAL geometry from gAlice
693 //static Method used by some classes where it is not convienient to pass eventfoldername
696 AliEMCAL* emcal=dynamic_cast<AliEMCAL*>(gAlice->GetDetector("EMCAL"));
699 return emcal->GetGeometry();
702 //____________________________________________________________________________
703 AliEMCALLoader* AliEMCALLoader::GetEMCALLoader(const char* eventfoldername)
705 // Get an instance of the EMCALLoader object
706 AliRunLoader* rn = AliRunLoader::GetRunLoader(eventfoldername);
709 cerr<<"Error: <AliEMCALLoader::GetEMCALLoader>: "
710 << "Can not find Run Loader in folder "<<eventfoldername<<endl;
713 return dynamic_cast<AliEMCALLoader*>(rn->GetLoader("EMCALLoader"));
716 //____________________________________________________________________________
717 Bool_t AliEMCALLoader::BranchExists(const TString& recName)
719 // Check is branch exists
720 if (fBranchTitle.IsNull()) return kFALSE;
721 TString dataname, zername ;
723 if(recName == "SDigits") {
725 dataname = GetDetectorName();
726 zername = "AliEMCALSDigitizer" ;
728 else if(recName == "Digits"){
730 dataname = GetDetectorName();
731 zername = "AliEMCALDigitizer" ;
733 else if(recName == "ECARecPoints"){
735 dataname = fgkECARecPointsBranchName;
736 zername = "AliEMCALClusterizer" ;
738 else if(recName == "TrackSegments"){
740 dataname = fgkTrackSegmentsBranchName;
741 zername = "AliEMCALTrackSegmentMaker";
743 else if(recName == "RecParticles"){
745 dataname = fgkRecParticlesBranchName;
746 zername = "AliEMCALPID";
754 TObjArray * lob = static_cast<TObjArray*>(tree->GetListOfBranches()) ;
756 TBranch * branch = 0 ;
757 TString titleName(fBranchTitle);
760 while ((branch = (static_cast<TBranch*>(next())))) {
761 TString branchName(branch->GetName() ) ;
762 TString branchTitle(branch->GetTitle() ) ;
763 if ( branchName.BeginsWith(dataname) && branchTitle.BeginsWith(fBranchTitle) ){
764 Warning("BranchExists","branch %s with title %s ",dataname.Data(),fBranchTitle.Data());
767 if ( branchName.BeginsWith(zername) && branchTitle.BeginsWith(titleName) ){
768 Warning("BranchExists","branch AliEMCAL... with title %s ",branch->GetTitle());
776 //____________________________________________________________________________
777 void AliEMCALLoader::SetBranchTitle(const TString& btitle)
779 // Gives a name to a branch in the folder structure
780 if (btitle.CompareTo(fBranchTitle) == 0) return;
781 fBranchTitle = btitle;
785 //____________________________________________________________________________
786 void AliEMCALLoader::CleanHits()
789 AliLoader::CleanHits();
791 TClonesArray* hits = Hits();
796 //____________________________________________________________________________
797 void AliEMCALLoader::CleanSDigits()
799 // Cleans the SDigits array in the folder structure
800 AliLoader::CleanSDigits();
801 TClonesArray* sdigits = SDigits();
802 if (sdigits) sdigits->Clear();
805 //____________________________________________________________________________
807 void AliEMCALLoader::CleanDigits()
809 // Cleans the Digits array in the folder structure
810 AliLoader::CleanDigits();
811 TClonesArray* digits = Digits();
812 if (digits) digits->Clear();
815 //____________________________________________________________________________
816 void AliEMCALLoader::CleanRecPoints()
818 // Cleans the RecPoints array in the folder structure
819 AliLoader::CleanRecPoints();
820 TObjArray* recpoints = ECARecPoints();
821 if (recpoints) recpoints->Clear();
825 //____________________________________________________________________________
826 void AliEMCALLoader::CleanTracks()
828 // Cleans the Tracks array in the folder structure
829 AliLoader::CleanTracks();//tree
830 //and clear the array
831 TClonesArray* tracks = TrackSegments();
836 //____________________________________________________________________________
837 void AliEMCALLoader::CleanRecParticles()
839 // Cleans the RecParticles array in the folder structure
840 TClonesArray *recpar = RecParticles();
845 //____________________________________________________________________________
846 // void AliEMCALLoader::ReadCalibrationDB(const char * database,const char * filename)
849 // if(fcdb && (strcmp(database,fcdb->GetTitle())==0))
852 // TFile * file = gROOT->GetFile(filename) ;
854 // file = TFile::Open(filename);
856 // Error ("ReadCalibrationDB", "Cannot open file %s", filename) ;
861 // fcdb = dynamic_cast<AliEMCALCalibrationDB *>(file->Get("AliEMCALCalibrationDB")) ;
863 // Error ("ReadCalibrationDB", "No database %s in file %s", database, filename) ;
865 //____________________________________________________________________________
867 // AliEMCALSDigitizer* AliEMCALLoader::EMCALSDigitizer()
869 // //return EMCAL SDigitizer
870 // return dynamic_cast<AliEMCALSDigitizer*>(SDigitizer()) ;
873 //____________________________________________________________________________
874 void AliEMCALLoader::MakeHitsArray()
876 // Create the array for Hits
878 TClonesArray* hits = new TClonesArray("AliEMCALHit",1000);
879 hits->SetName(fgkHitsName);
880 GetDetectorDataFolder()->Add(hits);
883 //____________________________________________________________________________
884 void AliEMCALLoader::MakeSDigitsArray()
886 // Create the array for SDigits
887 if ( SDigits()) return;
888 TClonesArray* sdigits = new TClonesArray("AliEMCALDigit",1);
889 sdigits->SetName(fgkSDigitsName);
890 GetDetectorDataFolder()->Add(sdigits);
893 //____________________________________________________________________________
894 void AliEMCALLoader::MakeDigitsArray()
896 // Create the array for Digits
897 if ( Digits()) return;
898 TClonesArray* digits = new TClonesArray("AliEMCALDigit",1);
899 digits->SetName(fgkDigitsName);
900 GetDetectorDataFolder()->Add(digits);
904 //____________________________________________________________________________
905 void AliEMCALLoader::MakeRecPointsArray()
907 // Make recpoints array
908 if ( ECARecPoints() == 0x0) {
910 printf("MakeRecPointsArray: Making array for ECA");
911 TObjArray* eca = new TObjArray(100) ;
912 eca->SetName(fgkECARecPointsName) ;
913 GetDetectorDataFolder()->Add(eca);
917 //____________________________________________________________________________
918 void AliEMCALLoader::MakeTrackSegmentsArray()
920 // Create the array for TrackSegments
921 if ( TrackSegments())
923 TClonesArray * ts = new TClonesArray("AliEMCALTrackSegment",100) ;
924 ts->SetName(fgkTracksName);
925 GetDetectorDataFolder()->Add(ts);
928 //____________________________________________________________________________
929 void AliEMCALLoader::MakeRecParticlesArray()
931 // Create the array for RecParticles
932 if ( RecParticles()) return;
933 TClonesArray * rp = new TClonesArray("AliEMCALRecParticle",100) ;
934 rp->SetName(fgkRecParticlesName);
935 GetDetectorDataFolder()->Add(rp);