From a3dfe79c4e5773dbe4515549b51fd0bbea23a321 Mon Sep 17 00:00:00 2001 From: martinez Date: Thu, 9 Nov 2000 15:49:17 +0000 Subject: [PATCH] Coding convention rules obeyed --- PHOS/AliPHOSAnalyze.cxx | 121 +++++++++++++++---------------- PHOS/AliPHOSAnalyze.h | 5 +- PHOS/AliPHOSCPVBaseGeometry.h | 72 +++++++++--------- PHOS/AliPHOSCPVDigit.h | 14 ++-- PHOS/AliPHOSCPVGeometry.cxx | 9 ++- PHOS/AliPHOSCPVGeometry.h | 79 ++++++++++---------- PHOS/AliPHOSCPVHit.h | 12 +-- PHOS/AliPHOSCPVModule.h | 13 +++- PHOS/AliPHOSCpvRecPoint.cxx | 15 ++-- PHOS/AliPHOSCpvRecPoint.h | 10 +-- PHOS/AliPHOSEMCAGeometry.cxx | 10 ++- PHOS/AliPHOSEMCAGeometry.h | 22 ++++-- PHOS/AliPHOSGeometry.cxx | 19 +++-- PHOS/AliPHOSGeometry.h | 12 ++- PHOS/AliPHOSPPSDGeometry.cxx | 21 ++++-- PHOS/AliPHOSPPSDGeometry.h | 87 +++++++++++----------- PHOS/AliPHOSReconstructioner.cxx | 8 +- PHOS/AliPHOSReconstructioner.h | 5 +- PHOS/AliPHOSv0.cxx | 3 +- PHOS/AliPHOSv0.h | 6 +- PHOS/AliPHOSv1.cxx | 117 ++++++++++++++---------------- PHOS/AliPHOSv1.h | 6 +- 22 files changed, 356 insertions(+), 310 deletions(-) diff --git a/PHOS/AliPHOSAnalyze.cxx b/PHOS/AliPHOSAnalyze.cxx index b2e4f0e9f81..df547ffbb84 100644 --- a/PHOS/AliPHOSAnalyze.cxx +++ b/PHOS/AliPHOSAnalyze.cxx @@ -19,7 +19,7 @@ // Algorythm class to analyze PHOSv1 events: // Construct histograms and displays them. // Use the macro EditorBar.C for best access to the functionnalities -// +//*-- //*-- Author: Y. Schutz (SUBATECH) & Gines Martinez (SUBATECH) ////////////////////////////////////////////////////////////////////////////// @@ -118,16 +118,13 @@ AliPHOSAnalyze::~AliPHOSAnalyze() { // dtor - if (fRootFile->IsOpen() ) - fRootFile->Close() ; - if(fRootFile) - delete fRootFile ; - if(fRootFile) {delete fRootFile ; fRootFile=0 ;} - if(fPHOS) {delete fPHOS ; fPHOS =0 ;} - if(fClu) {delete fClu ; fClu =0 ;} - if(fPID) {delete fPID ; fPID =0 ;} - if(fRec) {delete fRec ; fRec =0 ;} - if(fTrs) {delete fTrs ; fTrs =0 ;} + if(fRootFile->IsOpen()) fRootFile->Close() ; + if(fRootFile) {delete fRootFile ; fRootFile=0 ;} + if(fPHOS) {delete fPHOS ; fPHOS =0 ;} + if(fClu) {delete fClu ; fClu =0 ;} + if(fPID) {delete fPID ; fPID =0 ;} + if(fRec) {delete fRec ; fRec =0 ;} + if(fTrs) {delete fTrs ; fTrs =0 ;} } @@ -311,8 +308,8 @@ void AliPHOSAnalyze::AnalyzeManyEvents(Int_t Nevents, Int_t module) void AliPHOSAnalyze::Reconstruct(Int_t Nevents,Int_t FirstEvent ) { - // Perform reconstruction of EMC and CPV (GPS2 or IHEP) for events - // Yuri Kharlov. 19 October 2000 + // Performs reconstruction of EMC and CPV (GPS2 or IHEP) + // for events from FirstEvent to Nevents Int_t ievent ; for ( ievent=FirstEvent; ievent Event is " << ievent+1 << endl ; //=========== Connects the various Tree's for evt - gAlice->GetEvent(ievent); + Int_t ntracks = gAlice->GetEvent(ievent); - //=========== Get the Hits Tree - gAlice->ResetHits(); - gAlice->TreeH()->GetEvent(0); - //========== Creating branches =================================== - AliPHOSRecPoint::RecPointsList ** EmcRecPoints = fPHOS->EmcRecPoints() ; - gAlice->TreeR()->SetBranchAddress( "PHOSEmcRP" , EmcRecPoints ) ; + AliPHOSRecPoint::RecPointsList ** emcRecPoints = fPHOS->EmcRecPoints() ; + gAlice->TreeR()->SetBranchAddress( "PHOSEmcRP" , emcRecPoints ) ; - AliPHOSRecPoint::RecPointsList ** CpvRecPoints = fPHOS->PpsdRecPoints() ; - gAlice->TreeR()->SetBranchAddress( "PHOSPpsdRP", CpvRecPoints ) ; - - //=========== Gets the Reconstruction TTree - gAlice->TreeR()->GetEvent(0) ; + AliPHOSRecPoint::RecPointsList ** cpvRecPoints = fPHOS->PpsdRecPoints() ; + gAlice->TreeR()->SetBranchAddress( "PHOSPpsdRP", cpvRecPoints ) ; // Read and print CPV hits - - TClonesArray *CPVhits; - for (Int_t iModule=0; iModule < fGeom->GetNModules(); iModule++) { - AliPHOSCPVModule cpvModule = fPHOS->GetCPVModule(iModule); - CPVhits = cpvModule.Hits(); - Int_t nCPVhits = CPVhits->GetEntriesFast(); - for (Int_t ihit=0; ihitUncheckedAt(ihit); - TLorentzVector p = cpvHit->GetMomentum(); - Float_t xgen = cpvHit->GetX(); - Float_t zgen = cpvHit->GetY(); - Int_t ipart = cpvHit->GetIpart(); - printf("CPV hit in module %d: ",iModule+1); - printf(" p = (%f, %f, %f, %f) GeV,\n", - p.Px(),p.Py(),p.Pz(),p.Energy()); - printf(" xy = (%8.4f, %8.4f) cm, ipart = %d\n", - xgen,zgen,ipart); + + for (Int_t itrack=0; itrackResetHits(); + gAlice->TreeH()->GetEvent(itrack); + TClonesArray *cpvHits; + for (Int_t iModule=0; iModule < fGeom->GetNModules(); iModule++) { + AliPHOSCPVModule cpvModule = fPHOS->GetCPVModule(iModule); + cpvHits = cpvModule.Hits(); + Int_t nCPVhits = cpvHits->GetEntriesFast(); + for (Int_t ihit=0; ihitUncheckedAt(ihit); + TLorentzVector p = cpvHit->GetMomentum(); + Float_t xgen = cpvHit->GetX(); + Float_t zgen = cpvHit->GetY(); + Int_t ipart = cpvHit->GetIpart(); + printf("CPV hit in module %d: ",iModule+1); + printf(" p = (%f, %f, %f, %f) GeV,\n", + p.Px(),p.Py(),p.Pz(),p.Energy()); + printf(" xy = (%8.4f, %8.4f) cm, ipart = %d\n", + xgen,zgen,ipart); + } } } // Read and print CPV reconstructed points + //=========== Gets the Reconstruction TTree + gAlice->TreeR()->GetEvent(0) ; TIter nextRP(*fPHOS->PpsdRecPoints() ) ; AliPHOSPpsdRecPoint *cpvRecPoint ; while( ( cpvRecPoint = (AliPHOSPpsdRecPoint *)nextRP() ) ) { TVector3 locpos; cpvRecPoint->GetLocalPosition(locpos); - Int_t PHOSModule = cpvRecPoint->GetPHOSMod(); + Int_t phosModule = cpvRecPoint->GetPHOSMod(); printf("CPV recpoint in module %d: (X,Y,Z) = (%f,%f,%f) cm\n", - PHOSModule,locpos.X(),locpos.Y(),locpos.Z()); + phosModule,locpos.X(),locpos.Y(),locpos.Z()); } } } @@ -468,21 +465,21 @@ void AliPHOSAnalyze::AnalyzeCPV(Int_t Nevents) gAlice->TreeH()->GetEvent(0); //========== Creating branches =================================== - AliPHOSRecPoint::RecPointsList ** EmcRecPoints = fPHOS->EmcRecPoints() ; - gAlice->TreeR()->SetBranchAddress( "PHOSEmcRP" , EmcRecPoints ) ; + AliPHOSRecPoint::RecPointsList ** emcRecPoints = fPHOS->EmcRecPoints() ; + gAlice->TreeR()->SetBranchAddress( "PHOSEmcRP" , emcRecPoints ) ; - AliPHOSRecPoint::RecPointsList ** CpvRecPoints = fPHOS->PpsdRecPoints() ; - gAlice->TreeR()->SetBranchAddress( "PHOSPpsdRP", CpvRecPoints ) ; + AliPHOSRecPoint::RecPointsList ** cpvRecPoints = fPHOS->PpsdRecPoints() ; + gAlice->TreeR()->SetBranchAddress( "PHOSPpsdRP", cpvRecPoints ) ; //=========== Gets the Reconstruction TTree gAlice->TreeR()->GetEvent(0) ; TIter nextRP(*fPHOS->PpsdRecPoints() ) ; AliPHOSCpvRecPoint *cpvRecPoint ; AliPHOSCPVModule cpvModule; - TClonesArray *CPVhits; + TClonesArray *cpvHits; while( ( cpvRecPoint = (AliPHOSCpvRecPoint *)nextRP() ) ) { TVector3 locpos; cpvRecPoint->GetLocalPosition(locpos); - Int_t PHOSModule = cpvRecPoint->GetPHOSMod(); + Int_t phosModule = cpvRecPoint->GetPHOSMod(); Int_t rpMult = cpvRecPoint->GetDigitsMultiplicity(); Int_t rpMultX, rpMultZ; cpvRecPoint->GetClusterLengths(rpMultX,rpMultZ); @@ -491,11 +488,11 @@ void AliPHOSAnalyze::AnalyzeCPV(Int_t Nevents) Float_t dxmin = 1.e+10; Float_t dzmin = 1.e+10; - cpvModule = fPHOS->GetCPVModule(PHOSModule-1); - CPVhits = cpvModule.Hits(); - Int_t nCPVhits = CPVhits->GetEntriesFast(); + cpvModule = fPHOS->GetCPVModule(phosModule-1); + cpvHits = cpvModule.Hits(); + Int_t nCPVhits = cpvHits->GetEntriesFast(); for (Int_t ihit=0; ihitUncheckedAt(ihit); + AliPHOSCPVHit *cpvHit = (AliPHOSCPVHit*)cpvHits->UncheckedAt(ihit); Float_t xgen = cpvHit->GetX(); Float_t zgen = cpvHit->GetY(); if ( TMath::Abs(xgen-xrec) < TMath::Abs(dxmin) ) dxmin = xgen-xrec; @@ -524,40 +521,40 @@ void AliPHOSAnalyze::AnalyzeCPV(Int_t Nevents) // Plot histograms - TCanvas *CPVcanvas = new TCanvas("CPV","CPV analysis",20,20,600,600); + TCanvas *cpvCanvas = new TCanvas("CPV","CPV analysis",20,20,800,400); gStyle->SetOptStat(111111); gStyle->SetOptFit(1); gStyle->SetOptDate(1); - CPVcanvas->Divide(3,3); + cpvCanvas->Divide(3,2); - CPVcanvas->cd(1); + cpvCanvas->cd(1); gPad->SetFillColor(10); hNrp->SetFillColor(16); hNrp->Draw(); - CPVcanvas->cd(2); + cpvCanvas->cd(2); gPad->SetFillColor(10); hNrpX->SetFillColor(16); hNrpX->Draw(); - CPVcanvas->cd(3); + cpvCanvas->cd(3); gPad->SetFillColor(10); hNrpZ->SetFillColor(16); hNrpZ->Draw(); - CPVcanvas->cd(4); + cpvCanvas->cd(4); gPad->SetFillColor(10); hDx->SetFillColor(16); hDx->Fit("gaus"); hDx->Draw(); - CPVcanvas->cd(5); + cpvCanvas->cd(5); gPad->SetFillColor(10); hDz->SetFillColor(16); hDz->Fit("gaus"); hDz->Draw(); - CPVcanvas->Print("CPV.ps"); + cpvCanvas->Print("CPV.ps"); } diff --git a/PHOS/AliPHOSAnalyze.h b/PHOS/AliPHOSAnalyze.h index a6fe52e283a..4f6821ad152 100644 --- a/PHOS/AliPHOSAnalyze.h +++ b/PHOS/AliPHOSAnalyze.h @@ -6,7 +6,10 @@ /* $Id$ */ //_________________________________________________________________________ -// Algorithm class to analyze PHOSv1 events +// Algorythm class to analyze PHOSv1 events: +// Construct histograms and displays them. +// Use the macro EditorBar.C for best access to the functionnalities +//*-- //*-- Author : Yves Schutz (SUBATECH) // --- ROOT system --- diff --git a/PHOS/AliPHOSCPVBaseGeometry.h b/PHOS/AliPHOSCPVBaseGeometry.h index fecb0c57575..623584fe250 100644 --- a/PHOS/AliPHOSCPVBaseGeometry.h +++ b/PHOS/AliPHOSCPVBaseGeometry.h @@ -7,9 +7,11 @@ //_________________________________________________________________________ // Geometry base class for PHOS:CVS (Charged particle veto) -// -//*-- Author : Yuri Kharlov (IHEP, Protvino) -// 14 September 2000 +// It contains only virtual member functions-getters +// which will be implemented for PPSD and CPV in +// appropriate derived classes +// Author : Yuri Kharlov (IHEP, Protvino) +// 14 September 2000 #include "TObject.h" @@ -22,44 +24,44 @@ public: // Return common for PPSD and CPV geometrical parameters - virtual Float_t GetCPVBoxSize(Int_t index) { return 0; } + virtual Float_t GetCPVBoxSize(Int_t index) = 0 ; // Return PPSD geometrical parameters - virtual Float_t GetAnodeThickness(void) { return 0; } - virtual Float_t GetAvalancheGap(void) { return 0; } - virtual Float_t GetCathodeThickness(void) { return 0; } - virtual Float_t GetCompositeThickness(void) { return 0; } - virtual Float_t GetConversionGap(void) { return 0; } - virtual Float_t GetLeadConverterThickness(void) { return 0; } - virtual Float_t GetLeadToMicro2Gap(void) { return 0; } - virtual Float_t GetLidThickness(void) { return 0; } - virtual Float_t GetMicromegas1Thickness(void) { return 0; } - virtual Float_t GetMicromegas2Thickness(void) { return 0; } - virtual Float_t GetMicromegasWallThickness(void) { return 0; } - virtual Float_t GetMicro1ToLeadGap(void) { return 0; } - virtual Int_t GetNumberOfPadsPhi(void) { return 0; } - virtual Int_t GetNumberOfPadsZ(void) { return 0; } - virtual Int_t GetNumberOfModulesPhi(void) { return 0; } - virtual Int_t GetNumberOfModulesZ(void) { return 0; } - virtual Float_t GetPCThickness(void) { return 0; } - virtual Float_t GetPhiDisplacement(void) { return 0; } - virtual Float_t GetPPSDModuleSize(Int_t index) { return 0; } - virtual Float_t GetZDisplacement(void) { return 0; } + virtual Float_t GetAnodeThickness(void) = 0 ; + virtual Float_t GetAvalancheGap(void) = 0 ; + virtual Float_t GetCathodeThickness(void) = 0 ; + virtual Float_t GetCompositeThickness(void) = 0 ; + virtual Float_t GetConversionGap(void) = 0 ; + virtual Float_t GetLeadConverterThickness(void) = 0 ; + virtual Float_t GetLeadToMicro2Gap(void) = 0 ; + virtual Float_t GetLidThickness(void) = 0 ; + virtual Float_t GetMicromegas1Thickness(void) = 0 ; + virtual Float_t GetMicromegas2Thickness(void) = 0 ; + virtual Float_t GetMicromegasWallThickness(void) = 0 ; + virtual Float_t GetMicro1ToLeadGap(void) = 0 ; + virtual Int_t GetNumberOfPadsPhi(void) = 0 ; + virtual Int_t GetNumberOfPadsZ(void) = 0 ; + virtual Int_t GetNumberOfModulesPhi(void) = 0 ; + virtual Int_t GetNumberOfModulesZ(void) = 0 ; + virtual Float_t GetPCThickness(void) = 0 ; + virtual Float_t GetPhiDisplacement(void) = 0 ; + virtual Float_t GetPPSDModuleSize(Int_t index) = 0 ; + virtual Float_t GetZDisplacement(void) = 0 ; // Return CPV geometrical parameters - virtual Int_t GetNumberOfCPVLayers(void) { return 0; } - virtual Bool_t IsLeadConverterExists(void) { return 0; } - virtual Float_t GetCPVActiveSize(Int_t index) { return 0; } - virtual Int_t GetNumberOfCPVChipsPhi(void) { return 0; } - virtual Int_t GetNumberOfCPVChipsZ(void) { return 0; } - virtual Float_t GetGassiplexChipSize(Int_t index) { return 0; } - virtual Float_t GetCPVGasThickness(void) { return 0; } - virtual Float_t GetCPVTextoliteThickness(void) { return 0; } - virtual Float_t GetCPVCuNiFoilThickness(void) { return 0; } - virtual Float_t GetFTPosition(Int_t index) { return 0; } - virtual Float_t GetCPVFrameSize(Int_t index) { return 0; } + virtual Int_t GetNumberOfCPVLayers(void) = 0 ; + virtual Bool_t IsLeadConverterExists(void) = 0 ; + virtual Float_t GetCPVActiveSize(Int_t index) = 0 ; + virtual Int_t GetNumberOfCPVChipsPhi(void) = 0 ; + virtual Int_t GetNumberOfCPVChipsZ(void) = 0 ; + virtual Float_t GetGassiplexChipSize(Int_t index) = 0 ; + virtual Float_t GetCPVGasThickness(void) = 0 ; + virtual Float_t GetCPVTextoliteThickness(void) = 0 ; + virtual Float_t GetCPVCuNiFoilThickness(void) = 0 ; + virtual Float_t GetFTPosition(Int_t index) = 0 ; + virtual Float_t GetCPVFrameSize(Int_t index) = 0 ; ClassDef(AliPHOSCPVBaseGeometry,1) // CPV base geometry class diff --git a/PHOS/AliPHOSCPVDigit.h b/PHOS/AliPHOSCPVDigit.h index b542fe4a00a..2986d540dc1 100644 --- a/PHOS/AliPHOSCPVDigit.h +++ b/PHOS/AliPHOSCPVDigit.h @@ -1,5 +1,5 @@ -#ifndef ALIPHOSCPV_H -#define ALIPHOSCPV_H +#ifndef ALIPHOSCPVDIGIT_H +#define ALIPHOSCPVDIGIT_H /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ @@ -18,11 +18,6 @@ class AliPHOSCPVDigit : public TObject { -private: - Int_t fXpad; // Digit's pad number in Phi - Int_t fYpad; // Digit's pad number in Z - Float_t fQpad; // Digit's pad amplitude - public: virtual ~AliPHOSCPVDigit() {} AliPHOSCPVDigit() {} @@ -33,6 +28,11 @@ public: Int_t GetYpad() { return fYpad; } Float_t GetQpad() { return fQpad; } +private: + Int_t fXpad; // Digit's pad number in Phi + Int_t fYpad; // Digit's pad number in Z + Float_t fQpad; // Digit's pad amplitude + ClassDef(AliPHOSCPVDigit,1) // Digit object in one CPV pad }; diff --git a/PHOS/AliPHOSCPVGeometry.cxx b/PHOS/AliPHOSCPVGeometry.cxx index 018502ee081..e8dd40abb41 100644 --- a/PHOS/AliPHOSCPVGeometry.cxx +++ b/PHOS/AliPHOSCPVGeometry.cxx @@ -15,12 +15,17 @@ /* $Log$ + Revision 1.1 2000/11/03 16:28:21 schutz + CPV geometry class to correct previous name-convetion rule violation + */ //_________________________________________________________________________ // Geometry class for PHOS : CPV (Charged particle veto, IHEP version) -// -//*-- Author : Yuri Kharlov (IHEP, Protvino) 15 September 2000 +// Its data members provide geometry parametrization of CPV +// which can be changed in the constructor only. +// Author: Yuri Kharlov (IHEP, Protvino) +// 15 September 2000 // // --- ROOT system --- diff --git a/PHOS/AliPHOSCPVGeometry.h b/PHOS/AliPHOSCPVGeometry.h index e7df43a8a97..1d3d7a99aa4 100644 --- a/PHOS/AliPHOSCPVGeometry.h +++ b/PHOS/AliPHOSCPVGeometry.h @@ -7,9 +7,10 @@ //_________________________________________________________________________ // Geometry derived class for PHOS:CPV (Charged particle veto, IHEP version) -// -//*-- Author: Yuri Kharlov (IHEP, Protvino) -// 14 September 2000 +// Its data members provide geometry parametrization of CPV +// which can be changed in the constructor only. +// Author: Yuri Kharlov (IHEP, Protvino) +// 7 November 2000 #include @@ -24,41 +25,45 @@ public: // CPV functions - Int_t GetNumberOfCPVLayers(void) const { return fNumberOfCPVLayers; } - Bool_t IsLeadConverterExists(void) const { return fLeadConverterExists; } - Int_t GetNumberOfCPVPadsPhi(void) const { return fNumberOfCPVPadsPhi ; } - Int_t GetNumberOfCPVPadsZ(void) const { return fNumberOfCPVPadsZ ; } - Float_t GetCPVPadSizePhi(void) const { return fCPVPadSizePhi; } - Float_t GetCPVPadSizeZ(void) const { return fCPVPadSizeZ; } - Float_t GetCPVBoxSize(Int_t index) const { return fCPVBoxSize[index]; } - Float_t GetCPVActiveSize(Int_t index) const { return fCPVActiveSize[index]; } - Int_t GetNumberOfCPVChipsPhi(void) const { return fNumberOfCPVChipsPhi; } - Int_t GetNumberOfCPVChipsZ(void) const { return fNumberOfCPVChipsZ; } - Float_t GetGassiplexChipSize(Int_t index) const { return fGassiplexChipSize[index]; } - Float_t GetCPVGasThickness(void) const { return fCPVGasThickness; } - Float_t GetCPVTextoliteThickness(void) const { return fCPVTextoliteThickness; } - Float_t GetCPVCuNiFoilThickness(void) const { return fCPVCuNiFoilThickness; } - Float_t GetFTPosition(Int_t index) const { return fFTPosition[index]; } - Float_t GetCPVFrameSize(Int_t index) const { return fCPVFrameSize[index]; } + virtual Int_t GetNumberOfCPVLayers(void) { return fNumberOfCPVLayers; } + virtual Bool_t IsLeadConverterExists(void) { return fLeadConverterExists; } + virtual Int_t GetNumberOfCPVPadsPhi(void) { return fNumberOfCPVPadsPhi ; } + virtual Int_t GetNumberOfCPVPadsZ(void) { return fNumberOfCPVPadsZ ; } + virtual Float_t GetCPVPadSizePhi(void) { return fCPVPadSizePhi; } + virtual Float_t GetCPVPadSizeZ(void) { return fCPVPadSizeZ; } + virtual Float_t GetCPVBoxSize(Int_t index) { return fCPVBoxSize[index]; } + virtual Float_t GetCPVActiveSize(Int_t index) { return fCPVActiveSize[index]; } + virtual Int_t GetNumberOfCPVChipsPhi(void) { return fNumberOfCPVChipsPhi; } + virtual Int_t GetNumberOfCPVChipsZ(void) { return fNumberOfCPVChipsZ; } + virtual Float_t GetGassiplexChipSize(Int_t index) { return fGassiplexChipSize[index]; } + virtual Float_t GetCPVGasThickness(void) { return fCPVGasThickness; } + virtual Float_t GetCPVTextoliteThickness(void) { return fCPVTextoliteThickness; } + virtual Float_t GetCPVCuNiFoilThickness(void) { return fCPVCuNiFoilThickness; } + virtual Float_t GetFTPosition(Int_t index) { return fFTPosition[index]; } + virtual Float_t GetCPVFrameSize(Int_t index) { return fCPVFrameSize[index]; } // PPSD functions cannot be used for CPV - Float_t GetAnodeThickness(void) { AssertPPSD(); return 0; } - Float_t GetAvalancheGap(void) { AssertPPSD(); return 0; } - Float_t GetCathodeThickness(void) { AssertPPSD(); return 0; } - Float_t GetCompositeThickness(void) { AssertPPSD(); return 0; } - Float_t GetConversionGap(void) { AssertPPSD(); return 0; } - Float_t GetLeadConverterThickness(void) { AssertPPSD(); return 0; } - Float_t GetLeadToMicro2Gap(void) { AssertPPSD(); return 0; } - Float_t GetLidThickness(void) { AssertPPSD(); return 0; } - Float_t GetMicromegas1Thickness(void) { AssertPPSD(); return 0; } - Float_t GetMicromegas2Thickness(void) { AssertPPSD(); return 0; } - Float_t GetMicromegasWallThickness(void) { AssertPPSD(); return 0; } - Float_t GetMicro1ToLeadGap(void) { AssertPPSD(); return 0; } - Float_t GetPCThickness(void) { AssertPPSD(); return 0; } - Float_t GetPhiDisplacement(void) { AssertPPSD(); return 0; } - Float_t GetPPSDModuleSize(Int_t index) { AssertPPSD(); return 0; } - Float_t GetZDisplacement(void) { AssertPPSD(); return 0; } + virtual Float_t GetAnodeThickness(void) { AssertPPSD("GetAnodeThickness"); return 0; } + virtual Float_t GetAvalancheGap(void) { AssertPPSD("GetAvalancheGap"); return 0; } + virtual Float_t GetCathodeThickness(void) { AssertPPSD("GetCathodeThickness"); return 0; } + virtual Float_t GetCompositeThickness(void) { AssertPPSD("GetCompositeThickness"); return 0; } + virtual Float_t GetConversionGap(void) { AssertPPSD("GetConversionGap"); return 0; } + virtual Float_t GetLeadConverterThickness(void) { AssertPPSD("GetLeadConverterThickness"); return 0; } + virtual Float_t GetLeadToMicro2Gap(void) { AssertPPSD("GetLeadToMicro2Gap"); return 0; } + virtual Float_t GetLidThickness(void) { AssertPPSD("GetLidThickness"); return 0; } + virtual Float_t GetMicromegas1Thickness(void) { AssertPPSD("GetMicromegas1Thickness"); return 0; } + virtual Float_t GetMicromegas2Thickness(void) { AssertPPSD("GetMicromegas2Thickness"); return 0; } + virtual Float_t GetMicromegasWallThickness(void) { AssertPPSD("GetMicromegasWallThickness"); return 0; } + virtual Float_t GetMicro1ToLeadGap(void) { AssertPPSD("GetMicro1ToLeadGap"); return 0; } + virtual Float_t GetPCThickness(void) { AssertPPSD("GetPCThickness"); return 0; } + virtual Float_t GetPhiDisplacement(void) { AssertPPSD("GetPhiDisplacement"); return 0; } + virtual Float_t GetPPSDModuleSize(Int_t index) { AssertPPSD("GetPPSDModuleSize"); return 0; } + virtual Float_t GetZDisplacement(void) { AssertPPSD("GetZDisplacement"); return 0; } + virtual Int_t GetNumberOfPadsPhi(void) { AssertPPSD("GetNumberOfPadsPhi"); return 0; } + virtual Int_t GetNumberOfPadsZ(void) { AssertPPSD("GetNumberOfPadsZ"); return 0; } + virtual Int_t GetNumberOfModulesPhi(void) { AssertPPSD("GetNumberOfModulesPhi"); return 0; } + virtual Int_t GetNumberOfModulesZ(void) { AssertPPSD("GetNumberOfModulesZ"); return 0; } private: @@ -79,8 +84,8 @@ private: Float_t fFTPosition[4]; // Positions of the 4 PCB vs the CPV box center Float_t fCPVFrameSize[3]; // CPV frame size (0 - in phi, 1 - in z, 2 - thickness (along ALICE radius)) - void AssertPPSD() { - printf("Function %s should not be called for CPV geometry\n",__PRETTY_FUNCTION__); + void AssertPPSD(char* name) { + printf("Function AliCPVGeometry::%s should not be called for CPV geometry\n",name); assert(0==1) ; } diff --git a/PHOS/AliPHOSCPVHit.h b/PHOS/AliPHOSCPVHit.h index 7edfff2ba3c..7e9e8f0d448 100644 --- a/PHOS/AliPHOSCPVHit.h +++ b/PHOS/AliPHOSCPVHit.h @@ -24,12 +24,6 @@ class AliPHOSCPVHit : public TObject { -private: - TLorentzVector fMomentum; // 4-momentum of the particle - Float_t fXhit; // Hit's X-coordinates - Float_t fYhit; // Hit's Y-coordinates - Int_t fIpart; // Hit's particle type - public: virtual ~AliPHOSCPVHit() {} AliPHOSCPVHit() {} @@ -41,6 +35,12 @@ public: Int_t GetIpart() { return fIpart; } void Print(); +private: + TLorentzVector fMomentum; // 4-momentum of the particle + Float_t fXhit; // Hit's X-coordinates + Float_t fYhit; // Hit's Y-coordinates + Int_t fIpart; // Hit's particle type + ClassDef(AliPHOSCPVHit,1) // Hit object in one CPV module }; diff --git a/PHOS/AliPHOSCPVModule.h b/PHOS/AliPHOSCPVModule.h index 55d3b46ab38..e12c8b012c9 100644 --- a/PHOS/AliPHOSCPVModule.h +++ b/PHOS/AliPHOSCPVModule.h @@ -10,9 +10,11 @@ // // // Author: Yuri Kharlov, IHEP, Protvino // // e-mail: Yuri.Kharlov@cern.ch // -// Last modified: 2 November 2000 // +// Last modified: 7 November 2000 // //////////////////////////////////////////////// +#include + // --- ROOT system --- #include #include @@ -25,7 +27,16 @@ public: virtual ~AliPHOSCPVModule(void); AliPHOSCPVModule(void); + AliPHOSCPVModule(const AliPHOSCPVModule & cpv) { + // cpy ctor requested by Coding Convention but not yet needed + assert(0==1) ; + } + AliPHOSCPVModule & operator = (const AliPHOSCPVModule & rvalue) { + // assignement operator requested by coding convention but not needed + assert(0==1) ; + return *this ; + } void Clear(Option_t *opt=""); void Print(Option_t *opt=""); void AddHit(TLorentzVector p, Float_t *xy, Int_t ipart); diff --git a/PHOS/AliPHOSCpvRecPoint.cxx b/PHOS/AliPHOSCpvRecPoint.cxx index acf5eef350d..6ff17dc7deb 100644 --- a/PHOS/AliPHOSCpvRecPoint.cxx +++ b/PHOS/AliPHOSCpvRecPoint.cxx @@ -18,10 +18,9 @@ //_________________________________________________________________________ // RecPoint implementation for PHOS-CPV // An CpvRecPoint is a cluster of digits -// -//*-- Author: Yuri Kharlov 30 October 2000 -// (after Dmitri Peressounko (RRC KI & SUBATECH)) - +//*-- Author: Yuri Kharlov +// (after Dmitri Peressounko (RRC KI & SUBATECH)) +// 30 October 2000 // --- ROOT system --- #include "TPad.h" @@ -441,8 +440,8 @@ void AliPHOSCpvRecPoint::GetClusterLengths(Int_t &lengX, Int_t &lengZ) AliPHOSGeometry * phosgeom = (AliPHOSGeometry *) fGeom ; - const Int_t maxleng=20; - Int_t idX[maxleng], idZ[maxleng]; + const Int_t kMaxLeng=20; + Int_t idX[kMaxLeng], idZ[kMaxLeng]; lengX = 0; lengZ = 0; Bool_t dejavu; @@ -457,7 +456,7 @@ void AliPHOSCpvRecPoint::GetClusterLengths(Int_t &lengX, Int_t &lengZ) if (!dejavu) { idX[lengX]=relid[2]; lengX++; - lengX = TMath::Min(lengX,maxleng); + lengX = TMath::Min(lengX,kMaxLeng); } dejavu=kFALSE; @@ -465,7 +464,7 @@ void AliPHOSCpvRecPoint::GetClusterLengths(Int_t &lengX, Int_t &lengZ) if (!dejavu) { idZ[lengZ]=relid[3]; lengZ++; - lengZ = TMath::Min(lengZ,maxleng); + lengZ = TMath::Min(lengZ,kMaxLeng); } } fLengX = lengX; diff --git a/PHOS/AliPHOSCpvRecPoint.h b/PHOS/AliPHOSCpvRecPoint.h index 0fb3c2bdf13..efbd3b12547 100644 --- a/PHOS/AliPHOSCpvRecPoint.h +++ b/PHOS/AliPHOSCpvRecPoint.h @@ -8,10 +8,9 @@ //_________________________________________________________________________ // RecPoint implementation for PHOS-CPV // An CpvRecPoint is a cluster of digits -// -//*-- Author: Yuri Kharlov 30 October 2000 -// (after Dmitri Peressounko (RRC KI & SUBATECH)) - +//*-- Author: Yuri Kharlov +// (after Dmitri Peressounko (RRC KI & SUBATECH)) +// 30 October 2000 // --- ROOT system --- #include "TObject.h" @@ -83,8 +82,7 @@ public: void Print(Option_t * opt = "void") ; AliPHOSCpvRecPoint & operator = (const AliPHOSCpvRecPoint & rvalue) { - // assignement operator requested by coding convention - // but not needed + // assignement operator requested by coding convention but not needed assert(0==1) ; return *this ; } diff --git a/PHOS/AliPHOSEMCAGeometry.cxx b/PHOS/AliPHOSEMCAGeometry.cxx index 42a6f128c3b..14abc0bfed5 100644 --- a/PHOS/AliPHOSEMCAGeometry.cxx +++ b/PHOS/AliPHOSEMCAGeometry.cxx @@ -17,10 +17,12 @@ //_________________________________________________________________________ // Geometry class for PHOS : EMCA (Electromagnetic Calorimeter) -// -//*-- Author : Yves Schutz (SUBATECH) -// Modified : Yuri Kharlov (IHEP, Protvino) 13 September 2000 -// +// Its data members provide geometry parametrization of EMCA +// which can be changed in the constructor only. +// Author : Yves Schutz (SUBATECH) +// Modified : Yuri Kharlov (IHEP, Protvino) +// 13 September 2000 + // --- AliRoot header files --- #include "AliPHOSEMCAGeometry.h" diff --git a/PHOS/AliPHOSEMCAGeometry.h b/PHOS/AliPHOSEMCAGeometry.h index bd339a799b8..391307dafab 100644 --- a/PHOS/AliPHOSEMCAGeometry.h +++ b/PHOS/AliPHOSEMCAGeometry.h @@ -7,10 +7,13 @@ //_________________________________________________________________________ // Geometry class for PHOS : EMCA (Electromagnetic Calirometer) -// -//*-- Author: Yves Schutz (Subatech) -// Modified: Yuri Kharlov (IHEP, Protvino) -// 15 September 2000 +// Its data members provide geometry parametrization of EMCA +// which can be changed in the constructor only. +// Author: Yves Schutz (Subatech) +// Modified: Yuri Kharlov (IHEP, Protvino) +// 15 September 2000 + +#include // --- ROOT system --- @@ -23,8 +26,17 @@ class AliPHOSEMCAGeometry : public TObject { public: AliPHOSEMCAGeometry(); + AliPHOSEMCAGeometry(const AliPHOSEMCAGeometry & cpv) { + // cpy ctor requested by Coding Convention but not yet needed + assert(0==1) ; + } virtual ~AliPHOSEMCAGeometry(void) {} + AliPHOSEMCAGeometry & operator = (const AliPHOSEMCAGeometry & rvalue) { + // assignement operator requested by coding convention but not needed + assert(0==1) ; + return *this ; + } Float_t GetAirFilledBoxSize(Int_t index) const { return fAirFilledBoxSize[index] ;} Float_t GetCrystalHolderThickness(void) const { @@ -88,7 +100,6 @@ private: Float_t fOuterBoxSize[3] ; // Size of the outer thermo insulating foam box Float_t fOuterBoxThickness[3] ; // Thickness of the outer thermo insulating foam box Float_t fPinDiodeSize[3] ; // Size of the PIN Diode - TObjArray * fRotMatrixArray ; // Liste of rotation matrices (one per phos module) Float_t fSecondUpperPlateThickness ; // Thickness of upper polystyrene foam plate Float_t fSupportPlateThickness ; // Thickness of the Aluminium support plate Float_t fUpperCoolingPlateThickness ; // Thickness of the upper cooling plate @@ -96,6 +107,7 @@ private: Float_t fTextolitBoxSize[3] ; // Size of the Textolit box inside the insulating foam box Float_t fTextolitBoxThickness[3] ; // Thicknesses of th Textolit box Float_t fXtlSize[3] ; // PWO4 crystal dimensions + TObjArray *fRotMatrixArray ; // List of rotation matrices (one per phos module) ClassDef(AliPHOSEMCAGeometry,1) // EMCA geometry class diff --git a/PHOS/AliPHOSGeometry.cxx b/PHOS/AliPHOSGeometry.cxx index d7739d994f1..bb9c4c0b421 100644 --- a/PHOS/AliPHOSGeometry.cxx +++ b/PHOS/AliPHOSGeometry.cxx @@ -17,8 +17,12 @@ //_________________________________________________________________________ // Geometry class for PHOS : singleton -// The EMC modules are parametrized so that any configuration can be easily implemented -// The title is used to identify the type of CPV used. +// PHOS consists of the electromagnetic calorimeter (EMCA) +// and a charged particle veto either in the Subatech's version (PPSD) +// or in the IHEP's one (CPV). +// The EMCA/PPSD/CPV modules are parametrized so that any configuration +// can be easily implemented +// The title is used to identify the version of CPV used. // //*-- Author: Yves Schutz (SUBATECH) @@ -60,7 +64,6 @@ void AliPHOSGeometry::Init(void) { // Initializes the PHOS parameters - cout << "PHOS geometry setup: parameters for option " << fName << " " << fTitle << endl ; if ( ((strcmp( fName, "default" )) == 0) || ((strcmp( fName, "GPS2" )) == 0) || ((strcmp( fName, "IHEP" )) == 0) ) { @@ -446,6 +449,7 @@ void AliPHOSGeometry::RelPosInModule(const Int_t * relid, Float_t & x, Float_t & // Note: sign of z differs from that in the previous version (Yu.Kharlov, 12 Oct 2000) Int_t ppsdmodule ; + Float_t x0,z0; Int_t row = relid[2] ; //offset along x axiz Int_t column = relid[3] ; //offset along z axiz @@ -463,8 +467,13 @@ void AliPHOSGeometry::RelPosInModule(const Int_t * relid, Float_t & x, Float_t & 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) ; + if ( ((strcmp( fName, "GPS2" )) == 0) ) { + x0 = ( GetNumberOfModulesPhi() / 2. - modrow + 0.5 ) * GetPPSDModuleSize(0) ; + z0 = ( GetNumberOfModulesZ() / 2. - modcol + 0.5 ) * GetPPSDModuleSize(2) ; + } else { + x0 = 0; + z0 = 0; + } 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 } diff --git a/PHOS/AliPHOSGeometry.h b/PHOS/AliPHOSGeometry.h index 7efcebb5a27..4ba87b08a2b 100644 --- a/PHOS/AliPHOSGeometry.h +++ b/PHOS/AliPHOSGeometry.h @@ -6,10 +6,14 @@ /* $Id$ */ //_________________________________________________________________________ -// Geometry class for PHOS : singleton -// The EMC modules are parametrized so that any configuration can be easily implemented -// The title is used to identify the type of CPV used. PPSD and CPV are implemented -// +// Geometry class for PHOS : singleton +// PHOS consists of the electromagnetic calorimeter (EMCA) +// and a charged particle veto either in the Subatech's version (PPSD) +// or in the IHEP's one (CPV). +// The EMCA/PPSD/CPV modules are parametrized so that any configuration +// can be easily implemented +// The title is used to identify the version of CPV used. +// //*-- Author: Yves Schutz (SUBATECH) #include diff --git a/PHOS/AliPHOSPPSDGeometry.cxx b/PHOS/AliPHOSPPSDGeometry.cxx index f8140a7ce2d..8fdf5b06ade 100644 --- a/PHOS/AliPHOSPPSDGeometry.cxx +++ b/PHOS/AliPHOSPPSDGeometry.cxx @@ -15,14 +15,19 @@ /* $Log$ + Revision 1.1 2000/11/03 16:29:02 schutz + PPSD geometry class to correct previous name-convetion rule violation + */ //_________________________________________________________________________ // Geometry class for PHOS : PPSD (PHOS Preshower Detector) -// -//*-- Author : Yves Schutz (SUBATECH) -// Modified : Yuri Kharlov (IHEP, Protvino) 15 September 2000 -// +// Its data members provide geometry parametrization of PPSD +// which can be changed in the constructor only. +// Author : Yves Schutz (SUBATECH) +// Modified : Yuri Kharlov (IHEP, Protvino) +// 7 November 2000 + // --- ROOT system --- // --- Standard library --- @@ -53,10 +58,10 @@ AliPHOSPPSDGeometry::AliPHOSPPSDGeometry() fMicromegasWallThickness = 0.6 ; fNumberOfModulesPhi = 4 ; fNumberOfModulesZ = 4 ; - fNumberOfPadsPhi = 24 ; - fNumberOfPadsZ = 24 ; - fPCThickness = 0.1 ; - fPhiDisplacement = 0.8 ; + fNumberOfPadsPhi = 32 ; + fNumberOfPadsZ = 32 ; + fPCThickness = 0.1 ; + fPhiDisplacement = 0.8 ; fZDisplacement = 0.8 ; fMicromegas1Thickness = fLidThickness + 2 * fCompositeThickness + fCathodeThickness diff --git a/PHOS/AliPHOSPPSDGeometry.h b/PHOS/AliPHOSPPSDGeometry.h index 2515bc22a78..e581a2cd2dc 100644 --- a/PHOS/AliPHOSPPSDGeometry.h +++ b/PHOS/AliPHOSPPSDGeometry.h @@ -7,10 +7,11 @@ //_________________________________________________________________________ // Geometry derived class for PHOS:PPSD (PHOS Preshower Detector) -// -//*-- Author : Yves Schutz -// Modified: Yuri Kharlov (IHEP, Protvino) -// 14 September 2000 +// Its data members provide geometry parametrization of PPSD +// which can be changed in the constructor only. +// Author : Yves Schutz +// Modified: Yuri Kharlov (IHEP, Protvino) +// 7 November 2000 #include @@ -25,49 +26,49 @@ public: // PPSD functions - Float_t GetAnodeThickness(void) const { return fAnodeThickness ; } - Float_t GetAvalancheGap(void) const { return fAvalancheGap ; } - Float_t GetCathodeThickness(void) const { return fCathodeThickness ; } - Float_t GetCompositeThickness(void) const { return fCompositeThickness ; } - Float_t GetConversionGap(void) const { return fConversionGap ; } - Float_t GetLeadConverterThickness(void) const { return fLeadConverterThickness ; } - Float_t GetLeadToMicro2Gap(void) const { return fLeadToMicro2Gap ; } - Float_t GetLidThickness(void) const { return fLidThickness ; } - Float_t GetMicromegas1Thickness(void) const { return fMicromegas1Thickness ; } - Float_t GetMicromegas2Thickness(void) const { return fMicromegas2Thickness ; } - Float_t GetMicromegasWallThickness(void) const { return fMicromegasWallThickness ; } - Float_t GetMicro1ToLeadGap(void) const { return fMicro1ToLeadGap ; } - Int_t GetNumberOfPadsPhi(void) const { return fNumberOfPadsPhi ; } - Int_t GetNumberOfPadsZ(void) const { return fNumberOfPadsZ ; } - Int_t GetNumberOfModulesPhi(void) const { return fNumberOfModulesPhi ; } - Int_t GetNumberOfModulesZ(void) const { return fNumberOfModulesZ ; } - Float_t GetPCThickness(void) const { return fPCThickness ; } - Float_t GetPhiDisplacement(void) const { return fPhiDisplacement ; } - Float_t GetCPVBoxSize(Int_t index) const { return fPPSDBoxSize[index] ; } - Float_t GetPPSDModuleSize(Int_t index) const { return fPPSDModuleSize[index] ; } - Float_t GetZDisplacement(void) const { return fZDisplacement ; } - + virtual Float_t GetAnodeThickness(void) { return fAnodeThickness ; } + virtual Float_t GetAvalancheGap(void) { return fAvalancheGap ; } + virtual Float_t GetCathodeThickness(void) { return fCathodeThickness ; } + virtual Float_t GetCompositeThickness(void) { return fCompositeThickness ; } + virtual Float_t GetConversionGap(void) { return fConversionGap ; } + virtual Float_t GetLeadConverterThickness(void) { return fLeadConverterThickness ; } + virtual Float_t GetLeadToMicro2Gap(void) { return fLeadToMicro2Gap ; } + virtual Float_t GetLidThickness(void) { return fLidThickness ; } + virtual Float_t GetMicromegas1Thickness(void) { return fMicromegas1Thickness ; } + virtual Float_t GetMicromegas2Thickness(void) { return fMicromegas2Thickness ; } + virtual Float_t GetMicromegasWallThickness(void) { return fMicromegasWallThickness ; } + virtual Float_t GetMicro1ToLeadGap(void) { return fMicro1ToLeadGap ; } + virtual Int_t GetNumberOfPadsPhi(void) { return fNumberOfPadsPhi ; } + virtual Int_t GetNumberOfPadsZ(void) { return fNumberOfPadsZ ; } + virtual Int_t GetNumberOfModulesPhi(void) { return fNumberOfModulesPhi ; } + virtual Int_t GetNumberOfModulesZ(void) { return fNumberOfModulesZ ; } + virtual Float_t GetPCThickness(void) { return fPCThickness ; } + virtual Float_t GetPhiDisplacement(void) { return fPhiDisplacement ; } + virtual Float_t GetCPVBoxSize(Int_t index) { return fPPSDBoxSize[index] ; } + virtual Float_t GetPPSDModuleSize(Int_t index) { return fPPSDModuleSize[index] ; } + virtual Float_t GetZDisplacement(void) { return fZDisplacement ; } + // CPV functions cannot be used for PPSD - - Int_t GetNumberOfCPVLayers(void) { AssertCPV(); return 0; } - Bool_t IsLeadConverterExists(void) { AssertCPV(); return 0; } - Float_t GetCPVActiveSize(Int_t index) { AssertCPV(); return 0; } - Int_t GetNumberOfCPVChipsPhi(void) { AssertCPV(); return 0; } - Int_t GetNumberOfCPVChipsZ(void) { AssertCPV(); return 0; } - Float_t GetGassiplexChipSize(Int_t index){ AssertCPV(); return 0; } - Float_t GetCPVGasThickness(void) { AssertCPV(); return 0; } - Float_t GetCPVTextoliteThickness(void) { AssertCPV(); return 0; } - Float_t GetCPVCuNiFoilThickness(void) { AssertCPV(); return 0; } - Float_t GetFTPosition(Int_t index) { AssertCPV(); return 0; } - Float_t GetCPVFrameSize(Int_t index) { AssertCPV(); return 0; } - Float_t GetIPtoCPVDistance(void) { AssertCPV(); return 0; } + + virtual Int_t GetNumberOfCPVLayers(void) { AssertCPV("GetNumberOfCPVLayers"); return 0; } + virtual Bool_t IsLeadConverterExists(void) { AssertCPV("IsLeadConverterExists"); return 0; } + virtual Float_t GetCPVActiveSize(Int_t index) { AssertCPV("GetCPVActiveSize"); return 0; } + virtual Int_t GetNumberOfCPVChipsPhi(void) { AssertCPV("GetNumberOfCPVChipsPhi"); return 0; } + virtual Int_t GetNumberOfCPVChipsZ(void) { AssertCPV("GetNumberOfCPVChipsZ"); return 0; } + virtual Float_t GetGassiplexChipSize(Int_t index){ AssertCPV("GetGassiplexChipSize"); return 0; } + virtual Float_t GetCPVGasThickness(void) { AssertCPV("GetCPVGasThickness"); return 0; } + virtual Float_t GetCPVTextoliteThickness(void) { AssertCPV("GetCPVTextoliteThickness"); return 0; } + virtual Float_t GetCPVCuNiFoilThickness(void) { AssertCPV("GetCPVCuNiFoilThickness"); return 0; } + virtual Float_t GetFTPosition(Int_t index) { AssertCPV("GetFTPosition"); return 0; } + virtual Float_t GetCPVFrameSize(Int_t index) { AssertCPV("GetCPVFrameSize"); return 0; } + virtual Float_t GetIPtoCPVDistance(void) { AssertCPV("GetIPtoCPVDistance"); return 0; } private: Float_t fAnodeThickness ; // Thickness of the copper layer which makes the anode Float_t fAvalancheGap ; // Thickness of the gas in the avalanche stage - Float_t fCathodeThickness ; // Thickeness of composite material ensuring rigidity of cathode - Float_t fCompositeThickness ; // Thickeness of composite material ensuring rigidity of anode + Float_t fCathodeThickness ; // Thickness of composite material ensuring rigidity of cathode + Float_t fCompositeThickness ; // Thickness of composite material ensuring rigidity of anode Float_t fConversionGap ; // Thickness of the gas in the conversion stage Float_t fLeadConverterThickness ; // Thickness of the Lead converter Float_t fLeadToMicro2Gap ; // Thickness of the air gap between the Lead and Micromegas 2 @@ -88,8 +89,8 @@ private: Float_t fIPtoTopLidDistance ; // Distance from interaction point to top lid of PPSD - void AssertCPV() { - printf("Function %s should not be called for PPSD geometry\n",__PRETTY_FUNCTION__); + void AssertCPV(char* name) { + printf("Function AliPPSDGeometry::%s should not be called for PPSD geometry\n",name); assert(0==1) ; } diff --git a/PHOS/AliPHOSReconstructioner.cxx b/PHOS/AliPHOSReconstructioner.cxx index 7d24bc3a5d4..2f9471de30a 100644 --- a/PHOS/AliPHOSReconstructioner.cxx +++ b/PHOS/AliPHOSReconstructioner.cxx @@ -19,7 +19,7 @@ // Algorithm class for the reconstruction: clusterizer // track segment maker // particle identifier -// +//*-- //*-- Author: Gines Martinez & Yves Schutz (SUBATECH) @@ -390,19 +390,19 @@ AliPHOSReconstructioner::AliPHOSReconstructioner(AliPHOSClusterizer * Clusterize // mark the position of the RecPoints in the array AliPHOSEmcRecPoint * emcrp ; - Int_t PHOSModule; + Int_t currentPHOSModule; for (index = 0 ; index < emccl->GetEntries() ; index++) { emcrp = (AliPHOSEmcRecPoint * )emccl->At(index) ; emcrp ->SetIndexInList(index) ; TVector3 locpos; emcrp->GetLocalPosition(locpos); - PHOSModule = emcrp->GetPHOSMod(); + currentPHOSModule = emcrp->GetPHOSMod(); } AliPHOSEmcRecPoint * cpvrp ; for (index = 0 ; index < cpvcl->GetEntries() ; index++) { cpvrp = (AliPHOSEmcRecPoint * )cpvcl->At(index) ; cpvrp ->SetIndexInList(index) ; TVector3 locpos; cpvrp->GetLocalPosition(locpos); - PHOSModule = cpvrp->GetPHOSMod(); + currentPHOSModule = cpvrp->GetPHOSMod(); } if (fDebugReconstruction) diff --git a/PHOS/AliPHOSReconstructioner.h b/PHOS/AliPHOSReconstructioner.h index a3da421999d..bd77a5846db 100644 --- a/PHOS/AliPHOSReconstructioner.h +++ b/PHOS/AliPHOSReconstructioner.h @@ -9,7 +9,7 @@ // Algorithm class for the reconstruction: clusterizer // track segment maker // particle identifier -// +//*-- //*-- Author: Gines Martinez & Yves Schutz (SUBATECH) // --- ROOT system --- @@ -54,8 +54,7 @@ public: void SetDebugReconstruction(Bool_t deb) { fDebugReconstruction = deb; } AliPHOSReconstructioner & operator = (const AliPHOSReconstructioner & rvalue) { - // assignement operator requested by coding convention - // but not needed + // assignement operator requested by coding convention but not needed assert(0==1) ; return *this ; } diff --git a/PHOS/AliPHOSv0.cxx b/PHOS/AliPHOSv0.cxx index c77c2034bea..b600596106a 100644 --- a/PHOS/AliPHOSv0.cxx +++ b/PHOS/AliPHOSv0.cxx @@ -18,6 +18,7 @@ //_________________________________________________________________________ // Implementation version v0 of PHOS Manager class // Layout EMC + PPSD has name GPS2 +// Layout EMC + CPV has name IHEP // An object of this class does not produce hits nor digits // It is the one to use if you do not want to produce outputs in TREEH or TREED // @@ -923,7 +924,6 @@ void AliPHOSv0::CreateGeometryforPHOS() void AliPHOSv0::CreateGeometryforPPSD() { // Create the PHOS-PPSD geometry for GEANT - //BEGIN_HTML /*

