]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSReconstructor.cxx
new amplitude calibration up to 50 MIPs
[u/mrichter/AliRoot.git] / PHOS / AliPHOSReconstructor.cxx
CommitLineData
d15a28e7 1/**************************************************************************
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
b2a60966 16/* $Id$ */
17
d15a28e7 18//_________________________________________________________________________
a5e00016 19//--
20//-- Yves Schutz (SUBATECH)
dfe0be07 21// Reconstruction class. Redesigned from the old AliReconstructionner class and
22// derived from STEER/AliReconstructor.
23//
d15a28e7 24// --- ROOT system ---
bb5c37a5 25#include "TGeoManager.h"
26#include "TGeoMatrix.h"
00cfce1d 27
d15a28e7 28// --- Standard library ---
364de5c6 29
d15a28e7 30// --- AliRoot header files ---
9a2cdbdf 31#include "AliLog.h"
b3006690 32#include "AliAltroMapping.h"
af885e0f 33#include "AliESDEvent.h"
33ba95c3 34#include "AliESDCaloCluster.h"
a5e00016 35#include "AliESDCaloCells.h"
f444a19f 36#include "AliPHOSReconstructor.h"
7acf6008 37#include "AliPHOSClusterizerv1.h"
7acf6008 38#include "AliPHOSTrackSegmentMakerv1.h"
39#include "AliPHOSPIDv1.h"
23904d16 40#include "AliPHOSTracker.h"
d22dd3b4 41#include "AliRawReader.h"
d3aa2291 42#include "AliPHOSCalibData.h"
7e88424f 43#include "AliCDBEntry.h"
44#include "AliCDBManager.h"
64df000d 45#include "AliPHOSTrigger.h"
46#include "AliPHOSGeometry.h"
9a2cdbdf 47#include "AliPHOSDigit.h"
48#include "AliPHOSTrackSegment.h"
49#include "AliPHOSEmcRecPoint.h"
50#include "AliPHOSRecParticle.h"
379c5c09 51#include "AliPHOSRawFitterv0.h"
52#include "AliPHOSRawFitterv1.h"
53#include "AliPHOSRawFitterv2.h"
9a2cdbdf 54#include "AliPHOSRawDigiProducer.h"
55#include "AliPHOSPulseGenerator.h"
e957fea8 56
f444a19f 57ClassImp(AliPHOSReconstructor)
d15a28e7 58
2e60107f 59Bool_t AliPHOSReconstructor::fgDebug = kFALSE ;
6483babc 60TClonesArray* AliPHOSReconstructor::fgDigitsArray = 0; // Array of PHOS digits
61TObjArray* AliPHOSReconstructor::fgEMCRecPoints = 0; // Array of EMC rec.points
d3aa2291 62AliPHOSCalibData * AliPHOSReconstructor::fgCalibData = 0 ;
63
2e60107f 64
d15a28e7 65//____________________________________________________________________________
9a2cdbdf 66AliPHOSReconstructor::AliPHOSReconstructor() :
dcab1c7e 67 fGeom(NULL),fClusterizer(NULL),fTSM(NULL),fPID(NULL)
d15a28e7 68{
b2a60966 69 // ctor
8d8258f6 70 fGeom = AliPHOSGeometry::GetInstance("IHEP","");
dcab1c7e 71 fClusterizer = new AliPHOSClusterizerv1 (fGeom);
72 fTSM = new AliPHOSTrackSegmentMakerv1(fGeom);
73 fPID = new AliPHOSPIDv1 (fGeom);
6483babc 74 fgDigitsArray = new TClonesArray("AliPHOSDigit",100);
75 fgEMCRecPoints= new TObjArray(100) ;
d3aa2291 76 if (!fgCalibData)
77 fgCalibData = new AliPHOSCalibData(-1); //use AliCDBManager's run number
78
e68222ce 79}
6ad0bfa0 80
0379a13e 81//____________________________________________________________________________
82 AliPHOSReconstructor::~AliPHOSReconstructor()
83{
84 // dtor
9a2cdbdf 85 delete fGeom;
8d8258f6 86 delete fClusterizer;
dcab1c7e 87 delete fTSM;
88 delete fPID;
6483babc 89 delete fgDigitsArray;
90 delete fgEMCRecPoints;
0379a13e 91}
7acf6008 92
7acf6008 93//____________________________________________________________________________
9a2cdbdf 94void AliPHOSReconstructor::Reconstruct(TTree* digitsTree, TTree* clustersTree) const
35293055 95{
9a2cdbdf 96 // 'single-event' local reco method called by AliReconstruction;
dfe0be07 97 // Only the clusterization is performed,; the rest of the reconstruction is done in FillESD because the track
af885e0f 98 // segment maker needs access to the AliESDEvent object to retrieve the tracks reconstructed by
dfe0be07 99 // the global tracking.
9a2cdbdf 100
7e88424f 101 fClusterizer->InitParameters();
8d8258f6 102 fClusterizer->SetInput(digitsTree);
103 fClusterizer->SetOutput(clustersTree);
a68156e6 104 if ( Debug() )
8d8258f6 105 fClusterizer->Digits2Clusters("deb all") ;
a68156e6 106 else
8d8258f6 107 fClusterizer->Digits2Clusters("") ;
a68156e6 108}
109
110//____________________________________________________________________________
9a2cdbdf 111void AliPHOSReconstructor::FillESD(TTree* digitsTree, TTree* clustersTree,
112 AliESDEvent* esd) const
a68156e6 113{
9a2cdbdf 114 // This method produces PHOS rec-particles,
115 // then it creates AliESDtracks out of them and
116 // write tracks to the ESD
117
e68222ce 118
9a2cdbdf 119 // do current event; the loop over events is done by AliReconstruction::Run()
dcab1c7e 120 fTSM->SetESD(esd) ;
121 fTSM->SetInput(clustersTree);
9a2cdbdf 122 if ( Debug() )
dcab1c7e 123 fTSM->Clusters2TrackSegments("deb all") ;
9a2cdbdf 124 else
dcab1c7e 125 fTSM->Clusters2TrackSegments("") ;
35293055 126
71994f35 127 fPID->SetEnergyCorrectionOn(GetRecoParam()->GetEMCEnergyCorrectionOn());
128
dcab1c7e 129 fPID->SetInput(clustersTree, fTSM->GetTrackSegments()) ;
130 fPID->SetESD(esd) ;
dfe0be07 131 if ( Debug() )
dcab1c7e 132 fPID->TrackSegments2RecParticles("deb all") ;
dfe0be07 133 else
dcab1c7e 134 fPID->TrackSegments2RecParticles("") ;
7acf6008 135
dcab1c7e 136 TClonesArray *recParticles = fPID->GetRecParticles();
137 Int_t nOfRecParticles = recParticles->GetEntriesFast();
a5fa6165 138
85c60a8e 139 esd->SetNumberOfPHOSClusters(nOfRecParticles) ;
dd7ee508 140 esd->SetFirstPHOSCluster(esd->GetNumberOfCaloClusters()) ;
a5e00016 141
9a2cdbdf 142 AliDebug(2,Form("%d rec. particles, option %s",nOfRecParticles,GetOption()));
a5e00016 143
144 // Read digits array
145
146 TBranch *branch = digitsTree->GetBranch("PHOS");
147 if (!branch) {
148 AliError("can't get the branch with the PHOS digits !");
149 return;
150 }
6483babc 151 branch->SetAddress(&fgDigitsArray);
a5e00016 152 branch->GetEntry(0);
153
154 // Get the clusters array
155
156 TBranch *emcbranch = clustersTree->GetBranch("PHOSEmcRP");
157 if (!emcbranch) {
158 AliError("can't get the branch with the PHOS EMC clusters !");
159 return;
160 }
161
6483babc 162 emcbranch->SetAddress(&fgEMCRecPoints);
a5e00016 163 emcbranch->GetEntry(0);
8013c27e 164
64df000d 165 //#########Calculate trigger and set trigger info###########
a5e00016 166
64df000d 167 AliPHOSTrigger tr ;
168 // tr.SetPatchSize(1);//create 4x4 patches
bfae5a5d 169 tr.SetSimulation(kFALSE);
6483babc 170 tr.Trigger(fgDigitsArray);
64df000d 171
172 Float_t maxAmp2x2 = tr.Get2x2MaxAmplitude();
173 Float_t maxAmpnxn = tr.GetnxnMaxAmplitude();
174 Float_t ampOutOfPatch2x2 = tr.Get2x2AmpOutOfPatch() ;
175 Float_t ampOutOfPatchnxn = tr.GetnxnAmpOutOfPatch() ;
176
64df000d 177 Int_t iSM2x2 = tr.Get2x2SuperModule();
178 Int_t iSMnxn = tr.GetnxnSuperModule();
179 Int_t iCrystalPhi2x2 = tr.Get2x2CrystalPhi();
180 Int_t iCrystalPhinxn = tr.GetnxnCrystalPhi();
181 Int_t iCrystalEta2x2 = tr.Get2x2CrystalEta();
182 Int_t iCrystalEtanxn = tr.GetnxnCrystalEta();
183
a5e00016 184 AliDebug(2, Form("Trigger 2x2 max amp %f, out amp %f, SM %d, iphi %d ieta %d",
185 maxAmp2x2, ampOutOfPatch2x2, iSM2x2,iCrystalPhi2x2, iCrystalEta2x2));
186 AliDebug(2, Form("Trigger 4x4 max amp %f , out amp %f, SM %d, iphi %d, ieta %d",
187 maxAmpnxn, ampOutOfPatchnxn, iSMnxn,iCrystalPhinxn, iCrystalEtanxn));
64df000d 188
bfae5a5d 189 // Attention! PHOS modules in order to calculate AbsId need to be 1-5 not 0-4 as returns trigger.
190 Int_t iRelId2x2 []= {iSM2x2+1,0,iCrystalPhi2x2,iCrystalEta2x2};
64df000d 191 Int_t iAbsId2x2 =-1;
bfae5a5d 192 Int_t iRelIdnxn []= {iSMnxn+1,0,iCrystalPhinxn,iCrystalEtanxn};
64df000d 193 Int_t iAbsIdnxn =-1;
194 TVector3 pos2x2(-1,-1,-1);
195 TVector3 posnxn(-1,-1,-1);
9a2cdbdf 196 fGeom->RelToAbsNumbering(iRelId2x2, iAbsId2x2);
197 fGeom->RelToAbsNumbering(iRelIdnxn, iAbsIdnxn);
198 fGeom->RelPosInAlice(iAbsId2x2, pos2x2);
199 fGeom->RelPosInAlice(iAbsIdnxn, posnxn);
64df000d 200
201 TArrayF triggerPosition(6);
202 triggerPosition[0] = pos2x2(0) ;
203 triggerPosition[1] = pos2x2(1) ;
204 triggerPosition[2] = pos2x2(2) ;
205 triggerPosition[3] = posnxn(0) ;
206 triggerPosition[4] = posnxn(1) ;
207 triggerPosition[5] = posnxn(2) ;
208
209 TArrayF triggerAmplitudes(4);
210 triggerAmplitudes[0] = maxAmp2x2 ;
211 triggerAmplitudes[1] = ampOutOfPatch2x2 ;
212 triggerAmplitudes[2] = maxAmpnxn ;
213 triggerAmplitudes[3] = ampOutOfPatchnxn ;
214
215 //esd->SetPHOSTriggerCells(triggerPosition);
216 esd->AddPHOSTriggerPosition(triggerPosition);
217 esd->AddPHOSTriggerAmplitudes(triggerAmplitudes);
218
e68222ce 219
a5e00016 220 //########################################
221 //############# Fill CaloCells ###########
222 //########################################
223
6483babc 224 Int_t nDigits = fgDigitsArray->GetEntries();
a5e00016 225 Int_t idignew = 0 ;
226 AliDebug(1,Form("%d digits",nDigits));
227
228 const Int_t knEMC = fGeom->GetNModules()*fGeom->GetNPhi()*fGeom->GetNZ();
229 AliESDCaloCells &phsCells = *(esd->GetPHOSCells());
230 phsCells.CreateContainer(nDigits);
231 phsCells.SetType(AliESDCaloCells::kPHOSCell);
232
233 // Add to CaloCells only EMC digits with non-zero energy
234 for (Int_t idig = 0 ; idig < nDigits ; idig++) {
6483babc 235 const AliPHOSDigit * dig = (const AliPHOSDigit*)fgDigitsArray->At(idig);
12dd7f10 236 if(dig->GetId() <= knEMC &&
237 Calibrate(dig->GetEnergy(),dig->GetId()) > GetRecoParam()->GetEMCMinE() ){
6f47f50d 238 phsCells.SetCell(idignew,dig->GetId(), Calibrate(dig->GetEnergy(),dig->GetId()),
239 CalibrateT(dig->GetTime(),dig->GetId()));
a5e00016 240 idignew++;
241 }
e68222ce 242 }
a5e00016 243 phsCells.SetNumberOfCells(idignew);
244 phsCells.Sort();
e68222ce 245
a5e00016 246 //########################################
247 //############## Fill CaloClusters #######
248 //########################################
f4e0dd30 249
dfe0be07 250 for (Int_t recpart = 0 ; recpart < nOfRecParticles ; recpart++) {
a5e00016 251 AliPHOSRecParticle *rp = dynamic_cast<AliPHOSRecParticle*>(recParticles->At(recpart));
dfe0be07 252 if (Debug())
253 rp->Print();
25ed816e 254 // Get track segment and EMC rec.point associated with this rec.particle
dcab1c7e 255 AliPHOSTrackSegment *ts = static_cast<AliPHOSTrackSegment *>(fTSM->GetTrackSegments()
a5e00016 256 ->At(rp->GetPHOSTSIndex()));
9a2cdbdf 257
6483babc 258 AliPHOSEmcRecPoint *emcRP = static_cast<AliPHOSEmcRecPoint *>(fgEMCRecPoints->At(ts->GetEmcIndex()));
25ed816e 259 AliESDCaloCluster *ec = new AliESDCaloCluster() ;
e68222ce 260
85c60a8e 261 Float_t xyz[3];
8013c27e 262 for (Int_t ixyz=0; ixyz<3; ixyz++)
263 xyz[ixyz] = rp->GetPos()[ixyz];
dd7ee508 264
265 AliDebug(2,Form("Global position xyz=(%f,%f,%f)",xyz[0],xyz[1],xyz[2]));
77ea1c6f 266
a5e00016 267 // Create cell lists
268
269 Int_t cellMult = emcRP->GetDigitsMultiplicity();
270 Int_t *digitsList = emcRP->GetDigitsList();
271 Float_t *rpElist = emcRP->GetEnergiesList() ;
272 UShort_t *absIdList = new UShort_t[cellMult];
273 Double_t *fracList = new Double_t[cellMult];
274
275 for (Int_t iCell=0; iCell<cellMult; iCell++) {
6483babc 276 AliPHOSDigit *digit = static_cast<AliPHOSDigit *>(fgDigitsArray->At(digitsList[iCell]));
a5e00016 277 absIdList[iCell] = (UShort_t)(digit->GetId());
278 if (digit->GetEnergy() > 0)
d3aa2291 279 fracList[iCell] = rpElist[iCell]/(Calibrate(digit->GetEnergy(),digit->GetId()));
a5e00016 280 else
281 fracList[iCell] = 0;
25ed816e 282 }
77ea1c6f 283
7592dfc4 284 //Primaries
285 Int_t primMult = 0;
4dd59c4a 286 Int_t *primList = emcRP->GetPrimaries(primMult);
a5e00016 287
48c5db5b 288 Float_t energy;
7e88424f 289 if (GetRecoParam()->EMCEcore2ESD())
48c5db5b 290 energy = emcRP->GetCoreEnergy();
291 else
292 energy = rp->Energy();
293
7592dfc4 294 // fills the ESDCaloCluster
8ada0ffe 295 ec->SetClusterType(AliESDCaloCluster::kPHOSCluster);
a5e00016 296 ec->SetPosition(xyz); //rec.point position in MARS
48c5db5b 297 ec->SetE(energy); //total or core particle energy
25ed816e 298 ec->SetClusterDisp(emcRP->GetDispersion()); //cluster dispersion
e68222ce 299 ec->SetPid(rp->GetPID()) ; //array of particle identification
25ed816e 300 ec->SetM02(emcRP->GetM2x()) ; //second moment M2x
301 ec->SetM20(emcRP->GetM2z()) ; //second moment M2z
302 ec->SetNExMax(emcRP->GetNExMax()); //number of local maxima
a5e00016 303 ec->SetEmcCpvDistance(ts->GetCpvDistance("r")); //Only radius, what about separate x,z????
25ed816e 304 ec->SetClusterChi2(-1); //not yet implemented
6f47f50d 305 ec->SetTOF(emcRP->GetTime()); //Time of flight - already calibrated in EMCRecPoint
78902954 306
a5e00016 307 //Cells contributing to clusters
308 ec->SetNCells(cellMult);
309 ec->SetCellsAbsId(absIdList);
310 ec->SetCellsAmplitudeFraction(fracList);
7592dfc4 311
3744a6cf 312 //Distance to the nearest bad crystal
313 ec->SetDistanceToBadChannel(emcRP->GetDistanceToBadCrystal());
7592dfc4 314
315 //Array of MC indeces
4dd59c4a 316 TArrayI arrayPrim(primMult,primList);
7592dfc4 317 ec->AddLabels(arrayPrim);
64df000d 318
e44c41e9 319 //Matched ESD track
320 TArrayI arrayTrackMatched(1);
321 arrayTrackMatched[0]= ts->GetTrackIndex();
322 ec->AddTracksMatched(arrayTrackMatched);
323
85c60a8e 324 esd->AddCaloCluster(ec);
9a2cdbdf 325 delete ec;
091d150a 326 delete [] fracList;
327 delete [] absIdList;
e68222ce 328 }
6483babc 329 fgDigitsArray ->Delete();
330 fgEMCRecPoints->Delete();
331 recParticles ->Delete();
bb5c37a5 332
333 //Store PHOS misalignment matrixes
334 FillMisalMatrixes(esd) ;
335
dd7ee508 336}
337
e68222ce 338//____________________________________________________________________________
d76c31f4 339AliTracker* AliPHOSReconstructor::CreateTracker() const
dd7ee508 340{
9a2cdbdf 341 // creates the PHOS tracker
342 return new AliPHOSTracker();
343}
dd7ee508 344
1267d56d 345//____________________________________________________________________________
9a2cdbdf 346void AliPHOSReconstructor::ConvertDigits(AliRawReader* rawReader, TTree* digitsTree) const
347{
348 // Converts raw data to
349 // PHOS digits
350 // Works on a single-event basis
9a2cdbdf 351 rawReader->Reset() ;
dd7ee508 352
379c5c09 353 AliPHOSRawFitterv0 * fitter ;
77ea1c6f 354
7e88424f 355 const TObjArray* maps = AliPHOSRecoParam::GetMappings();
b3006690 356 if(!maps) AliFatal("Cannot retrieve ALTRO mappings!!");
357
47ba0d5d 358 AliAltroMapping *mapping[20];
359 for(Int_t i = 0; i < 20; i++) {
b3006690 360 mapping[i] = (AliAltroMapping*)maps->At(i);
361 }
362
379c5c09 363 if (strcmp(GetRecoParam()->EMCFitterVersion(),"v1")==0)
364 fitter=new AliPHOSRawFitterv1();
365 else if (strcmp(GetRecoParam()->EMCFitterVersion(),"v2")==0)
366 fitter=new AliPHOSRawFitterv2();
7e88424f 367 else
379c5c09 368 fitter=new AliPHOSRawFitterv0();
77ea1c6f 369
379c5c09 370 fitter->SubtractPedestals(GetRecoParam()->EMCSubtractPedestals());
371 fitter->SetAmpOffset (GetRecoParam()->GetGlobalAltroOffset());
372 fitter->SetAmpThreshold (GetRecoParam()->GetGlobalAltroThreshold());
8be3a30a 373
9a2cdbdf 374 TClonesArray *digits = new TClonesArray("AliPHOSDigit",1);
375 digits->SetName("DIGITS");
376 Int_t bufsize = 32000;
377 digitsTree->Branch("PHOS", &digits, bufsize);
dd7ee508 378
379c5c09 379 AliPHOSRawDigiProducer rdp(rawReader,mapping);
8be3a30a 380
379c5c09 381 rdp.SetEmcMinAmp(GetRecoParam()->GetEMCRawDigitThreshold()); // in ADC
382 rdp.SetCpvMinAmp(GetRecoParam()->GetCPVMinE());
383 rdp.SetSampleQualityCut(GetRecoParam()->GetEMCSampleQualityCut());
384 rdp.MakeDigits(digits,fitter);
77ea1c6f 385
379c5c09 386 delete fitter ;
7592dfc4 387
379c5c09 388 if (AliLog::GetGlobalDebugLevel() == 1) {
389 Int_t modMax=-111;
390 Int_t colMax=-111;
391 Int_t rowMax=-111;
392 Float_t eMax=-333;
393 //!!!for debug!!!
394
395 Int_t relId[4];
396 for(Int_t iDigit=0; iDigit<digits->GetEntries(); iDigit++) {
397 AliPHOSDigit* digit = (AliPHOSDigit*)digits->At(iDigit);
398 if(digit->GetEnergy()>eMax) {
399 fGeom->AbsToRelNumbering(digit->GetId(),relId);
400 eMax=digit->GetEnergy();
401 modMax=relId[0];
402 rowMax=relId[2];
403 colMax=relId[3];
404 }
dd7ee508 405 }
379c5c09 406
407 AliDebug(1,Form("Digit with max. energy: modMax %d colMax %d rowMax %d eMax %f\n\n",
408 modMax,colMax,rowMax,eMax));
dd7ee508 409 }
410
9a2cdbdf 411 digitsTree->Fill();
e68222ce 412 digits->Delete();
413 delete digits;
d7d3b67b 414}
d3aa2291 415//==================================================================================
416Float_t AliPHOSReconstructor::Calibrate(Float_t amp, Int_t absId)const{
417 // Calibrate EMC digit, i.e. multiply its Amp by a factor read from CDB
418
419 const AliPHOSGeometry *geom = AliPHOSGeometry::GetInstance() ;
420
421 //Determine rel.position of the cell absolute ID
422 Int_t relId[4];
423 geom->AbsToRelNumbering(absId,relId);
424 Int_t module=relId[0];
425 Int_t row =relId[2];
426 Int_t column=relId[3];
427 if(relId[1]){ //CPV
428 Float_t calibration = fgCalibData->GetADCchannelCpv(module,column,row);
429 return amp*calibration ;
430 }
431 else{ //EMC
432 Float_t calibration = fgCalibData->GetADCchannelEmc(module,column,row);
433 return amp*calibration ;
434 }
435}
bb5c37a5 436//==================================================================================
6f47f50d 437Float_t AliPHOSReconstructor::CalibrateT(Float_t time, Int_t absId)const{
438 // Calibrate EMC digit, i.e. multiply its Amp by a factor read from CDB
439
440 const AliPHOSGeometry *geom = AliPHOSGeometry::GetInstance() ;
441
442 //Determine rel.position of the cell absolute ID
443 Int_t relId[4];
444 geom->AbsToRelNumbering(absId,relId);
445 Int_t module=relId[0];
446 Int_t row =relId[2];
447 Int_t column=relId[3];
448 if(relId[1]){ //CPV
449 return 0. ;
450 }
451 else{ //EMC
452 time += fgCalibData->GetTimeShiftEmc(module,column,row);
453 return time ;
454 }
455}
456//==================================================================================
bb5c37a5 457void AliPHOSReconstructor::FillMisalMatrixes(AliESDEvent* esd)const{
458 //Store PHOS matrixes in ESD Header
459
460 //Check, if matrixes was already stored
461 for(Int_t mod=0 ;mod<5; mod++){
462 if(esd->GetPHOSMatrix(mod)!=0)
463 return ;
464 }
465
466 //Create and store matrixes
467 if(!gGeoManager){
468 AliError("Can not store misal. matrixes: no gGeoManager! \n") ;
469 return ;
470 }
471 //Note, that owner of copied marixes will be header
472 char path[255] ;
473 TGeoHMatrix * m ;
474 for(Int_t mod=0; mod<5; mod++){
475 sprintf(path,"/ALIC_1/PHOS_%d",mod+1) ; //In Geometry modules numbered 1,2,.,5
476 if (gGeoManager->cd(path)){
477 m = gGeoManager->GetCurrentMatrix() ;
478 esd->SetPHOSMatrix(new TGeoHMatrix(*m),mod) ;
479 }
480 else{
481 esd->SetPHOSMatrix(NULL,mod) ;
482 }
483 }
484
485}
d3aa2291 486
487