]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/EveDet/AliEveEMCALData.cxx
Coverity
[u/mrichter/AliRoot.git] / EVE / EveDet / AliEveEMCALData.cxx
1 //
2 // Fill containers for visualisation of EMCAL data structures
3 //    - read and store MC Hits    - read and store digits from esds or runloader
4 //    - read and store clusters from esds or runloader 
5 //
6 // Author: Magali Estienne (magali.estienne@cern.ch)
7 // June 30 2008
8 //
9
10 //#include <Riostream.h>
11 //#include <vector>
12
13 #include <TTree.h>
14 #include <TBranch.h>
15 #include <TObjArray.h>
16 #include <TRefArray.h>
17 #include <TClonesArray.h>
18 #include <TMath.h>
19 #include <TLorentzVector.h>
20
21 #include "AliRunLoader.h"
22 #include "AliEMCALLoader.h"
23 #include "AliESDVertex.h"
24 #include "AliEMCALHit.h"
25 #include "AliEMCALDigit.h"
26
27 #include "AliEMCALRecPoint.h"
28 #include "AliESDCaloCells.h"
29 #include "AliESDCaloCluster.h"
30
31 #include "AliEveEMCALData.h"
32 #include "AliEveEMCALSModuleData.h"
33
34 class Riostream;
35 class TObject;
36 class TEveUtil;
37 class TEvePointSet;
38 class AliRun;
39 class AliESDEvent;
40 class AliEMCAL;
41 class AliEMCALGeometry;
42 class AliEveEMCALSModule;
43
44
45 ClassImp(AliEveEMCALData)
46
47 //______________________________________________________________________________
48 AliEveEMCALData::AliEveEMCALData():
49   TObject(),
50   TEveRefCnt(),
51   fEmcal(0x0),
52   fGeom(0x0),
53   fNode(0x0),
54   fHMatrix(0),
55   fTree(0x0),
56   fESD(0x0),
57   fNsm(12),
58   fNsmfull(10),
59   fNsmhalf(2),
60   fSM(12),
61   fSMfull(10),
62   fSMhalf(2),
63   fRunLoader(0),
64   fDebug(0),
65   fPoint(0)
66 {
67   
68   //
69   // Constructor
70   //
71   //   for(Int_t i=0; i<12; i++)
72   //     fSM[i] = 0x0;
73   //   for(Int_t i=0; i<10; i++)
74   //     fSMfull[i] = 0x0;
75   //   fSMhalf[0] = fSMhalf[1] = 0x0;
76   //  InitEMCALGeom();
77   CreateAllSModules();
78
79
80 }
81
82 //______________________________________________________________________________
83 AliEveEMCALData::AliEveEMCALData(AliRunLoader* rl, TGeoNode* node, TGeoHMatrix* m):
84   TObject(),
85   TEveRefCnt(),
86   fEmcal(0x0),
87   fGeom(0x0),
88   fNode(node),
89   fHMatrix(m),
90   fTree(0x0),
91   fESD(0x0),
92   fNsm(12),
93   fNsmfull(10),
94   fNsmhalf(2),
95   fSM(12),
96   fSMfull(10),
97   fSMhalf(2),
98   fRunLoader(rl),
99   fDebug(0),
100   fPoint(0)
101 {
102   
103   //
104   // Constructor
105   //
106 //   for(Int_t i=0; i<12; i++)
107 //     fSM[i] = 0x0;
108 //   for(Int_t i=0; i<10; i++)
109 //     fSMfull[i] = 0x0;
110 //   fSMhalf[0] = fSMhalf[1] = 0x0;
111   InitEMCALGeom(rl);
112   CreateAllSModules();
113
114
115 }
116
117 //______________________________________________________________________________
118 AliEveEMCALData::~AliEveEMCALData()
119 {
120   //
121   // Destructor
122   //
123
124   DeleteSuperModules();
125   delete fTree;
126   // delete fEmcal; // deleted by run-loader
127   delete fGeom;
128   delete fNode;
129   delete fHMatrix;
130   delete fPoint;
131 }
132
133 //______________________________________________________________________________
134 AliEveEMCALData::AliEveEMCALData(const AliEveEMCALData &edata) :
135   TObject(edata),
136   TEveRefCnt(edata),
137   fEmcal(edata.fEmcal),
138   fGeom(edata.fGeom),
139   fNode(edata.fNode),
140   fHMatrix(edata.fHMatrix),
141   fTree(edata.fTree),
142   fESD(edata.fESD),
143   fNsm(edata.fNsm),
144   fNsmfull(edata.fNsmfull),
145   fNsmhalf(edata.fNsmhalf),
146   fSM(edata.fSM),
147   fSMfull(edata.fSMfull),
148   fSMhalf(edata.fSMhalf),
149   fRunLoader(edata.fRunLoader),
150   fDebug(edata.fDebug),
151   fPoint(edata.fPoint)
152 {
153   //
154   // Copy constructor
155   //
156   InitEMCALGeom(edata.fRunLoader);
157   CreateAllSModules();
158 }
159
160 //______________________________________________________________________________
161 AliEveEMCALData& AliEveEMCALData::operator=(const AliEveEMCALData &edata)
162 {
163   //
164   // Assignment operator
165   //
166
167   if (this != &edata) {
168
169   }
170
171   return *this;
172
173 }
174
175 //______________________________________________________________________________
176 void AliEveEMCALData::SetTree(TTree* const tree)
177 {
178   //
179   // Set digit-tree to be used for digit retrieval. 
180   // Data is loaded on demand.
181   // 
182
183   fTree = tree;
184
185 }
186
187 //______________________________________________________________________________
188 void AliEveEMCALData::SetESD(AliESDEvent* const esd)
189 {
190   //
191   // Set esd
192   //
193
194   fESD = esd;
195 }
196
197 //______________________________________________________________________________
198 void AliEveEMCALData::SetNode(TGeoNode* const node)
199 {
200   //
201   // Set node
202   //
203
204   fNode = node;
205 }
206
207 //______________________________________________________________________________
208 void AliEveEMCALData::InitEMCALGeom(AliRunLoader* const rl)
209 {
210   //
211   // Set data members for EMCAL geometry
212   //
213
214   fEmcal = (AliEMCAL*) rl->GetAliRun()->GetDetector("EMCAL");
215   fGeom  = (AliEMCALGeometry*) fEmcal->GetGeometry();
216
217 }
218
219 //______________________________________________________________________________
220 void AliEveEMCALData::GetGeomInfo(Int_t id, Int_t &iSupMod, Double_t& x, Double_t& y, Double_t& z)
221 {
222   //
223   // Get geometrical information from hit/digit/cluster absolute id
224   //
225
226   Int_t iTower  =  0 ;
227   Int_t iIphi   =  0 ;
228   Int_t iIeta   =  0 ;
229
230   //Geometry methods
231   fGeom->GetCellIndex(id,iSupMod,iTower,iIphi,iIeta);
232   //Gives SuperModule and Tower numbers
233   fGeom->RelPosCellInSModule(id, x, y, z);
234
235 }
236
237 //______________________________________________________________________________
238 void  AliEveEMCALData::CreateAllSModules()
239 {
240   //
241   // Create all fNsm super modules
242   //
243
244   for(Int_t sm = 0; sm < fNsm; sm++)
245     CreateSModule(sm);
246
247 }
248
249 //______________________________________________________________________________
250 void  AliEveEMCALData::CreateSModule(Int_t sm)
251 {
252   //
253   // Create super-module-data for SM if it does not exist already.
254   //
255
256   if(fSM[sm] == 0) fSM[sm] = new AliEveEMCALSModuleData(sm,fGeom,fNode,fHMatrix);
257   if(fSMfull[sm] == 0 && sm < 10) fSMfull[sm] = new AliEveEMCALSModuleData(sm,fGeom,fNode,fHMatrix);
258   if(fSMhalf[sm-10] == 0 && sm > 10) fSMhalf[sm-10] = new AliEveEMCALSModuleData(sm,fGeom,fNode,fHMatrix);
259 }
260
261 //______________________________________________________________________________
262 void AliEveEMCALData::DropAllSModules()
263 {
264   //
265   // Drop data of all existing sectors.
266   //
267
268   for (Int_t sm = 0; sm < fNsm; sm++) {
269     if (fSM[sm] != 0)
270       fSM[sm]->DropData();
271   }
272 }
273
274 //______________________________________________________________________________
275 void AliEveEMCALData::DeleteSuperModules()
276 {
277   //
278   // Delete all super module data
279   //
280
281   for (Int_t sm = 0; sm < fNsm; sm++)
282     {
283       fSM[sm] = 0;
284       delete fSM[sm];
285     }
286
287   for(Int_t smf = 0; smf < fNsmfull; smf++) 
288     {
289       fSMfull[smf] = 0;
290       delete fSMfull[smf];
291     }
292
293   for(Int_t smh = 0; smh < fNsmhalf; smh++)
294     {
295       fSMhalf[smh] = 0;
296       delete fSMhalf[smh];
297     }
298   
299 }
300
301 //______________________________________________________________________________
302 void AliEveEMCALData::LoadHits(TTree* const t)
303 {
304   //
305   // Get hit information from RunLoader
306   //
307
308   /*
309   // These are global coordinates !
310   char form[1000];
311   const char *selection = "";
312   const char *varexp = "fX:fY:fZ";
313   sprintf(form,"EMCAL Hits '%s'", selection);
314   fPoint = new TEvePointSet(form);
315
316   TEvePointSelector ps(t, fPoint, varexp, selection);
317   ps.Select();
318
319   if (fPoint->Size() == 0) {
320     Warning("emcal_hits", Form("No hits match '%s'", selection));
321     delete fPoint;
322     //    return 0;
323   }
324   */
325
326   TObjArray *harr=NULL;
327   TBranch *hbranch=t->GetBranch("EMCAL");
328   hbranch->SetAddress(&harr);
329   
330   if(hbranch->GetEvent(0)) {
331     for(Int_t ih = 0; ih < harr->GetEntriesFast(); ih++) {
332       AliEMCALHit* hit =(AliEMCALHit*)harr->UncheckedAt(ih);
333       if(hit != 0){
334         if(fDebug>1) cout << "Hit info " << hit->GetId() << " " << hit->GetEnergy() << endl;
335         Int_t id = hit->GetId();
336         // These are local coordinates
337         Double_t xl = 0.; Double_t yl = 0.; Double_t zl = 0.;
338         // Get global coordinates
339         Double_t x = hit->X();
340         Double_t y = hit->Y();
341         Double_t z = hit->Z();
342         Double_t amp = hit->GetEnergy();
343         Int_t iSupMod = 0;
344         // Get SM Id
345         GetGeomInfo(id,iSupMod,xl,yl,zl);
346         fSM[iSupMod]->RegisterHit(id,iSupMod,amp,x,y,z);
347       }
348     }
349   }
350 }
351
352 //______________________________________________________________________________
353 void AliEveEMCALData::LoadHitsFromEMCALLoader(AliEMCALLoader* const emcl)
354 {
355   //
356   // Get hit information from EMCAL Loader
357   //
358
359         AliEMCALHit* hit;
360   
361         //Fill array of hits                                                                        
362         TClonesArray *hits = 0;//(TClonesArray*)emcl->Hits();
363         TTree *treeH = emcl->TreeH();   
364         if (treeH) {
365                 Int_t nTrack = treeH->GetEntries();  // TreeH has array of hits for every primary
366                 TBranch * branchH = treeH->GetBranch("EMCAL");
367                 //if(fHits)fHits->Clear();
368                 branchH->SetAddress(&hits);
369                 for (Int_t iTrack = 0; iTrack < nTrack; iTrack++) {
370                         branchH->GetEntry(iTrack);
371                         
372                         //Get hits from the list                                                                    
373                         for(Int_t ihit = 0; ihit< hits->GetEntries();ihit++){
374
375                                 hit = static_cast<AliEMCALHit *>(hits->At(ihit)) ;
376     
377                                 if(hit != 0){
378                                         if(fDebug>1) cout << "Hit info " << hit->GetId() << " " << hit->GetEnergy() << endl;
379
380                                         Int_t id = hit->GetId();
381                                         // These are local coordinates
382                                         Double_t xl = 0.; Double_t yl = 0.; Double_t zl = 0.;
383                                         // Get global coordinates
384                                         Double_t x = hit->X();
385                                         Double_t y = hit->Y();
386                                         Double_t z = hit->Z();
387                                         Double_t amp = hit->GetEnergy();
388                                         Int_t iSupMod = 0;
389                                         // Get SM Id
390                                         GetGeomInfo(id,iSupMod,xl,yl,zl);
391                                         fSM[iSupMod]->RegisterHit(id,iSupMod,amp,x,y,z);
392                                 }//hit exists
393                         }//hit loop
394                         if(hits)hits->Clear();
395                 }// track loop
396         }//treeH exists
397 }
398
399 //______________________________________________________________________________
400 void AliEveEMCALData::LoadDigits(TTree *t)
401 {
402   //
403   // Get digit information from RunLoader
404   //
405
406   TClonesArray *digits = 0;
407   t->SetBranchAddress("EMCAL", &digits);
408   t->GetEntry(0);
409
410   Int_t nEnt = digits->GetEntriesFast();
411   cout << "nEnt: " << nEnt << endl;
412   AliEMCALDigit * dig;
413
414   //  Double_t amp   = -1 ;
415   Double_t ampFlo   = -1 ;
416   Int_t id      = -1 ;
417   Int_t iSupMod =  0 ;
418   Double_t x, y, z;
419
420   for (Int_t idig = 0; idig < nEnt; idig++)
421     {
422       dig = static_cast<AliEMCALDigit *>(digits->At(idig));
423       
424       if(dig != 0) {
425         id   = dig->GetId() ; //cell (digit) label
426         // adc
427         ampFlo  = dig->GetAmplitude(); //amplitude in cell (digit)
428         // GeV
429         //      amp = ampFlo*0.0153; // To be modified with correct OCDB conversion     
430
431         GetGeomInfo(id,iSupMod,x,y,z);
432
433 //      // GeV
434 //      fSM[iSupMod]->RegisterDigit(id,iSupMod,amp,x,y,z);
435 // //   fSM[iSupMod]->SaveDigit(dig);
436 // //   if(iSupMod<fNsmfull) fSMfull[iSupMod]->RegisterDigit(id,iSupMod,amp,x,y,z);
437 // //   if(iSupMod>fNsmfull) fSMhalf[iSupMod-10]->RegisterDigit(id,iSupMod,amp,x,y,z);
438         fSM[iSupMod]->RegisterDigit(id,iSupMod,ampFlo,x,y,z);
439 //      fSM[iSupMod]->SaveDigit(dig);
440 //      if(iSupMod<fNsmfull) fSMfull[iSupMod]->RegisterDigit(id,iSupMod,amp,x,y,z);
441 //      if(iSupMod>fNsmfull) fSMhalf[iSupMod-10]->RegisterDigit(id,iSupMod,amp,x,y,z);
442       }
443       else {
444         cout << "Digit object empty" << endl;
445         return;
446       }
447     } // end loop digits
448   cout << "after loop on digits !" << endl;
449 }
450
451 //______________________________________________________________________________
452 void AliEveEMCALData::LoadDigitsFromEMCALLoader(AliEMCALLoader* const emcl)
453 {
454
455   //
456   // Get digit information from EMCAL Loader
457   //
458
459   AliEMCALDigit* dig;
460   
461   //Fill array of digits                                                                        
462   TClonesArray *digits = (TClonesArray*)emcl->Digits();
463   
464   //Get digits from the list  
465   
466   //  Double_t amp   = -1 ;
467   Double_t ampFlo   = -1 ;
468   Int_t id      = -1 ;
469   Int_t iSupMod =  0 ;
470   Double_t x, y, z;
471                                                
472    for(Int_t idig = 0; idig< digits->GetEntries();idig++){
473
474      dig = static_cast<AliEMCALDigit *>(digits->At(idig)) ;
475
476      if(dig != 0){
477        if(fDebug>1) cout << "Digit info " << dig->GetId() << " " << dig->GetAmplitude() << endl;
478        id   = dig->GetId() ; //cell (digit) label
479        // adc
480        ampFlo  = dig->GetAmplitude(); //amplitude in cell (digit)
481        // GeV
482        //       amp = ampFlo*0.0153.; // To be modified with correct OCDB conversion
483
484        GetGeomInfo(id,iSupMod,x,y,z);
485        
486        //       // GeV
487        //       fSM[iSupMod]->RegisterDigit(id,iSupMod,amp,x,y,z);
488        // adc
489        fSM[iSupMod]->RegisterDigit(id,iSupMod,ampFlo,x,y,z);
490      }
491       else {
492         cout << "Digit object empty" << endl;
493         return;
494       }
495    } // end loop on digits
496    
497 }
498
499 //______________________________________________________________________________
500 void AliEveEMCALData::LoadDigitsFromESD()
501 {
502   //
503   // Get digit information from esd
504   //
505   
506   AliESDCaloCells &cells= *(fESD->GetEMCALCells());
507   Int_t ncell = cells.GetNumberOfCells() ;  
508   Int_t iSupMod =  0 ;
509   Double_t x, y, z;
510
511   // Extract digit information from the ESDs
512   for (Int_t icell=  0; icell <  ncell; icell++) 
513     {
514       Int_t id   = cells.GetCellNumber(icell);
515       // adc
516       Double_t ampFlo  = cells.GetAmplitude(icell);
517       // GeV
518       //      Double_t amp = ampFlo*0.0153; // To be modified with correct OCDB conversion
519
520       GetGeomInfo(id,iSupMod,x,y,z);
521
522 //       // GeV
523 //       fSM[iSupMod]->RegisterDigit(id,iSupMod,amp,x,y,z);
524 //       if(iSupMod<fNsmfull) fSMfull[iSupMod]->RegisterDigit(id,iSupMod,amp,x,y,z);
525 //       if(iSupMod>fNsmfull) fSMhalf[iSupMod-10]->RegisterDigit(id,iSupMod,amp,x,y,z);
526       // adc
527       fSM[iSupMod]->RegisterDigit(id,iSupMod,ampFlo,x,y,z);
528       if(iSupMod<fNsmfull) fSMfull[iSupMod]->RegisterDigit(id,iSupMod,ampFlo,x,y,z);
529       if(iSupMod>fNsmfull) fSMhalf[iSupMod-10]->RegisterDigit(id,iSupMod,ampFlo,x,y,z);
530
531     } // end loop cells
532 }
533
534 //______________________________________________________________________________
535 void AliEveEMCALData::LoadRecPoints(TTree* const t)
536 {
537   //
538   // Get rec point information from RunLoader
539   //
540
541   //*************************************************
542   // To be improved !!!!!
543   // Size and shape of cluster to be implemented
544   // 
545   //*************************************************
546         
547   // From TTreeR
548   TObjArray *carr=NULL;
549   TBranch *cbranch=t->GetBranch("EMCALECARP");
550   cbranch->SetAddress(&carr);
551   
552   if(cbranch->GetEvent(0)) {
553     for(Int_t ic = 0; ic < carr->GetEntriesFast(); ic++) {
554       AliEMCALRecPoint* rp =(AliEMCALRecPoint*)carr->UncheckedAt(ic);
555       if(rp){
556         if(fDebug>1) cout << "RecPoint info " << rp->GetAbsId() << " " << rp->GetEnergy() << endl;
557         Int_t iSupMod = rp->GetSuperModuleNumber();
558         // GeV
559         Double_t amp = (Double_t)rp->GetEnergy();
560         // adc
561         Double_t ampFlo = amp/0.0153; // To be modified with correct OCDB conversion
562         TVector3 lpos;
563         rp->GetLocalPosition(lpos);
564
565 //      // GeV
566 //      fSM[iSupMod]->RegisterCluster(iSupMod,amp,lpos[0],lpos[1],lpos[2]);
567         // adc
568         fSM[iSupMod]->RegisterCluster(iSupMod,ampFlo,lpos[0],lpos[1],lpos[2]);
569       }
570     }
571   }
572   
573 }
574
575 //______________________________________________________________________________
576 void AliEveEMCALData::LoadRecPointsFromEMCALLoader(AliEMCALLoader* const emcl)
577 {
578   //
579   // Get rec point information from EMCAL Loader
580   //
581
582   //*************************************************
583   // To be improved !!!!!
584   // Size and shape of cluster to be implemented
585   // 
586   //*************************************************
587
588   // From EMCALLoader
589   AliEMCALRecPoint* rp;
590   
591   //Fill array of clusters                                                                        
592   TClonesArray *clusters = (TClonesArray*)emcl->RecPoints();
593   
594   //Get clusters from the list                                                                    
595   for(Int_t iclu = 0; iclu< clusters->GetEntries();iclu++){
596
597     rp = static_cast<AliEMCALRecPoint *>(clusters->At(iclu)) ;
598     
599     if(rp){
600        if(fDebug>1) cout << "RecPoint info " << rp->GetAbsId() << " " << rp->GetEnergy() << endl;
601        Int_t iSupMod = rp->GetSuperModuleNumber();
602        Double_t amp = (Double_t)rp->GetEnergy();
603        Double_t ampFlo = amp/0.0153; // To be modified with correct OCDB conversion
604        TVector3 lpos;
605        rp->GetLocalPosition(lpos);
606        
607 //        // GeV
608 //        fSM[iSupMod]->RegisterCluster(iSupMod,amp,lpos[0],lpos[1],lpos[2]);
609        // adc
610        fSM[iSupMod]->RegisterCluster(iSupMod,ampFlo,lpos[0],lpos[1],lpos[2]);
611     }
612   }
613   
614 }
615
616 //______________________________________________________________________________
617 void AliEveEMCALData::LoadRecPointsFromESD()
618 {
619   //
620   // Get cluster information from esd
621   //
622
623  Int_t iSupMod =  0 ;
624   Double_t x, y, z;
625   Int_t iSM =  0 ;
626   Int_t iT  =  0 ;
627   Int_t iIp   =  0 ;
628   Int_t iIe   =  0 ;
629   Double_t xd, yd, zd;
630   Float_t pos[3] ; 
631   
632   // Get reconstructed vertex position
633   AliESDVertex* primVertex =(AliESDVertex*) fESD->GetVertex();
634   Double_t vertexPosition[3] ; 
635   primVertex->GetXYZ(vertexPosition) ; 
636
637   //Get the CaloClusters
638   //select EMCAL clusters only 
639   TRefArray * caloClusters  = new TRefArray();
640   fESD->GetEMCALClusters(caloClusters);
641   Int_t nclus = caloClusters->GetEntries();
642   cout << "nclus: " << nclus << endl; 
643   
644   if(!caloClusters) return;
645
646   for (Int_t iclus =  0; iclus <  nclus; iclus++) 
647     {
648       AliESDCaloCluster *clus = (AliESDCaloCluster *) caloClusters->At(iclus) ; 
649       //Get the cluster info
650       
651       Double_t energy = clus->E() ;
652       // adc
653       //      Int_t   eneInt = (Int_t)energy*500+0.5;
654       Double_t eneInt = energy/0.0153; // To be modified with correct OCDB conversion
655       Double_t disp   = clus->GetDispersion() ;
656       
657       clus->GetPosition(pos) ; // Global position
658       TVector3 vpos(pos[0],pos[1],pos[2]) ;
659       TLorentzVector p4 ;
660       TVector3 p3;
661       clus->GetMomentum(p4,vertexPosition);
662       p3.SetXYZ(p4[0],p4[1],p4[2]);
663       Double_t eta = p3.Eta();
664       Double_t phi = ( (p3.Phi()) < 0) ? (p3.Phi()) + 2. * TMath::Pi() : (p3.Phi());
665       
666       Int_t mult = clus->GetNCells() ;
667       if(fDebug>2) {
668         cout << "In cluster: " << iclus << ", ncells: " << mult << ", energy : " << energy << 
669           ", disp: " << disp << endl;
670         cout << "Cluster " << iclus << ", eta: " << eta << ", phi: " << phi << endl;
671       }
672
673       Int_t clusId = 0;
674       fGeom->GetAbsCellIdFromEtaPhi(eta,phi,clusId);
675       if(fDebug>2) {
676         cout << "Abs Cluster Id: " << clusId << ", xc: " << pos[0] << 
677           ", yc: " << pos[1] << ", zc: " << pos[2] << endl;
678       }
679
680       GetGeomInfo(clusId,iSupMod,x,y,z);
681       
682       //******** Not used yet but will come  ********
683       // AliESDCaloCells &cells= *(fESD->GetEMCALCells());
684       Int_t     digMult = clus->GetNCells() ;
685       UShort_t *digID   = clus->GetCellsAbsId() ;
686       for(Int_t i=0; i<digMult; i++){
687         // Float_t  digitAmp     = cells.GetCellAmplitude(digID[i]) ;
688         fGeom->RelPosCellInSModule(digID[i], xd, yd, zd);
689         //Geometry methods
690         fGeom->GetCellIndex(digID[i],iSM,iT,iIp,iIe);
691         //Gives SuperModule and Tower numbers
692
693       } // end digit loop
694       //*********************************************
695       //      // GeV
696       //      fSM[iSupMod]->RegisterCluster(iSM,energy,x,y,z);
697       // adc
698       fSM[iSupMod]->RegisterCluster(iSM,eneInt,x,y,z);
699
700     } // end cluster loop
701 }
702
703 //______________________________________________________________________________
704 AliEveEMCALSModuleData* AliEveEMCALData::GetSModuleData(Int_t sm)
705 {
706   //
707   // Return super module data
708   //
709
710   if (sm < 0 || sm > fNsm) 
711     {
712       printf("The number of super modules must be lower or equal to %d",fNsm);
713       return 0;
714     }
715   
716   return fSM[sm];
717 }
718
719 //______________________________________________________________________________
720 void AliEveEMCALData::LoadRaw() const
721 {
722   //
723   // Get raw information
724   //
725
726   // To be implemented !
727 }
728