default geant cuts for EMCAL's material: cutele=cutgam=100KeV
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALv2.cxx
CommitLineData
1963b290 1/**************************************************************************
2 * Copyright(c) 1998-2004, 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//*-- Implementation version v2 of EMCAL Manager class
20//*-- An object of this class does not produce digits
21//*-- It is the one to use if you do want to produce outputs in TREEH
22//*--
23//*-- Author: Sahal Yacoob (LBL /UCT)
24//*-- : Jennifer Klay (LBL)
25// This Class not stores information on all particles prior to EMCAL entry - in order to facilitate analysis.
26// This is done by setting fIShunt =2, and flagging all parents of particles entering the EMCAL.
27
28// 15/02/2002 .... Yves Schutz
29// 1. fSamplingFraction and fLayerToPreshowerRatio have been removed
30// 2. Timing signal is collected and added to hit
31
32// --- ROOT system ---
33#include "TParticle.h"
34#include "TVirtualMC.h"
35#include "TBrowser.h"
36#include "TH1.h"
37#include "TH2.h"
38
39// --- Standard library ---
40
41// --- AliRoot header files ---
42#include "AliEMCALv2.h"
43#include "AliEMCALHit.h"
44#include "AliEMCALGeometry.h"
45#include "AliRun.h"
46#include "AliHeader.h"
47#include "AliMC.h"
48#include "AliPoints.h"
49#include "AliEMCALGetter.h"
50// for TRD1,2 case
51
52ClassImp(AliEMCALv2)
53
54 //extern "C" void gdaxis_(float &x0, float &y0, float &z0, float &axsiz);
55
56
57//______________________________________________________________________
58AliEMCALv2::AliEMCALv2():AliEMCALv1(), fGeometry(0){
59 // ctor
60
61}
62
63//______________________________________________________________________
64AliEMCALv2::AliEMCALv2(const char *name, const char *title): AliEMCALv1(name,title) {
65 // Standard Creator.
66
67 // fGeant3 = (TGeant3*)gMC;
68 fHits= new TClonesArray("AliEMCALHit",1000);
69 gAlice->GetMCApp()->AddHitList(fHits);
70
71 fNhits = 0;
72 fIshunt = 2; // All hits are associated with particles entering the calorimeter
73 fTimeCut = 30e-09;
74
75 fGeometry = GetGeometry();
905263da 76 fHDe = fHNhits = 0;
1963b290 77 // if (gDebug>0){
78 if (1){
79 TH1::AddDirectory(0);
80 fHDe = new TH1F("fHDe","De in EMCAL", 1000, 0., 1.);
905263da 81 fHNhits = new TH1F("fHNhits","#hits in EMCAL", 1001, -0.5, 1000.5);
1963b290 82 fHistograms->Add(fHDe);
905263da 83 fHistograms->Add(fHNhits);
1963b290 84 TH1::AddDirectory(1);
85 }
86}
87
88//______________________________________________________________________
89AliEMCALv2::~AliEMCALv2(){
90 // dtor
91
92 if ( fHits) {
93 fHits->Delete();
94 delete fHits;
95 fHits = 0;
96 }
97}
98
99//______________________________________________________________________
100void AliEMCALv2::AddHit(Int_t shunt, Int_t primary, Int_t tracknumber, Int_t iparent, Float_t ienergy,
101 Int_t id, Float_t * hits,Float_t * p){
102 // Add a hit to the hit list.
103 // An EMCAL hit is the sum of all hits in a tower section
104 // originating from the same entering particle
105 static Int_t hitCounter;
106 static AliEMCALHit *newHit, *curHit;
107 static Bool_t deja;
108
109 deja = kFALSE;
110
111 newHit = new AliEMCALHit(shunt, primary, tracknumber, iparent, ienergy, id, hits, p);
112 for ( hitCounter = fNhits-1; hitCounter >= 0 && !deja; hitCounter-- ) {
113 curHit = (AliEMCALHit*) (*fHits)[hitCounter];
114 // We add hits with the same tracknumber, while GEANT treats
115 // primaries succesively
116 if(curHit->GetPrimary() != primary)
117 break;
118 if( *curHit == *newHit ) {
119 *curHit = *curHit + *newHit;
120 deja = kTRUE;
121 // break; // 30-aug-04 by PAI
122 } // end if
123 } // end for hitCounter
124
125 if ( !deja ) {
126 new((*fHits)[fNhits]) AliEMCALHit(*newHit);
127 fNhits++;
128 }
129 // printf(" fNhits %i \n", fNhits);
130 delete newHit;
131}
132//______________________________________________________________________
133void AliEMCALv2::StepManager(void){
134 // Accumulates hits as long as the track stays in a tower
135
136 // position wrt MRS and energy deposited
137 static Float_t xyzte[5]={0.,0.,0.,0.,0.};// position wrt MRS, time and energy deposited
138 static Float_t pmom[4]={0.,0.,0.,0.};
139 static TLorentzVector pos; // Lorentz vector of the track current position.
140 static TLorentzVector mom; // Lorentz vector of the track current momentum.
141 static Float_t ienergy = 0;
142 static TString curVolName;
143 static int supModuleNumber, moduleNumber, yNumber, xNumber, absid;
144 static int keyGeom=0;
145 static char *vn = "SX"; // 15-mar-05
146 static int nSMOP[7]={1,3,5,7,9,11}; // 30-mar-05
147 static int nSMON[7]={2,4,6,8,10,12};
148 static Float_t depositedEnergy=0.0;
149
150 if(keyGeom == 0) {
151 keyGeom = 2;
152 if(gMC->VolId("PBMO")==0 || gMC->VolId("WSUC")==1) {
153 vn = "SCMX"; // old TRD2(TRD1) or WSUC
154 keyGeom = 1;
155 }
156 printf("AliEMCALv2::StepManager(): keyGeom %i : Sensetive volume %s \n",
157 keyGeom, vn);
158 if(gMC->VolId("WSUC")==1) printf(" WSUC - cosmic ray stand geometry \n");
159 }
160 Int_t tracknumber = gAlice->GetMCApp()->GetCurrentTrackNumber();
161
162 curVolName = gMC->CurrentVolName();
163 if(curVolName.Contains(vn)) { // We are in a scintillator layer
164 // printf(" keyGeom %i : Sensetive volume %s (%s) \n", keyGeom, curVolName.Data(), vn);
165
166 if( ((depositedEnergy = gMC->Edep()) > 0.) && (gMC->TrackTime() < fTimeCut)){// Track is inside a scintillator and deposits some energy
167 // Info("StepManager "," entry %i DE %f",++ientry, depositedEnergy); // for testing
168 if (fCurPrimary==-1)
169 fCurPrimary=gAlice->GetMCApp()->GetPrimary(tracknumber);
170
171 if (fCurParent==-1 || tracknumber != fCurTrack) {
172 // Check parentage
173 Int_t parent=tracknumber;
174 if (fCurParent != -1) {
175 while (parent != fCurParent && parent != -1) {
176 TParticle *part=gAlice->GetMCApp()->Particle(parent);
177 parent=part->GetFirstMother();
178 }
179 }
180 if (fCurParent==-1 || parent==-1) {
181 Int_t parent=tracknumber;
182 TParticle *part=gAlice->GetMCApp()->Particle(parent);
183 while (parent != -1 && fGeometry->IsInEMCAL(part->Vx(),part->Vy(),part->Vz())) {
184 parent=part->GetFirstMother();
185 if (parent!=-1)
186 part=gAlice->GetMCApp()->Particle(parent);
187 }
188 fCurParent=parent;
189 if (fCurParent==-1)
190 Error("StepManager","Cannot find parent");
191 else {
192 TParticle *part=gAlice->GetMCApp()->Particle(fCurParent);
193 ienergy = part->Energy();
194 }
195 while (parent != -1) {
196 part=gAlice->GetMCApp()->Particle(parent);
197 part->SetBit(kKeepBit);
198 parent=part->GetFirstMother();
199 }
200 }
201 fCurTrack=tracknumber;
202 }
203 gMC->TrackPosition(pos);
204 xyzte[0] = pos[0];
205 xyzte[1] = pos[1];
206 xyzte[2] = pos[2];
207 xyzte[3] = gMC->TrackTime() ;
208
209 gMC->TrackMomentum(mom);
210 pmom[0] = mom[0];
211 pmom[1] = mom[1];
212 pmom[2] = mom[2];
213 pmom[3] = mom[3];
214
215 // if(ientry%200 > 0) return; // testing
216 supModuleNumber = moduleNumber = yNumber = xNumber = absid = 0;
217 if(keyGeom >= 1) { // old style
218 gMC->CurrentVolOffID(4, supModuleNumber);
219 gMC->CurrentVolOffID(3, moduleNumber);
220 gMC->CurrentVolOffID(1, yNumber);
221 gMC->CurrentVolOffID(0, xNumber); // really x number now
222 } else {
223 gMC->CurrentVolOffID(5, supModuleNumber);
224 gMC->CurrentVolOffID(4, moduleNumber);
225 gMC->CurrentVolOffID(1, yNumber);
226 gMC->CurrentVolOffID(0, xNumber); // really x number now
227 if (strcmp(gMC->CurrentVolOffName(5),"SMOP")==0) supModuleNumber = nSMOP[supModuleNumber-1];
228 else if(strcmp(gMC->CurrentVolOffName(5),"SMON")==0) supModuleNumber = nSMON[supModuleNumber-1];
229 else assert(0); // something wrong
230 }
231 absid = fGeometry->GetAbsCellId(supModuleNumber, moduleNumber, yNumber, xNumber);
232
233 if (absid == -1) Fatal("StepManager()", "Wrong id ") ;
234
235 Float_t lightYield = depositedEnergy ;
236 // Apply Birk's law (copied from G3BIRK)
237
238 if (gMC->TrackCharge()!=0) { // Check
239 Float_t BirkC1_mod = 0;
240 if (fBirkC0==1){ // Apply correction for higher charge states
241 if (TMath::Abs(gMC->TrackCharge())>=2) BirkC1_mod=fBirkC1*7.2/12.6;
242 else BirkC1_mod=fBirkC1;
243 }
244
245 Float_t dedxcm;
246 if (gMC->TrackStep()>0) dedxcm=1000.*gMC->Edep()/gMC->TrackStep();
247 else dedxcm=0;
248 lightYield=lightYield/(1.+BirkC1_mod*dedxcm+fBirkC2*dedxcm*dedxcm);
249 }
250
251 // use sampling fraction to get original energy --HG
252 // xyzte[4] = lightYield * fGeometry->GetSampling();
253 xyzte[4] = lightYield; // 15-dec-04
254
255 if (gDebug == -2)
256 printf("#sm %2i #m %3i #x %1i #z %1i -> absid %i : xyzte[4] = %f\n",
257 supModuleNumber,moduleNumber,yNumber,xNumber,absid, xyzte[4]);
258
259 AddHit(fIshunt, fCurPrimary,tracknumber, fCurParent, ienergy, absid, xyzte, pmom);
260 } // there is deposited energy
261 }
262}
263
264void AliEMCALv2::FinishEvent()
265{ // 26-may-05
266 static double de=0.;
905263da 267 fHNhits->Fill(double(fHits->GetEntries()));
1963b290 268 de = GetDepositEnergy(0);
269 if(fHDe) fHDe->Fill(de);
270}
271
272Double_t AliEMCALv2::GetDepositEnergy(int print)
273{ // 23-mar-05 - for testing
274 if(fHits == 0) return 0.;
275 AliEMCALHit *hit=0;
276 Double_t de=0.;
277 for(int ih=0; ih<fHits->GetEntries(); ih++) {
278 hit = (AliEMCALHit*)fHits->UncheckedAt(ih);
279 de += hit->GetEnergy();
280 }
281 if(print>0) {
282 printf(" #hits %i de %f \n", fHits->GetEntries(), de);
283 if(print>1) {
284 printf(" #primary particles %i\n", gAlice->GetHeader()->GetNprimary());
285 }
286 }
287 return de;
288}
289
290void AliEMCALv2::Browse(TBrowser* b)
291{
292 TObject::Browse(b);
293}
294
295void AliEMCALv2::DrawCalorimeterCut(const char *name, int axis, double dcut)
296{ // Size of tower is 5.6x5.6x24.8 (25.0); cut on Z axiz
297 gMC->Gsatt("*", "seen", 0);
298
299 int fill = 1;
300
301 if(axis!=1) SetVolumeAttributes("STPL", 1, 1, fill);
302
303 int colo=4;
304 TString sn(name);
305 if(sn.Contains("SCM")) colo=5;
306 SetVolumeAttributes(name, 1, colo, fill);
307
905263da 308 TString st(GetTitle());
309 st += ", zcut, ";
1963b290 310 st += name;
311
312 char *optShad = "on", *optHide="on";
313 double cxy=0.02;
314 if (axis==1) {
315 dcut = 0.;
316 // optHide = optShad = "off";
317 } else if(axis==2){
318 if(dcut==0.) SetVolumeAttributes("SCM0", 1, 5, fill); // yellow
319 }
320
321 gMC->Gdopt("hide", optHide);
322 gMC->Gdopt("shad", optShad);
323
324 gROOT->ProcessLine("TGeant3 *g3 = (TGeant3*)gMC");
325 char cmd[200];
326 sprintf(cmd,"g3->Gdrawc(\"XEN1\", %i, %5.1f, 12., 8., %3.2f, %3.2f)\n", axis, dcut, cxy,cxy);
327 printf("\n%s\n",cmd); gROOT->ProcessLine(cmd);
328
329 sprintf(cmd,"gMC->Gdhead(1111, \"%s\")\n", st.Data());
330 printf("%s\n",cmd); gROOT->ProcessLine(cmd);
331}
332
333void AliEMCALv2::DrawSuperModuleCut(const char *name, int axis, double dcut, int fill)
334{ // Size of tower is 5.6x5.6x24.8 (25.0); cut on Z axiz
335 TString sn(GetGeometry()->GetName());
336 sn.ToUpper();
337 char *tit[3]={"xcut", "ycut", "zcut"};
338 if(axis<1) axis=1; if(axis>3) axis=3;
339
340 gMC->Gsatt("*", "seen", 0);
341 // int fill = 6;
342
343 // SetVolumeAttributes("SMOD", 1, 1, fill); // black
344 SetVolumeAttributes(name, 1, 5, fill); // yellow
345
346 double cxy=0.055, x0=10., y0=10.;
347 char *optShad = "on", *optHide="on";
348 if(sn.Contains("TRD1")) {
349 SetVolumeAttributes("STPL", 1, 3, fill); // green
350 if (axis==1) {
351 gMC->Gsatt("STPL", "seen", 0);
352 dcut = 0.;
353 optHide = "off";
354 optShad = "off";
355 } else if(axis==3) cxy = 0.1;
356 } else if(sn.Contains("TRD2")) {
357 y0 = -10.;
358 if (axis==2) cxy=0.06;
359 }
360 gMC->Gdopt("hide", optHide);
361 gMC->Gdopt("shad", optShad);
362
363 TString st("Shish-Kebab, Compact, SMOD, ");
364 if(sn.Contains("TWIST")) st = "Shish-Kebab, Twist, SMOD, ";
365 st += tit[axis-1];;
366
367 gROOT->ProcessLine("TGeant3 *g3 = (TGeant3*)gMC");
368 char cmd[200];
369 sprintf(cmd,"g3->Gdrawc(\"SMOD\", %i, %6.3f, %5.1f, %5.1f, %5.3f, %5.3f)\n",axis,dcut,x0,y0,cxy,cxy);
370 printf("\n%s\n",cmd); gROOT->ProcessLine(cmd);
371
372 sprintf(cmd,"gMC->Gdhead(1111, \"%s\")\n", st.Data());
373 printf("%s\n",cmd); gROOT->ProcessLine(cmd);
374 // hint for testing
375 if(sn.Contains("TRD1")){
376 printf("Begin of super module\n");
377 printf("g3->Gdrawc(\"SMOD\", 2, 0.300, 89., 10., 0.5, 0.5)\n");
378 printf("Center of super modules\n");
379 printf("g3->Gdrawc(\"SMOD\", 2, 0.300, 0., 10., 0.5, 0.5)\n");
380 printf("end of super modules\n");
381 printf("g3->Gdrawc(\"SMOD\", 2, 0.300, -70., 10., 0.5, 0.5)\n");
382 } else if(sn.Contains("TRD2")){
383 printf("Begin of super module ** TRD2 ** \n");
384 printf("g3->Gdrawc(\"SMOD\", 2, 0.00, 40., -80, 0.2, 0.2)\n");
385 printf("end of super modules\n");
386 printf("g3->Gdrawc(\"SMOD\", 2, 0.00, -20., -80, 0.2, 0.2)\n");
387
388 printf(" *** Z cut (Y|X plane)\n scale 0.4\n");
389 printf("g3->Gdrawc(\"SMOD\", 3, -170.,-165.,10.,0.4,0.4)\n");
390 printf(" scale 0.2\n");
391 printf("g3->Gdrawc(\"SMOD\", 3, -170.,-80.,10.,0.2,0.2)\n");
392 printf(" scale 0.12\n");
393 printf("g3->Gdrawc(\"SMOD\", 3, -170.,-45.,10.,0.12,0.12)\n");
394 }
395}
396
397void AliEMCALv2::DrawTowerCut(const char *name, int axis, double dcut, int fill, char *optShad)
398{ // Size of tower is 5.6x5.6x24.8 (25.0); cut on Z axiz
399 if(axis<1) axis=1; if(axis>3) axis=3;
400 TString mn(name); mn.ToUpper();
401 TString sn(GetGeometry()->GetName());
402
403 gMC->Gsatt("*", "seen", 0);
404 gMC->Gsatt("*", "fill", fill);
405
406 // int mainColo=5; // yellow
407 if(mn == "EMOD") {
408 SetVolumeAttributes(mn.Data(), 1, 1, fill);
409 SetVolumeAttributes("SCM0", 1, 5, fill); // yellow
410 SetVolumeAttributes("SCPA", 1, 3, fill); // green - 13-may-05
411 } else if(mn == "SCM0") { // first division
412 SetVolumeAttributes(mn.Data(), 1, 1, fill);
413 SetVolumeAttributes("SCMY", 1, 5, fill); // yellow
414 } else if(mn == "SCMY") { // first division
415 SetVolumeAttributes(mn.Data(), 1, 1, fill);
416 if(sn.Contains("TEST") && sn.Contains("3X3")) {
417 SetVolumeAttributes("SCX1", 1, 5, fill); // yellow
418 SetVolumeAttributes("SCX2", 1, 2, fill); // red
419 SetVolumeAttributes("SCX3", 1, 3, fill); // green
420 } else {
421 SetVolumeAttributes("SCMX", 1, 5, fill); // yellow
422 }
423 } else if(mn == "SCMX" || mn.Contains("SCX")) {
424 SetVolumeAttributes(mn.Data(), 1, 5, fill);// yellow
425 SetVolumeAttributes("PBTI", 1, 4, fill);
426 } else {
427 printf("<W> for volume |%s| did not defined volume attributes\n", mn.Data());
428 }
429
430 // TString st("Shish-Kebab, 2x2 mm sampling, 62 layers, ");
431 TString st("Shashlyk, 2x2 mm sampling, 62 layers, ");
432 if (sn.Contains("25")) st = "Shish-Kebab, 5x5 mm sampling, 25 layers, ";
433 else if(sn.Contains("MAY05")) st = "Shish-Kebab, 5x5 mm sampling, 77 layers, ";
434 if(sn.Contains("TRD1")) st += " TRD1, ";
435 if(sn.Contains("3X3")) st += " 3x3, ";
436 st += name;
437
438 gROOT->ProcessLine("TGeant3 *g3 = (TGeant3*)gMC");
439 double cx=0.78, cy=2.;
440 if (axis==1 && sn.Contains("TRD")==0) {
441 cx = cy = 1.;
442 gMC->Gsatt("PBTI", "seen", 0);
443 } else if (sn.Contains("TEST") && sn.Contains("3X3")) {
444 cx = cy = 0.7;
445 if (axis==3) cx = cy = 1.;
446 } else if (sn.Contains("TRD2")) {
447 if (axis==3) cx = cy = 2.;
448 } else if (mn.Contains("EMOD")) {
449 cx = cy = 0.5;
450 }
451 char cmd[200];
452
453 gMC->Gdopt("hide", optShad);
454 gMC->Gdopt("shad", optShad);
455
456 sprintf(cmd,"g3->Gdrawc(\"%s\", %i, %6.2f, 10., 10., %5.3f, %5.3f)\n",name, axis,dcut,cx,cy);
457 printf("\n%s\n",cmd); gROOT->ProcessLine(cmd);
458
459 sprintf(cmd,"gMC->Gdhead(1111, \"%s\")\n", st.Data());
460 printf("%s\n",cmd); gROOT->ProcessLine(cmd);
461}
462
463void AliEMCALv2::DrawAlicWithHits(int mode)
464{ // 20-sep-04; does not work now
465 static TH2F *h2;
466 if(h2==0) h2 = new TH2F("h2","test fo hits", 60,0.5,60.5, 28,0.5,28.5);
467 else h2->Reset();
468 if(mode==0) {
469 gROOT->ProcessLine("TGeant3 *g3 = (TGeant3*)gMC");
470 gMC->Gsatt("*","seen",0);
471 gMC->Gsatt("scm0","seen",5);
472
473 gROOT->ProcessLine("g3->Gdrawc(\"ALIC\", 1, 2.0, 12., -130, 0.3, 0.3)");
474 // g3->Gdrawc("ALIC", 1, 2.0, 10., -14, 0.05, 0.05)
475 }
476
477 TClonesArray *hits = Hits();
478 Int_t nhits = hits->GetEntries(), absId, nSupMod, nTower, nIphi, nIeta, iphi, ieta;
479 AliEMCALHit *hit = 0;
480 Double_t de, des=0.;
481 for(Int_t i=0; i<nhits; i++) {
482 hit = (AliEMCALHit*)hits->UncheckedAt(i);
483 absId = hit->GetId();
484 de = hit->GetEnergy();
485 des += de;
486 if(fGeometry->GetCellIndex(absId, nSupMod, nTower, nIphi, nIeta)){
487 // printf(" de %f abs id %i smod %i tower %i | cell iphi %i : ieta %i\n",
488 // de, absId, nSupMod, nTower, nIphi, nIeta);
489 if(nSupMod==3) {
490 fGeometry->GetCellPhiEtaIndexInSModule(nTower,nIphi,nIeta, iphi,ieta);
491 // printf(" iphi %i : ieta %i\n", iphi,ieta);
492 h2->Fill(double(ieta),double(iphi), de);
493 }
494 }
495 // hit->Dump();
496 }
497 printf(" #hits %i : sum de %f -> %f \n", nhits, des, h2->Integral());
498 if(mode>0 && h2->Integral()>0.) h2->Draw();
499}
500
501void AliEMCALv2::SetVolumeAttributes(const char *name,const int seen, const int color, const int fill)
502{
503 /* seen=-2:volume is visible but none of its descendants;
504 -1:volume is not visible together with all its descendants;
505 0:volume is not visible;
506 1:volume is visible. */
507 gMC->Gsatt(name, "seen", seen);
508 gMC->Gsatt(name, "colo", color);
509 gMC->Gsatt(name, "fill", fill);
510 printf(" %s : seen %i color %i fill %i \n", name, seen, color, fill);
511}
512
513void AliEMCALv2::TestIndexTransition(int pri, int idmax)
514{ // for EMCAL_SHISH geometry
515 TString sn(fGeometry->GetName());
516 if(!sn.Contains("SHISH")) {
517 printf("Wrong geometry |%s| ! Bye \n", sn.Data());
518 return;
519 }
520
521 Int_t nSupMod, nTower, nIphi, nIeta, idNew, nGood=0;
522 if(idmax==0) idmax = fGeometry->GetNCells();
523 for(Int_t id=1; id<=idmax; id++) {
524 if(!fGeometry->GetCellIndex(id, nSupMod, nTower, nIphi, nIeta)){
525 printf(" Wrong abs ID %i : #cells %i\n", id, fGeometry->GetNCells());
526 break;
527 }
528 idNew = fGeometry->GetAbsCellId(nSupMod, nTower, nIphi, nIeta);
529 if(id != idNew || pri>0) {
530 printf(" ID %i : %i <- new id\n", id, idNew);
531 printf(" nSupMod %i ", nSupMod);
532 printf(" nTower %i ", nTower);
533 printf(" nIphi %i ", nIphi);
534 printf(" nIeta %i \n", nIeta);
535
536 } else nGood++;
537 }
538 printf(" Good decoding %i : %i <- #cells \n", nGood, fGeometry->GetNCells());
539}
540
541/* try to draw hits
542 gMC->Gsatt("*","seen",0);
543 gMC->Gsatt("scm0","seen",5);
544 g3->Gdrawc("alic", 1, 2.0, 12., -125, 0.3, 0.3);
545*/
546//void AliEMCALv2::Gdaxis(float x0, float y0, float z0, float <axsiz) {gdaxis_(x0,y0,z0,axsiz);}
547
548/*
549
550void AliEMCALv2::RemapTrackHitIDs(Int_t *map) {
551 // remap track index numbers for primary and parent indices
552 // (Called by AliStack::PurifyKine)
553 if (Hits()==0)
554 return;
555 TIter hit_it(Hits());
556 Int_t i_hit=0;
557 while (AliEMCALHit *hit=dynamic_cast<AliEMCALHit*>(hit_it()) ) {
558 if (map[hit->GetIparent()]==-99)
559 cout << "Remapping, found -99 for parent id " << hit->GetIparent() << ", " << map[hit->GetIparent()] << ", i_hit " << i_hit << endl;
560 hit->SetIparent(map[hit->GetIparent()]);
561 if (map[hit->GetPrimary()]==-99)
562 cout << "Remapping, found -99 for primary id " << hit->GetPrimary() << ", " << map[hit->GetPrimary()] << ", i_hit " << i_hit << endl;
563 hit->SetPrimary(map[hit->GetPrimary()]);
564 i_hit++;
565 }
566}
567
568void AliEMCALv2::FinishPrimary() {
569 fCurPrimary=-1;
570 fCurParent=-1;
571 fCurTrack=-1;
572}
573*/