@@ -1127,7 +1127,6 @@ void AliPHOSv0::CreateGeometryforCPV() { // Create the PHOS-CPV geometry for GEANT // Author: Yuri Kharlov 11 September 2000 - //BEGIN_HTML /*

diff --git a/PHOS/AliPHOSv0.h b/PHOS/AliPHOSv0.h index e7d589afb9a..f8794dbfa3b 100644 --- a/PHOS/AliPHOSv0.h +++ b/PHOS/AliPHOSv0.h @@ -6,7 +6,8 @@ //_________________________________________________________________________ // Implementation version v0 of PHOS Manager class // Layout EMC + PPSD has name GPS2 -// +// Layout EMC + CPV has name IHEP +//*-- //*-- Author: Yves Schutz (SUBATECH) // --- ROOT system --- @@ -64,8 +65,7 @@ class AliPHOSv0 : public AliPHOS { } AliPHOSv0 & operator = (const AliPHOSv0 & rvalue) { - // assignement operator requested by coding convention - // but not needed + // assignement operator requested by coding convention but not needed assert(0==1) ; return *this ; } diff --git a/PHOS/AliPHOSv1.cxx b/PHOS/AliPHOSv1.cxx index e050fad95f8..641e62ae75c 100644 --- a/PHOS/AliPHOSv1.cxx +++ b/PHOS/AliPHOSv1.cxx @@ -17,8 +17,12 @@ //_________________________________________________________________________ // Implementation version v1 of PHOS Manager class -// Layout EMC + PPSD has name GPS2 +//--- +// Layout EMC + PPSD has name GPS2: // Produces cumulated hits (no hits) and digits +//--- +// Layout EMC + CPV has name IHEP: +// Produces hits for CPV, cumulated hits and digits //*-- Author: Yves Schutz (SUBATECH) @@ -549,11 +553,11 @@ void AliPHOSv1::StepManager(void) // Charged track has just entered to the CPV sensitive plane - AliPHOSv1 &PHOS = *(AliPHOSv1*)gAlice->GetModule("PHOS"); + AliPHOSv1 &phos = *(AliPHOSv1*)gAlice->GetModule("PHOS"); - Int_t ModuleNumber; - gMC->CurrentVolOffID(3,ModuleNumber); - ModuleNumber--; + Int_t moduleNumber; + gMC->CurrentVolOffID(3,moduleNumber); + moduleNumber--; // Current position of the hit in the CPV module ref. system @@ -581,19 +585,21 @@ void AliPHOSv1::StepManager(void) // Add the current particle in the list of the CPV hits. - PHOS.GetCPVModule(ModuleNumber).AddHit(pmom,xyd,ipart); + phos.GetCPVModule(moduleNumber).AddHit(pmom,xyd,ipart); - printf("CPV hit added to module #%2d: p = (% .4f, % .4f, % .4f, % .4f) GeV,\n", - ModuleNumber,pmom.Px(),pmom.Py(),pmom.Pz(),pmom.E()); - printf( " xy = (%8.4f, %8.4f) cm, ipart = %d\n", - xyd[0],xyd[1],ipart); + if (fDebugLevel == 1) { + printf("CPV hit added to module #%2d: p = (% .4f, % .4f, % .4f, % .4f) GeV,\n", + moduleNumber+1,pmom.Px(),pmom.Py(),pmom.Pz(),pmom.E()); + printf( " xy = (%8.4f, %8.4f) cm, ipart = %d\n", + xyd[0],xyd[1],ipart); + } // Digitize the current CPV hit: // 1. find pad response and TClonesArray *cpvDigits = new TClonesArray("AliPHOSCPVDigit",0); // array of digits for current hit - CPVDigitize(pmom,xyd,ModuleNumber,cpvDigits); + CPVDigitize(pmom,xyd,moduleNumber,cpvDigits); Float_t xmean = 0; Float_t zmean = 0; @@ -625,7 +631,7 @@ void AliPHOSv1::StepManager(void) ndigits = cpvDigits->GetEntriesFast(); for (Int_t idigit=0; idigitUncheckedAt(idigit); - relid[0] = ModuleNumber + 1 ; // CPV (or PHOS) module number + relid[0] = moduleNumber + 1 ; // CPV (or PHOS) module number relid[1] =-1 ; // means CPV relid[2] = cpvDigit->GetXpad() ; // column number of a pad relid[3] = cpvDigit->GetYpad() ; // row number of a pad @@ -689,12 +695,12 @@ void AliPHOSv1::CPVDigitize (TLorentzVector p, Float_t *zxhit, Int_t moduleNumbe // 2 October 2000 // ------------------------------------------------------------------------ - const Float_t celWr = fGeom->GetPadSizePhi()/2; // Distance between wires (2 wires above 1 pad) - const Float_t detR = 0.1; // Relative energy fluctuation in track for 100 e- - const Float_t dEdx = 4.0; // Average energy loss in CPV; - const Int_t ngamz = 5; // Ionization size in Z - const Int_t ngamx = 9; // Ionization size in Phi - const Float_t qNoise = 0.03; // charge noise in one pad + const Float_t kCelWr = fGeom->GetPadSizePhi()/2; // Distance between wires (2 wires above 1 pad) + const Float_t kDetR = 0.1; // Relative energy fluctuation in track for 100 e- + const Float_t kdEdx = 4.0; // Average energy loss in CPV; + const Int_t kNgamz = 5; // Ionization size in Z + const Int_t kNgamx = 9; // Ionization size in Phi + const Float_t kNoise = 0.03; // charge noise in one pad Float_t rnor1,rnor2; @@ -703,71 +709,64 @@ void AliPHOSv1::CPVDigitize (TLorentzVector p, Float_t *zxhit, Int_t moduleNumbe // axis X goes across the beam in the module plane // axis Y is a normal to the module plane showing from the IP -// cout << __PRETTY_FUNCTION__ << ": YVK : Start digitization\n"; - Float_t hitX = zxhit[0]; Float_t hitZ =-zxhit[1]; Float_t pX = p.Px(); Float_t pZ =-p.Pz(); Float_t pNorm = p.Py(); - Float_t E = dEdx; - -// cout << "CPVDigitize: YVK : "<GetCPVGasThickness(); Float_t dXY = pX/pNorm * fGeom->GetCPVGasThickness(); gRandom->Rannor(rnor1,rnor2); - E *= (1 + detR*rnor1) * - TMath::Sqrt((1 + ( pow(dZY,2) + pow(dXY,2) ) / pow(fGeom->GetCPVGasThickness(),2))); + eloss *= (1 + kDetR*rnor1) * + TMath::Sqrt((1 + ( pow(dZY,2) + pow(dXY,2) ) / pow(fGeom->GetCPVGasThickness(),2))); Float_t zhit1 = hitZ + fGeom->GetCPVActiveSize(1)/2 - dZY/2; Float_t xhit1 = hitX + fGeom->GetCPVActiveSize(0)/2 - dXY/2; Float_t zhit2 = zhit1 + dZY; Float_t xhit2 = xhit1 + dXY; -// cout << "CPVDigitize: YVK : "<GetPadSizePhi())<<" "<<(Int_t)(zhit1/fGeom->GetPadSizeZ())<<" "<GetNumberOfPadsZ(); Int_t nCellX = fGeom->GetNumberOfPadsPhi(); - Int_t nz3 = (ngamz+1)/2; - Int_t nx3 = (ngamx+1)/2; - cpvDigits->Expand(nIter*ngamx*ngamz); + Int_t nz3 = (kNgamz+1)/2; + Int_t nx3 = (kNgamx+1)/2; + cpvDigits->Expand(nIter*kNgamx*kNgamz); TClonesArray &ldigits = *(TClonesArray *)cpvDigits; for (Int_t iter=0; iter