Added the option to write objects into separate files and improved the cleaning
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALSDigitizer.cxx
CommitLineData
ffa6d63b 1/*************************************************************************
61e0abb5 2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
15
16/* $Id$ */
17
18//_________________________________________________________________________
19// This is a TTask that makes SDigits out of Hits
20// A Summable Digits is the sum of all hits originating
ffa6d63b 21// from one in one tower of the EMCAL
61e0abb5 22// A threshold for assignment of the primary to SDigit is applied
23// SDigits are written to TreeS, branch "EMCAL"
24// AliEMCALSDigitizer with all current parameters is written
25// to TreeS branch "AliEMCALSDigitizer".
26// Both branches have the same title. If necessary one can produce
27// another set of SDigits with different parameters. Two versions
28// can be distunguished using titles of the branches.
29// User case:
30// root [0] AliEMCALSDigitizer * s = new AliEMCALSDigitizer("galice.root")
31// Warning in <TDatabasePDG::TDatabasePDG>: object already instantiated
32// root [1] s->ExecuteTask()
33// // Makes SDigitis for all events stored in galice.root
34// root [2] s->SetPedestalParameter(0.001)
35// // One can change parameters of digitization
36// root [3] s->SetSDigitsBranch("Redestal 0.001")
37// // and write them into the new branch
38// root [4] s->ExeciteTask("deb all tim")
39// // available parameters:
40// deb - print # of produced SDigitis
41// deb all - print # and list of produced SDigits
42// tim - print benchmarking information
43//
ffa6d63b 44//*-- Author : Sahal Yacoob (LBL)
45// based on : AliPHOSSDigitzer
61e0abb5 46//////////////////////////////////////////////////////////////////////////////
47
48
49// --- ROOT system ---
50#include "TFile.h"
51#include "TTask.h"
52#include "TTree.h"
53#include "TSystem.h"
54#include "TROOT.h"
55#include "TFolder.h"
106fc2fa 56#include "TGeometry.h"
61e0abb5 57#include "TBenchmark.h"
58// --- Standard library ---
59#include <iomanip.h>
60
61// --- AliRoot header files ---
62#include "AliRun.h"
106fc2fa 63#include "AliHeader.h"
61e0abb5 64#include "AliEMCALDigit.h"
65#include "AliEMCALHit.h"
66#include "AliEMCALSDigitizer.h"
67#include "AliEMCALGeometry.h"
68#include "AliEMCALv1.h"
814ad4bf 69#include "AliEMCALGetter.h"
61e0abb5 70
71ClassImp(AliEMCALSDigitizer)
72
73
74//____________________________________________________________________________
75 AliEMCALSDigitizer::AliEMCALSDigitizer():TTask("AliEMCALSDigitizer","")
76{
77 // ctor
89e103bd 78 fA = fB = fNevents = 0 ;
79 fTowerPrimThreshold = fPreShowerPrimThreshold = fPhotonElectronFactor = 0. ;
80 fHits = fSDigits = fSDigits = 0 ;
36657114 81 fSplitFile = 0 ;
61e0abb5 82 fIsInitialized = kFALSE ;
83
89e103bd 84
61e0abb5 85}
86
87//____________________________________________________________________________
814ad4bf 88AliEMCALSDigitizer::AliEMCALSDigitizer(const char* headerFile, const char *sDigitsTitle):TTask(sDigitsTitle, headerFile)
61e0abb5 89{
90 // ctor
91 fA = 0;
92 fB = 10000000.;
89e103bd 93 fTowerPrimThreshold = 0.01 ;
94 fPreShowerPrimThreshold = 0.0001 ;
814ad4bf 95 fNevents = 0 ;
89e103bd 96 fPhotonElectronFactor = 5000. ; // photoelectrons per GeV
36657114 97 fSplitFile = 0 ;
814ad4bf 98 Init();
61e0abb5 99}
100
101//____________________________________________________________________________
102AliEMCALSDigitizer::~AliEMCALSDigitizer()
103{
104 // dtor
36657114 105
106 if (fSplitFile)
107 if ( fSplitFile->IsOpen() )
108 fSplitFile->Close() ;
6f51f90b 109 // Close the root file
303492aa 110 AliEMCALGetter * gime = AliEMCALGetter::GetInstance() ;
111 gime->CloseFile() ;
6f51f90b 112
113 // remove the task from the folder list
114 gime->RemoveTask("S",GetName()) ;
115
116 TString name(GetName()) ;
117 name.Remove(name.Index(":")) ;
118
119 // remove the Hits from the folder list
120 gime->RemoveObjects("H",name) ;
121
122 // remove the SDigits from the folder list
123 gime->RemoveObjects("S", name) ;
61e0abb5 124}
36657114 125
61e0abb5 126//____________________________________________________________________________
127void AliEMCALSDigitizer::Init(){
61e0abb5 128
814ad4bf 129 // Initialization: open root-file, allocate arrays for hits and sdigits,
36657114 130 // attach task SDigitizer to the list of EMCAL tasks
814ad4bf 131 //
132 // Initialization can not be done in the default constructor
133 //============================================================= YS
134 // The initialisation is now done by the getter
61e0abb5 135
36657114 136 if( strcmp(GetTitle(), "") == 0 )
814ad4bf 137 SetTitle("galice.root") ;
36657114 138
814ad4bf 139 AliEMCALGetter * gime = AliEMCALGetter::GetInstance(GetTitle(), GetName(), "update") ;
140 if ( gime == 0 ) {
141 cerr << "ERROR: AliEMCALSDigitizer::Init -> Could not obtain the Getter object !" << endl ;
142 return ;
143 }
144
145 gime->PostSDigits( GetName(), GetTitle() ) ;
61e0abb5 146
814ad4bf 147 TString sdname(GetName() );
148 sdname.Append(":") ;
149 sdname.Append(GetTitle() ) ;
97f3344e 150 SetName(sdname.Data()) ;
814ad4bf 151 gime->PostSDigitizer(this) ;
152
814ad4bf 153
154 }
61e0abb5 155//____________________________________________________________________________
156void AliEMCALSDigitizer::Exec(Option_t *option) {
61e0abb5 157
814ad4bf 158// Collects all hits in the same active volume into digit
159
160 if( strcmp(GetName(), "") == 0 )
161 Init() ;
61e0abb5 162
814ad4bf 163 if (strstr(option, "print") ) {
164 Print("") ;
165 return ;
166 }
61e0abb5 167
814ad4bf 168 if(strstr(option,"tim"))
169 gBenchmark->Start("EMCALSDigitizer");
97f3344e 170
171
814ad4bf 172 //Check, if this branch already exits
173 gAlice->GetEvent(0) ;
97f3344e 174
175 TString sdname(GetName()) ;
176 sdname.Remove(sdname.Index(GetTitle())-1) ;
177
814ad4bf 178 if(gAlice->TreeS() ) {
179 TObjArray * lob = static_cast<TObjArray*>(gAlice->TreeS()->GetListOfBranches()) ;
180 TIter next(lob) ;
181 TBranch * branch = 0 ;
182 Bool_t emcalfound = kFALSE, sdigitizerfound = kFALSE ;
61e0abb5 183
97f3344e 184 while ( (branch = (static_cast<TBranch*>(next()))) && (!emcalfound || !sdigitizerfound) ) {
36657114 185 TString thisName( GetName() ) ;
186 TString branchName( branch->GetTitle() ) ;
187 branchName.Append(":") ;
188 if ( (strcmp(branch->GetName(), "EMCAL")==0) && thisName.BeginsWith(branchName) )
814ad4bf 189 emcalfound = kTRUE ;
190
36657114 191 else if ( (strcmp(branch->GetName(), "AliEMCALSDigitizer")==0) && thisName.BeginsWith(branchName) )
814ad4bf 192 sdigitizerfound = kTRUE ;
61e0abb5 193 }
194
814ad4bf 195 if ( emcalfound || sdigitizerfound ) {
196 cerr << "WARNING: AliEMCALSDigitizer::Exec -> SDigits and/or SDigitizer branch with name " << GetName()
197 << " already exits" << endl ;
198 return ;
199 }
200 }
97f3344e 201
814ad4bf 202 AliEMCALGetter * gime = AliEMCALGetter::GetInstance() ;
814ad4bf 203 Int_t nevents = (Int_t) gAlice->TreeE()->GetEntries() ;
204
205 Int_t ievent ;
206 for(ievent = 0; ievent < nevents; ievent++){
207 gime->Event(ievent,"H") ;
208 const TClonesArray * fHits = gime->Hits() ;
209 TClonesArray * sdigits = gime->SDigits(sdname.Data()) ;
210 sdigits->Clear();
61e0abb5 211 Int_t nSdigits = 0 ;
814ad4bf 212
213 //Collects all hits in the same active volume into digit
214
215
61e0abb5 216
217
218 //Now made SDigits from hits, for EMCAL it is the same, so just copy
814ad4bf 219 // Int_t itrack ;
220 // for (itrack=0; itrack < gAlice->GetNtrack(); itrack++){
221 //gime->Track(itrack);
61e0abb5 222 //=========== Get the EMCAL branch from Hits Tree for the Primary track itrack
89e103bd 223
61e0abb5 224 Int_t i;
e1f60236 225 for ( i = 0 ; i < fHits->GetEntries() ; i++ ) { // loop over all hits (hit = deposited energy/layer/entering particle)
226 AliEMCALHit * hit = dynamic_cast<AliEMCALHit*>(fHits->At(i)) ;
227 AliEMCALDigit * curSDigit = 0 ;
228 AliEMCALDigit * sdigit = 0 ;
ffa6d63b 229 Bool_t newsdigit = kTRUE;
e1f60236 230
89e103bd 231
232
e1f60236 233 // Assign primary number only if deposited energy is significant
234
89e103bd 235 if( (!hit->IsInPreShower() && hit->GetEnergy() > fTowerPrimThreshold) ||
236 (hit->IsInPreShower() && hit->GetEnergy() > fPreShowerPrimThreshold)) {
237 curSDigit = new AliEMCALDigit( hit->GetPrimary(),
e1f60236 238 hit->GetIparent(),Layer2TowerID(hit->GetId(),hit->IsInPreShower()),
89e103bd 239 Digitize(hit->GetEnergy()),
814ad4bf 240 hit->GetTime()) ;
89e103bd 241 } else {
814ad4bf 242 curSDigit = new AliEMCALDigit( -1 ,
243 -1 ,
e1f60236 244 Layer2TowerID(hit->GetId(),hit->IsInPreShower()),
89e103bd 245 Digitize(hit->GetEnergy()),
e1f60236 246 hit->GetTime() ) ;
89e103bd 247 }
e1f60236 248 Int_t check = 0 ;
249 for(check= 0; check < nSdigits ; check++) {
814ad4bf 250 sdigit = (AliEMCALDigit *)sdigits->At(check);
e1f60236 251 if( sdigit->GetId() == curSDigit->GetId()) { // Are we in the same tower or the same preshower ?
252 *sdigit = *sdigit + *curSDigit;
253
254 newsdigit = kFALSE;
255 }
814ad4bf 256 }
e1f60236 257 if (newsdigit) {
258 new((*sdigits)[nSdigits]) AliEMCALDigit(*curSDigit);
ffa6d63b 259 nSdigits++ ;
e1f60236 260 }
261 } // loop over all hits (hit = deposited energy/layer/entering particle)
814ad4bf 262 // } // loop over tracks
e1f60236 263
814ad4bf 264 sdigits->Sort() ;
61e0abb5 265
814ad4bf 266 nSdigits = sdigits->GetEntriesFast() ;
106fc2fa 267 if (nSdigits > 0) {
268 sdigits->Expand(nSdigits) ;
269
270 // Int_t i ;
271 const AliEMCALGeometry * geom = gime->EMCALGeometry() ;
272
273 Int_t lastPreShowerIndex = nSdigits - 1 ;
274 if (!(dynamic_cast<AliEMCALDigit *>(sdigits->At(lastPreShowerIndex))->IsInPreShower()))
275 lastPreShowerIndex = -2;
276 Int_t firstPreShowerIndex = 100000 ;
277 Int_t index ;
278 AliEMCALDigit * sdigit = 0 ;
279 for ( index = 0; index < nSdigits ; index++) {
280 sdigit = dynamic_cast<AliEMCALDigit *>(sdigits->At(index) ) ;
281 if (sdigit->IsInPreShower() ){
282 firstPreShowerIndex = index ;
283 break ;
284 }
285 }
286
287 AliEMCALDigit * preshower ;
288 AliEMCALDigit * tower ;
289 Int_t lastIndex = lastPreShowerIndex +1 ;
290
291
292 for (index = firstPreShowerIndex ; index <= lastPreShowerIndex; index++) {
293 preshower = dynamic_cast<AliEMCALDigit *>(sdigits->At(index) );
294 Bool_t towerFound = kFALSE ;
295 Int_t jndex ;
296 for (jndex = 0; jndex < firstPreShowerIndex; jndex++) {
297 tower = dynamic_cast<AliEMCALDigit *>(sdigits->At(jndex) );
298 if ( (preshower->GetId() - (geom->GetNZ() * geom->GetNPhi()) ) == tower->GetId() ) {
299 Float_t towerEnergy = static_cast<Float_t>(tower->GetAmp()) ;
300 Float_t preshoEnergy = static_cast<Float_t>(preshower->GetAmp()) ;
301 towerEnergy +=preshoEnergy ;
302 *tower = *tower + *preshower ; // and add preshower multiplied by layer ratio to tower
303 tower->SetAmp(static_cast<Int_t>(TMath::Ceil(towerEnergy))) ;
304 towerFound = kTRUE ;
305 }
306 }
307 if ( !towerFound ) {
308
309 new((*sdigits)[lastIndex]) AliEMCALDigit(*preshower);
310 AliEMCALDigit * temp = dynamic_cast<AliEMCALDigit *>(sdigits->At(lastIndex)) ;
311 temp->SetId(temp->GetId() - (geom->GetNZ() * geom->GetNPhi()) ) ;
312 lastIndex++ ;
313 }
314 }
315
316 sdigits->Sort() ;
317 Int_t NPrimarymax = -1 ;
318 for (i = 0 ; i < sdigits->GetEntriesFast() ; i++) {
319 sdigit = dynamic_cast<AliEMCALDigit *>(sdigits->At(i)) ;
320 sdigit->SetIndexInList(i) ;
321 }
322
323 for (i = 0 ; i < sdigits->GetEntriesFast() ; i++) {
324 if (((dynamic_cast<AliEMCALDigit *>(sdigits->At(i)))->GetNprimary()) > NPrimarymax)
325 NPrimarymax = ((dynamic_cast<AliEMCALDigit *>(sdigits->At(i)))->GetNprimary()) ;
e1f60236 326 }
327 }
106fc2fa 328 if(gAlice->TreeS() == 0)
36657114 329 gAlice->MakeTree("S",fSplitFile);
330
814ad4bf 331 //First list of sdigits
332 Int_t bufferSize = 32000 ;
333 TBranch * sdigitsBranch = gAlice->TreeS()->Branch("EMCAL",&sdigits,bufferSize);
334 sdigitsBranch->SetTitle(sdname);
814ad4bf 335
814ad4bf 336 //second - SDigitizer
337 Int_t splitlevel = 0 ;
338 AliEMCALSDigitizer * sd = this ;
339 TBranch * sdigitizerBranch = gAlice->TreeS()->Branch("AliEMCALSDigitizer","AliEMCALSDigitizer",
340 &sd,bufferSize,splitlevel);
341 sdigitizerBranch->SetTitle(sdname);
814ad4bf 342
36657114 343 sdigitsBranch->Fill() ;
344 sdigitizerBranch->Fill() ;
106fc2fa 345 gAlice->TreeS()->AutoSave() ;
36657114 346
814ad4bf 347 if(strstr(option,"deb"))
348 PrintSDigits(option) ;
349
61e0abb5 350 }
351
36657114 352 if (fSplitFile)
353 if ( fSplitFile->IsOpen() )
354 fSplitFile->Close() ;
355
61e0abb5 356 if(strstr(option,"tim")){
357 gBenchmark->Stop("EMCALSDigitizer");
358 cout << "AliEMCALSDigitizer:" << endl ;
359 cout << " took " << gBenchmark->GetCpuTime("EMCALSDigitizer") << " seconds for SDigitizing "
360 << gBenchmark->GetCpuTime("EMCALSDigitizer")/fNevents << " seconds per event " << endl ;
361 cout << endl ;
362 }
363
364
365}
366//__________________________________________________________________
367void AliEMCALSDigitizer::SetSDigitsBranch(const char * title ){
814ad4bf 368
369 // Setting title to branch SDigits
370
371 TString stitle(title) ;
372
373 // check if branch with title already exists
374 TBranch * sdigitsBranch =
375 static_cast<TBranch*>(gAlice->TreeS()->GetListOfBranches()->FindObject("EMCAL")) ;
376 TBranch * sdigitizerBranch =
377 static_cast<TBranch*>(gAlice->TreeS()->GetListOfBranches()->FindObject("AliEMCALSDigitizer")) ;
378 const char * sdigitsTitle = sdigitsBranch ->GetTitle() ;
379 const char * sdigitizerTitle = sdigitizerBranch ->GetTitle() ;
380 if ( stitle.CompareTo(sdigitsTitle)==0 || stitle.CompareTo(sdigitizerTitle)==0 ){
381 cerr << "ERROR: AliEMCALSdigitizer::SetSDigitsBranch -> Cannot overwrite existing branch with title " << title << endl ;
382 return ;
383 }
384
385 cout << "AliEMCALSdigitizer::SetSDigitsBranch -> Changing SDigits file from " << GetName() << " to " << title << endl ;
386
387 SetName(title) ;
388
389 // Post to the WhiteBoard
390 AliEMCALGetter * gime = AliEMCALGetter::GetInstance() ;
391 gime->PostSDigits( title, GetTitle()) ;
392
393
61e0abb5 394}
106fc2fa 395
396//__________________________________________________________________
36657114 397void AliEMCALSDigitizer::SetSplitFile(const TString splitFileName)
106fc2fa 398{
399 // Diverts the SDigits in a file separate from the hits file
400
401 TDirectory * cwd = gDirectory ;
36657114 402
403 if ( !(gAlice->GetTreeSFileName() == splitFileName) ) {
404 if (gAlice->GetTreeSFile() )
405 gAlice->GetTreeSFile()->Close() ;
406 }
407
408 fSplitFile = gAlice->InitTreeFile("S",splitFileName.Data());
409 fSplitFile->cd() ;
410 if ( !fSplitFile->Get("gAlice") )
411 gAlice->Write();
106fc2fa 412
413 TTree *treeE = gAlice->TreeE();
414 if (!treeE) {
36657114 415 cerr << "ERROR: AliEMCALSDigitizer::SetSPlitFile -> No TreeE found "<<endl;
416 abort() ;
106fc2fa 417 }
418
419 // copy TreeE
36657114 420 if ( !fSplitFile->Get("TreeE") ) {
421 AliHeader *header = new AliHeader();
422 treeE->SetBranchAddress("Header", &header);
423 treeE->SetBranchStatus("*",1);
424 TTree *treeENew = treeE->CloneTree();
425 treeENew->Write();
426 }
106fc2fa 427
428 // copy AliceGeom
36657114 429 if ( !fSplitFile->Get("AliceGeom") ) {
430 TGeometry *AliceGeom = static_cast<TGeometry*>(cwd->Get("AliceGeom"));
431 if (!AliceGeom) {
432 cerr << "ERROR: AliEMCALSDigitizer::SetSPlitFile -> AliceGeom was not found in the input file "<<endl;
433 abort() ;
434 }
435 AliceGeom->Write();
106fc2fa 436 }
36657114 437
438 gAlice->MakeTree("S",fSplitFile);
106fc2fa 439 cwd->cd() ;
36657114 440 cout << "INFO: AliEMCALSDigitizer::SetSPlitFile -> SDigits will be stored in " << splitFileName.Data() << endl ;
106fc2fa 441}
442
61e0abb5 443//__________________________________________________________________
444void AliEMCALSDigitizer::Print(Option_t* option)const{
445 cout << "------------------- "<< GetName() << " -------------" << endl ;
814ad4bf 446 cout << " Writing SDigitis to branch with title " << GetName() << endl ;
89e103bd 447 cout << " with digitization parameters A = " << fA << endl ;
448 cout << " B = " << fB << endl ;
449 cout << " Threshold for Primary assignment in Tower = " << fTowerPrimThreshold << endl ;
450 cout << " Threshold for Primary assignment in PreShower = " << fPreShowerPrimThreshold << endl ;
61e0abb5 451 cout << "---------------------------------------------------"<<endl ;
452
453}
454//__________________________________________________________________
455Bool_t AliEMCALSDigitizer::operator==( AliEMCALSDigitizer const &sd )const{
89e103bd 456 if( (fA==sd.fA)&&(fB==sd.fB)&&
457 (fTowerPrimThreshold==sd.fTowerPrimThreshold) &&
458 (fPreShowerPrimThreshold==sd.fPreShowerPrimThreshold))
61e0abb5 459 return kTRUE ;
460 else
461 return kFALSE ;
462}
463//__________________________________________________________________
464void AliEMCALSDigitizer::PrintSDigits(Option_t * option){
465 //Prints list of digits produced at the current pass of AliEMCALDigitizer
466
814ad4bf 467 AliEMCALGetter * gime = AliEMCALGetter::GetInstance() ;
468 TString sdname(GetName()) ;
469 sdname.Remove(sdname.Index(GetTitle())-1) ;
470 const TClonesArray * sdigits = gime->SDigits(sdname.Data()) ;
61e0abb5 471
814ad4bf 472 cout << "AliEMCALSDigitiser: event " << gAlice->GetEvNumber() << endl ;
473 cout << " Number of entries in SDigits list " << sdigits->GetEntriesFast() << endl ;
474 cout << endl ;
475 if(strstr(option,"all")||strstr(option,"EMC")){
476
61e0abb5 477 //loop over digits
478 AliEMCALDigit * digit;
e1f60236 479 cout << "SDigit Id " << " Amplitude " << " Time " << " Index " << " Nprim " << " Primaries list " << endl;
61e0abb5 480 Int_t index ;
814ad4bf 481 for (index = 0 ; index < sdigits->GetEntries() ; index++) {
482 digit = (AliEMCALDigit * ) sdigits->At(index) ;
483 cout << setw(6) << digit->GetId() << " " << setw(10) << digit->GetAmp() << " " << digit->GetTime()
484 << setw(6) << digit->GetIndexInList() << " "
485 << setw(5) << digit->GetNprimary() <<" ";
61e0abb5 486
487 Int_t iprimary;
488 for (iprimary=0; iprimary<digit->GetNprimary(); iprimary++)
814ad4bf 489 cout << " " << digit->GetPrimary(iprimary+1) << " ";
61e0abb5 490 cout << endl;
491 }
814ad4bf 492 cout <<endl;
61e0abb5 493 }
494}
814ad4bf 495//________________________________________________________________________
229f77c4 496Int_t AliEMCALSDigitizer::Layer2TowerID(Int_t ihit, Bool_t preshower){
497 // Method to Transform from Hit Id to Digit Id
498 // This function should be one to one
814ad4bf 499 AliEMCALGetter * gime = AliEMCALGetter::GetInstance() ;
500 const AliEMCALGeometry * geom = gime->EMCALGeometry();
f063936c 501 Int_t ieta = ((ihit-1)/geom->GetNPhi())%geom->GetNZ(); // eta Tower Index
229f77c4 502 Int_t iphi = (ihit-1)%(geom->GetNPhi())+1; //phi Tower Index
503 Int_t it = -10;
504 Int_t ipre = 0;
814ad4bf 505
229f77c4 506 if (preshower)ipre = 1;
507 if (iphi > 0 && ieta >= 0){
508 it = iphi+ieta*geom->GetNPhi() + ipre*geom->GetNPhi()*geom->GetNZ();
509 return it;
510 }else{
511 cerr << " AliEMCALSDigitizer::Layer2TowerID() -- there is an error "<< endl << "Eta number = "
512 << ieta << "Phi number = " << iphi << endl ;
513 return it;
514 } // end if iphi>0 && ieta>0
814ad4bf 515}
229f77c4 516//_______________________________________________________________________________________
89e103bd 517// void AliEMCALSDigitizer::TestTowerID(void)
518// {
519// Int_t j;
229f77c4 520
89e103bd 521// Bool_t preshower = kFALSE;
522// for (j = 0 ; j < 10 ; j++){ // loop over hit id
523// Int_t i;
524// for (i = 0 ; i <= 2 ; i++){ // loop over
525// Int_t k = i*96*144+j*144+1;
526// cout << " Hit Index = " << k << " " << j*10 << " TOWERID = " << Layer2TowerID(k, preshower) << endl ;
527// }
528// }
529// }