From 9286201303faf22df30f835f6aa39b6517513db8 Mon Sep 17 00:00:00 2001 From: schutz Date: Wed, 2 Feb 2000 23:35:04 +0000 Subject: [PATCH] Modifications to follow the Coding Convention Rules (make check) --- PHOS/AliPHOS.cxx | 207 ++++---- PHOS/AliPHOSAnalyze.cxx | 601 ++++++++++++++------- PHOS/AliPHOSAnalyze.h | 26 +- PHOS/AliPHOSClusterizer.h | 2 + PHOS/AliPHOSClusterizerv1.cxx | 38 +- PHOS/AliPHOSClusterizerv1.h | 6 +- PHOS/AliPHOSDigit.h | 2 - PHOS/AliPHOSEmcRecPoint.cxx | 178 +++---- PHOS/AliPHOSEmcRecPoint.h | 4 +- PHOS/AliPHOSGeometry.cxx | 226 ++++---- PHOS/AliPHOSLink.h | 2 - PHOS/AliPHOSParticleGuesserv1.h | 7 +- PHOS/AliPHOSPpsdRecPoint.cxx | 64 +-- PHOS/AliPHOSPpsdRecPoint.h | 3 - PHOS/AliPHOSRecParticle.cxx | 8 +- PHOS/AliPHOSRecParticle.h | 4 +- PHOS/AliPHOSRecPoint.cxx | 62 +-- PHOS/AliPHOSRecPoint.h | 2 - PHOS/AliPHOSReconstructioner.cxx | 1 + PHOS/AliPHOSReconstructioner.h | 5 +- PHOS/AliPHOSTrackSegment.cxx | 94 ++-- PHOS/AliPHOSTrackSegment.h | 10 +- PHOS/AliPHOSTrackSegmentMaker.h | 10 +- PHOS/AliPHOSTrackSegmentMakerv1.cxx | 320 ++++++------ PHOS/AliPHOSTrackSegmentMakerv1.h | 4 +- PHOS/AliPHOSv0.cxx | 782 ++++++++++++++-------------- PHOS/AliPHOSv0.h | 4 +- PHOS/Makefile | 4 +- PHOS/PHOSLinkDef.h | 2 +- PHOS/canevas.h | 4 +- 30 files changed, 1439 insertions(+), 1243 deletions(-) diff --git a/PHOS/AliPHOS.cxx b/PHOS/AliPHOS.cxx index 0ea0a1bc26d..555f66a2548 100644 --- a/PHOS/AliPHOS.cxx +++ b/PHOS/AliPHOS.cxx @@ -56,49 +56,49 @@ void AliPHOS::CreateMaterials() // DEFINITION OF PHOS MATERIALS // --- The PbWO4 crystals --- - Float_t AX[3] = {207.19, 183.85, 16.0} ; - Float_t ZX[3] = {82.0, 74.0, 8.0} ; - Float_t WX[3] = {1.0, 1.0, 4.0} ; - Float_t DX = 8.28 ; + Float_t aX[3] = {207.19, 183.85, 16.0} ; + Float_t zX[3] = {82.0, 74.0, 8.0} ; + Float_t wX[3] = {1.0, 1.0, 4.0} ; + Float_t dX = 8.28 ; - AliMixture(0, "PbWO4$", AX, ZX, DX, -3, WX) ; + AliMixture(0, "PbWO4$", aX, zX, dX, -3, wX) ; // --- The polysterene scintillator (CH) --- - Float_t AP[2] = {12.011, 1.00794} ; - Float_t ZP[2] = {6.0, 1.0} ; - Float_t WP[2] = {1.0, 1.0} ; - Float_t DP = 1.032 ; + Float_t aP[2] = {12.011, 1.00794} ; + Float_t zP[2] = {6.0, 1.0} ; + Float_t wP[2] = {1.0, 1.0} ; + Float_t dP = 1.032 ; - AliMixture(1, "Polystyrene$", AP, ZP, DP, -2, WP) ; + AliMixture(1, "Polystyrene$", aP, zP, dP, -2, wP) ; // --- Aluminium --- AliMaterial(2, "Al$", 26.98, 13., 2.7, 8.9, 999., 0, 0) ; // --- Absorption length is ignored ^ // --- Tyvek (CnH2n) --- - Float_t AT[2] = {12.011, 1.00794} ; - Float_t ZT[2] = {6.0, 1.0} ; - Float_t WT[2] = {1.0, 2.0} ; - Float_t DT = 0.331 ; + Float_t aT[2] = {12.011, 1.00794} ; + Float_t zT[2] = {6.0, 1.0} ; + Float_t wT[2] = {1.0, 2.0} ; + Float_t dT = 0.331 ; - AliMixture(3, "Tyvek$", AT, ZT, DT, -2, WT) ; + AliMixture(3, "Tyvek$", aT, zT, dT, -2, wT) ; // --- Polystyrene foam --- - Float_t AF[2] = {12.011, 1.00794} ; - Float_t ZF[2] = {6.0, 1.0} ; - Float_t WF[2] = {1.0, 1.0} ; - Float_t DF = 0.12 ; + Float_t aF[2] = {12.011, 1.00794} ; + Float_t zF[2] = {6.0, 1.0} ; + Float_t wF[2] = {1.0, 1.0} ; + Float_t dF = 0.12 ; - AliMixture(4, "Foam$", AF, ZF, DF, -2, WF) ; + AliMixture(4, "Foam$", aF, zF, dF, -2, wF) ; // --- Titanium --- - Float_t ATIT[3] = {47.88, 26.98, 54.94} ; - Float_t ZTIT[3] = {22.0, 13.0, 25.0} ; - Float_t WTIT[3] = {69.0, 6.0, 1.0} ; - Float_t DTIT = 4.5 ; + Float_t aTIT[3] = {47.88, 26.98, 54.94} ; + Float_t zTIT[3] = {22.0, 13.0, 25.0} ; + Float_t wTIT[3] = {69.0, 6.0, 1.0} ; + Float_t dTIT = 4.5 ; - AliMixture(5, "Titanium$", ATIT, ZTIT, DTIT, -3, WTIT); + AliMixture(5, "Titanium$", aTIT, zTIT, dTIT, -3, wTIT); // --- Silicon --- AliMaterial(6, "Si$", 28.0855, 14., 2.33, 9.36, 42.3, 0, 0) ; @@ -106,88 +106,88 @@ void AliPHOS::CreateMaterials() // --- Foam thermo insulation --- - Float_t ATI[2] = {12.011, 1.00794} ; - Float_t ZTI[2] = {6.0, 1.0} ; - Float_t WTI[2] = {1.0, 1.0} ; - Float_t DTI = 0.1 ; + Float_t aTI[2] = {12.011, 1.00794} ; + Float_t zTI[2] = {6.0, 1.0} ; + Float_t wTI[2] = {1.0, 1.0} ; + Float_t dTI = 0.1 ; - AliMixture(7, "Thermo Insul.$", ATI, ZTI, DTI, -2, WTI) ; + AliMixture(7, "Thermo Insul.$", aTI, zTI, dTI, -2, wTI) ; // --- Textolitn --- - Float_t ATX[4] = {16.0, 28.09, 12.011, 1.00794} ; - Float_t ZTX[4] = {8.0, 14.0, 6.0, 1.0} ; - Float_t WTX[4] = {292.0, 68.0, 462.0, 736.0} ; - Float_t DTX = 1.75 ; + Float_t aTX[4] = {16.0, 28.09, 12.011, 1.00794} ; + Float_t zTX[4] = {8.0, 14.0, 6.0, 1.0} ; + Float_t wTX[4] = {292.0, 68.0, 462.0, 736.0} ; + Float_t dTX = 1.75 ; - AliMixture(8, "Textolit$", ATX, ZTX, DTX, -4, WTX) ; + AliMixture(8, "Textolit$", aTX, zTX, dTX, -4, wTX) ; //--- FR4 --- - Float_t AFR[3] = {28.0855, 15.9994, 17.749} ; - Float_t ZFR[3] = {14., 8., 8.875} ; - Float_t WFR[3] = {.28, .32, .4} ; - Float_t DFR = 1.8 ; + Float_t aFR[3] = {28.0855, 15.9994, 17.749} ; + Float_t zFR[3] = {14., 8., 8.875} ; + Float_t wFR[3] = {.28, .32, .4} ; + Float_t dFR = 1.8 ; - AliMixture(9, "FR4$", AFR, ZFR, DFR, -3, WFR) ; + AliMixture(9, "FR4$", aFR, zFR, dFR, -3, wFR) ; // --- The Composite Material for micromegas (so far polyetylene) --- - Float_t ACM[2] = {12.01, 1.} ; - Float_t ZCM[2] = {6., 1.} ; - Float_t WCM[2] = {1., 2.} ; - Float_t DCM = 0.935 ; + Float_t aCM[2] = {12.01, 1.} ; + Float_t zCM[2] = {6., 1.} ; + Float_t wCM[2] = {1., 2.} ; + Float_t dCM = 0.935 ; - AliMixture(10, "Compo Mat$", ACM, ZCM, DCM, -2, WCM) ; + AliMixture(10, "Compo Mat$", aCM, zCM, dCM, -2, wCM) ; // --- Copper --- AliMaterial(11, "Cu$", 63.546, 29, 8.96, 1.43, 14.8, 0, 0) ; // --- G10 : Printed Circuit material --- - Float_t AG10[4] = { 12., 1., 16., 28.} ; - Float_t ZG10[4] = { 6., 1., 8., 14.} ; - Float_t WG10[4] = { .259, .288, .248, .205} ; - Float_t DG10 = 1.7 ; + Float_t aG10[4] = { 12., 1., 16., 28.} ; + Float_t zG10[4] = { 6., 1., 8., 14.} ; + Float_t wG10[4] = { .259, .288, .248, .205} ; + Float_t dG10 = 1.7 ; - AliMixture(12, "G10$", AG10, ZG10, DG10, -4, WG10); + AliMixture(12, "G10$", aG10, zG10, dG10, -4, wG10); // --- Lead --- AliMaterial(13, "Pb$", 207.2, 82, 11.35, 0.56, 0., 0, 0) ; // --- The gas mixture --- // Co2 - Float_t ACO[2] = {12.0, 16.0} ; - Float_t ZCO[2] = {6.0, 8.0} ; - Float_t WCO[2] = {1.0, 2.0} ; - Float_t DCO = 0.001977 ; + Float_t aCO[2] = {12.0, 16.0} ; + Float_t zCO[2] = {6.0, 8.0} ; + Float_t wCO[2] = {1.0, 2.0} ; + Float_t dCO = 0.001977 ; - AliMixture(14, "CO2$", ACO, ZCO, DCO, -2, WCO); + AliMixture(14, "CO2$", aCO, zCO, dCO, -2, wCO); // Ar - Float_t DAr = 0.001782 ; - AliMaterial(15, "Ar$", 39.948, 18.0, DAr, 14.0, 0., 0, 0) ; + Float_t dAr = 0.001782 ; + AliMaterial(15, "Ar$", 39.948, 18.0, dAr, 14.0, 0., 0, 0) ; // ArCo2 Char_t namate[21]; - Float_t AGM[2] ; - Float_t ZGM[2] ; - Float_t WGM[2] ; - Float_t DGM ; + Float_t aGM[2] ; + Float_t zGM[2] ; + Float_t wGM[2] ; + Float_t dGM ; - Float_t AbsL, RadL, Density ; + Float_t absL, radL, density ; Float_t buf[1] ; Int_t nbuf ; - gMC->Gfmate((*fIdmate)[15], namate, AGM[0], ZGM[0], Density, RadL, AbsL, buf, nbuf) ; // Get properties of Ar - gMC->Gfmate((*fIdmate)[14], namate, AGM[1], ZGM[1], Density, RadL, AbsL, buf, nbuf) ; // Get properties of CO2 + gMC->Gfmate((*fIdmate)[15], namate, aGM[0], zGM[0], density, radL, absL, buf, nbuf) ; // Get properties of Ar + gMC->Gfmate((*fIdmate)[14], namate, aGM[1], zGM[1], density, radL, absL, buf, nbuf) ; // Get properties of CO2 // Create gas mixture - Float_t ArContent = 0.80 ; // Ar-content of the Ar/CO2-mixture (80% / 20%) + Float_t arContent = 0.80 ; // Ar-content of the Ar/CO2-mixture (80% / 20%) - WGM[0] = ArContent; - WGM[1] = 1. - ArContent ; - DGM = WGM[0] * DAr + WGM[1] * DCO; + wGM[0] = arContent; + wGM[1] = 1. - arContent ; + dGM = wGM[0] * dAr + wGM[1] * dCO; - AliMixture(16, "ArCO2$", AGM, ZGM, DGM, 2, WGM) ; + AliMixture(16, "ArCO2$", aGM, zGM, dGM, 2, wGM) ; // --- Air --- @@ -198,76 +198,76 @@ void AliPHOS::CreateMaterials() // for PHOS: idtmed[699->798] equivalent to fIdtmed[0->100] Int_t * idtmed = fIdtmed->GetArray() - 699 ; - Int_t ISXFLD = gAlice->Field()->Integ() ; - Float_t SXMGMX = gAlice->Field()->Max() ; + Int_t isxfld = gAlice->Field()->Integ() ; + Float_t sxmgmx = gAlice->Field()->Max() ; // The scintillator of the calorimeter made of PBW04 -> idtmed[699] AliMedium(0, "PHOS Xtal $", 0, 1, - ISXFLD, SXMGMX, 10.0, 0.1, 0.1, 0.1, 0.1, 0, 0) ; + isxfld, sxmgmx, 10.0, 0.1, 0.1, 0.1, 0.1, 0, 0) ; // The scintillator of the CPV made of Polystyrene scintillator -> idtmed[700] AliMedium(1, "CPV scint. $", 1, 1, - ISXFLD, SXMGMX, 10.0, 0.1, 0.1, 0.1, 0.1, 0, 0) ; + isxfld, sxmgmx, 10.0, 0.1, 0.1, 0.1, 0.1, 0, 0) ; // Various Aluminium parts made of Al -> idtmed[701] AliMedium(2, "Al parts $", 2, 0, - ISXFLD, SXMGMX, 10.0, 0.1, 0.1, 0.001, 0.001, 0, 0) ; + isxfld, sxmgmx, 10.0, 0.1, 0.1, 0.001, 0.001, 0, 0) ; // The Tywek which wraps the calorimeter crystals -> idtmed[702] AliMedium(3, "Tyvek wrapper$", 3, 0, - ISXFLD, SXMGMX, 10.0, 0.1, 0.1, 0.001, 0.001, 0, 0) ; + isxfld, sxmgmx, 10.0, 0.1, 0.1, 0.001, 0.001, 0, 0) ; // The Polystyrene foam around the calorimeter module -> idtmed[703] AliMedium(4, "Polyst. foam $", 4, 0, - ISXFLD, SXMGMX, 10.0, 0.1, 0.1, 0.1, 0.1, 0, 0) ; + isxfld, sxmgmx, 10.0, 0.1, 0.1, 0.1, 0.1, 0, 0) ; // The Titanium around the calorimeter crystal -> idtmed[704] AliMedium(5, "Titan. cover $", 5, 0, - ISXFLD, SXMGMX, 10.0, 0.1, 0.1, 0.0001, 0.0001, 0, 0) ; + isxfld, sxmgmx, 10.0, 0.1, 0.1, 0.0001, 0.0001, 0, 0) ; // The Silicon of the pin diode to read out the calorimeter crystal -> idtmed[705] AliMedium(6, "Si PIN $", 6, 0, - ISXFLD, SXMGMX, 10.0, 0.1, 0.1, 0.01, 0.01, 0, 0) ; + isxfld, sxmgmx, 10.0, 0.1, 0.1, 0.01, 0.01, 0, 0) ; // The thermo insulating material of the box which contains the calorimeter module -> idtmed[706] AliMedium(7, "Thermo Insul.$", 7, 0, - ISXFLD, SXMGMX, 10.0, 0.1, 0.1, 0.1, 0.1, 0, 0) ; + isxfld, sxmgmx, 10.0, 0.1, 0.1, 0.1, 0.1, 0, 0) ; // The Textolit which makes up the box which contains the calorimeter module -> idtmed[707] AliMedium(8, "Textolit $", 8, 0, - ISXFLD, SXMGMX, 10.0, 0.1, 0.1, 0.1, 0.1, 0, 0) ; + isxfld, sxmgmx, 10.0, 0.1, 0.1, 0.1, 0.1, 0, 0) ; // FR4: The Plastic which makes up the frame of micromegas -> idtmed[708] AliMedium(9, "FR4 $", 9, 0, - ISXFLD, SXMGMX, 10.0, 0.1, 0.1, 0.1, 0.0001, 0, 0) ; + isxfld, sxmgmx, 10.0, 0.1, 0.1, 0.1, 0.0001, 0, 0) ; // The Composite Material for micromegas -> idtmed[709] AliMedium(10, "CompoMat $", 10, 0, - ISXFLD, SXMGMX, 10.0, 0.1, 0.1, 0.1, 0.1, 0, 0) ; + isxfld, sxmgmx, 10.0, 0.1, 0.1, 0.1, 0.1, 0, 0) ; // Copper -> idtmed[710] AliMedium(11, "Copper $", 11, 0, - ISXFLD, SXMGMX, 10.0, 0.1, 0.1, 0.1, 0.0001, 0, 0) ; + isxfld, sxmgmx, 10.0, 0.1, 0.1, 0.1, 0.0001, 0, 0) ; // G10: Printed Circuit material -> idtmed[711] AliMedium(12, "G10 $", 12, 0, - ISXFLD, SXMGMX, 10.0, 0.1, 0.1, 0.1, 0.01, 0, 0) ; + isxfld, sxmgmx, 10.0, 0.1, 0.1, 0.1, 0.01, 0, 0) ; // The Lead -> idtmed[712] AliMedium(13, "Lead $", 13, 0, - ISXFLD, SXMGMX, 10.0, 0.1, 0.1, 0.1, 0.1, 0, 0) ; + isxfld, sxmgmx, 10.0, 0.1, 0.1, 0.1, 0.1, 0, 0) ; // The gas mixture: ArCo2 -> idtmed[715] AliMedium(16, "ArCo2 $", 16, 1, - ISXFLD, SXMGMX, 10.0, 0.1, 0.1, 0.1, 0.01, 0, 0) ; + isxfld, sxmgmx, 10.0, 0.1, 0.1, 0.1, 0.01, 0, 0) ; // Air -> idtmed[798] AliMedium(99, "Air $", 99, 0, - ISXFLD, SXMGMX, 10.0, 1.0, 0.1, 0.1, 10.0, 0, 0) ; + isxfld, sxmgmx, 10.0, 1.0, 0.1, 0.1, 10.0, 0, 0) ; // --- Set decent energy thresholds for gamma and electron tracking @@ -278,25 +278,26 @@ void AliPHOS::CreateMaterials() // --- Generate explicitly delta rays in the titan cover --- gMC->Gstpar(idtmed[704], "LOSS",3.) ; gMC->Gstpar(idtmed[704], "DRAY",1.) ; - // --- and in aluminium parts --- gMC->Gstpar(idtmed[701], "LOSS",3.) ; gMC->Gstpar(idtmed[701], "DRAY",1.) ; - -// Tracking threshold for photons and electrons in the gas ArC02 - // TGeant3 *geant3 = (TGeant3*)gMC; - //geant3->SetERAN(5.e-8, 1.e1,90); - - gMC->Gstpar(idtmed[715], "CUTGAM",1.E-8) ; - gMC->Gstpar(idtmed[715], "CUTELE",1.E-8) ; - gMC->Gstpar(idtmed[715], "CUTNEU",1.E-8) ; - gMC->Gstpar(idtmed[715], "CUTHAD",1.E-8) ; - gMC->Gstpar(idtmed[715], "CUTMUO",1.E-8) ; - gMC->Gstpar(idtmed[715], "BCUTE",1.E-8) ; - gMC->Gstpar(idtmed[715], "BCUTM",1.E-8) ; - gMC->Gstpar(idtmed[715], "DCUTE",1.E-8) ; - gMC->Gstpar(idtmed[715], "DCUTM",1.E-8) ; - gMC->Gstpar(idtmed[715], "PPCUTM",1.E-8) ; + // --- and in PIN diode + gMC->Gstpar(idtmed[705], "LOSS",3) ; + gMC->Gstpar(idtmed[705], "DRAY",1) ; + // --- and in the passive convertor + gMC->Gstpar(idtmed[712], "LOSS",3) ; + gMC->Gstpar(idtmed[712], "DRAY",1) ; + // Tracking threshold for photons and electrons in the gas ArC02 + gMC->Gstpar(idtmed[715], "CUTGAM",5.E-7) ; + gMC->Gstpar(idtmed[715], "CUTELE",5.E-7) ; + gMC->Gstpar(idtmed[715], "CUTNEU",5.E-7) ; + gMC->Gstpar(idtmed[715], "CUTHAD",5.E-7) ; + gMC->Gstpar(idtmed[715], "CUTMUO",5.E-7) ; + gMC->Gstpar(idtmed[715], "BCUTE",5.E-7) ; + gMC->Gstpar(idtmed[715], "BCUTM",5.E-7) ; + gMC->Gstpar(idtmed[715], "DCUTE",5.E-7) ; + gMC->Gstpar(idtmed[715], "DCUTM",5.E-7) ; + gMC->Gstpar(idtmed[715], "PPCUTM",5.E-7) ; gMC->Gstpar(idtmed[715], "LOSS",2.) ; gMC->Gstpar(idtmed[715], "DRAY",0.) ; gMC->Gstpar(idtmed[715], "STRA",2.) ; diff --git a/PHOS/AliPHOSAnalyze.cxx b/PHOS/AliPHOSAnalyze.cxx index 8966fb5e696..1d6ea5107de 100644 --- a/PHOS/AliPHOSAnalyze.cxx +++ b/PHOS/AliPHOSAnalyze.cxx @@ -20,6 +20,9 @@ // --- ROOT system --- +#include "TFile.h" +#include "TH1.h" +#include "TPad.h" #include "TH2.h" #include "TParticle.h" #include "TClonesArray.h" @@ -29,6 +32,9 @@ // --- Standard library --- +#include +#include + // --- AliRoot header files --- #include "AliRun.h" @@ -57,8 +63,8 @@ AliPHOSAnalyze::AliPHOSAnalyze(Text_t * name) { // ctor - Bool_t OK = OpenRootFile(name) ; - if ( !OK ) { + Bool_t ok = OpenRootFile(name) ; + if ( !ok ) { cout << " AliPHOSAnalyze > Error opening " << name << endl ; } else { @@ -98,9 +104,9 @@ AliPHOSAnalyze::~AliPHOSAnalyze() //____________________________________________________________________________ void AliPHOSAnalyze::AnalyzeOneEvent(Int_t evt) { - Bool_t OK = Init(evt) ; + Bool_t ok = Init(evt) ; - if ( OK ) { + if ( ok ) { //=========== Get the number of entries in the Digits array Int_t nId = fPHOS->Digits()->GetEntries(); @@ -115,17 +121,182 @@ void AliPHOSAnalyze::AnalyzeOneEvent(Int_t evt) // =========== End of reconstruction cout << "AnalyzeOneEvent > event # " << fEvt << " processed" << endl ; - } // OK + } // ok else cout << "AnalyzeOneEvent > filed to process event # " << evt << endl ; } +//____________________________________________________________________________ + void AliPHOSAnalyze::AnalyzeManyEvents(Int_t Nevents, Int_t module) // analyzes many events +{ + + if ( fRootFile == 0 ) + cout << "AnalyzeManyEvents > " << "Root File not openned" << endl ; + else + { + //========== Get AliRun object from file + gAlice = (AliRun*) fRootFile->Get("gAlice") ; + //=========== Get the PHOS object and associated geometry from the file + fPHOS = (AliPHOSv0 *)gAlice->GetDetector("PHOS") ; + fGeom = AliPHOSGeometry::GetInstance( fPHOS->GetGeometry()->GetName(), fPHOS->GetGeometry()->GetTitle() ); + //========== Booking Histograms + cout << "AnalyzeManyEvents > " << "Booking Histograms" << endl ; + BookingHistograms(); + Int_t ievent; + Int_t relid[4] ; + AliPHOSDigit * digit ; + AliPHOSEmcRecPoint * emc ; + AliPHOSPpsdRecPoint * ppsd ; + AliPHOSTrackSegment * tracksegment ; + for ( ievent=0; ievent " << "Starting Analyzing " << endl ; + //========== Create the Clusterizer + fClu = new AliPHOSClusterizerv1() ; + fClu->SetEmcEnergyThreshold(0.025) ; + fClu->SetEmcClusteringThreshold(0.75) ; + fClu->SetPpsdEnergyThreshold (0.0000002) ; + fClu->SetPpsdClusteringThreshold(0.0000001) ; + fClu->SetLocalMaxCut(0.03) ; + fClu->SetCalibrationParameters(0., 0.00000001) ; + //========== Creates the track segment maker + fTrs = new AliPHOSTrackSegmentMakerv1() ; + //========== Creates the particle guesser + fPag = new AliPHOSParticleGuesserv1() ; + //========== Creates the Reconstructioner + fRec = new AliPHOSReconstructioner(fClu, fTrs, fPag) ; + //========== Event Number + if ( ( log10(ievent+1) - (Int_t)(log10(ievent+1)) ) == 0. ) cout << "AnalyzeManyEvents > " << "Event is " << ievent << endl ; + //=========== Connects the various Tree's for evt + gAlice->GetEvent(ievent); + //=========== Gets the Digit TTree + gAlice->TreeD()->GetEvent(0) ; + //=========== Gets the number of entries in the Digits array + TIter nextdigit(fPHOS->Digits()) ; + while( ( digit = (AliPHOSDigit *)nextdigit() ) ) + { + fGeom->AbsToRelNumbering(digit->GetId(), relid) ; + if (fClu->IsInEmc(digit)) fhEmcDigit->Fill(fClu->Calibrate(digit->GetAmp())) ; + else + { + if (relid[1]<17) fhVetoDigit->Fill(fClu->Calibrate(digit->GetAmp())); + if (relid[1]>16) fhConvertorDigit->Fill(fClu->Calibrate(digit->GetAmp())); + } + } + //=========== Do the reconstruction + fPHOS->Reconstruction(fRec); + //=========== Cluster in module + TIter nextEmc(fPHOS->EmcClusters() ) ; + while((emc = (AliPHOSEmcRecPoint *)nextEmc())) + { + if ( emc->GetPHOSMod() == module ) + { + fhEmcCluster->Fill( emc->GetTotalEnergy() ); + TIter nextPpsd( fPHOS->PpsdClusters()) ; + while((ppsd = (AliPHOSPpsdRecPoint *)nextPpsd())) + { + if ( ppsd->GetPHOSMod() == module ) + { + if (!ppsd->GetUp()) fhConvertorEmc->Fill(emc->GetTotalEnergy(),ppsd->GetTotalEnergy()) ; + } + } + } + } + //=========== Cluster in module PPSD Down + TIter nextPpsd(fPHOS->PpsdClusters() ) ; + while((ppsd = (AliPHOSPpsdRecPoint *)nextPpsd())) + { + if ( ppsd->GetPHOSMod() == module ) + { + if (!ppsd->GetUp()) fhConvertorCluster->Fill(ppsd->GetTotalEnergy()) ; + if (ppsd->GetUp()) fhVetoCluster ->Fill(ppsd->GetTotalEnergy()) ; + } + } + //========== TRackSegments in the event + TIter nextTrackSegment(fPHOS->TrackSegments() ) ; + while((tracksegment = (AliPHOSTrackSegment *)nextTrackSegment())) + { + if ( tracksegment->GetPHOSMod() == module ) + { + switch(tracksegment->GetPartType()) + { + case 0: + fhPhotonEnergy->Fill(tracksegment->GetEnergy() ) ; + // fhPhotonPositionX->Fill(tracksegment-> ) ; + //fhPhotonPositionY->Fill(tracksegment-> ) ; + //cout << "PHOTON" << endl; + break; + case 1 : + fhElectronEnergy->Fill(tracksegment->GetEnergy() ) ; + //fhElectronPositionX->Fill(tracksegment-> ) ; + //fhElectronPositionY->Fill(tracksegment-> ) ; + //cout << "ELECTRON" << endl; + break; + case 2 : + fhNeutralEnergy->Fill(tracksegment->GetEnergy() ) ; + //fhNeutralPositionX->Fill(tracksegment-> ) ; + //fhNeutralPositionY->Fill(tracksegment-> ) ; + //cout << "NEUTRAL" << endl; + break ; + case 3 : + fhChargedEnergy->Fill(tracksegment->GetEnergy() ) ; + //fhChargedPositionX->Fill(tracksegment-> ) ; + //fhChargedPositionY->Fill(tracksegment-> ) ; + //cout << "CHARGED" << endl; + break ; + + } + } + } + // Deleting fClu, fTrs, fPag et fRec + fClu->Delete(); + fTrs->Delete(); + fPag->Delete(); + fRec->Delete(); + + } // endfor + SavingHistograms(); + } // endif +} // endfunction + + +//____________________________________________________________________________ +void AliPHOSAnalyze::BookingHistograms() +{ + if (fhEmcDigit ) delete fhEmcDigit ; + if (fhVetoDigit ) delete fhVetoDigit ; + if (fhConvertorDigit ) delete fhConvertorDigit ; + if (fhEmcCluster ) delete fhEmcCluster ; + if (fhVetoCluster ) delete fhVetoCluster ; + if (fhConvertorCluster ) delete fhConvertorCluster ; + if (fhConvertorEmc ) delete fhConvertorEmc ; + fhEmcDigit = new TH1F("hEmcDigit", "hEmcDigit", 500, 0. , 5.); + fhVetoDigit = new TH1F("hVetoDigit", "hVetoDigit", 500, 0. , 3.e-5); + fhConvertorDigit = new TH1F("hConvertorDigit","hConvertorDigit", 500, 0. , 3.e-5); + fhEmcCluster = new TH1F("hEmcCluster", "hEmcCluster", 500, -5. , 5.); + fhVetoCluster = new TH1F("hVetoCluster", "hVetoCluster", 500, 0. , 3.e-5); + fhConvertorCluster = new TH1F("hConvertorCluster","hConvertorCluster",500, 0. , 3.e-5); + fhConvertorEmc = new TH2F("hConvertorEmc", "hConvertorEmc", 200, 1. , 3., 200, 0., 3.e-5); + fhPhotonEnergy = new TH1F("hPhotonEnergy", "hPhotonEnergy", 500, 0. , 5.); + fhElectronEnergy = new TH1F("hElectronEnergy","hElectronEnergy", 500, 0. , 5.); + fhNeutralEnergy = new TH1F("hNeutralEnergy", "hNeutralEnergy", 500, 0. , 5.); + fhChargedEnergy = new TH1F("hChargedEnergy", "hChargedEnergy", 500, 0. , 5.); + fhPhotonPositionX = new TH1F("hPhotonPositionX","hPhotonPositionX", 500,-80. , 80.); + fhElectronPositionX= new TH1F("hElectronPositionX","hElectronPositionX",500,-80. , 80.); + fhNeutralPositionX = new TH1F("hNeutralPositionX","hNeutralPositionX",500,-80. , 80.); + fhChargedPositionX = new TH1F("hChargedPositionX","hChargedPositionX",500,-80. , 80.); + fhPhotonPositionY = new TH1F("hPhotonPositionY","hPhotonPositionY", 500,-80. , 80.); + fhElectronPositionY= new TH1F("hElectronPositionY","hElectronPositionY",500,-80. , 80.); + fhNeutralPositionY = new TH1F("hNeutralPositionY","hNeutralPositionY",500,-80. , 80.); + fhChargedPositionY = new TH1F("hChargedPositionY","hChargedPositionY",500,-80. , 80.); + +} //____________________________________________________________________________ Bool_t AliPHOSAnalyze::Init(Int_t evt) { - Bool_t OK = kTRUE ; + Bool_t ok = kTRUE ; //========== Open galice root file @@ -133,8 +304,8 @@ Bool_t AliPHOSAnalyze::Init(Int_t evt) Text_t * name = new Text_t[80] ; cout << "AnalyzeOneEvent > Enter file root file name : " ; cin >> name ; - Bool_t OK = OpenRootFile(name) ; - if ( !OK ) + Bool_t ok = OpenRootFile(name) ; + if ( !ok ) cout << " AliPHOSAnalyze > Error opening " << name << endl ; else { //========== Get AliRun object from file @@ -145,20 +316,20 @@ Bool_t AliPHOSAnalyze::Init(Int_t evt) fPHOS = (AliPHOSv0 *)gAlice->GetDetector("PHOS") ; fGeom = AliPHOSGeometry::GetInstance( fPHOS->GetGeometry()->GetName(), fPHOS->GetGeometry()->GetTitle() ); - } // else !OK + } // else !ok } // if fRootFile - if ( OK ) { + if ( ok ) { //========== Create the Clusterizer fClu = new AliPHOSClusterizerv1() ; - fClu->SetEmcEnergyThreshold(0.01) ; - fClu->SetEmcClusteringThreshold(0.1) ; - fClu->SetPpsdEnergyThreshold(0.0000001) ; - fClu->SetPpsdClusteringThreshold(0.0000002) ; + fClu->SetEmcEnergyThreshold(0.025) ; + fClu->SetEmcClusteringThreshold(0.75) ; + fClu->SetPpsdEnergyThreshold (0.0000002) ; + fClu->SetPpsdClusteringThreshold(0.0000001) ; fClu->SetLocalMaxCut(0.03) ; - fClu->SetCalibrationParameters(0., 0.0000001) ; + fClu->SetCalibrationParameters(0., 0.00000001) ; cout << "AnalyzeOneEvent > using clusterizer " << fClu->GetName() << endl ; fClu->PrintParameters() ; @@ -190,34 +361,35 @@ Bool_t AliPHOSAnalyze::Init(Int_t evt) gAlice->TreeD()->GetEvent(0) ; - } // OK + } // ok - return OK ; + return ok ; } + //____________________________________________________________________________ -void AliPHOSAnalyze:: DisplayKineEvent(Int_t evt) +void AliPHOSAnalyze::DisplayKineEvent(Int_t evt) { if (evt == -999) evt = fEvt ; - Int_t Module ; + Int_t module ; cout << "DisplayKineEvent > which module (1-5, -1: all) ? " ; - cin >> Module ; cout << Module << endl ; + cin >> module ; cout << module << endl ; - Int_t TestParticle ; + Int_t testparticle ; cout << " 22 : PHOTON " << endl << " (-)11 : (POSITRON)ELECTRON " << endl << " (-)2112 : (ANTI)NEUTRON " << endl << " -999 : Everything else " << endl ; cout << "DisplayKineEvent > enter PDG particle code to display " ; - cin >> TestParticle ; cout << TestParticle << endl ; + cin >> testparticle ; cout << testparticle << endl ; - Text_t HistoName[80] ; - sprintf(HistoName,"Event %d: Incident particles in module %d", evt, Module) ; + Text_t histoname[80] ; + sprintf(histoname,"Event %d: Incident particles in module %d", evt, module) ; - Double_t tm, tM, pm, pM ; // min and Max theta and phi covered by Module - fGeom->EmcModuleCoverage(Module, tm, tM, pm, pM, kDegre) ; + Double_t tm, tM, pm, pM ; // min and Max theta and phi covered by module + fGeom->EmcModuleCoverage(module, tm, tM, pm, pM, kDegre) ; Double_t theta, phi ; fGeom->EmcXtalCoverage(theta, phi, kDegre) ; @@ -230,57 +402,57 @@ void AliPHOSAnalyze:: DisplayKineEvent(Int_t evt) pm -= phi ; pM += phi ; - TH2F * HistoParticle = new TH2F("HistoParticle", HistoName, + TH2F * histoparticle = new TH2F("histoparticle", histoname, pdim, pm, pM, tdim, tm, tM) ; - HistoParticle->SetStats(kFALSE) ; + histoparticle->SetStats(kFALSE) ; // Get pointers to Alice Particle TClonesArray - TParticle * Particle; - TClonesArray * ArrayOfParticles = gAlice->Particles(); + TParticle * particle; + TClonesArray * particlearray = gAlice->Particles(); - Text_t CanvasName[80]; - sprintf(CanvasName,"Particles incident in PHOS/EMC module # %d",Module) ; - TCanvas * KineCanvas = new TCanvas("KineCanvas", CanvasName, 650, 500) ; + Text_t canvasname[80]; + sprintf(canvasname,"Particles incident in PHOS/EMC module # %d",module) ; + TCanvas * kinecanvas = new TCanvas("kinecanvas", canvasname, 650, 500) ; // get the KINE Tree - TTree * Kine = gAlice->TreeK() ; - Stat_t NumberOfParticles = Kine->GetEntries() ; - cout << "DisplayKineEvent > events in Kine " << NumberOfParticles << endl ; + TTree * kine = gAlice->TreeK() ; + Stat_t nParticles = kine->GetEntries() ; + cout << "DisplayKineEvent > events in kine " << nParticles << endl ; // loop over particles - Double_t raddeg = 180. / TMath::Pi() ; + Double_t kRADDEG = 180. / TMath::Pi() ; Int_t index1 ; Int_t nparticlein = 0 ; - for (index1 = 0 ; index1 < NumberOfParticles ; index1++){ - Int_t nparticle = ArrayOfParticles->GetEntriesFast() ; + for (index1 = 0 ; index1 < nParticles ; index1++){ + Int_t nparticle = particlearray->GetEntriesFast() ; Int_t index2 ; for( index2 = 0 ; index2 < nparticle ; index2++) { - Particle = (TParticle*)ArrayOfParticles->UncheckedAt(index2) ; - Int_t ParticleType = Particle->GetPdgCode() ; - if (TestParticle == -999 || TestParticle == ParticleType) { - Double_t Phi = Particle->Phi() ; - Double_t Theta = Particle->Theta() ; + particle = (TParticle*)particlearray->UncheckedAt(index2) ; + Int_t particletype = particle->GetPdgCode() ; + if (testparticle == -999 || testparticle == particletype) { + Double_t phi = particle->Phi() ; + Double_t theta = particle->Theta() ; Int_t mod ; Double_t x, z ; - fGeom->ImpactOnEmc(Theta, Phi, mod, z, x) ; - if ( mod == Module ) { + fGeom->ImpactOnEmc(theta, phi, mod, z, x) ; + if ( mod == module ) { nparticlein++ ; - HistoParticle->Fill(Phi*raddeg, Theta*raddeg, Particle->Energy() ) ; + histoparticle->Fill(phi*kRADDEG, theta*kRADDEG, particle->Energy() ) ; } } } } - KineCanvas->Draw() ; - HistoParticle->Draw("color") ; - TPaveText * PaveText = new TPaveText(294, 100, 300, 101); + kinecanvas->Draw() ; + histoparticle->Draw("color") ; + TPaveText * pavetext = new TPaveText(294, 100, 300, 101); Text_t text[40] ; sprintf(text, "Particles: %d ", nparticlein) ; - PaveText->AddText(text) ; - PaveText->Draw() ; - KineCanvas->Update(); + pavetext->AddText(text) ; + pavetext->Draw() ; + kinecanvas->Update(); } //____________________________________________________________________________ @@ -295,13 +467,13 @@ void AliPHOSAnalyze::DisplayRecParticles() } if (fEvt != -999) { - Int_t Module ; + Int_t module ; cout << "DisplayRecPoints > which module (1-5, -1: all) ? " ; - cin >> Module ; cout << Module << endl ; - Text_t HistoName[80] ; - sprintf(HistoName,"Event %d: Reconstructed particles in module %d", fEvt, Module) ; - Double_t tm, tM, pm, pM ; // min and Max theta and phi covered by Module - fGeom->EmcModuleCoverage(Module, tm, tM, pm, pM, kDegre) ; + cin >> module ; cout << module << endl ; + Text_t histoname[80] ; + sprintf(histoname,"Event %d: Reconstructed particles in module %d", fEvt, module) ; + Double_t tm, tM, pm, pM ; // min and Max theta and phi covered by module + fGeom->EmcModuleCoverage(module, tm, tM, pm, pM, kDegre) ; Double_t theta, phi ; fGeom->EmcXtalCoverage(theta, phi, kDegre) ; Int_t tdim = (Int_t)( (tM - tm) / theta ) ; @@ -309,36 +481,36 @@ void AliPHOSAnalyze::DisplayRecParticles() tm -= theta ; tM += theta ; pm -= phi ; - TH2F * HistoRParticle = new TH2F("HistoRParticle", HistoName, + TH2F * histoRparticle = new TH2F("histoRparticle", histoname, pdim, pm, pM, tdim, tm, tM) ; - HistoRParticle->SetStats(kFALSE) ; - Text_t CanvasName[80] ; - sprintf(CanvasName, "Reconstructed particles in PHOSmodule # %d", Module) ; - TCanvas * RParticleCanvas = new TCanvas("RparticleCanvas", CanvasName, 650, 500) ; + histoRparticle->SetStats(kFALSE) ; + Text_t canvasname[80] ; + sprintf(canvasname, "Reconstructed particles in PHOSmodule # %d", module) ; + TCanvas * rparticlecanvas = new TCanvas("RparticleCanvas", canvasname, 650, 500) ; RecParticlesList * rpl = fPHOS->RecParticles() ; - Int_t NRecParticles = rpl->GetEntries() ; - Int_t NRecParticlesInModule = 0 ; + Int_t nRecParticles = rpl->GetEntries() ; + Int_t nRecParticlesInModule = 0 ; TIter nextRecPart(rpl) ; AliPHOSRecParticle * rp ; - cout << "DisplayRecParticles > " << NRecParticles << " reconstructed particles " << endl ; - Double_t raddeg = 180. / TMath::Pi() ; + cout << "DisplayRecParticles > " << nRecParticles << " reconstructed particles " << endl ; + Double_t kRADDEG = 180. / TMath::Pi() ; while ( (rp = (AliPHOSRecParticle *)nextRecPart() ) ) { AliPHOSTrackSegment * ts = rp->GetPHOSTrackSegment() ; - if ( ts->GetPHOSMod() == Module ) { - NRecParticlesInModule++ ; - Double_t theta = rp->Theta() * raddeg ; - Double_t phi = rp->Phi() * raddeg ; + if ( ts->GetPHOSMod() == module ) { + nRecParticlesInModule++ ; + Double_t theta = rp->Theta() * kRADDEG ; + Double_t phi = rp->Phi() * kRADDEG ; Double_t energy = rp->Energy() ; - HistoRParticle->Fill(phi, theta, energy) ; + histoRparticle->Fill(phi, theta, energy) ; } } - HistoRParticle->Draw("color") ; + histoRparticle->Draw("color") ; Text_t text[80] ; - sprintf(text, "reconstructed particles: %d", NRecParticlesInModule) ; - TPaveText * PaveText = new TPaveText(292, 100, 300, 101); - PaveText->AddText(text) ; - PaveText->Draw() ; - RParticleCanvas->Update() ; + sprintf(text, "reconstructed particles: %d", nRecParticlesInModule) ; + TPaveText * pavetext = new TPaveText(292, 100, 300, 101); + pavetext->AddText(text) ; + pavetext->Draw() ; + rparticlecanvas->Update() ; } } @@ -354,134 +526,134 @@ void AliPHOSAnalyze::DisplayRecPoints() } if (fEvt != -999) { - Int_t Module ; + Int_t module ; cout << "DisplayRecPoints > which module (1-5, -1: all) ? " ; - cin >> Module ; cout << Module << endl ; + cin >> module ; cout << module << endl ; - Text_t CanvasName[80]; - sprintf(CanvasName,"Digits in PHOS/EMC module # %d",Module) ; - TCanvas * ModuleCanvas = new TCanvas("Module", CanvasName, 650, 500) ; - ModuleCanvas->Draw() ; + Text_t canvasname[80]; + sprintf(canvasname,"Digits in PHOS/EMC module # %d",module) ; + TCanvas * modulecanvas = new TCanvas("module", canvasname, 650, 500) ; + modulecanvas->Draw() ; - //=========== Creating 2d-histogram of the PHOS Module + //=========== Creating 2d-histogram of the PHOS module // a little bit junkie but is used to test Geom functinalities - Double_t tm, tM, pm, pM ; // min and Max theta and phi covered by Module + Double_t tm, tM, pm, pM ; // min and Max theta and phi covered by module - fGeom->EmcModuleCoverage(Module, tm, tM, pm, pM); + fGeom->EmcModuleCoverage(module, tm, tM, pm, pM); // convert angles into coordinates local to the EMC module of interest - Int_t EmcModuleNumber ; - Double_t EmcModulexm, EmcModulezm ; // minimum local coordinate in a given EMCA module - Double_t EmcModulexM, EmcModulezM ; // maximum local coordinate in a given EMCA module - fGeom->ImpactOnEmc(tm, pm, EmcModuleNumber, EmcModulezm, EmcModulexm) ; - fGeom->ImpactOnEmc(tM, pM, EmcModuleNumber, EmcModulezM, EmcModulexM) ; - Int_t xdim = (Int_t)( ( EmcModulexM - EmcModulexm ) / fGeom->GetCrystalSize(0) ) ; - Int_t zdim = (Int_t)( ( EmcModulezM - EmcModulezm ) / fGeom->GetCrystalSize(2) ) ; - Float_t xmin = EmcModulexm - fGeom->GetCrystalSize(0) ; - Float_t xMax = EmcModulexM + fGeom->GetCrystalSize(0) ; - Float_t zmin = EmcModulezm - fGeom->GetCrystalSize(2) ; - Float_t zMax = EmcModulezM + fGeom->GetCrystalSize(2) ; - Text_t HistoName[80]; - sprintf(HistoName,"Event %d: Digits and RecPoints in module %d", fEvt, Module) ; - TH2F * hModule = new TH2F("HistoReconstructed", HistoName, + Int_t emcModuleNumber ; + Double_t emcModulexm, emcModulezm ; // minimum local coordinate in a given EMCA module + Double_t emcModulexM, emcModulezM ; // maximum local coordinate in a given EMCA module + fGeom->ImpactOnEmc(tm, pm, emcModuleNumber, emcModulezm, emcModulexm) ; + fGeom->ImpactOnEmc(tM, pM, emcModuleNumber, emcModulezM, emcModulexM) ; + Int_t xdim = (Int_t)( ( emcModulexM - emcModulexm ) / fGeom->GetCrystalSize(0) ) ; + Int_t zdim = (Int_t)( ( emcModulezM - emcModulezm ) / fGeom->GetCrystalSize(2) ) ; + Float_t xmin = emcModulexm - fGeom->GetCrystalSize(0) ; + Float_t xMax = emcModulexM + fGeom->GetCrystalSize(0) ; + Float_t zmin = emcModulezm - fGeom->GetCrystalSize(2) ; + Float_t zMax = emcModulezM + fGeom->GetCrystalSize(2) ; + Text_t histoname[80]; + sprintf(histoname,"Event %d: Digits and RecPoints in module %d", fEvt, module) ; + TH2F * hModule = new TH2F("HistoReconstructed", histoname, xdim, xmin, xMax, zdim, zmin, zMax) ; hModule->SetMaximum(2.0); hModule->SetMinimum(0.0); hModule->SetStats(kFALSE); TIter next(fPHOS->Digits()) ; - Float_t Energy, y, z; - Int_t RelId[4]; Int_t NumberOfDigits = 0 ; + Float_t energy, y, z; + Float_t etot=0.; + Int_t relid[4]; Int_t nDigits = 0 ; AliPHOSDigit * digit ; - Float_t Etot ; while((digit = (AliPHOSDigit *)next())) { - fGeom->AbsToRelNumbering(digit->GetId(), RelId) ; - if (RelId[0] == Module) + fGeom->AbsToRelNumbering(digit->GetId(), relid) ; + if (relid[0] == module) { - NumberOfDigits++ ; - Energy = fClu->Calibrate(digit->GetAmp()) ; - Etot += Energy ; - fGeom->RelPosInModule(RelId,y,z) ; - if (Energy > 0.01 ) - hModule->Fill(y, z, Energy) ; + nDigits++ ; + energy = fClu->Calibrate(digit->GetAmp()) ; + etot += energy ; + fGeom->RelPosInModule(relid,y,z) ; + if (energy > 0.01 ) + hModule->Fill(y, z, energy) ; } } - cout <<"DrawRecPoints > Found in Module " - << Module << " " << NumberOfDigits << " digits with total energy " << Etot << endl ; + cout <<"DrawRecPoints > Found in module " + << module << " " << nDigits << " digits with total energy " << etot << endl ; hModule->Draw("col2") ; - //=========== Cluster in Module + //=========== Cluster in module - TClonesArray * EmcRP = fPHOS->EmcClusters() ; - Etot = 0.; - Int_t TotalNumberOfClusters = 0 ; - Int_t NumberOfClusters = 0 ; - TIter nextemc(EmcRP) ; + TClonesArray * emcRP = fPHOS->EmcClusters() ; + etot = 0.; + Int_t totalnClusters = 0 ; + Int_t nClusters = 0 ; + TIter nextemc(emcRP) ; AliPHOSEmcRecPoint * emc ; while((emc = (AliPHOSEmcRecPoint *)nextemc())) { - TotalNumberOfClusters++ ; - if ( emc->GetPHOSMod() == Module ) + totalnClusters++ ; + if ( emc->GetPHOSMod() == module ) { - NumberOfClusters++ ; - Energy = emc->GetTotalEnergy() ; - Etot+= Energy ; + nClusters++ ; + energy = emc->GetTotalEnergy() ; + etot+= energy ; emc->Draw("P") ; } } - cout << "DrawRecPoints > Found " << TotalNumberOfClusters << " EMC Clusters in PHOS" << endl ; - cout << "DrawRecPoints > Found in Module " << Module << " " << NumberOfClusters << " EMC Clusters " << endl ; - cout << "DrawRecPoints > Total energy " << Etot << endl ; + cout << "DrawRecPoints > Found " << totalnClusters << " EMC Clusters in PHOS" << endl ; + cout << "DrawRecPoints > Found in module " << module << " " << nClusters << " EMC Clusters " << endl ; + cout << "DrawRecPoints > total energy " << etot << endl ; - TPaveText * PaveText = new TPaveText(22, 80, 83, 90); + TPaveText * pavetext = new TPaveText(22, 80, 83, 90); Text_t text[40] ; - sprintf(text, "digits: %d; clusters: %d", NumberOfDigits, NumberOfClusters) ; - PaveText->AddText(text) ; - PaveText->Draw() ; - ModuleCanvas->Update(); + sprintf(text, "digits: %d; clusters: %d", nDigits, nClusters) ; + pavetext->AddText(text) ; + pavetext->Draw() ; + modulecanvas->Update(); - //=========== Cluster in Module PPSD Down + //=========== Cluster in module PPSD Down - TClonesArray * PpsdRP = fPHOS->PpsdClusters() ; - Etot = 0.; - TIter nextPpsd(PpsdRP) ; - AliPHOSPpsdRecPoint * Ppsd ; - while((Ppsd = (AliPHOSPpsdRecPoint *)nextPpsd())) + TClonesArray * ppsdRP = fPHOS->PpsdClusters() ; + etot = 0.; + TIter nextPpsd(ppsdRP) ; + AliPHOSPpsdRecPoint * ppsd ; + while((ppsd = (AliPHOSPpsdRecPoint *)nextPpsd())) { - TotalNumberOfClusters++ ; - if ( Ppsd->GetPHOSMod() == Module ) + totalnClusters++ ; + if ( ppsd->GetPHOSMod() == module ) { - NumberOfClusters++ ; - Energy = Ppsd->GetEnergy() ; - Etot+=Energy ; - if (!Ppsd->GetUp()) Ppsd->Draw("P") ; + nClusters++ ; + energy = ppsd->GetEnergy() ; + etot+=energy ; + if (!ppsd->GetUp()) ppsd->Draw("P") ; } } - cout << "DrawRecPoints > Found " << TotalNumberOfClusters << " Ppsd Down Clusters in PHOS" << endl ; - cout << "DrawRecPoints > Found in Module " << Module << " " << NumberOfClusters << " Ppsd Down Clusters " << endl ; - cout << "DrawRecPoints > Total energy " << Etot << endl ; + cout << "DrawRecPoints > Found " << totalnClusters << " Ppsd Down Clusters in PHOS" << endl ; + cout << "DrawRecPoints > Found in module " << module << " " << nClusters << " Ppsd Down Clusters " << endl ; + cout << "DrawRecPoints > total energy " << etot << endl ; - //=========== Cluster in Module PPSD Up + //=========== Cluster in module PPSD Up - PpsdRP = fPHOS->PpsdClusters() ; - Etot = 0.; - TIter nextPpsdUp(PpsdRP) ; - while((Ppsd = (AliPHOSPpsdRecPoint *)nextPpsdUp())) + ppsdRP = fPHOS->PpsdClusters() ; + etot = 0.; + TIter nextPpsdUp(ppsdRP) ; + while((ppsd = (AliPHOSPpsdRecPoint *)nextPpsdUp())) { - TotalNumberOfClusters++ ; - if ( Ppsd->GetPHOSMod() == Module ) + totalnClusters++ ; + if ( ppsd->GetPHOSMod() == module ) { - NumberOfClusters++ ; - Energy = Ppsd->GetEnergy() ; - Etot+=Energy ; - if (Ppsd->GetUp()) Ppsd->Draw("P") ; + nClusters++ ; + energy = ppsd->GetEnergy() ; + etot+=energy ; + if (ppsd->GetUp()) ppsd->Draw("P") ; } } - cout << "DrawRecPoints > Found " << TotalNumberOfClusters << " Ppsd Up Clusters in PHOS" << endl ; - cout << "DrawRecPoints > Found in Module " << Module << " " << NumberOfClusters << " Ppsd Up Clusters " << endl ; - cout << "DrawRecPoints > Total energy " << Etot << endl ; + cout << "DrawRecPoints > Found " << totalnClusters << " Ppsd Up Clusters in PHOS" << endl ; + cout << "DrawRecPoints > Found in module " << module << " " << nClusters << " Ppsd Up Clusters " << endl ; + cout << "DrawRecPoints > total energy " << etot << endl ; } // if !-999 } @@ -498,60 +670,60 @@ void AliPHOSAnalyze::DisplayTrackSegments() } if (fEvt != -999) { - Int_t Module ; + Int_t module ; cout << "DisplayTrackSegments > which module (1-5, -1: all) ? " ; - cin >> Module ; cout << Module << endl ; - //=========== Creating 2d-histogram of the PHOS Module + cin >> module ; cout << module << endl ; + //=========== Creating 2d-histogram of the PHOS module // a little bit junkie but is used to test Geom functinalities - Double_t tm, tM, pm, pM ; // min and Max theta and phi covered by Module + Double_t tm, tM, pm, pM ; // min and Max theta and phi covered by module - fGeom->EmcModuleCoverage(Module, tm, tM, pm, pM); + fGeom->EmcModuleCoverage(module, tm, tM, pm, pM); // convert angles into coordinates local to the EMC module of interest - Int_t EmcModuleNumber ; - Double_t EmcModulexm, EmcModulezm ; // minimum local coordinate in a given EMCA module - Double_t EmcModulexM, EmcModulezM ; // maximum local coordinate in a given EMCA module - fGeom->ImpactOnEmc(tm, pm, EmcModuleNumber, EmcModulezm, EmcModulexm) ; - fGeom->ImpactOnEmc(tM, pM, EmcModuleNumber, EmcModulezM, EmcModulexM) ; - Int_t xdim = (Int_t)( ( EmcModulexM - EmcModulexm ) / fGeom->GetCrystalSize(0) ) ; - Int_t zdim = (Int_t)( ( EmcModulezM - EmcModulezm ) / fGeom->GetCrystalSize(2) ) ; - Float_t xmin = EmcModulexm - fGeom->GetCrystalSize(0) ; - Float_t xMax = EmcModulexM + fGeom->GetCrystalSize(0) ; - Float_t zmin = EmcModulezm - fGeom->GetCrystalSize(2) ; - Float_t zMax = EmcModulezM + fGeom->GetCrystalSize(2) ; - Text_t HistoName[80]; - sprintf(HistoName,"Event %d: Track Segments in module %d", fEvt, Module) ; - TH2F * HistoTrack = new TH2F("HistoTrack", HistoName, + Int_t emcModuleNumber ; + Double_t emcModulexm, emcModulezm ; // minimum local coordinate in a given EMCA module + Double_t emcModulexM, emcModulezM ; // maximum local coordinate in a given EMCA module + fGeom->ImpactOnEmc(tm, pm, emcModuleNumber, emcModulezm, emcModulexm) ; + fGeom->ImpactOnEmc(tM, pM, emcModuleNumber, emcModulezM, emcModulexM) ; + Int_t xdim = (Int_t)( ( emcModulexM - emcModulexm ) / fGeom->GetCrystalSize(0) ) ; + Int_t zdim = (Int_t)( ( emcModulezM - emcModulezm ) / fGeom->GetCrystalSize(2) ) ; + Float_t xmin = emcModulexm - fGeom->GetCrystalSize(0) ; + Float_t xMax = emcModulexM + fGeom->GetCrystalSize(0) ; + Float_t zmin = emcModulezm - fGeom->GetCrystalSize(2) ; + Float_t zMax = emcModulezM + fGeom->GetCrystalSize(2) ; + Text_t histoname[80]; + sprintf(histoname,"Event %d: Track Segments in module %d", fEvt, module) ; + TH2F * histotrack = new TH2F("histotrack", histoname, xdim, xmin, xMax, zdim, zmin, zMax) ; - HistoTrack->SetStats(kFALSE); - Text_t CanvasName[80]; - sprintf(CanvasName,"Track segments in PHOS/EMC-PPSD module # %d", Module) ; - TCanvas * TrackCanvas = new TCanvas("TrackSegmentCanvas", CanvasName, 650, 500) ; - HistoTrack->Draw() ; + histotrack->SetStats(kFALSE); + Text_t canvasname[80]; + sprintf(canvasname,"Track segments in PHOS/EMC-PPSD module # %d", module) ; + TCanvas * trackcanvas = new TCanvas("TrackSegmentCanvas", canvasname, 650, 500) ; + histotrack->Draw() ; TrackSegmentsList * trsegl = fPHOS->TrackSegments() ; AliPHOSTrackSegment * trseg ; - Int_t NTrackSegments = trsegl->GetEntries() ; + Int_t nTrackSegments = trsegl->GetEntries() ; Int_t index ; - Float_t Etot = 0 ; - Int_t NTrackSegmentsInModule = 0 ; - for(index = 0; index < NTrackSegments ; index++){ + Float_t etot = 0 ; + Int_t nTrackSegmentsInModule = 0 ; + for(index = 0; index < nTrackSegments ; index++){ trseg = (AliPHOSTrackSegment * )trsegl->At(index) ; - Etot+= trseg->GetEnergy() ; - if ( trseg->GetPHOSMod() == Module ) { - NTrackSegmentsInModule++ ; + etot+= trseg->GetEnergy() ; + if ( trseg->GetPHOSMod() == module ) { + nTrackSegmentsInModule++ ; trseg->Draw("P"); } } Text_t text[80] ; - sprintf(text, "track segments: %d", NTrackSegmentsInModule) ; - TPaveText * PaveText = new TPaveText(22, 80, 83, 90); - PaveText->AddText(text) ; - PaveText->Draw() ; - TrackCanvas->Update() ; - cout << "DisplayTrackSegments > Found " << trsegl->GetEntries() << " Track segments with total energy "<< Etot << endl ; + sprintf(text, "track segments: %d", nTrackSegmentsInModule) ; + TPaveText * pavetext = new TPaveText(22, 80, 83, 90); + pavetext->AddText(text) ; + pavetext->Draw() ; + trackcanvas->Update() ; + cout << "DisplayTrackSegments > Found " << trsegl->GetEntries() << " Track segments with total energy "<< etot << endl ; } } @@ -561,3 +733,32 @@ Bool_t AliPHOSAnalyze::OpenRootFile(Text_t * name) fRootFile = new TFile(name) ; return fRootFile->IsOpen() ; } +//____________________________________________________________________________ +void AliPHOSAnalyze::SavingHistograms() +{ + + TFile output("test.root","RECREATE"); + output.cd(); + if (fhEmcDigit ) fhEmcDigit->Write() ; + if (fhVetoDigit ) fhVetoDigit->Write() ; + if (fhConvertorDigit ) fhConvertorDigit->Write() ; + if (fhEmcCluster ) fhEmcCluster->Write() ; + if (fhVetoCluster ) fhVetoCluster->Write() ; + if (fhConvertorCluster ) fhConvertorCluster->Write() ; + if (fhConvertorEmc ) fhConvertorEmc->Write() ; + if (fhPhotonEnergy) fhPhotonEnergy->Write() ; + if (fhPhotonPositionX) fhPhotonPositionX->Write() ; + if (fhPhotonPositionY) fhPhotonPositionX->Write() ; + if (fhElectronEnergy) fhElectronEnergy->Write() ; + if (fhElectronPositionX) fhElectronPositionX->Write() ; + if (fhElectronPositionY) fhElectronPositionX->Write() ; + if (fhNeutralEnergy) fhNeutralEnergy->Write() ; + if (fhNeutralPositionX) fhNeutralPositionX->Write() ; + if (fhNeutralPositionY) fhNeutralPositionX->Write() ; + if (fhChargedEnergy) fhChargedEnergy->Write() ; + if (fhChargedPositionX) fhChargedPositionX->Write() ; + if (fhChargedPositionY) fhChargedPositionX->Write() ; + + output.Write(); + output.Close(); +} diff --git a/PHOS/AliPHOSAnalyze.h b/PHOS/AliPHOSAnalyze.h index 09d63888b09..638f143a1c1 100644 --- a/PHOS/AliPHOSAnalyze.h +++ b/PHOS/AliPHOSAnalyze.h @@ -15,6 +15,8 @@ // --- ROOT system --- #include "TFile.h" +#include "TH1.h" +#include "TH2.h" // --- Standard library --- @@ -32,12 +34,15 @@ public: virtual ~AliPHOSAnalyze() ; // dtor void AnalyzeOneEvent(Int_t evt = -999) ; // analyzes a single event ; + void AnalyzeManyEvents(Int_t Nevtents = 100, Int_t Module=0) ; // analyzes many events ; + void BookingHistograms() ; // booking histograms for the ManyEvent analysis ; Bool_t Init(Int_t evt) ; // does various initialisations void DisplayKineEvent(Int_t evt = -999) ; // displays the Kine events in ALICE coordinate void DisplayRecParticles() ; // displays RecParticles in ALICE coordinate void DisplayRecPoints() ; // displays RecPoints in module coordinate void DisplayTrackSegments() ; // displays TrackSegments in module coordinate Bool_t OpenRootFile(Text_t * name) ; // opens the root file + void SavingHistograms() ; // Save histograms in a root file private: @@ -49,7 +54,26 @@ private: AliPHOSReconstructioner * fRec ; // a reconstructioner TFile * fRootFile ; // the root file that contains the data AliPHOSTrackSegmentMaker * fTrs ; // a tracksegmentmaker ; -public: + TH1F * fhEmcDigit ; // Histo of digit energies in the Emc + TH1F * fhVetoDigit ; // Histo of digit energies in the Veto + TH1F * fhConvertorDigit ; // Histo of digit energies in the Convertor + TH1F * fhEmcCluster ; // Histo of Cluster energies in Emc + TH1F * fhVetoCluster ; // Histo of Cluster energies in Veto + TH1F * fhConvertorCluster; // Histo of Cluster energies in Convertor + TH2F * fhConvertorEmc ; // 2d Convertor versus Emc energies + TH1F * fhPhotonEnergy ; // Spectrum of detected photons + TH1F * fhElectronEnergy ; // Spectrum of detected electrons + TH1F * fhNeutralEnergy ; // Spectrum of detected neutrals + TH1F * fhChargedEnergy ; // Spectrum of detected charged + TH1F * fhPhotonPositionX ; // X distribution of detected photons + TH1F * fhElectronPositionX ; // X distribution of detected electrons + TH1F * fhNeutralPositionX ; // X distribution of detected neutrals + TH1F * fhChargedPositionX ; // X distribution of detected charged + TH1F * fhPhotonPositionY ; // Y distribution of detected photons + TH1F * fhElectronPositionY ; // Y distribution of detected electrons + TH1F * fhNeutralPositionY ; // Y distribution of detected neutrals + TH1F * fhChargedPositionY ; // Y distribution of detected charged + ClassDef(AliPHOSAnalyze,1) // PHOS event analyzis , version 1 diff --git a/PHOS/AliPHOSClusterizer.h b/PHOS/AliPHOSClusterizer.h index 89155fde371..a583f1bebe1 100644 --- a/PHOS/AliPHOSClusterizer.h +++ b/PHOS/AliPHOSClusterizer.h @@ -23,6 +23,7 @@ // --- AliRoot header files --- +#include "AliPHOSDigit.h" typedef TClonesArray RecPointsList ; // a cluster has a variable size (see ROOT FAQ) typedef TClonesArray DigitsList ; //for digits saved on disk @@ -35,6 +36,7 @@ public: virtual ~AliPHOSClusterizer() ; // dtor virtual Float_t Calibrate(Int_t Amp) = 0 ; + virtual Bool_t IsInEmc(AliPHOSDigit * digit)= 0 ; virtual void GetNumberOfClustersFound(Int_t * numb) = 0 ; virtual void MakeClusters(const DigitsList * dl, RecPointsList * emccl, RecPointsList * ppsdl) = 0 ; virtual void PrintParameters() = 0 ; diff --git a/PHOS/AliPHOSClusterizerv1.cxx b/PHOS/AliPHOSClusterizerv1.cxx index b1c4838c438..e242a0c79a8 100644 --- a/PHOS/AliPHOSClusterizerv1.cxx +++ b/PHOS/AliPHOSClusterizerv1.cxx @@ -69,10 +69,10 @@ Int_t AliPHOSClusterizerv1::AreNeighbours(AliPHOSDigit * d1, AliPHOSDigit * d2) geom->AbsToRelNumbering(d2->GetId(), relid2) ; if ( (relid1[0] == relid2[0]) && (relid1[1]==relid2[1]) ) { // inside the same PHOS module and the same PPSD Module - Int_t RowDiff = TMath::Abs( relid1[2] - relid2[2] ) ; - Int_t ColDiff = TMath::Abs( relid1[3] - relid2[3] ) ; + Int_t rowdiff = TMath::Abs( relid1[2] - relid2[2] ) ; + Int_t coldiff = TMath::Abs( relid1[3] - relid2[3] ) ; - if (( ColDiff<=1 ) && ( RowDiff <= 1 )){ + if (( coldiff <= 1 ) && ( rowdiff <= 1 )){ rv = 1 ; } else { @@ -150,18 +150,18 @@ Bool_t AliPHOSClusterizerv1::IsInEmc(AliPHOSDigit * digit) void AliPHOSClusterizerv1::MakeClusters(const DigitsList * dl, RecPointsList * emcl, RecPointsList * ppsdl) { // Fill and sort the working digits list - TObjArray TempoDigitsList( dl->GetEntries() ) ; - FillandSort(dl, &TempoDigitsList) ; + TObjArray tempodigitslist( dl->GetEntries() ) ; + FillandSort(dl, &tempodigitslist) ; // Clusterization starts - TIter nextdigit(&TempoDigitsList) ; + TIter nextdigit(&tempodigitslist) ; AliPHOSDigit * digit ; - Bool_t NotRemoved = kTRUE ; + Bool_t notremoved = kTRUE ; while ( (digit = (AliPHOSDigit *)nextdigit()) ) { // scan over the list of digits AliPHOSRecPoint * clu ; - int * ClusterDigitsList[dl->GetEntries()] ; + int * clusterdigitslist[dl->GetEntries()] ; Int_t index ; if (( ( IsInEmc(digit) ) && ( Calibrate(digit->GetAmp() ) > fEmcClusteringThreshold ) ) || ( ( !IsInEmc(digit) ) && ( Calibrate(digit->GetAmp() ) > fPpsdClusteringThreshold ) ) ) { @@ -174,9 +174,9 @@ void AliPHOSClusterizerv1::MakeClusters(const DigitsList * dl, RecPointsList * e fNumberOfEmcClusters++ ; clu->AddDigit(*digit, Calibrate(digit->GetAmp())) ; - ClusterDigitsList[iDigitInCluster] = (int* ) digit ; + clusterdigitslist[iDigitInCluster] = (int* ) digit ; iDigitInCluster++ ; - TempoDigitsList.Remove(digit) ; + tempodigitslist.Remove(digit) ; } else { @@ -184,25 +184,25 @@ void AliPHOSClusterizerv1::MakeClusters(const DigitsList * dl, RecPointsList * e clu = (AliPHOSPpsdRecPoint *) ppsdl->At(fNumberOfPpsdClusters) ; fNumberOfPpsdClusters++ ; clu->AddDigit(*digit, Calibrate(digit->GetAmp()) ) ; - ClusterDigitsList[iDigitInCluster] = (int* ) digit ; + clusterdigitslist[iDigitInCluster] = (int* ) digit ; iDigitInCluster++ ; - TempoDigitsList.Remove(digit) ; + tempodigitslist.Remove(digit) ; nextdigit.Reset() ; // Here we remove resting EMC digits, which cannot make cluster - if( NotRemoved ) { + if( notremoved ) { while( ( digit = (AliPHOSDigit *)nextdigit() ) ) { if( IsInEmc(digit) ) - TempoDigitsList.Remove(digit) ; + tempodigitslist.Remove(digit) ; else break ; } // while digit - } // if NotRemoved + } // if notremoved } // else @@ -211,7 +211,7 @@ void AliPHOSClusterizerv1::MakeClusters(const DigitsList * dl, RecPointsList * e AliPHOSDigit * digitN ; index = 0 ; while (index < iDigitInCluster){ // scan over digits already in cluster - digit = (AliPHOSDigit *) ClusterDigitsList[index] ; + digit = (AliPHOSDigit *) clusterdigitslist[index] ; index++ ; while ( (digitN = (AliPHOSDigit *)nextdigit()) ) { // scan over the reduced list of digits Int_t ineb = AreNeighbours(digit, digitN); // call (digit,digitN) in THAT oder !!!!! @@ -220,9 +220,9 @@ void AliPHOSClusterizerv1::MakeClusters(const DigitsList * dl, RecPointsList * e break ; case 1 : // are neighbours clu->AddDigit( *digitN, Calibrate( digitN->GetAmp() ) ) ; - ClusterDigitsList[iDigitInCluster] =(int*) digitN ; + clusterdigitslist[iDigitInCluster] =(int*) digitN ; iDigitInCluster++ ; - TempoDigitsList.Remove(digitN) ; + tempodigitslist.Remove(digitN) ; break ; case 2 : // too far from each other goto endofloop; @@ -239,7 +239,7 @@ void AliPHOSClusterizerv1::MakeClusters(const DigitsList * dl, RecPointsList * e } // while digit - TempoDigitsList.Clear() ; + tempodigitslist.Clear() ; } //____________________________________________________________________________ diff --git a/PHOS/AliPHOSClusterizerv1.h b/PHOS/AliPHOSClusterizerv1.h index 3b897b64b28..9c9635f1248 100644 --- a/PHOS/AliPHOSClusterizerv1.h +++ b/PHOS/AliPHOSClusterizerv1.h @@ -38,7 +38,7 @@ public: Float_t GetLogWeightCut(void){return fW0 ; } Float_t GetLocalMaxCut(void) {return fLocMaxCut ; } virtual void GetNumberOfClustersFound(Int_t * numb) ; - Bool_t IsInEmc(AliPHOSDigit * digit) ; // Tells if id digit is in EMC + virtual Bool_t IsInEmc(AliPHOSDigit * digit) ; // Tells if id digit is in EMC virtual void MakeClusters(const DigitsList * dl, RecPointsList * emcl, RecPointsList * ppsdl) ; // does the job virtual void PrintParameters() ; virtual void SetCalibrationParameters(Float_t A,Float_t B){ fA = A ; fB = B;} @@ -61,9 +61,7 @@ private: Float_t fPpsdClusteringThreshold ; Float_t fPpsdEnergyThreshold ; Float_t fW0 ; - -public: - + ClassDef(AliPHOSClusterizerv1,1) // Clusterizer implementation , version 1 }; diff --git a/PHOS/AliPHOSDigit.h b/PHOS/AliPHOSDigit.h index c9fccfd1200..9df7e2df34d 100644 --- a/PHOS/AliPHOSDigit.h +++ b/PHOS/AliPHOSDigit.h @@ -45,8 +45,6 @@ private: Int_t fId ; // absolute id Int_t fAmp ; // digitalized energy -public: - ClassDef(AliPHOSDigit,1) // Digit in PHOS, version 1 } ; diff --git a/PHOS/AliPHOSEmcRecPoint.cxx b/PHOS/AliPHOSEmcRecPoint.cxx index a8a4787e28e..df8047056ea 100644 --- a/PHOS/AliPHOSEmcRecPoint.cxx +++ b/PHOS/AliPHOSEmcRecPoint.cxx @@ -45,8 +45,8 @@ AliPHOSEmcRecPoint::AliPHOSEmcRecPoint(Float_t W0, Float_t LocMaxCut) fMulDigit = 0 ; fAmp = 0. ; fEnergyList = new Float_t[fMaxDigit]; - AliPHOSGeometry * PHOSGeom = (AliPHOSGeometry *) fGeom ; - fDelta = PHOSGeom->GetCrystalSize(0) ; + AliPHOSGeometry * phosgeom = (AliPHOSGeometry *) fGeom ; + fDelta = phosgeom->GetCrystalSize(0) ; fW0 = W0 ; fLocMaxCut = LocMaxCut ; fLocPos.SetX(1000000.) ; //Local position should be evaluated @@ -101,17 +101,17 @@ Bool_t AliPHOSEmcRecPoint::AreNeighbours(AliPHOSDigit * digit1, AliPHOSDigit * d Bool_t aren = kFALSE ; - AliPHOSGeometry * PHOSGeom = (AliPHOSGeometry *) fGeom ; + AliPHOSGeometry * phosgeom = (AliPHOSGeometry *) fGeom ; Int_t relid1[4] ; - PHOSGeom->AbsToRelNumbering(digit1->GetId(), relid1) ; + phosgeom->AbsToRelNumbering(digit1->GetId(), relid1) ; Int_t relid2[4] ; - PHOSGeom->AbsToRelNumbering(digit2->GetId(), relid2) ; + phosgeom->AbsToRelNumbering(digit2->GetId(), relid2) ; - Int_t RowDiff = TMath::Abs( relid1[2] - relid2[2] ) ; - Int_t ColDiff = TMath::Abs( relid1[3] - relid2[3] ) ; + Int_t rowdiff = TMath::Abs( relid1[2] - relid2[2] ) ; + Int_t coldiff = TMath::Abs( relid1[3] - relid2[3] ) ; - if (( ColDiff<=1 ) && ( RowDiff <= 1 ) && (ColDiff+RowDiff > 0)) + if (( coldiff <= 1 ) && ( rowdiff <= 1 ) && (coldiff + rowdiff > 0)) aren = kTRUE ; return aren ; @@ -125,28 +125,28 @@ Int_t AliPHOSEmcRecPoint::Compare(TObject * obj) AliPHOSEmcRecPoint * clu = (AliPHOSEmcRecPoint *)obj ; - Int_t PHOSMod1 = this->GetPHOSMod() ; - Int_t PHOSMod2 = clu->GetPHOSMod() ; + Int_t phosmod1 = this->GetPHOSMod() ; + Int_t phosmod2 = clu->GetPHOSMod() ; - TVector3 LocPos1; - this->GetLocalPosition(LocPos1) ; - TVector3 LocPos2; - clu->GetLocalPosition(LocPos2) ; + TVector3 locpos1; + this->GetLocalPosition(locpos1) ; + TVector3 locpos2; + clu->GetLocalPosition(locpos2) ; - if(PHOSMod1 == PHOSMod2 ) { - Int_t rowdif = (Int_t)TMath::Ceil(LocPos1.X()/fDelta)-(Int_t)TMath::Ceil(LocPos2.X()/fDelta) ; + if(phosmod1 == phosmod2 ) { + Int_t rowdif = (Int_t)TMath::Ceil(locpos1.X()/fDelta)-(Int_t)TMath::Ceil(locpos2.X()/fDelta) ; if (rowdif> 0) rv = -1 ; else if(rowdif < 0) rv = 1 ; - else if(LocPos1.Z()>LocPos2.Z()) + else if(locpos1.Z()>locpos2.Z()) rv = -1 ; else rv = 1 ; } else { - if(PHOSMod1 < PHOSMod2 ) + if(phosmod1 < phosmod2 ) rv = -1 ; else rv = 1 ; @@ -167,18 +167,18 @@ void AliPHOSEmcRecPoint::ExecuteEvent(Int_t event, Int_t px, Int_t py) // static Int_t pxold, pyold; - static TGraph * DigitGraph = 0 ; + static TGraph * digitgraph = 0 ; if (!gPad->IsEditable()) return; - TH2F * Histo = 0 ; - TCanvas * HistoCanvas ; + TH2F * histo = 0 ; + TCanvas * histocanvas ; switch (event) { case kButton1Down: { AliPHOSDigit * digit ; - AliPHOSGeometry * PHOSGeom = (AliPHOSGeometry *) fGeom ; + AliPHOSGeometry * phosgeom = (AliPHOSGeometry *) fGeom ; Int_t iDigit; Int_t relid[4] ; Float_t xi[fMulDigit] ; @@ -193,8 +193,8 @@ void AliPHOSEmcRecPoint::ExecuteEvent(Int_t event, Int_t px, Int_t py) for(iDigit=0; iDigitAbsToRelNumbering(digit->GetId(), relid) ; - PHOSGeom->RelPosInModule(relid, xi[iDigit], zi[iDigit]); + phosgeom->AbsToRelNumbering(digit->GetId(), relid) ; + phosgeom->RelPosInModule(relid, xi[iDigit], zi[iDigit]); if ( xi[iDigit] > ximax ) ximax = xi[iDigit] ; if ( xi[iDigit] < ximin ) @@ -204,52 +204,52 @@ void AliPHOSEmcRecPoint::ExecuteEvent(Int_t event, Int_t px, Int_t py) if ( zi[iDigit] < zimin ) zimin = zi[iDigit] ; } - ximax += PHOSGeom->GetCrystalSize(0) / 2. ; - zimax += PHOSGeom->GetCrystalSize(2) / 2. ; - ximin -= PHOSGeom->GetCrystalSize(0) / 2. ; - zimin -= PHOSGeom->GetCrystalSize(2) / 2. ; - Int_t xdim = (int)( (ximax - ximin ) / PHOSGeom->GetCrystalSize(0) + 0.5 ) ; - Int_t zdim = (int)( (zimax - zimin ) / PHOSGeom->GetCrystalSize(2) + 0.5 ) ; + ximax += phosgeom->GetCrystalSize(0) / 2. ; + zimax += phosgeom->GetCrystalSize(2) / 2. ; + ximin -= phosgeom->GetCrystalSize(0) / 2. ; + zimin -= phosgeom->GetCrystalSize(2) / 2. ; + Int_t xdim = (int)( (ximax - ximin ) / phosgeom->GetCrystalSize(0) + 0.5 ) ; + Int_t zdim = (int)( (zimax - zimin ) / phosgeom->GetCrystalSize(2) + 0.5 ) ; // 2. gets the histogram title Text_t title[100] ; sprintf(title,"Energy=%1.2f GeV ; Digits ; %d ", GetEnergy(), GetDigitsMultiplicity()) ; - if (!Histo) { - delete Histo ; - Histo = 0 ; + if (!histo) { + delete histo ; + histo = 0 ; } - Histo = new TH2F("cluster3D", title, xdim, ximin, ximax, zdim, zimin, zimax) ; + histo = new TH2F("cluster3D", title, xdim, ximin, ximax, zdim, zimin, zimax) ; Float_t x, z ; for(iDigit=0; iDigitAbsToRelNumbering(digit->GetId(), relid) ; - PHOSGeom->RelPosInModule(relid, x, z); - Histo->Fill(x, z, fEnergyList[iDigit] ) ; + phosgeom->AbsToRelNumbering(digit->GetId(), relid) ; + phosgeom->RelPosInModule(relid, x, z); + histo->Fill(x, z, fEnergyList[iDigit] ) ; } - if (!DigitGraph) { - DigitGraph = new TGraph(fMulDigit,xi,zi); - DigitGraph-> SetMarkerStyle(5) ; - DigitGraph-> SetMarkerSize(1.) ; - DigitGraph-> SetMarkerColor(1) ; - DigitGraph-> Paint("P") ; + if (!digitgraph) { + digitgraph = new TGraph(fMulDigit,xi,zi); + digitgraph-> SetMarkerStyle(5) ; + digitgraph-> SetMarkerSize(1.) ; + digitgraph-> SetMarkerColor(1) ; + digitgraph-> Paint("P") ; } Print() ; - HistoCanvas = new TCanvas("cluser", "a single cluster", 600, 500) ; - HistoCanvas->Draw() ; - Histo->Draw("lego1") ; + histocanvas = new TCanvas("cluser", "a single cluster", 600, 500) ; + histocanvas->Draw() ; + histo->Draw("lego1") ; break; } case kButton1Up: - if (DigitGraph) { - delete DigitGraph ; - DigitGraph = 0 ; + if (digitgraph) { + delete digitgraph ; + digitgraph = 0 ; } break; @@ -259,17 +259,17 @@ void AliPHOSEmcRecPoint::ExecuteEvent(Int_t event, Int_t px, Int_t py) //____________________________________________________________________________ Float_t AliPHOSEmcRecPoint::GetDispersion() { - Float_t D = 0 ; + Float_t d = 0 ; Float_t wtot = 0 ; - TVector3 LocPos; - GetLocalPosition(LocPos); - Float_t x = LocPos.X() ; - Float_t z = LocPos.Z() ; + TVector3 locpos; + GetLocalPosition(locpos); + Float_t x = locpos.X() ; + Float_t z = locpos.Z() ; // Int_t i = GetPHOSMod() ; AliPHOSDigit * digit ; - AliPHOSGeometry * PHOSGeom = (AliPHOSGeometry *) fGeom ; + AliPHOSGeometry * phosgeom = (AliPHOSGeometry *) fGeom ; Int_t iDigit; for(iDigit=0; iDigitAbsToRelNumbering(digit->GetId(), relid) ; - PHOSGeom->RelPosInModule(relid, xi, zi); + phosgeom->AbsToRelNumbering(digit->GetId(), relid) ; + phosgeom->RelPosInModule(relid, xi, zi); Float_t w = TMath::Max(0.,fW0+TMath::Log(fEnergyList[iDigit]/fAmp ) ) ; - D += w*((xi-x)*(xi-x) + (zi-z)*(zi-z) ) ; + d += w*((xi-x)*(xi-x) + (zi-z)*(zi-z) ) ; wtot+=w ; } - D /= wtot ; + d /= wtot ; - return TMath::Sqrt(D) ; + return TMath::Sqrt(d) ; } //____________________________________________________________________________ @@ -295,12 +295,12 @@ void AliPHOSEmcRecPoint::GetElipsAxis(Float_t * lambda) Float_t wtot = 0. ; Float_t x = 0.; Float_t z = 0.; - Float_t Dxx = 0.; - Float_t Dzz = 0.; - Float_t Dxz = 0.; + Float_t dxx = 0.; + Float_t dzz = 0.; + Float_t dxz = 0.; AliPHOSDigit * digit ; - AliPHOSGeometry * PHOSGeom = (AliPHOSGeometry *) fGeom ; + AliPHOSGeometry * phosgeom = (AliPHOSGeometry *) fGeom ; Int_t iDigit; for(iDigit=0; iDigitAbsToRelNumbering(digit->GetId(), relid) ; - PHOSGeom->RelPosInModule(relid, xi, zi); + phosgeom->AbsToRelNumbering(digit->GetId(), relid) ; + phosgeom->RelPosInModule(relid, xi, zi); Float_t w = TMath::Max(0.,fW0+TMath::Log(fEnergyList[iDigit]/fAmp ) ) ; - Dxx += w * xi * xi ; + dxx += w * xi * xi ; x += w * xi ; - Dzz += w * zi * zi ; + dzz += w * zi * zi ; z += w * zi ; - Dxz += w * xi * zi ; + dxz += w * xi * zi ; wtot += w ; } - Dxx /= wtot ; + dxx /= wtot ; x /= wtot ; - Dxx -= x * x ; - Dzz /= wtot ; + dxx -= x * x ; + dzz /= wtot ; z /= wtot ; - Dzz -= z * z ; - Dxz /= wtot ; - Dxz -= x * z ; + dzz -= z * z ; + dxz /= wtot ; + dxz -= x * z ; - lambda[0] = TMath::Sqrt( 0.5 * (Dxx + Dzz) + TMath::Sqrt( 0.25 * (Dxx - Dzz) * (Dxx - Dzz) + Dxz * Dxz ) ) ; - lambda[1] = TMath::Sqrt( 0.5 * (Dxx + Dzz) - TMath::Sqrt( 0.25 * (Dxx - Dzz) * (Dxx - Dzz) + Dxz * Dxz ) ) ; + lambda[0] = TMath::Sqrt( 0.5 * (dxx + dzz) + TMath::Sqrt( 0.25 * (dxx - dzz) * (dxx - dzz) + dxz * dxz ) ) ; + lambda[1] = TMath::Sqrt( 0.5 * (dxx + dzz) - TMath::Sqrt( 0.25 * (dxx - dzz) * (dxx - dzz) + dxz * dxz ) ) ; } //____________________________________________________________________________ @@ -427,7 +427,7 @@ void AliPHOSEmcRecPoint::GetLocalPosition(TVector3 &LPos) AliPHOSDigit * digit ; - AliPHOSGeometry * PHOSGeom = (AliPHOSGeometry *) fGeom ; + AliPHOSGeometry * phosgeom = (AliPHOSGeometry *) fGeom ; Int_t iDigit; @@ -437,8 +437,8 @@ void AliPHOSEmcRecPoint::GetLocalPosition(TVector3 &LPos) Float_t xi ; Float_t zi ; - PHOSGeom->AbsToRelNumbering(digit->GetId(), relid) ; - PHOSGeom->RelPosInModule(relid, xi, zi); + phosgeom->AbsToRelNumbering(digit->GetId(), relid) ; + phosgeom->RelPosInModule(relid, xi, zi); Float_t w = TMath::Max( 0., fW0 + TMath::Log( fEnergyList[iDigit] / fAmp ) ) ; x += xi * w ; z += zi * w ; @@ -458,7 +458,7 @@ void AliPHOSEmcRecPoint::GetLocalPosition(TVector3 &LPos) // //____________________________________________________________________________ // AliPHOSEmcRecPoint& AliPHOSEmcRecPoint::operator = (AliPHOSEmcRecPoint Clu) // { -// int * DL = Clu.GetDigitsList() ; +// int * dl = Clu.GetDigitsList() ; // if(fDigitsList) // delete fDigitsList ; @@ -468,15 +468,15 @@ void AliPHOSEmcRecPoint::GetLocalPosition(TVector3 &LPos) // Int_t iDigit; // for(iDigit=0; iDigitAbsToRelNumbering(digit->GetId(), relid) ; - PHOSGeom->RelPosInModule(relid, xi, zi); + phosgeom->AbsToRelNumbering(digit->GetId(), relid) ; + phosgeom->RelPosInModule(relid, xi, zi); cout << " Id = " << digit->GetId() ; cout << " module = " << relid[0] ; cout << " x = " << xi ; diff --git a/PHOS/AliPHOSEmcRecPoint.h b/PHOS/AliPHOSEmcRecPoint.h index eb29637e076..b7b0eac89d3 100644 --- a/PHOS/AliPHOSEmcRecPoint.h +++ b/PHOS/AliPHOSEmcRecPoint.h @@ -62,9 +62,7 @@ private: Float_t * fEnergyList ; // energy of digits Float_t fW0 ; // logarithmic weight factor for center of gravity calculation -public: - -ClassDef(AliPHOSEmcRecPoint,1) // EMC RecPoint, version 1 + ClassDef(AliPHOSEmcRecPoint,1) // EMC RecPoint, version 1 }; diff --git a/PHOS/AliPHOSGeometry.cxx b/PHOS/AliPHOSGeometry.cxx index 088fc60d3a3..71fdf86dbfa 100644 --- a/PHOS/AliPHOSGeometry.cxx +++ b/PHOS/AliPHOSGeometry.cxx @@ -46,37 +46,37 @@ AliPHOSGeometry::~AliPHOSGeometry(void) } //____________________________________________________________________________ -Bool_t AliPHOSGeometry::AbsToRelNumbering(const Int_t AbsId, Int_t * RelId) +Bool_t AliPHOSGeometry::AbsToRelNumbering(const Int_t AbsId, Int_t * relid) { - // RelId[0] = PHOS Module number 1:fNModules - // RelId[1] = 0 if PbW04 + // relid[0] = PHOS Module number 1:fNModules + // relid[1] = 0 if PbW04 // = PPSD Module number 1:fNumberOfModulesPhi*fNumberOfModulesZ*2 (2->up and bottom level) - // RelId[2] = Row number inside a PHOS or PPSD module - // RelId[3] = Column number inside a PHOS or PPSD module + // relid[2] = Row number inside a PHOS or PPSD module + // relid[3] = Column number inside a PHOS or PPSD module Bool_t rv = kTRUE ; - Float_t Id = AbsId ; + Float_t id = AbsId ; - Int_t PHOSModuleNumber = (Int_t)TMath:: Ceil( Id / ( GetNPhi() * GetNZ() ) ) ; + Int_t phosmodulenumber = (Int_t)TMath:: Ceil( id / ( GetNPhi() * GetNZ() ) ) ; - if ( PHOSModuleNumber > GetNModules() ) { // its a PPSD pad + if ( phosmodulenumber > GetNModules() ) { // its a PPSD pad - Id -= GetNPhi() * GetNZ() * GetNModules() ; + id -= GetNPhi() * GetNZ() * GetNModules() ; Float_t tempo = 2 * GetNumberOfModulesPhi() * GetNumberOfModulesZ() * GetNumberOfPadsPhi() * GetNumberOfPadsZ() ; - RelId[0] = (Int_t)TMath::Ceil( Id / tempo ) ; - Id -= ( RelId[0] - 1 ) * tempo ; - RelId[1] = (Int_t)TMath::Ceil( Id / ( GetNumberOfPadsPhi() * GetNumberOfPadsZ() ) ) ; - Id -= ( RelId[1] - 1 ) * GetNumberOfPadsPhi() * GetNumberOfPadsZ() ; - RelId[2] = (Int_t)TMath::Ceil( Id / GetNumberOfPadsPhi() ) ; - RelId[3] = (Int_t) ( Id - ( RelId[2] - 1 ) * GetNumberOfPadsPhi() ) ; + relid[0] = (Int_t)TMath::Ceil( id / tempo ) ; + id -= ( relid[0] - 1 ) * tempo ; + relid[1] = (Int_t)TMath::Ceil( id / ( GetNumberOfPadsPhi() * GetNumberOfPadsZ() ) ) ; + id -= ( relid[1] - 1 ) * GetNumberOfPadsPhi() * GetNumberOfPadsZ() ; + relid[2] = (Int_t)TMath::Ceil( id / GetNumberOfPadsPhi() ) ; + relid[3] = (Int_t) ( id - ( relid[2] - 1 ) * GetNumberOfPadsPhi() ) ; } else { // its a PW04 crystal - RelId[0] = PHOSModuleNumber ; - RelId[1] = 0 ; - Id -= ( PHOSModuleNumber - 1 ) * GetNPhi() * GetNZ() ; - RelId[2] = (Int_t)TMath::Ceil( Id / GetNPhi() ) ; - RelId[3] = (Int_t)( Id - ( RelId[2] - 1 ) * GetNPhi() ) ; + relid[0] = phosmodulenumber ; + relid[1] = 0 ; + id -= ( phosmodulenumber - 1 ) * GetNPhi() * GetNZ() ; + relid[2] = (Int_t)TMath::Ceil( id / GetNPhi() ) ; + relid[3] = (Int_t)( id - ( relid[2] - 1 ) * GetNPhi() ) ; } return rv ; } @@ -96,21 +96,21 @@ void AliPHOSGeometry::EmcModuleCoverage(const Int_t mod, Double_t & tm, Double_t } Float_t phi = GetPHOSAngle(mod) * (TMath::Pi() / 180.) ; - Float_t Y0 = GetIPtoOuterCoverDistance() + GetUpperPlateThickness() + Float_t y0 = GetIPtoOuterCoverDistance() + GetUpperPlateThickness() + GetSecondUpperPlateThickness() + GetUpperCoolingPlateThickness() ; - Double_t angle = TMath::ATan( GetCrystalSize(0)*GetNPhi() / (2 * Y0) ) ; + Double_t angle = TMath::ATan( GetCrystalSize(0)*GetNPhi() / (2 * y0) ) ; phi = phi + 1.5 * TMath::Pi() ; // to follow the convention of the particle generator(PHOS is between 230 and 310 deg.) - Double_t m = phi - angle ; - Double_t M = phi + angle ; - pM = TMath::Max(M, m) * conv ; - pm = TMath::Min(M, m) * conv ; + Double_t max = phi - angle ; + Double_t min = phi + angle ; + pM = TMath::Max(max, min) * conv ; + pm = TMath::Min(max, min) * conv ; - angle = TMath::ATan( GetCrystalSize(2)*GetNZ() / (2 * Y0) ) ; - M = TMath::Pi() / 2. + angle ; // to follow the convention of the particle generator(PHOS is at 90 deg.) - m = TMath::Pi() / 2. - angle ; - tM = TMath::Max(M, m) * conv ; - tm = TMath::Min(M, m) * conv ; + angle = TMath::ATan( GetCrystalSize(2)*GetNZ() / (2 * y0) ) ; + max = TMath::Pi() / 2. + angle ; // to follow the convention of the particle generator(PHOS is at 90 deg.) + min = TMath::Pi() / 2. - angle ; + tM = TMath::Max(max, min) * conv ; + tm = TMath::Min(max, min) * conv ; } @@ -129,10 +129,10 @@ void AliPHOSGeometry::EmcXtalCoverage(Double_t & theta, Double_t & phi, Option_t conv = 1. ; } - Float_t Y0 = GetIPtoOuterCoverDistance() + GetUpperPlateThickness() + Float_t y0 = GetIPtoOuterCoverDistance() + GetUpperPlateThickness() + GetSecondUpperPlateThickness() + GetUpperCoolingPlateThickness() ; - theta = 2 * TMath::ATan( GetCrystalSize(2) / (2 * Y0) ) * conv ; - phi = 2 * TMath::ATan( GetCrystalSize(0) / (2 * Y0) ) * conv ; + theta = 2 * TMath::ATan( GetCrystalSize(2) / (2 * y0) ) * conv ; + phi = 2 * TMath::ATan( GetCrystalSize(0) / (2 * y0) ) * conv ; } @@ -154,12 +154,12 @@ void AliPHOSGeometry::ImpactOnEmc(const Double_t theta, const Double_t phi, Int_ } if ( ModuleNumber != 0 ) { Float_t phi0 = GetPHOSAngle(ModuleNumber) * (TMath::Pi() / 180.) + 1.5 * TMath::Pi() ; - Float_t Y0 = GetIPtoOuterCoverDistance() + GetUpperPlateThickness() + Float_t y0 = GetIPtoOuterCoverDistance() + GetUpperPlateThickness() + GetSecondUpperPlateThickness() + GetUpperCoolingPlateThickness() ; Double_t angle = phi - phi0; - x = Y0 * TMath::Tan(angle) ; + x = y0 * TMath::Tan(angle) ; angle = theta - TMath::Pi() / 2 ; - z = Y0 * TMath::Tan(angle) ; + z = y0 * TMath::Tan(angle) ; } } @@ -168,7 +168,7 @@ void AliPHOSGeometry::GetGlobal(const AliRecPoint* RecPoint, TVector3 & gpos, TM { AliPHOSRecPoint * tmpPHOS = (AliPHOSRecPoint *) RecPoint ; - TVector3 LocalPosition ; + TVector3 localposition ; tmpPHOS->GetLocalPosition(gpos) ; @@ -191,15 +191,15 @@ void AliPHOSGeometry::GetGlobal(const AliRecPoint* RecPoint, TVector3 & gpos, TM gpos.SetY(-( GetIPtoOuterCoverDistance() - GetMicromegas2Thickness() / 2.0) ) ; } - Float_t Phi = GetPHOSAngle( tmpPHOS->GetPHOSMod()) ; - Double_t const RADDEG = 180.0 / kPI ; - Float_t rPhi = Phi / RADDEG ; + Float_t phi = GetPHOSAngle( tmpPHOS->GetPHOSMod()) ; + Double_t const kRADDEG = 180.0 / kPI ; + Float_t rphi = phi / kRADDEG ; - TRotation Rot ; - Rot.RotateZ(-rPhi) ; // a rotation around Z by angle + TRotation rot ; + rot.RotateZ(-rphi) ; // a rotation around Z by angle - TRotation dummy = Rot.Invert() ; // to transform from original frame to rotate frame - gpos.Transform(Rot) ; // rotate the baby + TRotation dummy = rot.Invert() ; // to transform from original frame to rotate frame + gpos.Transform(rot) ; // rotate the baby } @@ -207,7 +207,7 @@ void AliPHOSGeometry::GetGlobal(const AliRecPoint* RecPoint, TVector3 & gpos, TM void AliPHOSGeometry::GetGlobal(const AliRecPoint* RecPoint, TVector3 & gpos) { AliPHOSRecPoint * tmpPHOS = (AliPHOSRecPoint *) RecPoint ; - TVector3 LocalPosition ; + TVector3 localposition ; tmpPHOS->GetLocalPosition(gpos) ; @@ -228,15 +228,15 @@ void AliPHOSGeometry::GetGlobal(const AliRecPoint* RecPoint, TVector3 & gpos) gpos.SetY(-( GetIPtoOuterCoverDistance() - GetMicromegas2Thickness() / 2.0) ) ; } - Float_t Phi = GetPHOSAngle( tmpPHOS->GetPHOSMod()) ; - Double_t const RADDEG = 180.0 / kPI ; - Float_t rPhi = Phi / RADDEG ; + Float_t phi = GetPHOSAngle( tmpPHOS->GetPHOSMod()) ; + Double_t const kRADDEG = 180.0 / kPI ; + Float_t rphi = phi / kRADDEG ; - TRotation Rot ; - Rot.RotateZ(-rPhi) ; // a rotation around Z by angle + TRotation rot ; + rot.RotateZ(-rphi) ; // a rotation around Z by angle - TRotation dummy = Rot.Invert() ; // to transform from original frame to rotate frame - gpos.Transform(Rot) ; // rotate the baby + TRotation dummy = rot.Invert() ; // to transform from original frame to rotate frame + gpos.Transform(rot) ; // rotate the baby } //____________________________________________________________________________ @@ -292,9 +292,9 @@ void AliPHOSGeometry::InitPHOS(void) fIPtoOuterCoverDistance = 447.0 ; fIPtoCrystalSurface = 460.0 ; - fPinDiodeSize[0] = 1.0 ; - fPinDiodeSize[1] = 0.1 ; - fPinDiodeSize[2] = 1.0 ; + fPinDiodeSize[0] = 1.71 ; //Values given by Odd Harald feb 2000 + fPinDiodeSize[1] = 0.0280 ; // 0.0280 is the depth of active layer in the silicon + fPinDiodeSize[2] = 1.61 ; fUpperCoolingPlateThickness = 0.06 ; fSupportPlateThickness = 10.0 ; @@ -310,16 +310,16 @@ void AliPHOSGeometry::InitPHOS(void) fAirThickness[1] = 20.5175 ; fAirThickness[2] = 2.48 ; - Float_t XtalModulePhiSize = fNPhi * ( fXtlSize[0] + 2 * fGapBetweenCrystals ) ; - Float_t XtalModuleZSize = fNZ * ( fXtlSize[2] + 2 * fGapBetweenCrystals ) ; + Float_t xtalModulePhiSize = fNPhi * ( fXtlSize[0] + 2 * fGapBetweenCrystals ) ; + Float_t xtalModuleZSize = fNZ * ( fXtlSize[2] + 2 * fGapBetweenCrystals ) ; // The next dimensions are calculated from the above parameters - fOuterBoxSize[0] = XtalModulePhiSize + 2 * ( fAirThickness[0] + fModuleBoxThickness + fOuterBoxSize[0] = xtalModulePhiSize + 2 * ( fAirThickness[0] + fModuleBoxThickness + fTextolitBoxThickness[0] + fOuterBoxThickness[0] ) ; fOuterBoxSize[1] = ( fXtlSize[1] + fCrystalSupportHeight + fCrystalWrapThickness + fCrystalHolderThickness ) + 2 * (fAirThickness[1] + fModuleBoxThickness + fTextolitBoxThickness[1] + fOuterBoxThickness[1] ) ; - fOuterBoxSize[2] = XtalModuleZSize + 2 * ( fAirThickness[2] + fModuleBoxThickness + fOuterBoxSize[2] = xtalModuleZSize + 2 * ( fAirThickness[2] + fModuleBoxThickness + fTextolitBoxThickness[2] + fOuterBoxThickness[2] ) ; fTextolitBoxSize[0] = fOuterBoxSize[0] - 2 * fOuterBoxThickness[0] ; @@ -398,7 +398,7 @@ AliPHOSGeometry * AliPHOSGeometry::GetInstance(const Text_t* name, const Text_t } //____________________________________________________________________________ -Bool_t AliPHOSGeometry::RelToAbsNumbering(const Int_t * RelId, Int_t & AbsId) +Bool_t AliPHOSGeometry::RelToAbsNumbering(const Int_t * relid, Int_t & AbsId) { // AbsId = 1:fNModules * fNPhi * fNZ -> PbWO4 @@ -406,20 +406,20 @@ Bool_t AliPHOSGeometry::RelToAbsNumbering(const Int_t * RelId, Int_t & AbsId) Bool_t rv = kTRUE ; - if ( RelId[1] > 0 ) { // its a PPSD pad + if ( relid[1] > 0 ) { // its a PPSD pad AbsId = GetNPhi() * GetNZ() * GetNModules() // the offset to separate emcal crystals from PPSD pads - + ( RelId[0] - 1 ) * GetNumberOfModulesPhi() * GetNumberOfModulesZ() // the pads offset of PHOS modules + + ( relid[0] - 1 ) * GetNumberOfModulesPhi() * GetNumberOfModulesZ() // the pads offset of PHOS modules * GetNumberOfPadsPhi() * GetNumberOfPadsZ() * 2 - + ( RelId[1] - 1 ) * GetNumberOfPadsPhi() * GetNumberOfPadsZ() // the pads offset of PPSD modules - + ( RelId[2] - 1 ) * GetNumberOfPadsPhi() // the pads offset of a PPSD row - + RelId[3] ; // the column number + + ( relid[1] - 1 ) * GetNumberOfPadsPhi() * GetNumberOfPadsZ() // the pads offset of PPSD modules + + ( relid[2] - 1 ) * GetNumberOfPadsPhi() // the pads offset of a PPSD row + + relid[3] ; // the column number } else { - if ( RelId[1] == 0 ) { // its a Phos crystal - AbsId = ( RelId[0] - 1 ) * GetNPhi() * GetNZ() // the offset of PHOS modules - + ( RelId[2] - 1 ) * GetNPhi() // the offset of a xtal row - + RelId[3] ; // the column number + if ( relid[1] == 0 ) { // its a Phos crystal + AbsId = ( relid[0] - 1 ) * GetNPhi() * GetNZ() // the offset of PHOS modules + + ( relid[2] - 1 ) * GetNPhi() // the offset of a xtal row + + relid[3] ; // the column number } } @@ -428,51 +428,51 @@ Bool_t AliPHOSGeometry::RelToAbsNumbering(const Int_t * RelId, Int_t & AbsId) //____________________________________________________________________________ -void AliPHOSGeometry::RelPosInAlice(const Int_t Id, TVector3 & pos ) +void AliPHOSGeometry::RelPosInAlice(const Int_t id, TVector3 & pos ) { - if (Id > 0) { + if (id > 0) { - Int_t RelId[4] ; + Int_t relid[4] ; - AbsToRelNumbering(Id , RelId) ; + AbsToRelNumbering(id , relid) ; - Int_t PHOSModule = RelId[0] ; + Int_t phosmodule = relid[0] ; - Float_t Y0 ; + Float_t y0 = 0 ; - if ( RelId[1] == 0 ) // it is a PbW04 crystal - { Y0 = -(GetIPtoOuterCoverDistance() + GetUpperPlateThickness() + if ( relid[1] == 0 ) // it is a PbW04 crystal + { y0 = -(GetIPtoOuterCoverDistance() + GetUpperPlateThickness() + GetSecondUpperPlateThickness() + GetUpperCoolingPlateThickness()) ; } - if ( RelId[1] > 0 ) { // its a PPSD pad - if ( RelId[1] > GetNumberOfModulesPhi() * GetNumberOfModulesZ() ) // its an bottom module + if ( relid[1] > 0 ) { // its a PPSD pad + if ( relid[1] > GetNumberOfModulesPhi() * GetNumberOfModulesZ() ) // its an bottom module { - Y0 = -( GetIPtoOuterCoverDistance() - GetMicromegas2Thickness() / 2.0) ; + y0 = -( GetIPtoOuterCoverDistance() - GetMicromegas2Thickness() / 2.0) ; } else // its an upper module - Y0 = -( GetIPtoOuterCoverDistance() - GetMicromegas2Thickness() - GetLeadToMicro2Gap() + y0 = -( GetIPtoOuterCoverDistance() - GetMicromegas2Thickness() - GetLeadToMicro2Gap() - GetLeadConverterThickness() - GetMicro1ToLeadGap() - GetMicromegas1Thickness() / 2.0) ; } Float_t x, z ; - RelPosInModule(RelId, x, z) ; + RelPosInModule(relid, x, z) ; pos.SetX(x) ; pos.SetZ(z) ; - pos.SetY( TMath::Sqrt(x*x + z*z + Y0*Y0) ) ; + pos.SetY( TMath::Sqrt(x*x + z*z + y0*y0) ) ; - Float_t Phi = GetPHOSAngle( PHOSModule) ; - Double_t const RADDEG = 180.0 / kPI ; - Float_t rPhi = Phi / RADDEG ; + Float_t phi = GetPHOSAngle( phosmodule) ; + Double_t const kRADDEG = 180.0 / kPI ; + Float_t rphi = phi / kRADDEG ; - TRotation Rot ; - Rot.RotateZ(-rPhi) ; // a rotation around Z by angle + TRotation rot ; + rot.RotateZ(-rphi) ; // a rotation around Z by angle - TRotation dummy = Rot.Invert() ; // to transform from original frame to rotate frame + TRotation dummy = rot.Invert() ; // to transform from original frame to rotate frame - pos.Transform(Rot) ; // rotate the baby + pos.Transform(rot) ; // rotate the baby } else { pos.SetX(0.); @@ -482,41 +482,41 @@ void AliPHOSGeometry::RelPosInAlice(const Int_t Id, TVector3 & pos ) } //____________________________________________________________________________ -void AliPHOSGeometry::RelPosInModule(const Int_t * RelId, Float_t & x, Float_t & z) +void AliPHOSGeometry::RelPosInModule(const Int_t * relid, Float_t & x, Float_t & z) { - Int_t PPSDModule ; - Int_t Row = RelId[2] ; //offset along z axiz - Int_t Column = RelId[3] ; //offset along x axiz + Int_t ppsdmodule ; + Int_t row = relid[2] ; //offset along z axiz + Int_t column = relid[3] ; //offset along x axiz - Float_t PadSizeZ = GetPPSDModuleSize(2)/ GetNumberOfPadsZ(); - Float_t PadSizeX = GetPPSDModuleSize(0)/ GetNumberOfPadsPhi(); + Float_t padsizeZ = GetPPSDModuleSize(2)/ GetNumberOfPadsZ(); + Float_t padsizeX = GetPPSDModuleSize(0)/ GetNumberOfPadsPhi(); - if ( RelId[1] == 0 ) { // its a PbW04 crystal - x = -( GetNPhi()/2. - Row + 0.5 ) * GetCrystalSize(0) ; // position ox Xtal with respect - z = ( GetNZ() /2. - Column + 0.5 ) * GetCrystalSize(2) ; // of center of PHOS module + if ( relid[1] == 0 ) { // its a PbW04 crystal + x = -( GetNPhi()/2. - row + 0.5 ) * GetCrystalSize(0) ; // position ox Xtal with respect + z = ( GetNZ() /2. - column + 0.5 ) * GetCrystalSize(2) ; // of center of PHOS module } else { - if ( RelId[1] > GetNumberOfModulesPhi() * GetNumberOfModulesZ() ) - PPSDModule = RelId[1]-GetNumberOfModulesPhi() * GetNumberOfModulesZ(); - else PPSDModule = RelId[1] ; - Int_t ModRow = 1+(Int_t)TMath::Ceil( (Float_t)PPSDModule / GetNumberOfModulesPhi()-1. ) ; - Int_t ModCol = PPSDModule - ( ModRow-1 ) * GetNumberOfModulesPhi() ; - Float_t x0 = ( GetNumberOfModulesPhi() / 2. - ModRow + 0.5 ) * GetPPSDModuleSize(0) ; - Float_t z0 = ( GetNumberOfModulesZ() / 2. - ModCol + 0.5 ) * GetPPSDModuleSize(2) ; - x = - ( GetNumberOfPadsPhi()/2. - Row - 0.5 ) * PadSizeX + x0 ; // position of pad with respect - z = ( GetNumberOfPadsZ()/2. - Column - 0.5 ) * PadSizeZ - z0 ; // of center of PHOS module + if ( relid[1] > GetNumberOfModulesPhi() * GetNumberOfModulesZ() ) + ppsdmodule = relid[1]-GetNumberOfModulesPhi() * GetNumberOfModulesZ(); + else ppsdmodule = relid[1] ; + Int_t modrow = 1+(Int_t)TMath::Ceil( (Float_t)ppsdmodule / GetNumberOfModulesPhi()-1. ) ; + Int_t modcol = ppsdmodule - ( modrow - 1 ) * GetNumberOfModulesPhi() ; + Float_t x0 = ( GetNumberOfModulesPhi() / 2. - modrow + 0.5 ) * GetPPSDModuleSize(0) ; + Float_t z0 = ( GetNumberOfModulesZ() / 2. - modcol + 0.5 ) * GetPPSDModuleSize(2) ; + x = - ( GetNumberOfPadsPhi()/2. - row - 0.5 ) * padsizeX + x0 ; // position of pad with respect + z = ( GetNumberOfPadsZ()/2. - column - 0.5 ) * padsizeZ - z0 ; // of center of PHOS module } } //____________________________________________________________________________ void AliPHOSGeometry:: SetPHOSAngles() { - Double_t const RADDEG = 180.0 / kPI ; - Float_t PPHI = TMath::ATan( fOuterBoxSize[0] / ( 2.0 * fIPtoOuterCoverDistance ) ) ; - PPHI *= RADDEG ; + Double_t const kRADDEG = 180.0 / kPI ; + Float_t pphi = TMath::ATan( fOuterBoxSize[0] / ( 2.0 * fIPtoOuterCoverDistance ) ) ; + pphi *= kRADDEG ; for( Int_t i = 1; i <= fNModules ; i++ ) { - Float_t angle = PPHI * 2 * ( i - fNModules / 2.0 - 0.5 ) ; + Float_t angle = pphi * 2 * ( i - fNModules / 2.0 - 0.5 ) ; fPHOSAngle[i-1] = - angle ; } } diff --git a/PHOS/AliPHOSLink.h b/PHOS/AliPHOSLink.h index 600a803cd2b..fa01ce9dee0 100644 --- a/PHOS/AliPHOSLink.h +++ b/PHOS/AliPHOSLink.h @@ -39,8 +39,6 @@ private: Int_t fEmcN ; // Emc index Int_t fPpsdN ; // Ppsd index Float_t fR ; // Distance - -public: ClassDef(AliPHOSLink,1) // description , version 1 diff --git a/PHOS/AliPHOSParticleGuesserv1.h b/PHOS/AliPHOSParticleGuesserv1.h index f8a88a2e697..8b99df9bf93 100644 --- a/PHOS/AliPHOSParticleGuesserv1.h +++ b/PHOS/AliPHOSParticleGuesserv1.h @@ -30,12 +30,7 @@ public: void GuessParticleType(TrackSegmentsList * trsl, RecParticlesList * rpl ) ; // does the job - -private: - -public: - -ClassDef( AliPHOSParticleGuesserv1,1) // particle guesser implementation , version 1 + ClassDef( AliPHOSParticleGuesserv1,1) // particle guesser implementation , version 1 }; diff --git a/PHOS/AliPHOSPpsdRecPoint.cxx b/PHOS/AliPHOSPpsdRecPoint.cxx index e8011767282..a904ec4e724 100644 --- a/PHOS/AliPHOSPpsdRecPoint.cxx +++ b/PHOS/AliPHOSPpsdRecPoint.cxx @@ -90,8 +90,8 @@ Int_t AliPHOSPpsdRecPoint::Compare(TObject * obj) Float_t x1 , z1 ; Float_t x2 , z2 ; - Int_t PhosMod1 ; - Int_t PhosMod2 ; + Int_t phosmod1 ; + Int_t phosmod2 ; Int_t up1 ; Int_t up2 ; @@ -106,17 +106,17 @@ Int_t AliPHOSPpsdRecPoint::Compare(TObject * obj) else // lower layer up2 = 1 ; - TVector3 PosLoc ; - this->GetLocalPosition(PosLoc) ; - x1 = PosLoc.X() ; - z1 = PosLoc.Z() ; - PhosMod1 = this->GetPHOSMod(); - clu->GetLocalPosition(PosLoc) ; - x2 = PosLoc.X() ; - z2 = PosLoc.Z() ; - PhosMod2 = clu->GetPHOSMod(); - - if(PhosMod1 == PhosMod2 ) { + TVector3 posloc ; + this->GetLocalPosition(posloc) ; + x1 = posloc.X() ; + z1 = posloc.Z() ; + phosmod1 = this->GetPHOSMod(); + clu->GetLocalPosition(posloc) ; + x2 = posloc.X() ; + z2 = posloc.Z() ; + phosmod2 = clu->GetPHOSMod(); + + if(phosmod1 == phosmod2 ) { if(up1 == up2 ){ Int_t rowdif = (Int_t)TMath::Ceil(x1/fDelta) - (Int_t) TMath::Ceil(x2/fDelta) ; @@ -139,11 +139,11 @@ Int_t AliPHOSPpsdRecPoint::Compare(TObject * obj) rv = - 1 ; } - } // if PhosMod1 == PhosMod2 + } // if phosmod1 == phosmod2 else { - if(PhosMod1 < PhosMod2 ) + if(phosmod1 < phosmod2 ) rv = -1 ; else rv = 1 ; @@ -166,7 +166,7 @@ void AliPHOSPpsdRecPoint::GetLocalPosition(TVector3 &LPos){ Float_t x = 0. ; Float_t z = 0. ; - AliPHOSGeometry * PHOSGeom = (AliPHOSGeometry *) fGeom ; + AliPHOSGeometry * phosgeom = (AliPHOSGeometry *) fGeom ; AliPHOSDigit * digit ; Int_t iDigit; @@ -176,8 +176,8 @@ void AliPHOSPpsdRecPoint::GetLocalPosition(TVector3 &LPos){ Float_t xi ; Float_t zi ; - PHOSGeom->AbsToRelNumbering(digit->GetId(), relid) ; - PHOSGeom->RelPosInModule(relid, xi, zi); + phosgeom->AbsToRelNumbering(digit->GetId(), relid) ; + phosgeom->RelPosInModule(relid, xi, zi); x += xi ; z += zi ; } @@ -198,15 +198,15 @@ Bool_t AliPHOSPpsdRecPoint::GetUp() { Int_t relid[4] ; - AliPHOSGeometry * PHOSGeom = (AliPHOSGeometry *) fGeom ; + AliPHOSGeometry * phosgeom = (AliPHOSGeometry *) fGeom ; AliPHOSDigit *digit = (AliPHOSDigit *)fDigitsList[0] ; - PHOSGeom->AbsToRelNumbering(digit->GetId(),relid); + phosgeom->AbsToRelNumbering(digit->GetId(),relid); Bool_t up ; if((Int_t)TMath::Ceil((Float_t)relid[1]/ - (PHOSGeom->GetNumberOfModulesPhi()*PHOSGeom->GetNumberOfModulesZ())-0.0001 ) > 1) + (phosgeom->GetNumberOfModulesPhi()*phosgeom->GetNumberOfModulesZ())-0.0001 ) > 1) up = kFALSE ; else up = kTRUE ; @@ -222,18 +222,18 @@ void AliPHOSPpsdRecPoint::Paint(Option_t *) GetLocalPosition(pos) ; Coord_t x = pos.X() ; Coord_t y = pos.Z() ; - Color_t MarkerColor = 1 ; - Size_t MarkerSize = 1. ; - Style_t MarkerStyle = 2 ; + Color_t markercolor = 1 ; + Size_t markersize = 1. ; + Style_t markerstyle = 2 ; if (GetUp()) - MarkerStyle = 3 ; + markerstyle = 3 ; if (!gPad->IsBatch()) { - gVirtualX->SetMarkerColor(MarkerColor); - gVirtualX->SetMarkerSize (MarkerSize); - gVirtualX->SetMarkerStyle(MarkerStyle); + gVirtualX->SetMarkerColor(markercolor); + gVirtualX->SetMarkerSize (markersize); + gVirtualX->SetMarkerStyle(markerstyle); } - gPad->SetAttMarkerPS(MarkerColor,MarkerStyle,MarkerSize); + gPad->SetAttMarkerPS(markercolor,markerstyle,markersize); gPad->PaintPolyMarker(1,&x,&y,""); @@ -246,7 +246,7 @@ void AliPHOSPpsdRecPoint::Print(Option_t * option) AliPHOSDigit * digit ; Int_t iDigit; - AliPHOSGeometry * PHOSGeom = (AliPHOSGeometry *) fGeom ; + AliPHOSGeometry * phosgeom = (AliPHOSGeometry *) fGeom ; Float_t xi ; Float_t zi ; @@ -254,8 +254,8 @@ void AliPHOSPpsdRecPoint::Print(Option_t * option) for(iDigit=0; iDigitAbsToRelNumbering(digit->GetId(), relid) ; - PHOSGeom->RelPosInModule(relid, xi, zi); + phosgeom->AbsToRelNumbering(digit->GetId(), relid) ; + phosgeom->RelPosInModule(relid, xi, zi); cout << " Id = " << digit->GetId() ; cout << " Phos mod = " << relid[0] ; cout << " PPSD mod = " << relid[1] ; diff --git a/PHOS/AliPHOSPpsdRecPoint.h b/PHOS/AliPHOSPpsdRecPoint.h index c70ed7ddc86..93e43a1b8af 100644 --- a/PHOS/AliPHOSPpsdRecPoint.h +++ b/PHOS/AliPHOSPpsdRecPoint.h @@ -47,9 +47,6 @@ public: private: Float_t fDelta ; // parameter used for sorting - - -public: ClassDef(AliPHOSPpsdRecPoint,1) // PPSD RecPoint, version 1 diff --git a/PHOS/AliPHOSRecParticle.cxx b/PHOS/AliPHOSRecParticle.cxx index c60e4a3549f..2d3fc2ad232 100644 --- a/PHOS/AliPHOSRecParticle.cxx +++ b/PHOS/AliPHOSRecParticle.cxx @@ -49,16 +49,16 @@ TString AliPHOSRecParticle::Name() { TString name ; switch (fType) { - case GAMMA : + case kGAMMA : name = "PHOTON" ; break ; - case ELECTRON : + case kELECTRON : name = "ELECTRON" ; break ; - case NEUTRAL : + case kNEUTRAL : name = "NEUTRAL" ; break ; - case CHARGEDHADRON: + case kCHARGEDHADRON: name = "CHARGED HADRON" ; break ; } diff --git a/PHOS/AliPHOSRecParticle.h b/PHOS/AliPHOSRecParticle.h index d6644e7e90f..ec9870283ae 100644 --- a/PHOS/AliPHOSRecParticle.h +++ b/PHOS/AliPHOSRecParticle.h @@ -42,9 +42,7 @@ private: AliPHOSTrackSegment * fPHOSTrackSegment ; // pointer to the associated track segment in PHOS Int_t fType ; // guessed particle type -public: - -ClassDef(AliPHOSRecParticle,1) // Reconstructed Particle, version 1 + ClassDef(AliPHOSRecParticle,1) // Reconstructed Particle, version 1 }; diff --git a/PHOS/AliPHOSRecPoint.cxx b/PHOS/AliPHOSRecPoint.cxx index dc8db33cdab..8e28b4a1f0f 100644 --- a/PHOS/AliPHOSRecPoint.cxx +++ b/PHOS/AliPHOSRecPoint.cxx @@ -90,8 +90,8 @@ void AliPHOSRecPoint::ExecuteEvent(Int_t event, Int_t px, Int_t py) // static Int_t pxold, pyold; - static TGraph * DigitGraph = 0 ; - static TPaveText* ClusterText = 0 ; + static TGraph * digitgraph = 0 ; + static TPaveText* clustertext = 0 ; if (!gPad->IsEditable()) return; @@ -100,7 +100,7 @@ void AliPHOSRecPoint::ExecuteEvent(Int_t event, Int_t px, Int_t py) case kButton1Down:{ AliPHOSDigit * digit ; - AliPHOSGeometry * PHOSGeom = (AliPHOSGeometry *) fGeom ; + AliPHOSGeometry * phosgeom = (AliPHOSGeometry *) fGeom ; Int_t iDigit; Int_t relid[4] ; Float_t xi[fMulDigit] ; @@ -108,29 +108,29 @@ void AliPHOSRecPoint::ExecuteEvent(Int_t event, Int_t px, Int_t py) for(iDigit=0; iDigitAbsToRelNumbering(digit->GetId(), relid) ; - PHOSGeom->RelPosInModule(relid, xi[iDigit], zi[iDigit]) ; + phosgeom->AbsToRelNumbering(digit->GetId(), relid) ; + phosgeom->RelPosInModule(relid, xi[iDigit], zi[iDigit]) ; } - if (!DigitGraph) { - DigitGraph = new TGraph(fMulDigit,xi,zi); - DigitGraph-> SetMarkerStyle(5) ; - DigitGraph-> SetMarkerSize(1.) ; - DigitGraph-> SetMarkerColor(1) ; - DigitGraph-> Draw("P") ; + if (!digitgraph) { + digitgraph = new TGraph(fMulDigit,xi,zi); + digitgraph-> SetMarkerStyle(5) ; + digitgraph-> SetMarkerSize(1.) ; + digitgraph-> SetMarkerColor(1) ; + digitgraph-> Draw("P") ; } - if (!ClusterText) { + if (!clustertext) { TVector3 pos(0.,0.,0.) ; GetLocalPosition(pos) ; - ClusterText = new TPaveText(pos.X()-10,pos.Z()+10,pos.X()+50,pos.Z()+35,"") ; + clustertext = new TPaveText(pos.X()-10,pos.Z()+10,pos.X()+50,pos.Z()+35,"") ; Text_t line1[40] ; Text_t line2[40] ; sprintf(line1,"Energy=%1.2f GeV",GetEnergy()) ; sprintf(line2,"%d Digits",GetDigitsMultiplicity()) ; - ClusterText ->AddText(line1) ; - ClusterText ->AddText(line2) ; - ClusterText ->Draw(""); + clustertext ->AddText(line1) ; + clustertext ->AddText(line2) ; + clustertext ->Draw(""); } gPad->Update() ; Print() ; @@ -139,13 +139,13 @@ void AliPHOSRecPoint::ExecuteEvent(Int_t event, Int_t px, Int_t py) break; case kButton1Up: - if (DigitGraph) { - delete DigitGraph ; - DigitGraph = 0 ; + if (digitgraph) { + delete digitgraph ; + digitgraph = 0 ; } - if (ClusterText) { - delete ClusterText ; - ClusterText = 0 ; + if (clustertext) { + delete clustertext ; + clustertext = 0 ; } break; @@ -164,9 +164,9 @@ Int_t AliPHOSRecPoint::GetPHOSMod() AliPHOSDigit * digit ; digit = (AliPHOSDigit *) fDigitsList[0] ; - AliPHOSGeometry * PHOSGeom = (AliPHOSGeometry *) fGeom ; + AliPHOSGeometry * phosgeom = (AliPHOSGeometry *) fGeom ; - PHOSGeom->AbsToRelNumbering(digit->GetId(), relid) ; + phosgeom->AbsToRelNumbering(digit->GetId(), relid) ; fPHOSMod = relid[0]; return fPHOSMod ; } @@ -180,15 +180,15 @@ void AliPHOSRecPoint::Paint(Option_t *) GetLocalPosition(pos) ; Coord_t x = pos.X() ; Coord_t y = pos.Z() ; - Color_t MarkerColor = 1 ; - Size_t MarkerSize = 1. ; - Style_t MarkerStyle = 5 ; + Color_t markercolor = 1 ; + Size_t markersize = 1. ; + Style_t markerstyle = 5 ; if (!gPad->IsBatch()) { - gVirtualX->SetMarkerColor(MarkerColor) ; - gVirtualX->SetMarkerSize (MarkerSize) ; - gVirtualX->SetMarkerStyle(MarkerStyle) ; + gVirtualX->SetMarkerColor(markercolor) ; + gVirtualX->SetMarkerSize (markersize) ; + gVirtualX->SetMarkerStyle(markerstyle) ; } - gPad->SetAttMarkerPS(MarkerColor,MarkerStyle,MarkerSize) ; + gPad->SetAttMarkerPS(markercolor,markerstyle,markersize) ; gPad->PaintPolyMarker(1,&x,&y,"") ; } diff --git a/PHOS/AliPHOSRecPoint.h b/PHOS/AliPHOSRecPoint.h index b28019ed2f7..aac17b0a720 100644 --- a/PHOS/AliPHOSRecPoint.h +++ b/PHOS/AliPHOSRecPoint.h @@ -49,8 +49,6 @@ protected: Int_t fPHOSMod ; -public: - ClassDef(AliPHOSRecPoint,1) }; diff --git a/PHOS/AliPHOSReconstructioner.cxx b/PHOS/AliPHOSReconstructioner.cxx index 053f2248c5c..c93483db7e3 100644 --- a/PHOS/AliPHOSReconstructioner.cxx +++ b/PHOS/AliPHOSReconstructioner.cxx @@ -71,6 +71,7 @@ AliPHOSReconstructioner::~AliPHOSReconstructioner() TrackSegmentsList * trsl, RecParticlesList * rpl) { fClusterizer->MakeClusters(dl, emccl, ppsdl); + fTrackSegmentMaker->MakeTrackSegments(dl, emccl, ppsdl, trsl) ; diff --git a/PHOS/AliPHOSReconstructioner.h b/PHOS/AliPHOSReconstructioner.h index 9a08bc9c45a..37680df34ae 100644 --- a/PHOS/AliPHOSReconstructioner.h +++ b/PHOS/AliPHOSReconstructioner.h @@ -48,10 +48,7 @@ private: AliPHOSClusterizer * fClusterizer ; // Method for clusterization AliPHOSTrackSegmentMaker * fTrackSegmentMaker ; // Method for track segments finding AliPHOSParticleGuesser * fParticleGuesser ; // Method for guessing the type of particle - - -public: - + ClassDef(AliPHOSReconstructioner,1) // Reconstruction interface , version 1 }; diff --git a/PHOS/AliPHOSTrackSegment.cxx b/PHOS/AliPHOSTrackSegment.cxx index b86b084e73a..fae3164d70f 100644 --- a/PHOS/AliPHOSTrackSegment.cxx +++ b/PHOS/AliPHOSTrackSegment.cxx @@ -126,7 +126,7 @@ void AliPHOSTrackSegment::ExecuteEvent(Int_t event, Int_t px, Int_t py) // If Left button is clicked on AliPHOSRecPoint, the digits are switched on // and switched off when the mouse button is released. // - static TPaveText* TrackSegmentText = 0 ; + static TPaveText* textTS = 0 ; if (!gPad->IsEditable()) return; @@ -135,23 +135,23 @@ void AliPHOSTrackSegment::ExecuteEvent(Int_t event, Int_t px, Int_t py) case kButton1Down:{ - if (!TrackSegmentText) { + if (!textTS) { TVector3 pos(0.,0.,0.) ; fEmcRecPoint->GetLocalPosition(pos) ; - TrackSegmentText = new TPaveText(pos.X()-10,pos.Z()+10,pos.X()+5,pos.Z()+15,"") ; + textTS = new TPaveText(pos.X()-10,pos.Z()+10,pos.X()+5,pos.Z()+15,"") ; Text_t line1[40] ; - if (GetPartType() == GAMMA ) + if (GetPartType() == kGAMMA ) sprintf(line1,"PHOTON") ; - if (GetPartType() == ELECTRON ) + if (GetPartType() == kELECTRON ) sprintf(line1,"ELECTRON") ; - if (GetPartType() == NEUTRAL ) + if (GetPartType() == kNEUTRAL ) sprintf(line1,"NEUTRAL") ; - if (GetPartType() == CHARGEDHADRON ) + if (GetPartType() == kCHARGEDHADRON ) sprintf(line1,"CHARGED HADRON") ; - TrackSegmentText ->AddText(line1) ; - TrackSegmentText ->Draw(""); + textTS ->AddText(line1) ; + textTS ->Draw(""); gPad->Update() ; } } @@ -159,9 +159,9 @@ void AliPHOSTrackSegment::ExecuteEvent(Int_t event, Int_t px, Int_t py) break; case kButton1Up: - if (TrackSegmentText) { - delete TrackSegmentText ; - TrackSegmentText = 0 ; + if (textTS) { + delete textTS ; + textTS = 0 ; } break; } @@ -183,9 +183,9 @@ Float_t AliPHOSTrackSegment::GetDistanceInPHOSPlane() } vecEmc -= vecPpsd ; - Float_t R = vecEmc.Mag();; + Float_t r = vecEmc.Mag();; - return R ; + return r ; } //____________________________________________________________________________ @@ -231,27 +231,27 @@ Int_t AliPHOSTrackSegment::GetPartType() // 2 - neutral // 3 - charged hadron - Int_t PartType = GAMMA ; + Int_t typeofparticle = kGAMMA ; if( fPpsdUp == 0 ) { // Neutral if( fPpsdLow == 0 ) // Neutral - PartType = NEUTRAL ; + typeofparticle = kNEUTRAL ; else // Gamma - PartType = GAMMA ; + typeofparticle = kGAMMA ; } else { // Charged if( fEmcRecPoint->GetDispersion() > fCutOnDispersion) - PartType = CHARGEDHADRON ; + typeofparticle = kCHARGEDHADRON ; else - PartType = ELECTRON ; + typeofparticle = kELECTRON ; } - return PartType ; + return typeofparticle ; } @@ -259,8 +259,8 @@ Int_t AliPHOSTrackSegment::GetPartType() void AliPHOSTrackSegment::GetPosition( TVector3 & pos ) { // Returns positions of hits - TMatrix Dummy ; - fEmcRecPoint->GetGlobalPosition(pos, Dummy) ; + TMatrix dummy ; + fEmcRecPoint->GetGlobalPosition(pos, dummy) ; } //______________________________________________________________________________ @@ -287,45 +287,45 @@ void AliPHOSTrackSegment::Paint(Option_t *) Coord_t yppsdu = posppsdu.Z() ; Coord_t xppsdu = posppsdu.X() ; - Color_t MarkerColor = 1 ; - Size_t MarkerSize = 1.5 ; - Style_t MarkerStyle = 20 ; + Color_t markercolor = 1 ; + Size_t markersize = 1.5 ; + Style_t markerstyle = 20 ; if (!gPad->IsBatch()) { - gVirtualX->SetMarkerColor(MarkerColor) ; - gVirtualX->SetMarkerSize (MarkerSize) ; - gVirtualX->SetMarkerStyle(MarkerStyle) ; + gVirtualX->SetMarkerColor(markercolor) ; + gVirtualX->SetMarkerSize (markersize) ; + gVirtualX->SetMarkerStyle(markerstyle) ; } - gPad->SetAttMarkerPS(MarkerColor,MarkerStyle,MarkerSize) ; + gPad->SetAttMarkerPS(markercolor,markerstyle,markersize) ; gPad->PaintPolyMarker(1, &xemc, &yemc, "") ; if (xppsdl != 999. && yppsdl != 999. ) { - MarkerColor = 2 ; - MarkerSize = 1.25 ; - MarkerStyle = 21 ; + markercolor = 2 ; + markersize = 1.25 ; + markerstyle = 21 ; if (!gPad->IsBatch()) { - gVirtualX->SetMarkerColor(MarkerColor) ; - gVirtualX->SetMarkerSize (MarkerSize) ; - gVirtualX->SetMarkerStyle(MarkerStyle) ; + gVirtualX->SetMarkerColor(markercolor) ; + gVirtualX->SetMarkerSize (markersize) ; + gVirtualX->SetMarkerStyle(markerstyle) ; } - gPad->SetAttMarkerPS(MarkerColor,MarkerStyle,MarkerSize) ; + gPad->SetAttMarkerPS(markercolor,markerstyle,markersize) ; gPad->PaintPolyMarker(1, &xppsdl, &yppsdl, "") ; } if (xppsdu != 999. && yppsdu != 999. ) { - MarkerColor = 3 ; - MarkerSize = 1. ; - MarkerStyle = 22 ; + markercolor = 3 ; + markersize = 1. ; + markerstyle = 22 ; if (!gPad->IsBatch()) { - gVirtualX->SetMarkerColor(MarkerColor) ; - gVirtualX->SetMarkerSize (MarkerSize) ; - gVirtualX->SetMarkerStyle(MarkerStyle) ; + gVirtualX->SetMarkerColor(markercolor) ; + gVirtualX->SetMarkerSize (markersize) ; + gVirtualX->SetMarkerStyle(markerstyle) ; } - gPad->SetAttMarkerPS(MarkerColor,MarkerStyle,MarkerSize) ; + gPad->SetAttMarkerPS(markercolor,markerstyle,markersize) ; gPad->PaintPolyMarker(1, &xppsdu, &yppsdu, "") ; } } @@ -338,22 +338,22 @@ void AliPHOSTrackSegment::Print() cout << "EMC Reconstructed Point: " << fEmcRecPoint << endl; TVector3 pos ; - TMatrix Dummy ; + TMatrix dummy ; - fEmcRecPoint->GetGlobalPosition( pos, Dummy ) ; + fEmcRecPoint->GetGlobalPosition( pos, dummy ) ; cout << " position " << pos.X() << " " << pos.Y() << " " << pos.Z() << " Energy " << fEmcRecPoint->GetTotalEnergy() << endl ; cout << "PPSD Low Reconstructed Point: " << endl; if(fPpsdLow){ - fPpsdLow->GetGlobalPosition( pos , Dummy ) ; + fPpsdLow->GetGlobalPosition( pos , dummy ) ; cout << " position " << pos.X() << " " << pos.Y() << " " << pos.Z() << endl ; } cout << "PPSD Up Reconstructed Point: " << endl; if(fPpsdUp ){ - fPpsdUp->GetGlobalPosition( pos, Dummy ) ; + fPpsdUp->GetGlobalPosition( pos, dummy ) ; cout << " position " << pos.X() << " " << pos.Y() << " " << pos.Z() << endl ; } diff --git a/PHOS/AliPHOSTrackSegment.h b/PHOS/AliPHOSTrackSegment.h index 06f45b47fdb..1323117ef15 100644 --- a/PHOS/AliPHOSTrackSegment.h +++ b/PHOS/AliPHOSTrackSegment.h @@ -27,10 +27,10 @@ #include "AliPHOSEmcRecPoint.h" #include "AliPHOSPpsdRecPoint.h" -const static Int_t GAMMA = 0 ; -const static Int_t ELECTRON = 1 ; -const static Int_t NEUTRAL = 2 ; -const static Int_t CHARGEDHADRON = 3 ; +const static Int_t kGAMMA = 0 ; +const static Int_t kELECTRON = 1 ; +const static Int_t kNEUTRAL = 2 ; +const static Int_t kCHARGEDHADRON = 3 ; class AliPHOSTrackSegment : public TObject { @@ -65,8 +65,6 @@ private: AliPHOSPpsdRecPoint * fPpsdUp ; Float_t fCutOnDispersion ; - -public: ClassDef(AliPHOSTrackSegment,1) // description , version 1 diff --git a/PHOS/AliPHOSTrackSegmentMaker.h b/PHOS/AliPHOSTrackSegmentMaker.h index 0d7f1657a38..ed855ea2845 100644 --- a/PHOS/AliPHOSTrackSegmentMaker.h +++ b/PHOS/AliPHOSTrackSegmentMaker.h @@ -1,5 +1,5 @@ -#ifndef ALIPHOSSUBTRACKER_H -#define ALIPHOSSUBTRACKER_H +#ifndef ALIPHOSTRACKSEGMENTMAKER_H +#define ALIPHOSTRACKSEGMENTMAKER_H /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ @@ -42,10 +42,8 @@ private: Float_t fR0 ; -public: - -ClassDef( AliPHOSTrackSegmentMaker,1) // subtracking implementation , version 1 + ClassDef( AliPHOSTrackSegmentMaker,1) // subtracking implementation , version 1 }; -#endif // AliPHOSSUBTRACKER_H +#endif // ALIPHOSTRACKSEGMENTMAKER_H diff --git a/PHOS/AliPHOSTrackSegmentMakerv1.cxx b/PHOS/AliPHOSTrackSegmentMakerv1.cxx index 1cd97bca1ad..13a665af136 100644 --- a/PHOS/AliPHOSTrackSegmentMakerv1.cxx +++ b/PHOS/AliPHOSTrackSegmentMakerv1.cxx @@ -38,7 +38,7 @@ #include "AliPHOSv0.h" #include "AliRun.h" -extern void UnfoldingChiSquare(Int_t &NPar, Double_t *Grad, Double_t & fret, Double_t *x, Int_t iflag) ; +extern void UnfoldingChiSquare(Int_t &nPar, Double_t *Grad, Double_t & fret, Double_t *x, Int_t iflag) ; ClassImp( AliPHOSTrackSegmentMakerv1) @@ -62,7 +62,7 @@ ClassImp( AliPHOSTrackSegmentMakerv1) } //____________________________________________________________________________ Bool_t AliPHOSTrackSegmentMakerv1::FindFit(AliPHOSEmcRecPoint * emcRP, int * maxAt, Float_t * maxAtEnergy, - Int_t NPar, Float_t * FitParameters) + Int_t nPar, Float_t * fitparameters) { // Calls TMinuit for fitting cluster with several maxima @@ -77,21 +77,21 @@ Bool_t AliPHOSTrackSegmentMakerv1::FindFit(AliPHOSEmcRecPoint * emcRP, int * ma Int_t ierflg = 0; Int_t index = 0 ; - Int_t NDigits = (Int_t) NPar / 3 ; + Int_t nDigits = (Int_t) nPar / 3 ; Int_t iDigit ; - for(iDigit = 0; iDigit < NDigits; iDigit++){ + for(iDigit = 0; iDigit < nDigits; iDigit++){ digit = (AliPHOSDigit *) maxAt[iDigit]; - Int_t RelId[4] ; + Int_t relid[4] ; Float_t x ; Float_t z ; - geom->AbsToRelNumbering(digit->GetId(), RelId) ; - geom->RelPosInModule(RelId, x, z) ; + geom->AbsToRelNumbering(digit->GetId(), relid) ; + geom->RelPosInModule(relid, x, z) ; - Float_t Energy = maxAtEnergy[iDigit] ; + Float_t energy = maxAtEnergy[iDigit] ; gMinuit->mnparm(index, "x", x, 0.1, 0, 0, ierflg) ; index++ ; @@ -105,10 +105,10 @@ Bool_t AliPHOSTrackSegmentMakerv1::FindFit(AliPHOSEmcRecPoint * emcRP, int * ma cout << "PHOS Unfolding> Unable to set initial value for fit procedure : z = " << z << endl ; return kFALSE; } - gMinuit->mnparm(index, "Energy", Energy , 0.05*Energy, 0., 4.*Energy, ierflg) ; + gMinuit->mnparm(index, "Energy", energy , 0.05*energy, 0., 4.*energy, ierflg) ; index++ ; if(ierflg != 0){ - cout << "PHOS Unfolding> Unable to set initial value for fit procedure : Energy = " << Energy << endl ; + cout << "PHOS Unfolding> Unable to set initial value for fit procedure : energy = " << energy << endl ; return kFALSE; } } @@ -127,11 +127,11 @@ Bool_t AliPHOSTrackSegmentMakerv1::FindFit(AliPHOSEmcRecPoint * emcRP, int * ma cout << "PHOS Unfolding> Fit not converged, cluster abandoned "<< endl ; return kFALSE ; } - for(index = 0; index < NPar; index++){ + for(index = 0; index < nPar; index++){ Double_t err ; Double_t val ; gMinuit->GetParameter(index, val, err) ; // Returns value and error of parameter index - FitParameters[index] = val ; + fitparameters[index] = val ; } return kTRUE; @@ -140,7 +140,7 @@ Bool_t AliPHOSTrackSegmentMakerv1::FindFit(AliPHOSEmcRecPoint * emcRP, int * ma //____________________________________________________________________________ void AliPHOSTrackSegmentMakerv1::FillOneModule(DigitsList * Dl, RecPointsList * emcIn, TObjArray * emcOut, RecPointsList * ppsdIn, TObjArray * ppsdOutUp, - TObjArray * ppsdOutLow, Int_t & PHOSMod, Int_t & emcStopedAt, + TObjArray * ppsdOutLow, Int_t & phosmod, Int_t & emcStopedAt, Int_t & ppsdStopedAt) { // Unfold clusters and fill xxxOut arrays with clusters from one PHOS module @@ -149,25 +149,25 @@ void AliPHOSTrackSegmentMakerv1::FillOneModule(DigitsList * Dl, RecPointsList * AliPHOSPpsdRecPoint * ppsdRecPoint ; Int_t index ; - Int_t NemcUnfolded = emcIn->GetEntries() ; - for(index = emcStopedAt; index < NemcUnfolded; index++){ + Int_t nEmcUnfolded = emcIn->GetEntries() ; + for(index = emcStopedAt; index < nEmcUnfolded; index++){ emcRecPoint = (AliPHOSEmcRecPoint *) (*emcIn)[index] ; - if(emcRecPoint->GetPHOSMod() != PHOSMod ) + if(emcRecPoint->GetPHOSMod() != phosmod ) break ; - Int_t NMultipl = emcRecPoint->GetMultiplicity() ; - Int_t maxAt[NMultipl] ; - Float_t maxAtEnergy[NMultipl] ; - Int_t Nmax = emcRecPoint->GetNumberOfLocalMax(maxAt, maxAtEnergy) ; + Int_t nMultipl = emcRecPoint->GetMultiplicity() ; + Int_t maxAt[nMultipl] ; + Float_t maxAtEnergy[nMultipl] ; + Int_t nMax = emcRecPoint->GetNumberOfLocalMax(maxAt, maxAtEnergy) ; - if(Nmax <= 1) // if cluster is very flat (no pronounced maximum) then Nmax = 0 + if(nMax <= 1) // if cluster is very flat (no pronounced maximum) then nMax = 0 emcOut->Add(emcRecPoint) ; else { - UnfoldClusters(Dl, emcIn, emcRecPoint, Nmax, maxAt, maxAtEnergy, emcOut) ; + UnfoldClusters(Dl, emcIn, emcRecPoint, nMax, maxAt, maxAtEnergy, emcOut) ; emcIn->Remove(emcRecPoint); emcIn->Compress() ; - NemcUnfolded-- ; + nEmcUnfolded-- ; index-- ; } } @@ -175,7 +175,7 @@ void AliPHOSTrackSegmentMakerv1::FillOneModule(DigitsList * Dl, RecPointsList * for(index = ppsdStopedAt; index < ppsdIn->GetEntries(); index++){ ppsdRecPoint = (AliPHOSPpsdRecPoint *) (*ppsdIn)[index] ; - if(ppsdRecPoint->GetPHOSMod() != PHOSMod ) + if(ppsdRecPoint->GetPHOSMod() != phosmod ) break ; if(ppsdRecPoint->GetUp() ) ppsdOutUp->Add(ppsdRecPoint) ; @@ -189,82 +189,82 @@ void AliPHOSTrackSegmentMakerv1::FillOneModule(DigitsList * Dl, RecPointsList * ppsdOutLow->Sort() ; } //____________________________________________________________________________ -Float_t AliPHOSTrackSegmentMakerv1::GetDistanceInPHOSPlane(AliPHOSEmcRecPoint * EmcClu,AliPHOSPpsdRecPoint * PpsdClu, Bool_t &TooFar) +Float_t AliPHOSTrackSegmentMakerv1::GetDistanceInPHOSPlane(AliPHOSEmcRecPoint * emcclu,AliPHOSPpsdRecPoint * PpsdClu, Bool_t &toofar) { - Float_t R = fR0 ; + Float_t r = fR0 ; TVector3 vecEmc ; TVector3 vecPpsd ; - EmcClu->GetLocalPosition(vecEmc) ; + emcclu->GetLocalPosition(vecEmc) ; PpsdClu->GetLocalPosition(vecPpsd) ; - if(EmcClu->GetPHOSMod() == PpsdClu->GetPHOSMod()){ + if(emcclu->GetPHOSMod() == PpsdClu->GetPHOSMod()){ if(vecPpsd.X() >= vecEmc.X() - fDelta ){ if(vecPpsd.Z() >= vecEmc.Z() - fDelta ){ AliPHOSGeometry * geom = AliPHOSGeometry::GetInstance() ; // Correct to difference in CPV and EMC position due to different distance to center. // we assume, that particle moves from center - Float_t DCPV = geom->GetIPtoOuterCoverDistance(); - Float_t DEMC = geom->GetIPtoCrystalSurface() ; - DEMC = DEMC / DCPV ; - vecPpsd = DEMC * vecPpsd - vecEmc ; - R = vecPpsd.Mag() ; + Float_t dCPV = geom->GetIPtoOuterCoverDistance(); + Float_t dEMC = geom->GetIPtoCrystalSurface() ; + dEMC = dEMC / dCPV ; + vecPpsd = dEMC * vecPpsd - vecEmc ; + r = vecPpsd.Mag() ; } // if zPpsd >= zEmc - fDelta - TooFar = kFALSE ; + toofar = kFALSE ; } // if xPpsd >= xEmc - fDelta else - TooFar = kTRUE ; + toofar = kTRUE ; } else - TooFar = kTRUE ; + toofar = kTRUE ; - return R ; + return r ; } //____________________________________________________________________________ -void AliPHOSTrackSegmentMakerv1::MakeLinks(TObjArray * EmcRecPoints, TObjArray * PpsdRecPointsUp, - TObjArray * PpsdRecPointsLow, TClonesArray * LinkLowArray, - TClonesArray *LinkUpArray) +void AliPHOSTrackSegmentMakerv1::MakeLinks(TObjArray * emcRecPoints, TObjArray * ppsdRecPointsUp, + TObjArray * ppsdRecPointsLow, TClonesArray * linklowArray, + TClonesArray *linkupArray) { //Finds distanses (links) between all EMC and PPSD clusters, which are not further from each other than fR0 - TIter nextEmc(EmcRecPoints) ; + TIter nextEmc(emcRecPoints) ; Int_t iEmcClu = 0 ; - AliPHOSPpsdRecPoint * PpsdLow ; - AliPHOSPpsdRecPoint * PpsdUp ; - AliPHOSEmcRecPoint * EmcClu ; + AliPHOSPpsdRecPoint * ppsdlow ; + AliPHOSPpsdRecPoint * ppsdup ; + AliPHOSEmcRecPoint * emcclu ; Int_t iLinkLow = 0 ; Int_t iLinkUp = 0 ; - while( (EmcClu = (AliPHOSEmcRecPoint*)nextEmc() ) ) { - Bool_t TooFar ; - TIter nextPpsdLow(PpsdRecPointsLow ) ; + while( (emcclu = (AliPHOSEmcRecPoint*)nextEmc() ) ) { + Bool_t toofar ; + TIter nextPpsdLow(ppsdRecPointsLow ) ; Int_t iPpsdLow = 0 ; - while( (PpsdLow = (AliPHOSPpsdRecPoint*)nextPpsdLow() ) ) { - Float_t R = GetDistanceInPHOSPlane(EmcClu, PpsdLow, TooFar) ; + while( (ppsdlow = (AliPHOSPpsdRecPoint*)nextPpsdLow() ) ) { + Float_t r = GetDistanceInPHOSPlane(emcclu, ppsdlow, toofar) ; - if(TooFar) + if(toofar) break ; - if(R < fR0) - new( (*LinkLowArray)[iLinkLow++]) AliPHOSLink(R, iEmcClu, iPpsdLow) ; + if(r < fR0) + new( (*linklowArray)[iLinkLow++]) AliPHOSLink(r, iEmcClu, iPpsdLow) ; iPpsdLow++ ; } - TIter nextPpsdUp(PpsdRecPointsUp ) ; + TIter nextPpsdUp(ppsdRecPointsUp ) ; Int_t iPpsdUp = 0 ; - while( (PpsdUp = (AliPHOSPpsdRecPoint*)nextPpsdUp() ) ) { - Float_t R = GetDistanceInPHOSPlane(EmcClu, PpsdUp, TooFar) ; + while( (ppsdup = (AliPHOSPpsdRecPoint*)nextPpsdUp() ) ) { + Float_t r = GetDistanceInPHOSPlane(emcclu, ppsdup, toofar) ; - if(TooFar) + if(toofar) break ; - if(R < fR0) - new( (*LinkUpArray)[iLinkUp++]) AliPHOSLink(R, iEmcClu, iPpsdUp) ; + if(r < fR0) + new( (*linkupArray)[iLinkUp++]) AliPHOSLink(r, iEmcClu, iPpsdUp) ; iPpsdUp++ ; @@ -274,20 +274,20 @@ void AliPHOSTrackSegmentMakerv1::MakeLinks(TObjArray * EmcRecPoints, TObjArray } // while nextEmC - LinkLowArray->Sort() ; //first links with smallest distances - LinkUpArray->Sort() ; + linklowArray->Sort() ; //first links with smallest distances + linkupArray->Sort() ; } //____________________________________________________________________________ -void AliPHOSTrackSegmentMakerv1::MakePairs(TObjArray * EmcRecPoints, TObjArray * PpsdRecPointsUp, - TObjArray * PpsdRecPointsLow, TClonesArray * LinkLowArray, - TClonesArray * LinkUpArray, TrackSegmentsList * trsl) +void AliPHOSTrackSegmentMakerv1::MakePairs(TObjArray * emcRecPoints, TObjArray * ppsdRecPointsUp, + TObjArray * ppsdRecPointsLow, TClonesArray * linklowArray, + TClonesArray * linkupArray, TrackSegmentsList * trsl) { // Finds the smallest links and makes pairs of PPSD and EMC clusters with smallest distance - TIter nextLow(LinkLowArray) ; - TIter nextUp(LinkUpArray) ; + TIter nextLow(linklowArray) ; + TIter nextUp(linkupArray) ; AliPHOSLink * linkLow ; AliPHOSLink * linkUp ; @@ -296,17 +296,17 @@ void AliPHOSTrackSegmentMakerv1::MakePairs(TObjArray * EmcRecPoints, TObjArray AliPHOSPpsdRecPoint * ppsdLow ; AliPHOSPpsdRecPoint * ppsdUp ; - AliPHOSRecPoint * NullPointer = 0 ; + AliPHOSRecPoint * nullpointer = 0 ; while ( (linkLow = (AliPHOSLink *)nextLow() ) ){ - emc = (AliPHOSEmcRecPoint *) EmcRecPoints->At(linkLow->GetEmc()) ; - ppsdLow = (AliPHOSPpsdRecPoint *) PpsdRecPointsLow->At(linkLow->GetPpsd()) ; + emc = (AliPHOSEmcRecPoint *) emcRecPoints->At(linkLow->GetEmc()) ; + ppsdLow = (AliPHOSPpsdRecPoint *) ppsdRecPointsLow->At(linkLow->GetPpsd()) ; if( (emc) && (ppsdLow) ){ // RecPoints not removed yet ppsdUp = 0 ; while ( (linkUp = (AliPHOSLink *)nextUp() ) ){ if(linkLow->GetEmc() == linkUp->GetEmc() ){ - ppsdUp = (AliPHOSPpsdRecPoint *) PpsdRecPointsUp->At(linkUp->GetPpsd()) ; + ppsdUp = (AliPHOSPpsdRecPoint *) ppsdRecPointsUp->At(linkUp->GetPpsd()) ; break ; } @@ -315,26 +315,26 @@ void AliPHOSTrackSegmentMakerv1::MakePairs(TObjArray * EmcRecPoints, TObjArray nextUp.Reset(); AliPHOSTrackSegment * subtr = new AliPHOSTrackSegment(emc, ppsdUp, ppsdLow ) ; trsl->Add(subtr) ; - EmcRecPoints->AddAt(NullPointer,linkLow->GetEmc()) ; - PpsdRecPointsLow->AddAt(NullPointer,linkLow->GetPpsd()) ; + emcRecPoints->AddAt(nullpointer,linkLow->GetEmc()) ; + ppsdRecPointsLow->AddAt(nullpointer,linkLow->GetPpsd()) ; if(ppsdUp) - PpsdRecPointsUp->AddAt(NullPointer,linkUp->GetPpsd()) ; + ppsdRecPointsUp->AddAt(nullpointer,linkUp->GetPpsd()) ; } } - TIter nextEmc(EmcRecPoints) ; + TIter nextEmc(emcRecPoints) ; nextEmc.Reset() ; - while( (emc = (AliPHOSEmcRecPoint*)nextEmc()) ){ //to create pairs if no PpsdLow + while( (emc = (AliPHOSEmcRecPoint*)nextEmc()) ){ //to create pairs if no ppsdlow ppsdLow = 0 ; ppsdUp = 0 ; while ( (linkUp = (AliPHOSLink *)nextUp() ) ){ - if(EmcRecPoints->IndexOf(emc) == linkUp->GetEmc() ){ - ppsdUp = (AliPHOSPpsdRecPoint *) PpsdRecPointsUp->At(linkUp->GetPpsd()) ; + if(emcRecPoints->IndexOf(emc) == linkUp->GetEmc() ){ + ppsdUp = (AliPHOSPpsdRecPoint *) ppsdRecPointsUp->At(linkUp->GetPpsd()) ; break ; } @@ -343,7 +343,7 @@ void AliPHOSTrackSegmentMakerv1::MakePairs(TObjArray * EmcRecPoints, TObjArray trsl->Add(subtr) ; if(ppsdUp) - PpsdRecPointsUp->AddAt(NullPointer,linkUp->GetPpsd()) ; + ppsdRecPointsUp->AddAt(nullpointer,linkUp->GetPpsd()) ; } } @@ -354,54 +354,54 @@ void AliPHOSTrackSegmentMakerv1::MakeTrackSegments(DigitsList * DL, RecPointsLi { // main function, does the job - Int_t PHOSMod = 1 ; + Int_t phosmod = 1 ; Int_t emcStopedAt = 0 ; Int_t ppsdStopedAt = 0 ; - TObjArray * EmcRecPoints = new TObjArray(100) ; // these arrays keep pointers - TObjArray * PpsdRecPointsUp = new TObjArray(100) ; // to RecPoints, which are - TObjArray * PpsdRecPointsLow = new TObjArray(100) ; // kept in TClonesArray's emcl and ppsdl + TObjArray * emcRecPoints = new TObjArray(100) ; // these arrays keep pointers + TObjArray * ppsdRecPointsUp = new TObjArray(100) ; // to RecPoints, which are + TObjArray * ppsdRecPointsLow = new TObjArray(100) ; // kept in TClonesArray's emcl and ppsdl - TClonesArray * LinkLowArray = new TClonesArray("AliPHOSLink", 100); - TClonesArray * LinkUpArray = new TClonesArray("AliPHOSLink", 100); + TClonesArray * linklowArray = new TClonesArray("AliPHOSLink", 100); + TClonesArray * linkupArray = new TClonesArray("AliPHOSLink", 100); AliPHOSGeometry * geom = AliPHOSGeometry::GetInstance() ; - while(PHOSMod <= geom->GetNModules() ){ + while(phosmod <= geom->GetNModules() ){ - FillOneModule(DL, emcl, EmcRecPoints, ppsdl, PpsdRecPointsUp, PpsdRecPointsLow, PHOSMod, emcStopedAt, ppsdStopedAt) ; + FillOneModule(DL, emcl, emcRecPoints, ppsdl, ppsdRecPointsUp, ppsdRecPointsLow, phosmod, emcStopedAt, ppsdStopedAt) ; - MakeLinks(EmcRecPoints, PpsdRecPointsUp, PpsdRecPointsLow, LinkLowArray, LinkUpArray) ; + MakeLinks(emcRecPoints, ppsdRecPointsUp, ppsdRecPointsLow, linklowArray, linkupArray) ; - MakePairs(EmcRecPoints, PpsdRecPointsUp, PpsdRecPointsLow, LinkLowArray, LinkUpArray, trsl) ; + MakePairs(emcRecPoints, ppsdRecPointsUp, ppsdRecPointsLow, linklowArray, linkupArray, trsl) ; - EmcRecPoints->Clear() ; + emcRecPoints->Clear() ; - PpsdRecPointsUp->Clear() ; + ppsdRecPointsUp->Clear() ; - PpsdRecPointsLow->Clear() ; + ppsdRecPointsLow->Clear() ; - LinkUpArray->Clear() ; + linkupArray->Clear() ; - LinkLowArray->Clear() ; + linklowArray->Clear() ; - PHOSMod++ ; + phosmod++ ; } - delete EmcRecPoints ; - EmcRecPoints = 0 ; + delete emcRecPoints ; + emcRecPoints = 0 ; - delete PpsdRecPointsUp ; - PpsdRecPointsUp = 0 ; + delete ppsdRecPointsUp ; + ppsdRecPointsUp = 0 ; - delete PpsdRecPointsLow ; - PpsdRecPointsLow = 0 ; + delete ppsdRecPointsLow ; + ppsdRecPointsLow = 0 ; - delete LinkUpArray ; - LinkUpArray = 0 ; + delete linkupArray ; + linkupArray = 0 ; - delete LinkLowArray ; - LinkLowArray = 0 ; + delete linklowArray ; + linklowArray = 0 ; } //____________________________________________________________________________ @@ -416,29 +416,29 @@ Double_t AliPHOSTrackSegmentMakerv1::ShowerShape(Double_t r) //____________________________________________________________________________ void AliPHOSTrackSegmentMakerv1::UnfoldClusters(DigitsList * DL, RecPointsList * emcIn, AliPHOSEmcRecPoint * iniEmc, - Int_t Nmax, int * maxAt, Float_t * maxAtEnergy, TObjArray * emcList) + Int_t nMax, int * maxAt, Float_t * maxAtEnergy, TObjArray * emcList) { - // fits cluster with Nmax overlapping showers + // fits cluster with nMax overlapping showers - Int_t NPar = 3 * Nmax ; - Float_t FitParameters[NPar] ; + Int_t nPar = 3 * nMax ; + Float_t fitparameters[nPar] ; AliPHOSGeometry * geom = AliPHOSGeometry::GetInstance() ; - Bool_t rv = FindFit(iniEmc, maxAt, maxAtEnergy, NPar, FitParameters) ; + Bool_t rv = FindFit(iniEmc, maxAt, maxAtEnergy, nPar, fitparameters) ; if( !rv ) // Fit failed, return and remove cluster return ; Float_t xDigit ; Float_t zDigit ; - Int_t RelId[4] ; + Int_t relid[4] ; - Int_t Ndigits = iniEmc->GetMultiplicity() ; + Int_t nDigits = iniEmc->GetMultiplicity() ; Float_t xpar ; Float_t zpar ; - Float_t Epar ; - Float_t Distance ; - Float_t Ratio ; - Float_t Efit[Ndigits] ; + Float_t epar ; + Float_t distance ; + Float_t ratio ; + Float_t efit[nDigits] ; Int_t iparam ; Int_t iDigit ; @@ -449,43 +449,43 @@ void AliPHOSTrackSegmentMakerv1::UnfoldClusters(DigitsList * DL, RecPointsList Int_t iRecPoint = emcIn->GetEntries() ; - for(iDigit = 0 ; iDigit < Ndigits ; iDigit ++){ + for(iDigit = 0 ; iDigit < nDigits ; iDigit ++){ digit = (AliPHOSDigit *) emcDigits[iDigit]; - geom->AbsToRelNumbering(digit->GetId(), RelId) ; - geom->RelPosInModule(RelId, xDigit, zDigit) ; - Efit[iDigit] = 0; + geom->AbsToRelNumbering(digit->GetId(), relid) ; + geom->RelPosInModule(relid, xDigit, zDigit) ; + efit[iDigit] = 0; iparam = 0 ; - while(iparam < NPar ){ - xpar = FitParameters[iparam] ; - zpar = FitParameters[iparam+1] ; - Epar = FitParameters[iparam+2] ; + while(iparam < nPar ){ + xpar = fitparameters[iparam] ; + zpar = fitparameters[iparam+1] ; + epar = fitparameters[iparam+2] ; iparam += 3 ; - Distance = (xDigit - xpar) * (xDigit - xpar) + (zDigit - zpar) * (zDigit - zpar) ; - Distance = TMath::Sqrt(Distance) ; - Efit[iDigit] += Epar * ShowerShape(Distance) ; + distance = (xDigit - xpar) * (xDigit - xpar) + (zDigit - zpar) * (zDigit - zpar) ; + distance = TMath::Sqrt(distance) ; + efit[iDigit] += epar * ShowerShape(distance) ; } } iparam = 0 ; Float_t eDigit ; - while(iparam < NPar ){ - xpar = FitParameters[iparam] ; - zpar = FitParameters[iparam+1] ; - Epar = FitParameters[iparam+2] ; + while(iparam < nPar ){ + xpar = fitparameters[iparam] ; + zpar = fitparameters[iparam+1] ; + epar = fitparameters[iparam+2] ; iparam += 3 ; new ((*emcIn)[iRecPoint]) AliPHOSEmcRecPoint( iniEmc->GetLogWeightCut(), iniEmc->GetLocMaxCut() ) ; emcRP = (AliPHOSEmcRecPoint *) emcIn->At(iRecPoint++); - for(iDigit = 0 ; iDigit < Ndigits ; iDigit ++){ + for(iDigit = 0 ; iDigit < nDigits ; iDigit ++){ digit = (AliPHOSDigit *) emcDigits[iDigit]; - geom->AbsToRelNumbering(digit->GetId(), RelId) ; - geom->RelPosInModule(RelId, xDigit, zDigit) ; - Distance = (xDigit - xpar) * (xDigit - xpar) + (zDigit - zpar) * (zDigit - zpar) ; - Distance = TMath::Sqrt(Distance) ; - Ratio = Epar * ShowerShape(Distance) / Efit[iDigit] ; - eDigit = emcEnergies[iDigit] * Ratio ; + geom->AbsToRelNumbering(digit->GetId(), relid) ; + geom->RelPosInModule(relid, xDigit, zDigit) ; + distance = (xDigit - xpar) * (xDigit - xpar) + (zDigit - zpar) * (zDigit - zpar) ; + distance = TMath::Sqrt(distance) ; + ratio = epar * ShowerShape(distance) / efit[iDigit] ; + eDigit = emcEnergies[iDigit] * ratio ; emcRP->AddDigit( *digit, eDigit ) ; } @@ -495,7 +495,7 @@ void AliPHOSTrackSegmentMakerv1::UnfoldClusters(DigitsList * DL, RecPointsList } //______________________________________________________________________________ -void UnfoldingChiSquare(Int_t & NPar, Double_t * Grad, Double_t & fret, Double_t * x, Int_t iflag) +void UnfoldingChiSquare(Int_t & nPar, Double_t * Grad, Double_t & fret, Double_t * x, Int_t iflag) { // Number of parameters, Gradient, Chi squared, parameters, what to do @@ -509,39 +509,39 @@ void UnfoldingChiSquare(Int_t & NPar, Double_t * Grad, Double_t & fret, Double_t Int_t iparam ; if(iflag == 2) - for(iparam = 0 ; iparam < NPar ; iparam++) + for(iparam = 0 ; iparam < nPar ; iparam++) Grad[iparam] = 0 ; // Will evaluate gradient - Double_t Efit ; + Double_t efit ; AliPHOSDigit * digit ; Int_t iDigit = 0 ; while ( (digit = (AliPHOSDigit *)emcDigits[iDigit] )){ - Int_t RelId[4] ; + Int_t relid[4] ; Float_t xDigit ; Float_t zDigit ; - geom->AbsToRelNumbering(digit->GetId(), RelId) ; - geom->RelPosInModule(RelId, xDigit, zDigit) ; + geom->AbsToRelNumbering(digit->GetId(), relid) ; + geom->RelPosInModule(relid, xDigit, zDigit) ; if(iflag == 2){ // calculate gradient Int_t iParam = 0 ; - Efit = 0 ; - while(iParam < NPar ){ - Double_t Distance = (xDigit - x[iParam]) * (xDigit - x[iParam]) ; + efit = 0 ; + while(iParam < nPar ){ + Double_t distance = (xDigit - x[iParam]) * (xDigit - x[iParam]) ; iParam++ ; - Distance += (zDigit - x[iParam]) * (zDigit - x[iParam]) ; - Distance = TMath::Sqrt( Distance ) ; + distance += (zDigit - x[iParam]) * (zDigit - x[iParam]) ; + distance = TMath::Sqrt( distance ) ; iParam++ ; - Efit += x[iParam] * AliPHOSTrackSegmentMakerv1::ShowerShape(Distance) ; + efit += x[iParam] * AliPHOSTrackSegmentMakerv1::ShowerShape(distance) ; iParam++ ; } - Double_t sum = 2. * (Efit - emcEnergies[iDigit]) / emcEnergies[iDigit] ; // Here we assume, that sigma = sqrt(E) + Double_t sum = 2. * (efit - emcEnergies[iDigit]) / emcEnergies[iDigit] ; // Here we assume, that sigma = sqrt(E) iParam = 0 ; - while(iParam < NPar ){ + while(iParam < nPar ){ Double_t xpar = x[iParam] ; Double_t zpar = x[iParam+1] ; - Double_t Epar = x[iParam+2] ; + Double_t epar = x[iParam+2] ; Double_t dr = TMath::Sqrt( (xDigit - xpar) * (xDigit - xpar) + (zDigit - zpar) * (zDigit - zpar) ); Double_t shape = sum * AliPHOSTrackSegmentMakerv1::ShowerShape(dr) ; Double_t r4 = dr*dr*dr*dr ; @@ -549,26 +549,26 @@ void UnfoldingChiSquare(Int_t & NPar, Double_t * Grad, Double_t & fret, Double_t Double_t deriv =-4. * dr*dr * ( 2.32 / ( (2.32 + 0.26 * r4) * (2.32 + 0.26 * r4) ) + 0.0316 * (1. + 0.0171 * r295) / ( ( 1. + 0.0652 * r295) * (1. + 0.0652 * r295) ) ) ; - Grad[iParam] += Epar * shape * deriv * (xpar - xDigit) ; // Derivative over x + Grad[iParam] += epar * shape * deriv * (xpar - xDigit) ; // Derivative over x iParam++ ; - Grad[iParam] += Epar * shape * deriv * (zpar - zDigit) ; // Derivative over z + Grad[iParam] += epar * shape * deriv * (zpar - zDigit) ; // Derivative over z iParam++ ; Grad[iParam] += shape ; // Derivative over energy iParam++ ; } } - Efit = 0; + efit = 0; iparam = 0 ; - while(iparam < NPar ){ + while(iparam < nPar ){ Double_t xpar = x[iparam] ; Double_t zpar = x[iparam+1] ; - Double_t Epar = x[iparam+2] ; + Double_t epar = x[iparam+2] ; iparam += 3 ; - Double_t Distance = (xDigit - xpar) * (xDigit - xpar) + (zDigit - zpar) * (zDigit - zpar) ; - Distance = TMath::Sqrt(Distance) ; - Efit += Epar * AliPHOSTrackSegmentMakerv1::ShowerShape(Distance) ; + Double_t distance = (xDigit - xpar) * (xDigit - xpar) + (zDigit - zpar) * (zDigit - zpar) ; + distance = TMath::Sqrt(distance) ; + efit += epar * AliPHOSTrackSegmentMakerv1::ShowerShape(distance) ; } - fret += (Efit-emcEnergies[iDigit])*(Efit-emcEnergies[iDigit])/emcEnergies[iDigit] ; + fret += (efit-emcEnergies[iDigit])*(efit-emcEnergies[iDigit])/emcEnergies[iDigit] ; // Here we assume, that sigma = sqrt(E) iDigit++ ; } diff --git a/PHOS/AliPHOSTrackSegmentMakerv1.h b/PHOS/AliPHOSTrackSegmentMakerv1.h index a2d2f8a3652..c3b84aa7b5f 100644 --- a/PHOS/AliPHOSTrackSegmentMakerv1.h +++ b/PHOS/AliPHOSTrackSegmentMakerv1.h @@ -64,9 +64,7 @@ private: Float_t fR0 ; // Maximal distance between EMC and PPSD clusters of one Track Segment in module plane TMinuit * fMinuit ; // Minuit object needed by cluster unfolding -public: - -ClassDef( AliPHOSTrackSegmentMakerv1,1) // track segment maker implementation , version 1 + ClassDef( AliPHOSTrackSegmentMakerv1,1) // track segment maker implementation , version 1 }; diff --git a/PHOS/AliPHOSv0.cxx b/PHOS/AliPHOSv0.cxx index 0ae00d9789b..19489c12f66 100644 --- a/PHOS/AliPHOSv0.cxx +++ b/PHOS/AliPHOSv0.cxx @@ -143,24 +143,24 @@ AliPHOSv0::~AliPHOSv0() void AliPHOSv0::AddHit(Int_t track, Int_t Id, Float_t * hits) { Int_t hitCounter ; - TClonesArray <mphits = *fTmpHits; + TClonesArray <mphits = *fTmpHits ; AliPHOSHit *newHit ; - AliPHOSHit *curHit; - bool already = false ; + AliPHOSHit *curHit ; + Bool_t deja = false ; // In any case, fills the fTmpHit TClonesArray (with "accumulated hits") newHit = new AliPHOSHit(fIshunt, track, Id, hits) ; - for ( hitCounter = 0 ; hitCounter < fNTmpHits && !already ; hitCounter++ ) { + for ( hitCounter = 0 ; hitCounter < fNTmpHits && !deja ; hitCounter++ ) { curHit = (AliPHOSHit*) ltmphits[hitCounter] ; if( *curHit == *newHit ) { *curHit = *curHit + *newHit ; - already = true ; + deja = true ; } } - if ( !already ) { + if ( !deja ) { new(ltmphits[fNTmpHits]) AliPHOSHit(*newHit) ; fNTmpHits++ ; } @@ -201,7 +201,7 @@ void AliPHOSv0:: BuildGeometryforPHOS(void) const Int_t kColorPHOS = kRed ; const Int_t kColorXTAL = kBlue ; - Double_t const RADDEG = 180.0 / kPI ; + Double_t const kRADDEG = 180.0 / kPI ; new TBRIK( "OuterBox", "PHOS box", "void", fGeom->GetOuterBoxSize(0)/2, fGeom->GetOuterBoxSize(1)/2, @@ -227,24 +227,24 @@ void AliPHOSv0:: BuildGeometryforPHOS(void) // Crystals Box - Float_t XTL_X = fGeom->GetCrystalSize(0) ; - Float_t XTL_Y = fGeom->GetCrystalSize(1) ; - Float_t XTL_Z = fGeom->GetCrystalSize(2) ; + Float_t xtlX = fGeom->GetCrystalSize(0) ; + Float_t xtlY = fGeom->GetCrystalSize(1) ; + Float_t xtlZ = fGeom->GetCrystalSize(2) ; - Float_t XL = fGeom->GetNPhi() * ( XTL_X + 2 * fGeom->GetGapBetweenCrystals() ) / 2.0 + fGeom->GetModuleBoxThickness() ; - Float_t YL = ( XTL_Y + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() + fGeom->GetCrystalHolderThickness() ) / 2.0 + Float_t xl = fGeom->GetNPhi() * ( xtlX + 2 * fGeom->GetGapBetweenCrystals() ) / 2.0 + fGeom->GetModuleBoxThickness() ; + Float_t yl = ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() + fGeom->GetCrystalHolderThickness() ) / 2.0 + fGeom->GetModuleBoxThickness() / 2.0 ; - Float_t ZL = fGeom->GetNZ() * ( XTL_Z + 2 * fGeom->GetGapBetweenCrystals() ) / 2.0 + fGeom->GetModuleBoxThickness() ; + Float_t zl = fGeom->GetNZ() * ( xtlZ + 2 * fGeom->GetGapBetweenCrystals() ) / 2.0 + fGeom->GetModuleBoxThickness() ; - new TBRIK( "CrystalsBox", "PHOS crystals box", "void", XL, YL, ZL ) ; + new TBRIK( "CrystalsBox", "PHOS crystals box", "void", xl, yl, zl ) ; // position PHOS into ALICE - Float_t R = fGeom->GetIPtoOuterCoverDistance() + fGeom->GetOuterBoxSize(1) / 2.0 ; + Float_t r = fGeom->GetIPtoOuterCoverDistance() + fGeom->GetOuterBoxSize(1) / 2.0 ; Int_t number = 988 ; Float_t pphi = TMath::ATan( fGeom->GetOuterBoxSize(0) / ( 2.0 * fGeom->GetIPtoOuterCoverDistance() ) ) ; - pphi *= RADDEG ; - TNode * Top = gAlice->GetGeometry()->GetNode("alice") ; + pphi *= kRADDEG ; + TNode * top = gAlice->GetGeometry()->GetNode("alice") ; char * nodename = new char[20] ; char * rotname = new char[20] ; @@ -253,42 +253,42 @@ void AliPHOSv0:: BuildGeometryforPHOS(void) Float_t angle = pphi * 2 * ( i - fGeom->GetNModules() / 2.0 - 0.5 ) ; sprintf(rotname, "%s%d", "rot", number++) ; new TRotMatrix(rotname, rotname, 90, angle, 90, 90 + angle, 0, 0); - Top->cd(); + top->cd(); sprintf(nodename,"%s%d", "Module", i) ; - Float_t X = R * TMath::Sin( angle / RADDEG ) ; - Float_t Y = -R * TMath::Cos( angle / RADDEG ) ; - TNode * OuterBoxNode = new TNode(nodename, nodename, "OuterBox", X, Y, 0, rotname ) ; - OuterBoxNode->SetLineColor(kColorPHOS) ; - fNodes->Add(OuterBoxNode) ; - OuterBoxNode->cd() ; + Float_t x = r * TMath::Sin( angle / kRADDEG ) ; + Float_t y = -r * TMath::Cos( angle / kRADDEG ) ; + TNode * outerboxnode = new TNode(nodename, nodename, "OuterBox", x, y, 0, rotname ) ; + outerboxnode->SetLineColor(kColorPHOS) ; + fNodes->Add(outerboxnode) ; + outerboxnode->cd() ; // now inside the outer box the textolit box - Y = ( fGeom->GetOuterBoxThickness(1) - fGeom->GetUpperPlateThickness() ) / 2. ; + y = ( fGeom->GetOuterBoxThickness(1) - fGeom->GetUpperPlateThickness() ) / 2. ; sprintf(nodename,"%s%d", "TexBox", i) ; - TNode * TextolitBoxNode = new TNode(nodename, nodename, "TextolitBox", 0, Y, 0) ; - TextolitBoxNode->SetLineColor(kColorPHOS) ; - fNodes->Add(TextolitBoxNode) ; + TNode * textolitboxnode = new TNode(nodename, nodename, "TextolitBox", 0, y, 0) ; + textolitboxnode->SetLineColor(kColorPHOS) ; + fNodes->Add(textolitboxnode) ; // upper foam plate inside outre box - OuterBoxNode->cd() ; + outerboxnode->cd() ; sprintf(nodename, "%s%d", "UFPlate", i) ; - Y = ( fGeom->GetTextolitBoxSize(1) - fGeom->GetSecondUpperPlateThickness() ) / 2.0 ; - TNode * UpperFoamPlateNode = new TNode(nodename, nodename, "UpperFoamPlate", 0, Y, 0) ; - UpperFoamPlateNode->SetLineColor(kColorPHOS) ; - fNodes->Add(UpperFoamPlateNode) ; + y = ( fGeom->GetTextolitBoxSize(1) - fGeom->GetSecondUpperPlateThickness() ) / 2.0 ; + TNode * upperfoamplatenode = new TNode(nodename, nodename, "UpperFoamPlate", 0, y, 0) ; + upperfoamplatenode->SetLineColor(kColorPHOS) ; + fNodes->Add(upperfoamplatenode) ; // air filled box inside textolit box (not drawn) - TextolitBoxNode->cd(); - Y = ( fGeom->GetTextolitBoxSize(1) - fGeom->GetAirFilledBoxSize(1) ) / 2.0 - fGeom->GetSecondUpperPlateThickness() ; + textolitboxnode->cd(); + y = ( fGeom->GetTextolitBoxSize(1) - fGeom->GetAirFilledBoxSize(1) ) / 2.0 - fGeom->GetSecondUpperPlateThickness() ; sprintf(nodename, "%s%d", "AFBox", i) ; - TNode * AirFilledBoxNode = new TNode(nodename, nodename, "AirFilledBox", 0, Y, 0) ; - fNodes->Add(AirFilledBoxNode) ; + TNode * airfilledboxnode = new TNode(nodename, nodename, "AirFilledBox", 0, y, 0) ; + fNodes->Add(airfilledboxnode) ; // crystals box inside air filled box - AirFilledBoxNode->cd() ; - Y = fGeom->GetAirFilledBoxSize(1) / 2.0 - YL + airfilledboxnode->cd() ; + y = fGeom->GetAirFilledBoxSize(1) / 2.0 - yl - ( fGeom->GetIPtoCrystalSurface() - fGeom->GetIPtoOuterCoverDistance() - fGeom->GetModuleBoxThickness() - fGeom->GetUpperPlateThickness() - fGeom->GetSecondUpperPlateThickness() ) ; sprintf(nodename, "%s%d", "XTBox", i) ; - TNode * CrystalsBoxNode = new TNode(nodename, nodename, "CrystalsBox", 0, Y, 0) ; - CrystalsBoxNode->SetLineColor(kColorXTAL) ; - fNodes->Add(CrystalsBoxNode) ; + TNode * crystalsboxnode = new TNode(nodename, nodename, "CrystalsBox", 0, y, 0) ; + crystalsboxnode->SetLineColor(kColorXTAL) ; + fNodes->Add(crystalsboxnode) ; } } @@ -297,7 +297,7 @@ void AliPHOSv0:: BuildGeometryforPPSD(void) { // Build the PPSD geometry for the ROOT display - Double_t const RADDEG = 180.0 / kPI ; + Double_t const kRADDEG = 180.0 / kPI ; const Int_t kColorPHOS = kRed ; const Int_t kColorPPSD = kGreen ; @@ -371,163 +371,163 @@ void AliPHOSv0:: BuildGeometryforPPSD(void) char * nodename = new char[20] ; char * rotname = new char[20] ; - Float_t R = fGeom->GetIPtoTopLidDistance() + fGeom->GetPPSDBoxSize(1) / 2.0 ; + Float_t r = fGeom->GetIPtoTopLidDistance() + fGeom->GetPPSDBoxSize(1) / 2.0 ; Int_t number = 988 ; - TNode * Top = gAlice->GetGeometry()->GetNode("alice") ; + TNode * top = gAlice->GetGeometry()->GetNode("alice") ; for( Int_t i = 1; i <= fGeom->GetNModules(); i++ ) { // the number of PHOS modules Float_t angle = fGeom->GetPHOSAngle(i) ; sprintf(rotname, "%s%d", "rotg", number++) ; new TRotMatrix(rotname, rotname, 90, angle, 90, 90 + angle, 0, 0); - Top->cd(); + top->cd(); sprintf(nodename, "%s%d", "Moduleg", i) ; - Float_t X = R * TMath::Sin( angle / RADDEG ) ; - Float_t Y = -R * TMath::Cos( angle / RADDEG ) ; - TNode * PPSDBoxNode = new TNode(nodename , nodename ,"PPSDBox", X, Y, 0, rotname ) ; - PPSDBoxNode->SetLineColor(kColorPPSD) ; - fNodes->Add(PPSDBoxNode) ; - PPSDBoxNode->cd() ; + Float_t x = r * TMath::Sin( angle / kRADDEG ) ; + Float_t y = -r * TMath::Cos( angle / kRADDEG ) ; + TNode * ppsdboxnode = new TNode(nodename , nodename ,"PPSDBox", x, y, 0, rotname ) ; + ppsdboxnode->SetLineColor(kColorPPSD) ; + fNodes->Add(ppsdboxnode) ; + ppsdboxnode->cd() ; // inside the PPSD box: // 1. fNumberOfModulesPhi x fNumberOfModulesZ top micromegas - X = ( fGeom->GetPPSDBoxSize(0) - fGeom->GetPPSDModuleSize(0) ) / 2. ; + x = ( fGeom->GetPPSDBoxSize(0) - fGeom->GetPPSDModuleSize(0) ) / 2. ; for ( Int_t iphi = 1; iphi <= fGeom->GetNumberOfModulesPhi(); iphi++ ) { // the number of micromegas modules in phi per PHOS module - Float_t Z = ( fGeom->GetPPSDBoxSize(2) - fGeom->GetPPSDModuleSize(2) ) / 2. ; - TNode * Micro1Node ; + Float_t z = ( fGeom->GetPPSDBoxSize(2) - fGeom->GetPPSDModuleSize(2) ) / 2. ; + TNode * micro1node ; for ( Int_t iz = 1; iz <= fGeom->GetNumberOfModulesZ(); iz++ ) { // the number of micromegas modules in z per PHOS module - Y = ( fGeom->GetPPSDBoxSize(1) - fGeom->GetMicromegas1Thickness() ) / 2. ; + y = ( fGeom->GetPPSDBoxSize(1) - fGeom->GetMicromegas1Thickness() ) / 2. ; sprintf(nodename, "%s%d%d%d", "Mic1", i, iphi, iz) ; - Micro1Node = new TNode(nodename, nodename, "PPSDModule", X, Y, Z) ; - Micro1Node->SetLineColor(kColorPPSD) ; - fNodes->Add(Micro1Node) ; + micro1node = new TNode(nodename, nodename, "PPSDModule", x, y, z) ; + micro1node->SetLineColor(kColorPPSD) ; + fNodes->Add(micro1node) ; // inside top micromegas - Micro1Node->cd() ; + micro1node->cd() ; // a. top lid - Y = ( fGeom->GetMicromegas1Thickness() - fGeom->GetLidThickness() ) / 2. ; + y = ( fGeom->GetMicromegas1Thickness() - fGeom->GetLidThickness() ) / 2. ; sprintf(nodename, "%s%d%d%d", "Lid", i, iphi, iz) ; - TNode * TopLidNode = new TNode(nodename, nodename, "TopLid", 0, Y, 0) ; - TopLidNode->SetLineColor(kColorPPSD) ; - fNodes->Add(TopLidNode) ; + TNode * toplidnode = new TNode(nodename, nodename, "TopLid", 0, y, 0) ; + toplidnode->SetLineColor(kColorPPSD) ; + fNodes->Add(toplidnode) ; // b. composite panel - Y = Y - fGeom->GetLidThickness() / 2. - fGeom->GetCompositeThickness() / 2. ; + y = y - fGeom->GetLidThickness() / 2. - fGeom->GetCompositeThickness() / 2. ; sprintf(nodename, "%s%d%d%d", "CompU", i, iphi, iz) ; - TNode * CompUpNode = new TNode(nodename, nodename, "TopPanel", 0, Y, 0) ; - CompUpNode->SetLineColor(kColorPPSD) ; - fNodes->Add(CompUpNode) ; + TNode * compupnode = new TNode(nodename, nodename, "TopPanel", 0, y, 0) ; + compupnode->SetLineColor(kColorPPSD) ; + fNodes->Add(compupnode) ; // c. anode - Y = Y - fGeom->GetCompositeThickness() / 2. - fGeom->GetAnodeThickness() / 2. ; + y = y - fGeom->GetCompositeThickness() / 2. - fGeom->GetAnodeThickness() / 2. ; sprintf(nodename, "%s%d%d%d", "Ano", i, iphi, iz) ; - TNode * AnodeNode = new TNode(nodename, nodename, "Anode", 0, Y, 0) ; - AnodeNode->SetLineColor(kColorPHOS) ; - fNodes->Add(AnodeNode) ; + TNode * anodenode = new TNode(nodename, nodename, "Anode", 0, y, 0) ; + anodenode->SetLineColor(kColorPHOS) ; + fNodes->Add(anodenode) ; // d. gas - Y = Y - fGeom->GetAnodeThickness() / 2. - ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2. ; + y = y - fGeom->GetAnodeThickness() / 2. - ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2. ; sprintf(nodename, "%s%d%d%d", "GGap", i, iphi, iz) ; - TNode * GGapNode = new TNode(nodename, nodename, "GasGap", 0, Y, 0) ; - GGapNode->SetLineColor(kColorGas) ; - fNodes->Add(GGapNode) ; + TNode * ggapnode = new TNode(nodename, nodename, "GasGap", 0, y, 0) ; + ggapnode->SetLineColor(kColorGas) ; + fNodes->Add(ggapnode) ; // f. cathode - Y = Y - ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2. - fGeom->GetCathodeThickness() / 2. ; + y = y - ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2. - fGeom->GetCathodeThickness() / 2. ; sprintf(nodename, "%s%d%d%d", "Cathode", i, iphi, iz) ; - TNode * CathodeNode = new TNode(nodename, nodename, "Cathode", 0, Y, 0) ; - CathodeNode->SetLineColor(kColorPHOS) ; - fNodes->Add(CathodeNode) ; + TNode * cathodenode = new TNode(nodename, nodename, "Cathode", 0, y, 0) ; + cathodenode->SetLineColor(kColorPHOS) ; + fNodes->Add(cathodenode) ; // g. printed circuit - Y = Y - fGeom->GetCathodeThickness() / 2. - fGeom->GetPCThickness() / 2. ; + y = y - fGeom->GetCathodeThickness() / 2. - fGeom->GetPCThickness() / 2. ; sprintf(nodename, "%s%d%d%d", "PC", i, iphi, iz) ; - TNode * PCNode = new TNode(nodename, nodename, "PCBoard", 0, Y, 0) ; - PCNode->SetLineColor(kColorPPSD) ; - fNodes->Add(PCNode) ; + TNode * pcnode = new TNode(nodename, nodename, "PCBoard", 0, y, 0) ; + pcnode->SetLineColor(kColorPPSD) ; + fNodes->Add(pcnode) ; // h. composite panel - Y = Y - fGeom->GetPCThickness() / 2. - fGeom->GetCompositeThickness() / 2. ; + y = y - fGeom->GetPCThickness() / 2. - fGeom->GetCompositeThickness() / 2. ; sprintf(nodename, "%s%d%d%d", "CompDown", i, iphi, iz) ; - TNode * CompDownNode = new TNode(nodename, nodename, "BottomPanel", 0, Y, 0) ; - CompDownNode->SetLineColor(kColorPPSD) ; - fNodes->Add(CompDownNode) ; - Z = Z - fGeom->GetPPSDModuleSize(2) ; - PPSDBoxNode->cd() ; + TNode * compdownnode = new TNode(nodename, nodename, "BottomPanel", 0, y, 0) ; + compdownnode->SetLineColor(kColorPPSD) ; + fNodes->Add(compdownnode) ; + z = z - fGeom->GetPPSDModuleSize(2) ; + ppsdboxnode->cd() ; } // end of Z module loop - X = X - fGeom->GetPPSDModuleSize(0) ; - PPSDBoxNode->cd() ; + x = x - fGeom->GetPPSDModuleSize(0) ; + ppsdboxnode->cd() ; } // end of phi module loop // 2. air gap - PPSDBoxNode->cd() ; - Y = ( fGeom->GetPPSDBoxSize(1) - 2 * fGeom->GetMicromegas1Thickness() - fGeom->GetMicro1ToLeadGap() ) / 2. ; + ppsdboxnode->cd() ; + y = ( fGeom->GetPPSDBoxSize(1) - 2 * fGeom->GetMicromegas1Thickness() - fGeom->GetMicro1ToLeadGap() ) / 2. ; sprintf(nodename, "%s%d", "GapUp", i) ; - TNode * GapUpNode = new TNode(nodename, nodename, "LeadToM", 0, Y, 0) ; - GapUpNode->SetLineColor(kColorAir) ; - fNodes->Add(GapUpNode) ; + TNode * gapupnode = new TNode(nodename, nodename, "LeadToM", 0, y, 0) ; + gapupnode->SetLineColor(kColorAir) ; + fNodes->Add(gapupnode) ; // 3. lead converter - Y = Y - fGeom->GetMicro1ToLeadGap() / 2. - fGeom->GetLeadConverterThickness() / 2. ; + y = y - fGeom->GetMicro1ToLeadGap() / 2. - fGeom->GetLeadConverterThickness() / 2. ; sprintf(nodename, "%s%d", "LeadC", i) ; - TNode * LeadCNode = new TNode(nodename, nodename, "Lead", 0, Y, 0) ; - LeadCNode->SetLineColor(kColorPPSD) ; - fNodes->Add(LeadCNode) ; + TNode * leadcnode = new TNode(nodename, nodename, "Lead", 0, y, 0) ; + leadcnode->SetLineColor(kColorPPSD) ; + fNodes->Add(leadcnode) ; // 4. air gap - Y = Y - fGeom->GetLeadConverterThickness() / 2. - fGeom->GetLeadToMicro2Gap() / 2. ; + y = y - fGeom->GetLeadConverterThickness() / 2. - fGeom->GetLeadToMicro2Gap() / 2. ; sprintf(nodename, "%s%d", "GapDown", i) ; - TNode * GapDownNode = new TNode(nodename, nodename, "MToLead", 0, Y, 0) ; - GapDownNode->SetLineColor(kColorAir) ; - fNodes->Add(GapDownNode) ; + TNode * gapdownnode = new TNode(nodename, nodename, "MToLead", 0, y, 0) ; + gapdownnode->SetLineColor(kColorAir) ; + fNodes->Add(gapdownnode) ; // 5. fNumberOfModulesPhi x fNumberOfModulesZ bottom micromegas - X = ( fGeom->GetPPSDBoxSize(0) - fGeom->GetPPSDModuleSize(0) ) / 2. - fGeom->GetPhiDisplacement() ; + x = ( fGeom->GetPPSDBoxSize(0) - fGeom->GetPPSDModuleSize(0) ) / 2. - fGeom->GetPhiDisplacement() ; for ( Int_t iphi = 1; iphi <= fGeom->GetNumberOfModulesPhi(); iphi++ ) { - Float_t Z = ( fGeom->GetPPSDBoxSize(2) - fGeom->GetPPSDModuleSize(2) ) / 2. - fGeom->GetZDisplacement() ;; - TNode * Micro2Node ; + Float_t z = ( fGeom->GetPPSDBoxSize(2) - fGeom->GetPPSDModuleSize(2) ) / 2. - fGeom->GetZDisplacement() ;; + TNode * micro2node ; for ( Int_t iz = 1; iz <= fGeom->GetNumberOfModulesZ(); iz++ ) { - Y = - ( fGeom->GetPPSDBoxSize(1) - fGeom->GetMicromegas2Thickness() ) / 2. ; + y = - ( fGeom->GetPPSDBoxSize(1) - fGeom->GetMicromegas2Thickness() ) / 2. ; sprintf(nodename, "%s%d%d%d", "Mic2", i, iphi, iz) ; - Micro2Node = new TNode(nodename, nodename, "PPSDModule", X, Y, Z) ; - Micro2Node->SetLineColor(kColorPPSD) ; - fNodes->Add(Micro2Node) ; + micro2node = new TNode(nodename, nodename, "PPSDModule", x, y, z) ; + micro2node->SetLineColor(kColorPPSD) ; + fNodes->Add(micro2node) ; // inside bottom micromegas - Micro2Node->cd() ; + micro2node->cd() ; // a. top lid - Y = ( fGeom->GetMicromegas2Thickness() - fGeom->GetLidThickness() ) / 2. ; + y = ( fGeom->GetMicromegas2Thickness() - fGeom->GetLidThickness() ) / 2. ; sprintf(nodename, "%s%d", "Lidb", i) ; - TNode * TopLidbNode = new TNode(nodename, nodename, "TopLid", 0, Y, 0) ; - TopLidbNode->SetLineColor(kColorPPSD) ; - fNodes->Add(TopLidbNode) ; + TNode * toplidbnode = new TNode(nodename, nodename, "TopLid", 0, y, 0) ; + toplidbnode->SetLineColor(kColorPPSD) ; + fNodes->Add(toplidbnode) ; // b. composite panel - Y = Y - fGeom->GetLidThickness() / 2. - fGeom->GetCompositeThickness() / 2. ; + y = y - fGeom->GetLidThickness() / 2. - fGeom->GetCompositeThickness() / 2. ; sprintf(nodename, "%s%d", "CompUb", i) ; - TNode * CompUpbNode = new TNode(nodename, nodename, "TopPanel", 0, Y, 0) ; - CompUpbNode->SetLineColor(kColorPPSD) ; - fNodes->Add(CompUpbNode) ; + TNode * compupbnode = new TNode(nodename, nodename, "TopPanel", 0, y, 0) ; + compupbnode->SetLineColor(kColorPPSD) ; + fNodes->Add(compupbnode) ; // c. anode - Y = Y - fGeom->GetCompositeThickness() / 2. - fGeom->GetAnodeThickness() / 2. ; + y = y - fGeom->GetCompositeThickness() / 2. - fGeom->GetAnodeThickness() / 2. ; sprintf(nodename, "%s%d", "Anob", i) ; - TNode * AnodebNode = new TNode(nodename, nodename, "Anode", 0, Y, 0) ; - AnodebNode->SetLineColor(kColorPPSD) ; - fNodes->Add(AnodebNode) ; + TNode * anodebnode = new TNode(nodename, nodename, "Anode", 0, y, 0) ; + anodebnode->SetLineColor(kColorPPSD) ; + fNodes->Add(anodebnode) ; // d. conversion gas - Y = Y - fGeom->GetAnodeThickness() / 2. - ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2. ; + y = y - fGeom->GetAnodeThickness() / 2. - ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2. ; sprintf(nodename, "%s%d", "GGapb", i) ; - TNode * GGapbNode = new TNode(nodename, nodename, "GasGap", 0, Y, 0) ; - GGapbNode->SetLineColor(kColorGas) ; - fNodes->Add(GGapbNode) ; + TNode * ggapbnode = new TNode(nodename, nodename, "GasGap", 0, y, 0) ; + ggapbnode->SetLineColor(kColorGas) ; + fNodes->Add(ggapbnode) ; // f. cathode - Y = Y - ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2. - fGeom->GetCathodeThickness() / 2. ; + y = y - ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2. - fGeom->GetCathodeThickness() / 2. ; sprintf(nodename, "%s%d", "Cathodeb", i) ; - TNode * CathodebNode = new TNode(nodename, nodename, "Cathode", 0, Y, 0) ; - CathodebNode->SetLineColor(kColorPPSD) ; - fNodes->Add(CathodebNode) ; + TNode * cathodebnode = new TNode(nodename, nodename, "Cathode", 0, y, 0) ; + cathodebnode->SetLineColor(kColorPPSD) ; + fNodes->Add(cathodebnode) ; // g. printed circuit - Y = Y - fGeom->GetCathodeThickness() / 2. - fGeom->GetPCThickness() / 2. ; + y = y - fGeom->GetCathodeThickness() / 2. - fGeom->GetPCThickness() / 2. ; sprintf(nodename, "%s%d", "PCb", i) ; - TNode * PCbNode = new TNode(nodename, nodename, "PCBoard", 0, Y, 0) ; - PCbNode->SetLineColor(kColorPPSD) ; - fNodes->Add(PCbNode) ; + TNode * pcbnode = new TNode(nodename, nodename, "PCBoard", 0, y, 0) ; + pcbnode->SetLineColor(kColorPPSD) ; + fNodes->Add(pcbnode) ; // h. composite pane - Y = Y - fGeom->GetPCThickness() / 2. - fGeom->GetCompositeThickness() / 2. ; + y = y - fGeom->GetPCThickness() / 2. - fGeom->GetCompositeThickness() / 2. ; sprintf(nodename, "%s%d", "CompDownb", i) ; - TNode * CompDownbNode = new TNode(nodename, nodename, "BottomPanel", 0, Y, 0) ; - CompDownbNode->SetLineColor(kColorPPSD) ; - fNodes->Add(CompDownbNode) ; - Z = Z - fGeom->GetPPSDModuleSize(2) ; - PPSDBoxNode->cd() ; + TNode * compdownbnode = new TNode(nodename, nodename, "BottomPanel", 0, y, 0) ; + compdownbnode->SetLineColor(kColorPPSD) ; + fNodes->Add(compdownbnode) ; + z = z - fGeom->GetPPSDModuleSize(2) ; + ppsdboxnode->cd() ; } // end of Z module loop - X = X - fGeom->GetPPSDModuleSize(0) ; - PPSDBoxNode->cd() ; + x = x - fGeom->GetPPSDModuleSize(0) ; + ppsdboxnode->cd() ; } // end of phi module loop } // PHOS modules delete rotname ; @@ -538,9 +538,9 @@ void AliPHOSv0:: BuildGeometryforPPSD(void) void AliPHOSv0::CreateGeometry() { - AliPHOSv0 *PHOS_tmp = (AliPHOSv0*)gAlice->GetModule("PHOS") ; + AliPHOSv0 *phostmp = (AliPHOSv0*)gAlice->GetModule("PHOS") ; - if ( PHOS_tmp == NULL ) { + if ( phostmp == NULL ) { fprintf(stderr, "PHOS detector not found!\n") ; return; @@ -548,14 +548,14 @@ void AliPHOSv0::CreateGeometry() } // Get pointer to the array containing media indeces - Int_t *IDTMED = fIdtmed->GetArray() - 699 ; + Int_t *idtmed = fIdtmed->GetArray() - 699 ; - Float_t BigBox[3] ; - BigBox[0] = fGeom->GetOuterBoxSize(0) / 2.0 ; - BigBox[1] = ( fGeom->GetOuterBoxSize(1) + fGeom->GetPPSDBoxSize(1) ) / 2.0 ; - BigBox[2] = fGeom->GetOuterBoxSize(2) / 2.0 ; + Float_t bigbox[3] ; + bigbox[0] = fGeom->GetOuterBoxSize(0) / 2.0 ; + bigbox[1] = ( fGeom->GetOuterBoxSize(1) + fGeom->GetPPSDBoxSize(1) ) / 2.0 ; + bigbox[2] = fGeom->GetOuterBoxSize(2) / 2.0 ; - gMC->Gsvolu("PHOS", "BOX ", IDTMED[798], BigBox, 3) ; + gMC->Gsvolu("PHOS", "BOX ", idtmed[798], bigbox, 3) ; this->CreateGeometryforPHOS() ; if ( strcmp( fGeom->GetName(), "GPS2") == 0 ) @@ -565,20 +565,20 @@ void AliPHOSv0::CreateGeometry() // --- Position PHOS mdules in ALICE setup --- - Int_t IDROTM[99] ; - Double_t const RADDEG = 180.0 / kPI ; + Int_t idrotm[99] ; + Double_t const kRADDEG = 180.0 / kPI ; for( Int_t i = 1; i <= fGeom->GetNModules(); i++ ) { Float_t angle = fGeom->GetPHOSAngle(i) ; - AliMatrix(IDROTM[i-1], 90.0, angle, 90.0, 90.0+angle, 0.0, 0.0) ; + AliMatrix(idrotm[i-1], 90.0, angle, 90.0, 90.0+angle, 0.0, 0.0) ; - Float_t R = fGeom->GetIPtoOuterCoverDistance() + ( fGeom->GetOuterBoxSize(1) + fGeom->GetPPSDBoxSize(1) ) / 2.0 ; + Float_t r = fGeom->GetIPtoOuterCoverDistance() + ( fGeom->GetOuterBoxSize(1) + fGeom->GetPPSDBoxSize(1) ) / 2.0 ; - Float_t XP1 = R * TMath::Sin( angle / RADDEG ) ; - Float_t YP1 = -R * TMath::Cos( angle / RADDEG ) ; + Float_t xP1 = r * TMath::Sin( angle / kRADDEG ) ; + Float_t yP1 = -r * TMath::Cos( angle / kRADDEG ) ; - gMC->Gspos("PHOS", i, "ALIC", XP1, YP1, 0.0, IDROTM[i-1], "ONLY") ; + gMC->Gspos("PHOS", i, "ALIC", xP1, yP1, 0.0, idrotm[i-1], "ONLY") ; } // for GetNModules @@ -588,39 +588,39 @@ void AliPHOSv0::CreateGeometry() void AliPHOSv0::CreateGeometryforPHOS() { // Get pointer to the array containing media indeces - Int_t *IDTMED = fIdtmed->GetArray() - 699 ; + Int_t *idtmed = fIdtmed->GetArray() - 699 ; // --- // --- Define PHOS box volume, fPUFPill with thermo insulating foam --- // --- Foam Thermo Insulating outer cover dimensions --- - // --- Put it in BigBox = PHOS + // --- Put it in bigbox = PHOS - Float_t DPHOS[3] ; - DPHOS[0] = fGeom->GetOuterBoxSize(0) / 2.0 ; - DPHOS[1] = fGeom->GetOuterBoxSize(1) / 2.0 ; - DPHOS[2] = fGeom->GetOuterBoxSize(2) / 2.0 ; + Float_t dphos[3] ; + dphos[0] = fGeom->GetOuterBoxSize(0) / 2.0 ; + dphos[1] = fGeom->GetOuterBoxSize(1) / 2.0 ; + dphos[2] = fGeom->GetOuterBoxSize(2) / 2.0 ; - gMC->Gsvolu("EMCA", "BOX ", IDTMED[706], DPHOS, 3) ; + gMC->Gsvolu("EMCA", "BOX ", idtmed[706], dphos, 3) ; - Float_t YO = - fGeom->GetPPSDBoxSize(1) / 2.0 ; + Float_t yO = - fGeom->GetPPSDBoxSize(1) / 2.0 ; - gMC->Gspos("EMCA", 1, "PHOS", 0.0, YO, 0.0, 0, "ONLY") ; + gMC->Gspos("EMCA", 1, "PHOS", 0.0, yO, 0.0, 0, "ONLY") ; // --- // --- Define Textolit Wall box, position inside EMCA --- // --- Textolit Wall box dimentions --- - Float_t DPTXW[3]; - DPTXW[0] = fGeom->GetTextolitBoxSize(0) / 2.0 ; - DPTXW[1] = fGeom->GetTextolitBoxSize(1) / 2.0 ; - DPTXW[2] = fGeom->GetTextolitBoxSize(2) / 2.0 ; + Float_t dptxw[3]; + dptxw[0] = fGeom->GetTextolitBoxSize(0) / 2.0 ; + dptxw[1] = fGeom->GetTextolitBoxSize(1) / 2.0 ; + dptxw[2] = fGeom->GetTextolitBoxSize(2) / 2.0 ; - gMC->Gsvolu("PTXW", "BOX ", IDTMED[707], DPTXW, 3); + gMC->Gsvolu("PTXW", "BOX ", idtmed[707], dptxw, 3); - YO = ( fGeom->GetOuterBoxThickness(1) - fGeom->GetUpperPlateThickness() ) / 2. ; + yO = ( fGeom->GetOuterBoxThickness(1) - fGeom->GetUpperPlateThickness() ) / 2. ; - gMC->Gspos("PTXW", 1, "EMCA", 0.0, YO, 0.0, 0, "ONLY") ; + gMC->Gspos("PTXW", 1, "EMCA", 0.0, yO, 0.0, 0, "ONLY") ; // --- // --- Define Upper Polystyrene Foam Plate, place inside PTXW --- @@ -628,125 +628,125 @@ void AliPHOSv0::CreateGeometryforPHOS() // --- Upper Polystyrene Foam plate thickness --- - Float_t DPUFP[3] ; - DPUFP[0] = fGeom->GetTextolitBoxSize(0) / 2.0 ; - DPUFP[1] = fGeom->GetSecondUpperPlateThickness() / 2. ; - DPUFP[2] = fGeom->GetTextolitBoxSize(2) /2.0 ; + Float_t dpufp[3] ; + dpufp[0] = fGeom->GetTextolitBoxSize(0) / 2.0 ; + dpufp[1] = fGeom->GetSecondUpperPlateThickness() / 2. ; + dpufp[2] = fGeom->GetTextolitBoxSize(2) /2.0 ; - gMC->Gsvolu("PUFP", "BOX ", IDTMED[703], DPUFP, 3) ; + gMC->Gsvolu("PUFP", "BOX ", idtmed[703], dpufp, 3) ; - YO = ( fGeom->GetTextolitBoxSize(1) - fGeom->GetSecondUpperPlateThickness() ) / 2.0 ; + yO = ( fGeom->GetTextolitBoxSize(1) - fGeom->GetSecondUpperPlateThickness() ) / 2.0 ; - gMC->Gspos("PUFP", 1, "PTXW", 0.0, YO, 0.0, 0, "ONLY") ; + gMC->Gspos("PUFP", 1, "PTXW", 0.0, yO, 0.0, 0, "ONLY") ; // --- // --- Define air-filled box, place inside PTXW --- // --- Inner AIR volume dimensions --- - Float_t DPAIR[3] ; - DPAIR[0] = fGeom->GetAirFilledBoxSize(0) / 2.0 ; - DPAIR[1] = fGeom->GetAirFilledBoxSize(1) / 2.0 ; - DPAIR[2] = fGeom->GetAirFilledBoxSize(2) / 2.0 ; + Float_t dpair[3] ; + dpair[0] = fGeom->GetAirFilledBoxSize(0) / 2.0 ; + dpair[1] = fGeom->GetAirFilledBoxSize(1) / 2.0 ; + dpair[2] = fGeom->GetAirFilledBoxSize(2) / 2.0 ; - gMC->Gsvolu("PAIR", "BOX ", IDTMED[798], DPAIR, 3) ; + gMC->Gsvolu("PAIR", "BOX ", idtmed[798], dpair, 3) ; - YO = ( fGeom->GetTextolitBoxSize(1) - fGeom->GetAirFilledBoxSize(1) ) / 2.0 - fGeom->GetSecondUpperPlateThickness() ; + yO = ( fGeom->GetTextolitBoxSize(1) - fGeom->GetAirFilledBoxSize(1) ) / 2.0 - fGeom->GetSecondUpperPlateThickness() ; - gMC->Gspos("PAIR", 1, "PTXW", 0.0, YO, 0.0, 0, "ONLY") ; + gMC->Gspos("PAIR", 1, "PTXW", 0.0, yO, 0.0, 0, "ONLY") ; // --- Dimensions of PbWO4 crystal --- - Float_t XTL_X = fGeom->GetCrystalSize(0) ; - Float_t XTL_Y = fGeom->GetCrystalSize(1) ; - Float_t XTL_Z = fGeom->GetCrystalSize(2) ; + Float_t xtlX = fGeom->GetCrystalSize(0) ; + Float_t xtlY = fGeom->GetCrystalSize(1) ; + Float_t xtlZ = fGeom->GetCrystalSize(2) ; - Float_t DPTCB[3] ; - DPTCB[0] = fGeom->GetNPhi() * ( XTL_X + 2 * fGeom->GetGapBetweenCrystals() ) / 2.0 + fGeom->GetModuleBoxThickness() ; - DPTCB[1] = ( XTL_Y + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() + fGeom->GetCrystalHolderThickness() ) / 2.0 + Float_t dptcb[3] ; + dptcb[0] = fGeom->GetNPhi() * ( xtlX + 2 * fGeom->GetGapBetweenCrystals() ) / 2.0 + fGeom->GetModuleBoxThickness() ; + dptcb[1] = ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() + fGeom->GetCrystalHolderThickness() ) / 2.0 + fGeom->GetModuleBoxThickness() / 2.0 ; - DPTCB[2] = fGeom->GetNZ() * ( XTL_Z + 2 * fGeom->GetGapBetweenCrystals() ) / 2.0 + fGeom->GetModuleBoxThickness() ; + dptcb[2] = fGeom->GetNZ() * ( xtlZ + 2 * fGeom->GetGapBetweenCrystals() ) / 2.0 + fGeom->GetModuleBoxThickness() ; - gMC->Gsvolu("PTCB", "BOX ", IDTMED[706], DPTCB, 3) ; + gMC->Gsvolu("PTCB", "BOX ", idtmed[706], dptcb, 3) ; - YO = fGeom->GetAirFilledBoxSize(1) / 2.0 - DPTCB[1] + yO = fGeom->GetAirFilledBoxSize(1) / 2.0 - dptcb[1] - ( fGeom->GetIPtoCrystalSurface() - fGeom->GetIPtoOuterCoverDistance() - fGeom->GetModuleBoxThickness() - fGeom->GetUpperPlateThickness() - fGeom->GetSecondUpperPlateThickness() ) ; - gMC->Gspos("PTCB", 1, "PAIR", 0.0, YO, 0.0, 0, "ONLY") ; + gMC->Gspos("PTCB", 1, "PAIR", 0.0, yO, 0.0, 0, "ONLY") ; // --- // --- Define Crystal BLock filled with air, position it inside PTCB --- - Float_t DPCBL[3] ; + Float_t dpcbl[3] ; - DPCBL[0] = fGeom->GetNPhi() * ( XTL_X + 2 * fGeom->GetGapBetweenCrystals() ) / 2.0 ; - DPCBL[1] = ( XTL_Y + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() + fGeom->GetCrystalHolderThickness() ) / 2.0 ; - DPCBL[2] = fGeom->GetNZ() * ( XTL_Z + 2 * fGeom->GetGapBetweenCrystals() ) / 2.0 ; + dpcbl[0] = fGeom->GetNPhi() * ( xtlX + 2 * fGeom->GetGapBetweenCrystals() ) / 2.0 ; + dpcbl[1] = ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() + fGeom->GetCrystalHolderThickness() ) / 2.0 ; + dpcbl[2] = fGeom->GetNZ() * ( xtlZ + 2 * fGeom->GetGapBetweenCrystals() ) / 2.0 ; - gMC->Gsvolu("PCBL", "BOX ", IDTMED[798], DPCBL, 3) ; + gMC->Gsvolu("PCBL", "BOX ", idtmed[798], dpcbl, 3) ; // --- Divide PCBL in X (phi) and Z directions -- gMC->Gsdvn("PROW", "PCBL", Int_t (fGeom->GetNPhi()), 1) ; gMC->Gsdvn("PCEL", "PROW", Int_t (fGeom->GetNZ()), 3) ; - YO = -fGeom->GetModuleBoxThickness() / 2.0 ; + yO = -fGeom->GetModuleBoxThickness() / 2.0 ; - gMC->Gspos("PCBL", 1, "PTCB", 0.0, YO, 0.0, 0, "ONLY") ; + gMC->Gspos("PCBL", 1, "PTCB", 0.0, yO, 0.0, 0, "ONLY") ; // --- // --- Define STeel (actually, it's titanium) Cover volume, place inside PCEL - Float_t DPSTC[3] ; + Float_t dpstc[3] ; - DPSTC[0] = ( XTL_X + 2 * fGeom->GetCrystalWrapThickness() ) / 2.0 ; - DPSTC[1] = ( XTL_Y + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() + fGeom->GetCrystalHolderThickness() ) / 2.0 ; - DPSTC[2] = ( XTL_Z + 2 * fGeom->GetCrystalWrapThickness() + 2 * fGeom->GetCrystalHolderThickness() ) / 2.0 ; + dpstc[0] = ( xtlX + 2 * fGeom->GetCrystalWrapThickness() ) / 2.0 ; + dpstc[1] = ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() + fGeom->GetCrystalHolderThickness() ) / 2.0 ; + dpstc[2] = ( xtlZ + 2 * fGeom->GetCrystalWrapThickness() + 2 * fGeom->GetCrystalHolderThickness() ) / 2.0 ; - gMC->Gsvolu("PSTC", "BOX ", IDTMED[704], DPSTC, 3) ; + gMC->Gsvolu("PSTC", "BOX ", idtmed[704], dpstc, 3) ; gMC->Gspos("PSTC", 1, "PCEL", 0.0, 0.0, 0.0, 0, "ONLY") ; // --- // --- Define Tyvek volume, place inside PSTC --- - Float_t DPPAP[3] ; + Float_t dppap[3] ; - DPPAP[0] = XTL_X / 2.0 + fGeom->GetCrystalWrapThickness() ; - DPPAP[1] = ( XTL_Y + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() ) / 2.0 ; - DPPAP[2] = XTL_Z / 2.0 + fGeom->GetCrystalWrapThickness() ; + dppap[0] = xtlX / 2.0 + fGeom->GetCrystalWrapThickness() ; + dppap[1] = ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() ) / 2.0 ; + dppap[2] = xtlZ / 2.0 + fGeom->GetCrystalWrapThickness() ; - gMC->Gsvolu("PPAP", "BOX ", IDTMED[702], DPPAP, 3) ; + gMC->Gsvolu("PPAP", "BOX ", idtmed[702], dppap, 3) ; - YO = ( XTL_Y + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() ) / 2.0 - - ( XTL_Y + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() + fGeom->GetCrystalHolderThickness() ) / 2.0 ; + yO = ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() ) / 2.0 + - ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() + fGeom->GetCrystalHolderThickness() ) / 2.0 ; - gMC->Gspos("PPAP", 1, "PSTC", 0.0, YO, 0.0, 0, "ONLY") ; + gMC->Gspos("PPAP", 1, "PSTC", 0.0, yO, 0.0, 0, "ONLY") ; // --- // --- Define PbWO4 crystal volume, place inside PPAP --- - Float_t DPXTL[3] ; + Float_t dpxtl[3] ; - DPXTL[0] = XTL_X / 2.0 ; - DPXTL[1] = XTL_Y / 2.0 ; - DPXTL[2] = XTL_Z / 2.0 ; + dpxtl[0] = xtlX / 2.0 ; + dpxtl[1] = xtlY / 2.0 ; + dpxtl[2] = xtlZ / 2.0 ; - gMC->Gsvolu("PXTL", "BOX ", IDTMED[699], DPXTL, 3) ; + gMC->Gsvolu("PXTL", "BOX ", idtmed[699], dpxtl, 3) ; - YO = ( XTL_Y + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() ) / 2.0 - XTL_Y / 2.0 - fGeom->GetCrystalWrapThickness() ; + yO = ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() ) / 2.0 - xtlY / 2.0 - fGeom->GetCrystalWrapThickness() ; - gMC->Gspos("PXTL", 1, "PPAP", 0.0, YO, 0.0, 0, "ONLY") ; + gMC->Gspos("PXTL", 1, "PPAP", 0.0, yO, 0.0, 0, "ONLY") ; // --- // --- Define crystal support volume, place inside PPAP --- - Float_t DPSUP[3] ; + Float_t dpsup[3] ; - DPSUP[0] = XTL_X / 2.0 + fGeom->GetCrystalWrapThickness() ; - DPSUP[1] = fGeom->GetCrystalSupportHeight() / 2.0 ; - DPSUP[2] = XTL_Z / 2.0 + fGeom->GetCrystalWrapThickness() ; + dpsup[0] = xtlX / 2.0 + fGeom->GetCrystalWrapThickness() ; + dpsup[1] = fGeom->GetCrystalSupportHeight() / 2.0 ; + dpsup[2] = xtlZ / 2.0 + fGeom->GetCrystalWrapThickness() ; - gMC->Gsvolu("PSUP", "BOX ", IDTMED[798], DPSUP, 3) ; + gMC->Gsvolu("PSUP", "BOX ", idtmed[798], dpsup, 3) ; - YO = fGeom->GetCrystalSupportHeight() / 2.0 - ( XTL_Y + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() ) / 2.0 ; + yO = fGeom->GetCrystalSupportHeight() / 2.0 - ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() ) / 2.0 ; - gMC->Gspos("PSUP", 1, "PPAP", 0.0, YO, 0.0, 0, "ONLY") ; + gMC->Gspos("PSUP", 1, "PPAP", 0.0, yO, 0.0, 0, "ONLY") ; // --- // --- Define PIN-diode volume and position it inside crystal support --- @@ -755,88 +755,88 @@ void AliPHOSv0::CreateGeometryforPHOS() // --- PIN-diode dimensions --- - Float_t DPPIN[3] ; - DPPIN[0] = fGeom->GetPinDiodeSize(0) / 2.0 ; - DPPIN[1] = fGeom->GetPinDiodeSize(1) / 2.0 ; - DPPIN[2] = fGeom->GetPinDiodeSize(2) / 2.0 ; + Float_t dppin[3] ; + dppin[0] = fGeom->GetPinDiodeSize(0) / 2.0 ; + dppin[1] = fGeom->GetPinDiodeSize(1) / 2.0 ; + dppin[2] = fGeom->GetPinDiodeSize(2) / 2.0 ; - gMC->Gsvolu("PPIN", "BOX ", IDTMED[705], DPPIN, 3) ; + gMC->Gsvolu("PPIN", "BOX ", idtmed[705], dppin, 3) ; - YO = fGeom->GetCrystalSupportHeight() / 2.0 - fGeom->GetPinDiodeSize(1) / 2.0 ; + yO = fGeom->GetCrystalSupportHeight() / 2.0 - fGeom->GetPinDiodeSize(1) / 2.0 ; - gMC->Gspos("PPIN", 1, "PSUP", 0.0, YO, 0.0, 0, "ONLY") ; + gMC->Gspos("PPIN", 1, "PSUP", 0.0, yO, 0.0, 0, "ONLY") ; // --- // --- Define Upper Cooling Panel, place it on top of PTCB --- - Float_t DPUCP[3] ; + Float_t dpucp[3] ; // --- Upper Cooling Plate thickness --- - DPUCP[0] = DPTCB[0] ; - DPUCP[1] = fGeom->GetUpperCoolingPlateThickness() ; - DPUCP[2] = DPTCB[2] ; + dpucp[0] = dptcb[0] ; + dpucp[1] = fGeom->GetUpperCoolingPlateThickness() ; + dpucp[2] = dptcb[2] ; - gMC->Gsvolu("PUCP", "BOX ", IDTMED[701], DPUCP,3) ; + gMC->Gsvolu("PUCP", "BOX ", idtmed[701], dpucp,3) ; - YO = ( fGeom->GetAirFilledBoxSize(1) - fGeom->GetUpperCoolingPlateThickness() ) / 2. + yO = ( fGeom->GetAirFilledBoxSize(1) - fGeom->GetUpperCoolingPlateThickness() ) / 2. - ( fGeom->GetIPtoCrystalSurface() - fGeom->GetIPtoOuterCoverDistance() - fGeom->GetModuleBoxThickness() - fGeom->GetUpperPlateThickness() - fGeom->GetSecondUpperPlateThickness() - fGeom->GetUpperCoolingPlateThickness() ) ; - gMC->Gspos("PUCP", 1, "PAIR", 0.0, YO, 0.0, 0, "ONLY") ; + gMC->Gspos("PUCP", 1, "PAIR", 0.0, yO, 0.0, 0, "ONLY") ; // --- // --- Define Al Support Plate, position it inside PAIR --- // --- right beneath PTCB --- // --- Al Support Plate thickness --- - Float_t DPASP[3] ; - DPASP[0] = fGeom->GetAirFilledBoxSize(0) / 2.0 ; - DPASP[1] = fGeom->GetSupportPlateThickness() / 2.0 ; - DPASP[2] = fGeom->GetAirFilledBoxSize(2) / 2.0 ; + Float_t dpasp[3] ; + dpasp[0] = fGeom->GetAirFilledBoxSize(0) / 2.0 ; + dpasp[1] = fGeom->GetSupportPlateThickness() / 2.0 ; + dpasp[2] = fGeom->GetAirFilledBoxSize(2) / 2.0 ; - gMC->Gsvolu("PASP", "BOX ", IDTMED[701], DPASP, 3) ; + gMC->Gsvolu("PASP", "BOX ", idtmed[701], dpasp, 3) ; - YO = ( fGeom->GetAirFilledBoxSize(1) - fGeom->GetSupportPlateThickness() ) / 2. + yO = ( fGeom->GetAirFilledBoxSize(1) - fGeom->GetSupportPlateThickness() ) / 2. - ( fGeom->GetIPtoCrystalSurface() - fGeom->GetIPtoOuterCoverDistance() - - fGeom->GetUpperPlateThickness() - fGeom->GetSecondUpperPlateThickness() + DPCBL[1] * 2 ) ; + - fGeom->GetUpperPlateThickness() - fGeom->GetSecondUpperPlateThickness() + dpcbl[1] * 2 ) ; - gMC->Gspos("PASP", 1, "PAIR", 0.0, YO, 0.0, 0, "ONLY") ; + gMC->Gspos("PASP", 1, "PAIR", 0.0, yO, 0.0, 0, "ONLY") ; // --- // --- Define Thermo Insulating Plate, position it inside PAIR --- // --- right beneath PASP --- // --- Lower Thermo Insulating Plate thickness --- - Float_t DPTIP[3] ; - DPTIP[0] = fGeom->GetAirFilledBoxSize(0) / 2.0 ; - DPTIP[1] = fGeom->GetLowerThermoPlateThickness() / 2.0 ; - DPTIP[2] = fGeom->GetAirFilledBoxSize(2) / 2.0 ; + Float_t dptip[3] ; + dptip[0] = fGeom->GetAirFilledBoxSize(0) / 2.0 ; + dptip[1] = fGeom->GetLowerThermoPlateThickness() / 2.0 ; + dptip[2] = fGeom->GetAirFilledBoxSize(2) / 2.0 ; - gMC->Gsvolu("PTIP", "BOX ", IDTMED[706], DPTIP, 3) ; + gMC->Gsvolu("PTIP", "BOX ", idtmed[706], dptip, 3) ; - YO = ( fGeom->GetAirFilledBoxSize(1) - fGeom->GetLowerThermoPlateThickness() ) / 2. + yO = ( fGeom->GetAirFilledBoxSize(1) - fGeom->GetLowerThermoPlateThickness() ) / 2. - ( fGeom->GetIPtoCrystalSurface() - fGeom->GetIPtoOuterCoverDistance() - fGeom->GetUpperPlateThickness() - - fGeom->GetSecondUpperPlateThickness() + DPCBL[1] * 2 + fGeom->GetSupportPlateThickness() ) ; + - fGeom->GetSecondUpperPlateThickness() + dpcbl[1] * 2 + fGeom->GetSupportPlateThickness() ) ; - gMC->Gspos("PTIP", 1, "PAIR", 0.0, YO, 0.0, 0, "ONLY") ; + gMC->Gspos("PTIP", 1, "PAIR", 0.0, yO, 0.0, 0, "ONLY") ; // --- // --- Define Textolit Plate, position it inside PAIR --- // --- right beneath PTIP --- // --- Lower Textolit Plate thickness --- - Float_t DPTXP[3] ; - DPTXP[0] = fGeom->GetAirFilledBoxSize(0) / 2.0 ; - DPTXP[1] = fGeom->GetLowerTextolitPlateThickness() / 2.0 ; - DPTXP[2] = fGeom->GetAirFilledBoxSize(2) / 2.0 ; + Float_t dptxp[3] ; + dptxp[0] = fGeom->GetAirFilledBoxSize(0) / 2.0 ; + dptxp[1] = fGeom->GetLowerTextolitPlateThickness() / 2.0 ; + dptxp[2] = fGeom->GetAirFilledBoxSize(2) / 2.0 ; - gMC->Gsvolu("PTXP", "BOX ", IDTMED[707], DPTXP, 3) ; + gMC->Gsvolu("PTXP", "BOX ", idtmed[707], dptxp, 3) ; - YO = ( fGeom->GetAirFilledBoxSize(1) - fGeom->GetLowerTextolitPlateThickness() ) / 2. + yO = ( fGeom->GetAirFilledBoxSize(1) - fGeom->GetLowerTextolitPlateThickness() ) / 2. - ( fGeom->GetIPtoCrystalSurface() - fGeom->GetIPtoOuterCoverDistance() - fGeom->GetUpperPlateThickness() - - fGeom->GetSecondUpperPlateThickness() + DPCBL[1] * 2 + fGeom->GetSupportPlateThickness() + - fGeom->GetSecondUpperPlateThickness() + dpcbl[1] * 2 + fGeom->GetSupportPlateThickness() + fGeom->GetLowerThermoPlateThickness() ) ; - gMC->Gspos("PTXP", 1, "PAIR", 0.0, YO, 0.0, 0, "ONLY") ; + gMC->Gspos("PTXP", 1, "PAIR", 0.0, yO, 0.0, 0, "ONLY") ; } @@ -844,188 +844,188 @@ void AliPHOSv0::CreateGeometryforPHOS() void AliPHOSv0::CreateGeometryforPPSD() { // Get pointer to the array containing media indeces - Int_t *IDTMED = fIdtmed->GetArray() - 699 ; + Int_t *idtmed = fIdtmed->GetArray() - 699 ; - // The box containing all PPSD's for one PHOS module filled with air - Float_t PPSD[3] ; - PPSD[0] = fGeom->GetPPSDBoxSize(0) / 2.0 ; - PPSD[1] = fGeom->GetPPSDBoxSize(1) / 2.0 ; - PPSD[2] = fGeom->GetPPSDBoxSize(2) / 2.0 ; + // The box containing all ppsd's for one PHOS module filled with air + Float_t ppsd[3] ; + ppsd[0] = fGeom->GetPPSDBoxSize(0) / 2.0 ; + ppsd[1] = fGeom->GetPPSDBoxSize(1) / 2.0 ; + ppsd[2] = fGeom->GetPPSDBoxSize(2) / 2.0 ; - gMC->Gsvolu("PPSD", "BOX ", IDTMED[798], PPSD, 3) ; + gMC->Gsvolu("PPSD", "BOX ", idtmed[798], ppsd, 3) ; - Float_t YO = fGeom->GetOuterBoxSize(1) / 2.0 ; + Float_t yO = fGeom->GetOuterBoxSize(1) / 2.0 ; - gMC->Gspos("PPSD", 1, "PHOS", 0.0, YO, 0.0, 0, "ONLY") ; + gMC->Gspos("PPSD", 1, "PHOS", 0.0, yO, 0.0, 0, "ONLY") ; // Now we build a micromegas module // The box containing the whole module filled with epoxy (FR4) - Float_t MPPSD[3] ; - MPPSD[0] = fGeom->GetPPSDModuleSize(0) / 2.0 ; - MPPSD[1] = fGeom->GetPPSDModuleSize(1) / 2.0 ; - MPPSD[2] = fGeom->GetPPSDModuleSize(2) / 2.0 ; + Float_t mppsd[3] ; + mppsd[0] = fGeom->GetPPSDModuleSize(0) / 2.0 ; + mppsd[1] = fGeom->GetPPSDModuleSize(1) / 2.0 ; + mppsd[2] = fGeom->GetPPSDModuleSize(2) / 2.0 ; - gMC->Gsvolu("MPPS", "BOX ", IDTMED[708], MPPSD, 3) ; + gMC->Gsvolu("MPPS", "BOX ", idtmed[708], mppsd, 3) ; - // Inside MPPSD : + // Inside mppsd : // 1. The Top Lid made of epoxy (FR4) - Float_t TLPPSD[3] ; - TLPPSD[0] = fGeom->GetPPSDModuleSize(0) / 2.0 ; - TLPPSD[1] = fGeom->GetLidThickness() / 2.0 ; - TLPPSD[2] = fGeom->GetPPSDModuleSize(2) / 2.0 ; + Float_t tlppsd[3] ; + tlppsd[0] = fGeom->GetPPSDModuleSize(0) / 2.0 ; + tlppsd[1] = fGeom->GetLidThickness() / 2.0 ; + tlppsd[2] = fGeom->GetPPSDModuleSize(2) / 2.0 ; - gMC->Gsvolu("TLPS", "BOX ", IDTMED[708], TLPPSD, 3) ; + gMC->Gsvolu("TLPS", "BOX ", idtmed[708], tlppsd, 3) ; - Float_t Y0 = ( fGeom->GetMicromegas1Thickness() - fGeom->GetLidThickness() ) / 2. ; + Float_t y0 = ( fGeom->GetMicromegas1Thickness() - fGeom->GetLidThickness() ) / 2. ; - gMC->Gspos("TLPS", 1, "MPPS", 0.0, Y0, 0.0, 0, "ONLY") ; + gMC->Gspos("TLPS", 1, "MPPS", 0.0, y0, 0.0, 0, "ONLY") ; // 2. the upper panel made of composite material - Float_t UPPPSD[3] ; - UPPPSD[0] = ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; - UPPPSD[1] = fGeom->GetCompositeThickness() / 2.0 ; - UPPPSD[2] = ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; + Float_t upppsd[3] ; + upppsd[0] = ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; + upppsd[1] = fGeom->GetCompositeThickness() / 2.0 ; + upppsd[2] = ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; - gMC->Gsvolu("UPPS", "BOX ", IDTMED[709], UPPPSD, 3) ; + gMC->Gsvolu("UPPS", "BOX ", idtmed[709], upppsd, 3) ; - Y0 = Y0 - fGeom->GetLidThickness() / 2. - fGeom->GetCompositeThickness() / 2. ; + y0 = y0 - fGeom->GetLidThickness() / 2. - fGeom->GetCompositeThickness() / 2. ; - gMC->Gspos("UPPS", 1, "MPPS", 0.0, Y0, 0.0, 0, "ONLY") ; + gMC->Gspos("UPPS", 1, "MPPS", 0.0, y0, 0.0, 0, "ONLY") ; // 3. the anode made of Copper - Float_t ANPPSD[3] ; - ANPPSD[0] = ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; - ANPPSD[1] = fGeom->GetAnodeThickness() / 2.0 ; - ANPPSD[2] = ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; + Float_t anppsd[3] ; + anppsd[0] = ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; + anppsd[1] = fGeom->GetAnodeThickness() / 2.0 ; + anppsd[2] = ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; - gMC->Gsvolu("ANPS", "BOX ", IDTMED[710], ANPPSD, 3) ; + gMC->Gsvolu("ANPS", "BOX ", idtmed[710], anppsd, 3) ; - Y0 = Y0 - fGeom->GetCompositeThickness() / 2. - fGeom->GetAnodeThickness() / 2. ; + y0 = y0 - fGeom->GetCompositeThickness() / 2. - fGeom->GetAnodeThickness() / 2. ; - gMC->Gspos("ANPS", 1, "MPPS", 0.0, Y0, 0.0, 0, "ONLY") ; + gMC->Gspos("ANPS", 1, "MPPS", 0.0, y0, 0.0, 0, "ONLY") ; // 4. the conversion gap + avalanche gap filled with gas - Float_t GGPPSD[3] ; - GGPPSD[0] = ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; - GGPPSD[1] = ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2.0 ; - GGPPSD[2] = ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; + Float_t ggppsd[3] ; + ggppsd[0] = ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; + ggppsd[1] = ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2.0 ; + ggppsd[2] = ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; - gMC->Gsvolu("GGPS", "BOX ", IDTMED[715], GGPPSD, 3) ; + gMC->Gsvolu("GGPS", "BOX ", idtmed[715], ggppsd, 3) ; // --- Divide GGPP in X (phi) and Z directions -- gMC->Gsdvn("GROW", "GGPS", fGeom->GetNumberOfPadsPhi(), 1) ; gMC->Gsdvn("GCEL", "GROW", fGeom->GetNumberOfPadsZ() , 3) ; - Y0 = Y0 - fGeom->GetAnodeThickness() / 2. - ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2. ; + y0 = y0 - fGeom->GetAnodeThickness() / 2. - ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2. ; - gMC->Gspos("GGPS", 1, "MPPS", 0.0, Y0, 0.0, 0, "ONLY") ; + gMC->Gspos("GGPS", 1, "MPPS", 0.0, y0, 0.0, 0, "ONLY") ; // 6. the cathode made of Copper - Float_t CAPPSD[3] ; - CAPPSD[0] = ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; - CAPPSD[1] = fGeom->GetCathodeThickness() / 2.0 ; - CAPPSD[2] = ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; + Float_t cappsd[3] ; + cappsd[0] = ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; + cappsd[1] = fGeom->GetCathodeThickness() / 2.0 ; + cappsd[2] = ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; - gMC->Gsvolu("CAPS", "BOX ", IDTMED[710], CAPPSD, 3) ; + gMC->Gsvolu("CAPS", "BOX ", idtmed[710], cappsd, 3) ; - Y0 = Y0 - ( fGeom->GetAvalancheGap() + fGeom->GetAvalancheGap() ) / 2. - fGeom->GetCathodeThickness() / 2. ; + y0 = y0 - ( fGeom->GetAvalancheGap() + fGeom->GetAvalancheGap() ) / 2. - fGeom->GetCathodeThickness() / 2. ; - gMC->Gspos("CAPS", 1, "MPPS", 0.0, Y0, 0.0, 0, "ONLY") ; + gMC->Gspos("CAPS", 1, "MPPS", 0.0, y0, 0.0, 0, "ONLY") ; // 7. the printed circuit made of G10 - Float_t PCPPSD[3] ; - PCPPSD[0] = ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() ) / 2,.0 ; - PCPPSD[1] = fGeom->GetPCThickness() / 2.0 ; - PCPPSD[2] = ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; + Float_t pcppsd[3] ; + pcppsd[0] = ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() ) / 2,.0 ; + pcppsd[1] = fGeom->GetPCThickness() / 2.0 ; + pcppsd[2] = ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; - gMC->Gsvolu("PCPS", "BOX ", IDTMED[711], CAPPSD, 3) ; + gMC->Gsvolu("PCPS", "BOX ", idtmed[711], cappsd, 3) ; - Y0 = Y0 - fGeom->GetCathodeThickness() / 2. - fGeom->GetPCThickness() / 2. ; + y0 = y0 - fGeom->GetCathodeThickness() / 2. - fGeom->GetPCThickness() / 2. ; - gMC->Gspos("PCPS", 1, "MPPS", 0.0, Y0, 0.0, 0, "ONLY") ; + gMC->Gspos("PCPS", 1, "MPPS", 0.0, y0, 0.0, 0, "ONLY") ; // 8. the lower panel made of composite material - Float_t LPPPSD[3] ; - LPPPSD[0] = ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; - LPPPSD[1] = fGeom->GetCompositeThickness() / 2.0 ; - LPPPSD[2] = ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; + Float_t lpppsd[3] ; + lpppsd[0] = ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; + lpppsd[1] = fGeom->GetCompositeThickness() / 2.0 ; + lpppsd[2] = ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() ) / 2.0 ; - gMC->Gsvolu("LPPS", "BOX ", IDTMED[709], LPPPSD, 3) ; + gMC->Gsvolu("LPPS", "BOX ", idtmed[709], lpppsd, 3) ; - Y0 = Y0 - fGeom->GetPCThickness() / 2. - fGeom->GetCompositeThickness() / 2. ; + y0 = y0 - fGeom->GetPCThickness() / 2. - fGeom->GetCompositeThickness() / 2. ; - gMC->Gspos("LPPS", 1, "MPPS", 0.0, Y0, 0.0, 0, "ONLY") ; + gMC->Gspos("LPPS", 1, "MPPS", 0.0, y0, 0.0, 0, "ONLY") ; - // Position the fNumberOfModulesPhi x fNumberOfModulesZ modules (MPPSD) inside PPSD to cover a PHOS module + // Position the fNumberOfModulesPhi x fNumberOfModulesZ modules (mppsd) inside PPSD to cover a PHOS module // the top and bottom one's (which are assumed identical) : - Float_t Yt = ( fGeom->GetPPSDBoxSize(1) - fGeom->GetMicromegas1Thickness() ) / 2. ; - Float_t Yb = - ( fGeom->GetPPSDBoxSize(1) - fGeom->GetMicromegas2Thickness() ) / 2. ; + Float_t yt = ( fGeom->GetPPSDBoxSize(1) - fGeom->GetMicromegas1Thickness() ) / 2. ; + Float_t yb = - ( fGeom->GetPPSDBoxSize(1) - fGeom->GetMicromegas2Thickness() ) / 2. ; - Int_t CopyNumbertop = 0 ; - Int_t CopyNumberbot = fGeom->GetNumberOfModulesPhi() * fGeom->GetNumberOfModulesZ() ; + Int_t copyNumbertop = 0 ; + Int_t copyNumberbot = fGeom->GetNumberOfModulesPhi() * fGeom->GetNumberOfModulesZ() ; - Float_t X = ( fGeom->GetPPSDBoxSize(0) - fGeom->GetPPSDModuleSize(0) ) / 2. ; + Float_t x = ( fGeom->GetPPSDBoxSize(0) - fGeom->GetPPSDModuleSize(0) ) / 2. ; for ( Int_t iphi = 1; iphi <= fGeom->GetNumberOfModulesPhi(); iphi++ ) { // the number of micromegas modules in phi per PHOS module - Float_t Z = ( fGeom->GetPPSDBoxSize(2) - fGeom->GetPPSDModuleSize(2) ) / 2. ; + Float_t z = ( fGeom->GetPPSDBoxSize(2) - fGeom->GetPPSDModuleSize(2) ) / 2. ; for ( Int_t iz = 1; iz <= fGeom->GetNumberOfModulesZ(); iz++ ) { // the number of micromegas modules in z per PHOS module - gMC->Gspos("MPPS", ++CopyNumbertop, "PPSD", X, Yt, Z, 0, "ONLY") ; - gMC->Gspos("MPPS", ++CopyNumberbot, "PPSD", X, Yb, Z, 0, "ONLY") ; - Z = Z - fGeom->GetPPSDModuleSize(2) ; + gMC->Gspos("MPPS", ++copyNumbertop, "PPSD", x, yt, z, 0, "ONLY") ; + gMC->Gspos("MPPS", ++copyNumberbot, "PPSD", x, yb, z, 0, "ONLY") ; + z = z - fGeom->GetPPSDModuleSize(2) ; } // end of Z module loop - X = X - fGeom->GetPPSDModuleSize(0) ; + x = x - fGeom->GetPPSDModuleSize(0) ; } // end of phi module loop // The Lead converter between two air gaps // 1. Upper air gap - Float_t UAPPSD[3] ; - UAPPSD[0] = fGeom->GetPPSDBoxSize(0) / 2.0 ; - UAPPSD[1] = fGeom->GetMicro1ToLeadGap() / 2.0 ; - UAPPSD[2] = fGeom->GetPPSDBoxSize(2) / 2.0 ; + Float_t uappsd[3] ; + uappsd[0] = fGeom->GetPPSDBoxSize(0) / 2.0 ; + uappsd[1] = fGeom->GetMicro1ToLeadGap() / 2.0 ; + uappsd[2] = fGeom->GetPPSDBoxSize(2) / 2.0 ; - gMC->Gsvolu("UAPPSD", "BOX ", IDTMED[798], UAPPSD, 3) ; + gMC->Gsvolu("UAPPSD", "BOX ", idtmed[798], uappsd, 3) ; - Y0 = ( fGeom->GetPPSDBoxSize(1) - 2 * fGeom->GetMicromegas1Thickness() - fGeom->GetMicro1ToLeadGap() ) / 2. ; + y0 = ( fGeom->GetPPSDBoxSize(1) - 2 * fGeom->GetMicromegas1Thickness() - fGeom->GetMicro1ToLeadGap() ) / 2. ; - gMC->Gspos("UAPPSD", 1, "PPSD", 0.0, Y0, 0.0, 0, "ONLY") ; + gMC->Gspos("UAPPSD", 1, "PPSD", 0.0, y0, 0.0, 0, "ONLY") ; // 2. Lead converter - Float_t LCPPSD[3] ; - LCPPSD[0] = fGeom->GetPPSDBoxSize(0) / 2.0 ; - LCPPSD[1] = fGeom->GetLeadConverterThickness() / 2.0 ; - LCPPSD[2] = fGeom->GetPPSDBoxSize(2) / 2.0 ; + Float_t lcppsd[3] ; + lcppsd[0] = fGeom->GetPPSDBoxSize(0) / 2.0 ; + lcppsd[1] = fGeom->GetLeadConverterThickness() / 2.0 ; + lcppsd[2] = fGeom->GetPPSDBoxSize(2) / 2.0 ; - gMC->Gsvolu("LCPPSD", "BOX ", IDTMED[712], LCPPSD, 3) ; + gMC->Gsvolu("LCPPSD", "BOX ", idtmed[712], lcppsd, 3) ; - Y0 = Y0 - fGeom->GetMicro1ToLeadGap() / 2. - fGeom->GetLeadConverterThickness() / 2. ; + y0 = y0 - fGeom->GetMicro1ToLeadGap() / 2. - fGeom->GetLeadConverterThickness() / 2. ; - gMC->Gspos("LCPPSD", 1, "PPSD", 0.0, Y0, 0.0, 0, "ONLY") ; + gMC->Gspos("LCPPSD", 1, "PPSD", 0.0, y0, 0.0, 0, "ONLY") ; // 3. Lower air gap - Float_t LAPPSD[3] ; - LAPPSD[0] = fGeom->GetPPSDBoxSize(0) / 2.0 ; - LAPPSD[1] = fGeom->GetLeadToMicro2Gap() / 2.0 ; - LAPPSD[2] = fGeom->GetPPSDBoxSize(2) / 2.0 ; + Float_t lappsd[3] ; + lappsd[0] = fGeom->GetPPSDBoxSize(0) / 2.0 ; + lappsd[1] = fGeom->GetLeadToMicro2Gap() / 2.0 ; + lappsd[2] = fGeom->GetPPSDBoxSize(2) / 2.0 ; - gMC->Gsvolu("LAPPSD", "BOX ", IDTMED[798], LAPPSD, 3) ; + gMC->Gsvolu("LAPPSD", "BOX ", idtmed[798], lappsd, 3) ; - Y0 = Y0 - fGeom->GetLeadConverterThickness() / 2. - fGeom->GetLeadToMicro2Gap() / 2. ; + y0 = y0 - fGeom->GetLeadConverterThickness() / 2. - fGeom->GetLeadToMicro2Gap() / 2. ; - gMC->Gspos("LAPPSD", 1, "PPSD", 0.0, Y0, 0.0, 0, "ONLY") ; + gMC->Gspos("LAPPSD", 1, "PPSD", 0.0, y0, 0.0, 0, "ONLY") ; } @@ -1043,14 +1043,14 @@ void AliPHOSv0::FinishEvent() cout << " AliPHOSv0::FinishEvent() -- Starting digitalization" << endl ; Int_t i ; TClonesArray &lDigits = *fDigits ; - AliPHOSHit * Hit ; - AliPHOSDigit * Digit ; + AliPHOSHit * hit ; + AliPHOSDigit * digit ; for ( i = 0 ; i < fNTmpHits ; i++ ) { - Hit = (AliPHOSHit*)fTmpHits->At(i) ; - Digit = new AliPHOSDigit(Hit->GetId(),Digitize(Hit->GetEnergy())) ; - new(lDigits[fNdigits]) AliPHOSDigit(* Digit) ; - fNdigits++; delete Digit ; + hit = (AliPHOSHit*)fTmpHits->At(i) ; + digit = new AliPHOSDigit(hit->GetId(),Digitize(hit->GetEnergy())) ; + new(lDigits[fNdigits]) AliPHOSDigit(* digit) ; + fNdigits++; delete digit ; } // Reset the array of all the "accumulated hits" of this event. @@ -1088,9 +1088,9 @@ void AliPHOSv0::MakeBranch(Option_t* opt) char branchname[10]; sprintf(branchname,"%s",GetName()); - char *D = strstr(opt,"D"); + char *cd = strstr(opt,"D"); - if (fDigits && gAlice->TreeD() && D) { + if (fDigits && gAlice->TreeD() && cd) { gAlice->TreeD()->Branch(branchname,&fDigits, fBufferSize); printf("* AliPHOS::MakeBranch * Making Branch %s for digits\n",branchname); } @@ -1138,7 +1138,7 @@ void AliPHOSv0::Reconstruction(AliPHOSReconstructioner * Reconstructioner) //____________________________________________________________________________ void AliPHOSv0::StepManager(void) { - Int_t RelId[4] ; // (box, layer, row, column) indices + Int_t relid[4] ; // (box, layer, row, column) indices Float_t xyze[4] ; // position wrt MRS and energy deposited TLorentzVector pos ; Int_t copy; @@ -1156,20 +1156,20 @@ void AliPHOSv0::StepManager(void) xyze[3] = gMC->Edep() ; if ( xyze[3] != 0 ) { // there is deposited energy - gMC->CurrentVolOffID(5, RelId[0]) ; // get the PHOS Module number - gMC->CurrentVolOffID(3, RelId[1]) ; // get the Micromegas Module number + gMC->CurrentVolOffID(5, relid[0]) ; // get the PHOS Module number + gMC->CurrentVolOffID(3, relid[1]) ; // get the Micromegas Module number // 1-> Geom->GetNumberOfModulesPhi() * fGeom->GetNumberOfModulesZ() upper // > fGeom->GetNumberOfModulesPhi() * fGeom->GetNumberOfModulesZ() lower - gMC->CurrentVolOffID(1, RelId[2]) ; // get the row number of the cell - gMC->CurrentVolID(RelId[3]) ; // get the column number + gMC->CurrentVolOffID(1, relid[2]) ; // get the row number of the cell + gMC->CurrentVolID(relid[3]) ; // get the column number // get the absolute Id number - Int_t AbsId ; - fGeom->RelToAbsNumbering(RelId,AbsId) ; + Int_t absid ; + fGeom->RelToAbsNumbering(relid,absid) ; // add current hit to the hit list - AddHit(gAlice->CurrentTrack(), AbsId, xyze); + AddHit(gAlice->CurrentTrack(), absid, xyze); } // there is deposited energy } // We are inside the gas of the CPV @@ -1185,19 +1185,19 @@ void AliPHOSv0::StepManager(void) xyze[3] = gMC->Edep() ; if ( xyze[3] != 0 ) { - gMC->CurrentVolOffID(10, RelId[0]) ; // get the PHOS module number ; - RelId[1] = 0 ; // means PW04 - gMC->CurrentVolOffID(4, RelId[2]) ; // get the row number inside the module - gMC->CurrentVolOffID(3, RelId[3]) ; // get the cell number inside the module + gMC->CurrentVolOffID(10, relid[0]) ; // get the PHOS module number ; + relid[1] = 0 ; // means PW04 + gMC->CurrentVolOffID(4, relid[2]) ; // get the row number inside the module + gMC->CurrentVolOffID(3, relid[3]) ; // get the cell number inside the module // get the absolute Id number - Int_t AbsId ; - fGeom->RelToAbsNumbering(RelId,AbsId) ; + Int_t absid ; + fGeom->RelToAbsNumbering(relid, absid) ; // add current hit to the hit list - AddHit(gAlice->CurrentTrack(), AbsId, xyze); + AddHit(gAlice->CurrentTrack(), absid, xyze); } // there is deposited energy } // we are inside a PHOS Xtal diff --git a/PHOS/AliPHOSv0.h b/PHOS/AliPHOSv0.h index 6e255e001e9..fa1ed59cf49 100644 --- a/PHOS/AliPHOSv0.h +++ b/PHOS/AliPHOSv0.h @@ -52,7 +52,7 @@ public: virtual void StepManager(void) ; // does the tracking through PHOS and a preliminary digitalization TrackSegmentsList * TrackSegments(){return fTrackSegments ;} -private: +protected: RecPointsList * fEmcClusters ; //! (!=do not stream) AliPHOSGeometry * fGeom ; // geometry definition @@ -64,8 +64,6 @@ private: TrackSegmentsList * fTrackSegments ; //! idem RecParticlesList * fRecParticles ; //! idem -public: - ClassDef(AliPHOSv0,1) // PHOS main class , version subatech }; diff --git a/PHOS/Makefile b/PHOS/Makefile index 1a2ca8cbe09..70ac0375b48 100644 --- a/PHOS/Makefile +++ b/PHOS/Makefile @@ -9,7 +9,7 @@ PACKAGE = PHOS # C++ sources -SRCS = AliPHOS.cxx AliPHOSv0.cxx AliPHOSHit.cxx \ +SRCS = AliPHOS.cxx AliPHOSv0.cxx AliPHOSv1.cxx AliPHOSHit.cxx \ AliPHOSGeometry.cxx \ AliPHOSDigit.cxx \ AliPHOSRecPoint.cxx AliPHOSEmcRecPoint.cxx AliPHOSPpsdRecPoint.cxx \ @@ -17,7 +17,7 @@ SRCS = AliPHOS.cxx AliPHOSv0.cxx AliPHOSHit.cxx \ AliPHOSReconstructioner.cxx AliPHOSTrackSegment.cxx \ AliPHOSTrackSegmentMaker.cxx AliPHOSTrackSegmentMakerv1.cxx \ AliPHOSRecParticle.cxx AliPHOSParticleGuesser.cxx AliPHOSParticleGuesserv1.cxx \ - AliPHOSAnalyze.cxx PHOSHistos.cxx + AliPHOSAnalyze.cxx # C++ Headers diff --git a/PHOS/PHOSLinkDef.h b/PHOS/PHOSLinkDef.h index 146c61e66ec..44761c337f6 100644 --- a/PHOS/PHOSLinkDef.h +++ b/PHOS/PHOSLinkDef.h @@ -16,6 +16,7 @@ #pragma link C++ class AliPHOSReconstructioner ; #pragma link C++ class AliPHOSRecPoint ; #pragma link C++ class AliPHOSv0 ; +#pragma link C++ class AliPHOSv1 ; #pragma link C++ class AliPHOSTrackSegment ; #pragma link C++ class AliPHOSTrackSegmentMaker ; #pragma link C++ class AliPHOSTrackSegmentMakerv1 ; @@ -23,6 +24,5 @@ #pragma link C++ class AliPHOSParticleGuesser ; #pragma link C++ class AliPHOSParticleGuesserv1 ; #pragma link C++ class AliPHOSAnalyze ; -#pragma link C++ function PHOSHistos(Text_t*,Int_t, Int_t); #endif diff --git a/PHOS/canevas.h b/PHOS/canevas.h index 0020d440073..66be28077c1 100644 --- a/PHOS/canevas.h +++ b/PHOS/canevas.h @@ -27,9 +27,7 @@ public: private: -public: - -ClassDef(AliPHOSxxx,1) // description , version 1 + ClassDef(AliPHOSxxx,1) // description , version 1 }; -- 2.39.3