From a6bf15effe2332abd8b7a6d55955d4198dc2ebfc Mon Sep 17 00:00:00 2001 From: gconesab Date: Thu, 11 Feb 2010 09:17:42 +0000 Subject: [PATCH] Update testing macro with access to geometry to get cell indices, correct place of parenthesis when getting the list of primaries contributing to the cluster --- EMCAL/macros/TestESD.C | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/EMCAL/macros/TestESD.C b/EMCAL/macros/TestESD.C index e8b3ce964b4..05931382570 100644 --- a/EMCAL/macros/TestESD.C +++ b/EMCAL/macros/TestESD.C @@ -37,6 +37,9 @@ Bool_t kPrintClusterCells = kFALSE; void TestESD() { + TGeoManager::Import("geometry.root"); + AliEMCALGeometry *geom = AliEMCALGeometry::GetInstance("EMCAL_COMPLETE") ; + TFile* f = new TFile("AliESDs.root"); TTree* esdTree = (TTree*)f->Get("esdTree"); @@ -101,7 +104,7 @@ void TestESD() { //For later: ADD CHECK THAT CLUSTER IS WITHIN SM FIDUCIAL VOLUME cout << "Cluster: " << icl+1 << "/" << nclus << " Energy: " << energy << " Phi: " - << cphi << " Eta: " << ceta << " NCells: " << nCells << " #Matches: " << nMatched + << cphi*TMath::RadToDeg() << " Eta: " << ceta << " NCells: " << nCells << " #Matches: " << nMatched << " Index: " << trackIndex << " #Labels: " << nLabels << " Index: " << labelIndex << endl; @@ -136,6 +139,22 @@ void TestESD() { Float_t amp = cells.GetCellAmplitude(absId) ; Float_t time = cells.GetCellTime(absId); cout<<" Cluster Cell: AbsID : "<< absId << "; Amplitude "<< amp << "; Fraction "<GetCellIndex(absId,iSupMod,iTower,iIphi,iIeta); + //Gives SuperModule and Tower numbers + geom->GetCellPhiEtaIndexInSModule(iSupMod,iTower, + iIphi, iIeta,iphi,ieta); + //Gives label of cell in eta-phi position per each supermodule + cout<< "SModule "<= 0 && labelIndex < stack->GetNtrack()){ TParticle * particle = stack->Particle(labelIndex); //Print primary values - cout<<" More contributing primary: "<GetName()<< "; Energy "<Energy()<GetName()<< "; Energy "<Energy()<<"; Eta "<Eta()<<"; Phi "<Phi()*TMath::RadToDeg()<Particle(clus->(GetLabels()->At(i))); + particle = stack->Particle((clus->GetLabels())->At(i)); cout<<" Other contributing primary: "<GetName()<< "; Energy "<Energy()<