From 0bc3b8eda6a9ea194e4af879b7bf9d7e2ed553a7 Mon Sep 17 00:00:00 2001 From: schutz Date: Tue, 4 Mar 2003 10:43:05 +0000 Subject: [PATCH] Coding convention obeyed --- PHOS/AliPHOS.cxx | 2 +- PHOS/AliPHOS.h | 8 +- PHOS/AliPHOSCPVBaseGeometry.cxx | 5 +- PHOS/AliPHOSCPVDigit.h | 6 +- PHOS/AliPHOSCPVGeometry.h | 38 +++++----- PHOS/AliPHOSClusterizer.h | 9 +++ PHOS/AliPHOSClusterizerv1.cxx | 9 +++ PHOS/AliPHOSClusterizerv1.h | 17 ++++- PHOS/AliPHOSClusterizerv2.cxx | 26 +++++++ PHOS/AliPHOSDigitizer.cxx | 18 +++-- PHOS/AliPHOSDigitizer.h | 10 +-- PHOS/AliPHOSEMCAGeometry.h | 8 +- PHOS/AliPHOSEmcRecPoint.cxx | 6 +- PHOS/AliPHOSEmcRecPoint.h | 6 +- PHOS/AliPHOSGeometry.cxx | 28 +++++-- PHOS/AliPHOSGeometry.h | 18 +---- PHOS/AliPHOSGetter.cxx | 125 ++++++++++++++++++++------------ PHOS/AliPHOSGetter.h | 4 +- PHOS/AliPHOSHit.cxx | 26 +++++-- PHOS/AliPHOSHit.h | 1 - PHOS/AliPHOSIhepAnalyze.cxx | 78 ++++++++++---------- PHOS/AliPHOSIhepAnalyze.h | 9 ++- PHOS/AliPHOSImpact.cxx | 3 + PHOS/AliPHOSJet.cxx | 19 ++++- PHOS/AliPHOSJet.h | 30 ++++++-- PHOS/AliPHOSJetFinder.cxx | 15 ++-- PHOS/AliPHOSJetFinder.h | 29 +++++--- PHOS/AliPHOSLink.h | 6 +- 28 files changed, 357 insertions(+), 202 deletions(-) diff --git a/PHOS/AliPHOS.cxx b/PHOS/AliPHOS.cxx index fa2d48e40f5..ff91cd13ad4 100644 --- a/PHOS/AliPHOS.cxx +++ b/PHOS/AliPHOS.cxx @@ -368,7 +368,7 @@ AliPHOSGeometry * AliPHOS::GetGeometry() const //____________________________________________________________________________ void AliPHOS::SetTreeAddress() { - + // Set tree address to hit array TBranch *branch; char branchname[20]; sprintf(branchname,"%s",GetName()); diff --git a/PHOS/AliPHOS.h b/PHOS/AliPHOS.h index 17aca1f325d..dbce7c0fec6 100644 --- a/PHOS/AliPHOS.h +++ b/PHOS/AliPHOS.h @@ -9,7 +9,7 @@ // //*-- Author: Laurent Aphecetche & Yves Schutz (SUBATECH) -#include +//#include // --- ROOT system --- @@ -52,10 +52,8 @@ class AliPHOS : public AliDetector { virtual const TString Version() const {return TString(" ") ; } virtual void WriteQA() ; AliPHOS & operator = (const AliPHOS & rvalue) { - // assignement operator requested by coding convention - // but not needed - Fatal("operator =", "not implemented") ; - return *this ; + // assignement operator requested by coding convention but not needed + Fatal("operator =", "not implemented") ; return *this ; } protected: diff --git a/PHOS/AliPHOSCPVBaseGeometry.cxx b/PHOS/AliPHOSCPVBaseGeometry.cxx index b74bd02ebdc..1603618623f 100644 --- a/PHOS/AliPHOSCPVBaseGeometry.cxx +++ b/PHOS/AliPHOSCPVBaseGeometry.cxx @@ -15,6 +15,9 @@ /* $Log$ + Revision 1.2 2001/05/31 22:46:32 schutz + Coding rule violation corrected + Revision 1.1 2000/11/03 16:27:47 schutz CPV base geometry class to correct previous name-convetion rule violation @@ -31,7 +34,7 @@ // --- AliRoot header files --- -#include "AliPHOSCPVBaseGeometry.h" +class AliPHOSCPVBaseGeometry ClassImp(AliPHOSCPVBaseGeometry) ; diff --git a/PHOS/AliPHOSCPVDigit.h b/PHOS/AliPHOSCPVDigit.h index 2986d540dc1..e05ea364d41 100644 --- a/PHOS/AliPHOSCPVDigit.h +++ b/PHOS/AliPHOSCPVDigit.h @@ -24,9 +24,9 @@ public: AliPHOSCPVDigit(Int_t x, Int_t y, Float_t q); void SetQpad(Float_t q) { fQpad = q; } - Int_t GetXpad() { return fXpad; } - Int_t GetYpad() { return fYpad; } - Float_t GetQpad() { return fQpad; } + Int_t GetXpad() const { return fXpad; } + Int_t GetYpad() const { return fYpad; } + Float_t GetQpad() const { return fQpad; } private: Int_t fXpad; // Digit's pad number in Phi diff --git a/PHOS/AliPHOSCPVGeometry.h b/PHOS/AliPHOSCPVGeometry.h index 58d2d1a7b8a..2f64377a345 100644 --- a/PHOS/AliPHOSCPVGeometry.h +++ b/PHOS/AliPHOSCPVGeometry.h @@ -12,11 +12,11 @@ // Author: Yuri Kharlov (IHEP, Protvino) // 7 November 2000 -#include +//#include "AliPHOSCPVBaseGeometry.h" +#include "TObject.h" -#include "AliPHOSCPVBaseGeometry.h" - -class AliPHOSCPVGeometry : public AliPHOSCPVBaseGeometry { +// class AliPHOSCPVGeometry : public AliPHOSCPVBaseGeometry { +class AliPHOSCPVGeometry : public TObject { public: @@ -25,21 +25,21 @@ public: // CPV functions - virtual Int_t GetNumberOfCPVLayers(void) { return fNumberOfCPVLayers; } - 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]; } + virtual Int_t GetNumberOfCPVLayers(void) const { return fNumberOfCPVLayers; } + virtual Int_t GetNumberOfCPVPadsPhi(void) const { return fNumberOfCPVPadsPhi ; } + virtual Int_t GetNumberOfCPVPadsZ(void) const { return fNumberOfCPVPadsZ ; } + virtual Float_t GetCPVPadSizePhi(void) const { return fCPVPadSizePhi; } + virtual Float_t GetCPVPadSizeZ(void) const { return fCPVPadSizeZ; } + virtual Float_t GetCPVBoxSize(Int_t index) const { return fCPVBoxSize[index]; } + virtual Float_t GetCPVActiveSize(Int_t index) const { return fCPVActiveSize[index]; } + virtual Int_t GetNumberOfCPVChipsPhi(void) const { return fNumberOfCPVChipsPhi; } + virtual Int_t GetNumberOfCPVChipsZ(void) const { return fNumberOfCPVChipsZ; } + virtual Float_t GetGassiplexChipSize(Int_t index) const { return fGassiplexChipSize[index]; } + virtual Float_t GetCPVGasThickness(void) const { return fCPVGasThickness; } + virtual Float_t GetCPVTextoliteThickness(void) const { return fCPVTextoliteThickness; } + virtual Float_t GetCPVCuNiFoilThickness(void) const { return fCPVCuNiFoilThickness; } + virtual Float_t GetFTPosition(Int_t index) const { return fFTPosition[index]; } + virtual Float_t GetCPVFrameSize(Int_t index) const { return fCPVFrameSize[index]; } private: diff --git a/PHOS/AliPHOSClusterizer.h b/PHOS/AliPHOSClusterizer.h index 5e555d63b39..119cdb49573 100644 --- a/PHOS/AliPHOSClusterizer.h +++ b/PHOS/AliPHOSClusterizer.h @@ -24,6 +24,10 @@ public: AliPHOSClusterizer() ; // default ctor AliPHOSClusterizer(const char * headerFile, const char * name, const Bool_t toSplit) ; + AliPHOSClusterizer(const AliPHOSClusterizer & clusterizer) { + // copy ctor: no implementation yet + Fatal("cpy ctor", "not implemented") ; + } virtual ~AliPHOSClusterizer() ; // dtor virtual Float_t GetEmcClusteringThreshold()const {Warning("GetEmcClusteringThreshold", "Not Defined" ) ; return 0. ; } @@ -42,6 +46,7 @@ public: virtual void SetEmcClusteringThreshold(Float_t cluth) {Warning("SetEmcClusteringThreshold", "Not Defined" ) ; } virtual void SetEmcLocalMaxCut(Float_t cut) {Warning("SetEmcLocalMaxCut", "Not Defined" ) ; } + virtual void SetEmcLogWeight(Float_t w) {Warning("SetEmcLogWeight", "Not Defined" ) ; } virtual void SetEmcTimeGate(Float_t gate) {Warning("SetEmcTimeGate", "Not Defined" ) ; } virtual void SetCpvClusteringThreshold(Float_t cluth) {Warning("SetCpvClusteringThreshold", "Not Defined" ) ; } @@ -50,6 +55,10 @@ public: virtual void SetDigitsBranch(const char * title) {Warning("SetDigitsBranch", "Not Defined" ) ; } virtual void SetRecPointsBranch(const char *title) {Warning("SetRecPointsBranch", "Not Defined" ) ; } virtual void SetUnfolding(Bool_t toUnfold ){Warning("SetUnfolding", "Not Defined" ) ;} + AliPHOSClusterizer & operator = (const AliPHOSClusterizer & rvalue) { + // assignement operator requested by coding convention but not needed + Fatal("operator =", "not implemented") ; return *this ; + } virtual const char * Version() const {Warning("Version", "Not Defined" ) ; return 0 ; } protected: diff --git a/PHOS/AliPHOSClusterizerv1.cxx b/PHOS/AliPHOSClusterizerv1.cxx index 8df86c0407d..1c5d1078b42 100644 --- a/PHOS/AliPHOSClusterizerv1.cxx +++ b/PHOS/AliPHOSClusterizerv1.cxx @@ -106,6 +106,8 @@ AliPHOSClusterizerv1::AliPHOSClusterizerv1(const char* headerFile,const char* na //____________________________________________________________________________ AliPHOSClusterizerv1::~AliPHOSClusterizerv1() { + // dtor + delete fPedestals ; delete fGains ; @@ -116,6 +118,8 @@ AliPHOSClusterizerv1::AliPHOSClusterizerv1(const char* headerFile,const char* na //____________________________________________________________________________ const TString AliPHOSClusterizerv1::BranchName() const { + // Returns branch name of the AliPHOSClusterizer + TString branchName(GetName() ) ; branchName.Remove(branchName.Index(Version())-1) ; return branchName ; @@ -124,6 +128,8 @@ const TString AliPHOSClusterizerv1::BranchName() const //____________________________________________________________________________ Float_t AliPHOSClusterizerv1::Calibrate(Int_t amp, Int_t absId) const { + // Returns energy value in the cell absId with the digit amplitude amp + if(fPedestals || fGains ){ //use calibration data if(!fPedestals || !fGains ){ Error("Calibrate","Either Pedestals of Gains not set!") ; @@ -324,6 +330,8 @@ Bool_t AliPHOSClusterizerv1::FindFit(AliPHOSEmcRecPoint * emcRP, AliPHOSDigit ** //____________________________________________________________________________ void AliPHOSClusterizerv1::GetCalibrationParameters() { + // Get calibration parameters from AliPHOSDigitizer + AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ; const TTask * task = gime->Digitizer(BranchName()) ; @@ -399,6 +407,7 @@ void AliPHOSClusterizerv1::Init() //____________________________________________________________________________ void AliPHOSClusterizerv1::InitParameters() { + // Set initial parameters for clusterization fNumberOfCpvClusters = 0 ; fNumberOfEmcClusters = 0 ; diff --git a/PHOS/AliPHOSClusterizerv1.h b/PHOS/AliPHOSClusterizerv1.h index 3e1cc860abb..abb824da0e4 100644 --- a/PHOS/AliPHOSClusterizerv1.h +++ b/PHOS/AliPHOSClusterizerv1.h @@ -33,6 +33,10 @@ public: AliPHOSClusterizerv1() ; AliPHOSClusterizerv1(const char * headerFile, const char * name = "Default", const Bool_t toSplit=kFALSE); + AliPHOSClusterizerv1(const AliPHOSClusterizerv1 & clusterizer) { + // copy ctor: no implementation yet + Fatal("cpy ctor", "not implemented") ; + } virtual ~AliPHOSClusterizerv1() ; virtual Int_t AreNeighbours(AliPHOSDigit * d1, AliPHOSDigit * d2)const ; @@ -75,6 +79,11 @@ public: //class member function (not object member function) static void UnfoldingChiSquare(Int_t & nPar, Double_t * Grad, Double_t & fret, Double_t * x, Int_t iflag) ; // Chi^2 of the fit. Should be static to be passes to MINUIT + AliPHOSClusterizerv1 & operator = (const AliPHOSClusterizerv1 & rvalue) { + // assignement operator requested by coding convention but not needed + Fatal("operator =", "not implemented") ; return *this ; + } + virtual const char * Version() const { return "clu-v1" ; } protected: @@ -115,12 +124,12 @@ private: AliPHOSCalibrationData * fPedestals ; //! AliPHOSCalibrationData * fGains ; //! TArrayS * fPatterns ;// Array of trigger patterns of events to handle - TString fCalibrVersion ; //Version of calibration Data - Int_t fCalibrRun ; //Specification of Calibration data + TString fCalibrVersion ; // Version of calibration Data + Int_t fCalibrRun ; // Specification of Calibration data Float_t fADCchanelEmc ; // width of one ADC channel in GeV - Float_t fADCpedestalEmc ; // + Float_t fADCpedestalEmc ; // value of the EMC ADC pedestal Float_t fADCchanelCpv ; // width of one ADC channel in CPV 'popugais' - Float_t fADCpedestalCpv ; // + Float_t fADCpedestalCpv ; // value of the CPV ADC pedestal Float_t fPurifyThreshold ; // threshold for cell energies after unfolding Float_t fEmcClusteringThreshold ; // minimum energy to include a EMC digit in a cluster diff --git a/PHOS/AliPHOSClusterizerv2.cxx b/PHOS/AliPHOSClusterizerv2.cxx index 7fa234aebdc..dba250a53e0 100644 --- a/PHOS/AliPHOSClusterizerv2.cxx +++ b/PHOS/AliPHOSClusterizerv2.cxx @@ -1,3 +1,27 @@ +/************************************************************************** + * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * * + * Author: The ALICE Off-line Project. * + * Contributors are mentioned in the code where appropriate. * + * * + * Permission to use, copy, modify and distribute this software and its * + * documentation strictly for non-commercial purposes is hereby granted * + * without fee, provided that the above copyright notice appears in all * + * copies and that both the copyright notice and this permission notice * + * appear in the supporting documentation. The authors make no claims * + * about the suitability of this software for any purpose. It is * + * provided "as is" without express or implied warranty. * + **************************************************************************/ +/* $Id: */ + +/* $Log: + */ +//*-- Author: Boris Polichtchouk, IHEP +////////////////////////////////////////////////////////////////////////////// +// Clusterization class for IHEP reconstruction. +// Performs clusterization (collects neighbouring active cells) +// It differs from AliPHOSClusterizerv1 in neighbour definition only + // --- ROOT system --- #include "TBenchmark.h" #include "TROOT.h" @@ -23,6 +47,7 @@ AliPHOSClusterizerv1(headerFile,name,toSplit) void AliPHOSClusterizerv2::GetNumberOfClustersFound(int* numb) const { + // Returns the number of found EMC and CPV rec.points AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ; numb[0] = gime->EmcRecPoints()->GetEntries(); @@ -31,6 +56,7 @@ void AliPHOSClusterizerv2::GetNumberOfClustersFound(int* numb) const void AliPHOSClusterizerv2::Exec(Option_t* option) { + // Steering method if(strstr(option,"tim")) gBenchmark->Start("PHOSClusterizer"); diff --git a/PHOS/AliPHOSDigitizer.cxx b/PHOS/AliPHOSDigitizer.cxx index 9b464730644..bd9b8ddab49 100644 --- a/PHOS/AliPHOSDigitizer.cxx +++ b/PHOS/AliPHOSDigitizer.cxx @@ -358,6 +358,8 @@ void AliPHOSDigitizer::Digitize(const Int_t event) //____________________________________________________________________________ Int_t AliPHOSDigitizer::DigitizeEnergy(Float_t energy, Int_t absId) { + // Returns digitized value of the energy in a cell absId + Int_t chanel ; if(absId <= fEmcCrystals){ //digitize as EMC chanel = (Int_t) TMath::Ceil((energy - fADCpedestalEmc)/fADCchanelEmc) ; @@ -470,8 +472,10 @@ void AliPHOSDigitizer::Exec(Option_t *option) } //____________________________________________________________________________ -Float_t AliPHOSDigitizer::FrontEdgeTime(TClonesArray * ticks) -{ // +Float_t AliPHOSDigitizer::FrontEdgeTime(TClonesArray * ticks) const +{ + // Returns the shortest time among all time ticks + ticks->Sort() ; //Sort in accordance with times of ticks TIter it(ticks) ; AliPHOSTick * ctick = (AliPHOSTick *) it.Next() ; @@ -547,6 +551,8 @@ Bool_t AliPHOSDigitizer::Init() //____________________________________________________________________________ void AliPHOSDigitizer::InitParameters() { + // Set initial parameters for Digitizer + fPinNoise = 0.004 ; fEMCDigitThreshold = 0.012 ; fCPVNoise = 0.01; @@ -628,10 +634,10 @@ void AliPHOSDigitizer::Print(Option_t* option)const message += GetName() ; message += "-------------\n" ; - const Int_t nStreams = GetNInputStreams() ; - if (nStreams) { + const Int_t kNStreams = GetNInputStreams() ; + if (kNStreams) { Int_t index = 0 ; - for (index = 0 ; index < nStreams ; index++) { + for (index = 0 ; index < kNStreams ; index++) { message += "Adding SDigits " ; message += GetName() ; message += "from " ; @@ -735,7 +741,7 @@ void AliPHOSDigitizer::Print(Option_t* option)const } //__________________________________________________________________ -Float_t AliPHOSDigitizer::TimeOfNoise(void) +Float_t AliPHOSDigitizer::TimeOfNoise(void) const { // Calculates the time signal generated by noise //to be rewritten, now returns just big number return 1. ; diff --git a/PHOS/AliPHOSDigitizer.h b/PHOS/AliPHOSDigitizer.h index cb62592affa..476577d07a2 100644 --- a/PHOS/AliPHOSDigitizer.h +++ b/PHOS/AliPHOSDigitizer.h @@ -83,9 +83,9 @@ private: void InitParameters() ; void PrintDigits(Option_t * option) ; void WriteDigits(Int_t evt) ; // Writes Digits for particular event - Float_t TimeOfNoise(void) ; // Calculate time signal generated by noise + Float_t TimeOfNoise(void) const; // Calculate time signal generated by noise //Calculate the time of crossing of the threshold by front edge - Float_t FrontEdgeTime(TClonesArray * ticks) ; + Float_t FrontEdgeTime(TClonesArray * ticks) const ; //Calculate digitized signal with gived ADC parameters Int_t DigitizeEnergy(Float_t energy, Int_t absId) ; @@ -108,11 +108,11 @@ private: Float_t fTimeSignalLength ; // Length of the timing signal Float_t fADCchanelEmc ; // width of one ADC channel in GeV - Float_t fADCpedestalEmc ; // + Float_t fADCpedestalEmc ; // value of the EMC ADC pedestal Int_t fNADCemc ; // number of channels in EMC ADC - Float_t fADCchanelCpv ; // width of one ADC channel in CPV 'popugais' - Float_t fADCpedestalCpv ; // + Float_t fADCchanelCpv ; // width of one ADC channel in CPV units + Float_t fADCpedestalCpv ; // value of the CPV ADC pedestal in CPV units Int_t fNADCcpv ; // number of channels in CPV ADC Bool_t fToSplit ; //! Do we work in the split mode diff --git a/PHOS/AliPHOSEMCAGeometry.h b/PHOS/AliPHOSEMCAGeometry.h index d107d767283..bc83eb5c491 100644 --- a/PHOS/AliPHOSEMCAGeometry.h +++ b/PHOS/AliPHOSEMCAGeometry.h @@ -39,14 +39,14 @@ public: } Float_t * GetStripHalfSize() {return fStripHalfSize ;} - Float_t GetStripWallWidthOut() {return fStripWallWidthOut ;} + Float_t GetStripWallWidthOut() const {return fStripWallWidthOut ;} Float_t * GetAirCellHalfSize() {return fAirCellHalfSize ;} Float_t * GetWrappedHalfSize() {return fWrappedHalfSize ;} Float_t GetAirGapLed() const {return fAirGapLed ;} Float_t * GetCrystalHalfSize() {return fCrystalHalfSize ;} - Float_t * GetSupportPlateHalfSize() { return fSupportPlateHalfSize ;} + Float_t * GetSupportPlateHalfSize() {return fSupportPlateHalfSize ;} Float_t * GetSupportPlateInHalfSize() {return fSupportPlateInHalfSize ;} - Float_t GetSupportPlateThickness(void) const { return fSupportPlateThickness ; } + Float_t GetSupportPlateThickness(void) const { return fSupportPlateThickness ; } Float_t * GetPreampHalfSize() {return fPreampHalfSize ;} Float_t * GetAPDHalfSize(void) {return fPinDiodeHalfSize ; } @@ -62,7 +62,7 @@ public: Float_t * GetTSupport2HalfSize() {return fTSupport2HalfSize ;} Float_t * GetTCables1HalfSize() {return fTCables1HalfSize ; } Float_t * GetTCables2HalfSize() {return fTCables2HalfSize ; } - Float_t GetTSupportDist() {return fTSupportDist ; } + Float_t GetTSupportDist() const {return fTSupportDist ; } Float_t * GetFrameXHalfSize() {return fFrameXHalfSize ;} Float_t * GetFrameZHalfSize() {return fFrameZHalfSize ;} Float_t * GetFrameXPosition() {return fFrameXPosition ;} diff --git a/PHOS/AliPHOSEmcRecPoint.cxx b/PHOS/AliPHOSEmcRecPoint.cxx index 2cbf1151013..9f2c2735edb 100644 --- a/PHOS/AliPHOSEmcRecPoint.cxx +++ b/PHOS/AliPHOSEmcRecPoint.cxx @@ -642,8 +642,10 @@ Int_t AliPHOSEmcRecPoint::GetNumberOfLocalMax( AliPHOSDigit ** maxAt, Float_t return iDigitN ; } //____________________________________________________________________________ -void AliPHOSEmcRecPoint::EvalTime(TClonesArray * digits){ - +void AliPHOSEmcRecPoint::EvalTime(TClonesArray * digits) +{ + // Define a rec.point time as a time in the cell with the maximum energy + Float_t maxE = 0; Int_t maxAt = 0; for(Int_t idig=0; idig < fMulDigit; idig++){ diff --git a/PHOS/AliPHOSEmcRecPoint.h b/PHOS/AliPHOSEmcRecPoint.h index a34b19c1ac9..f61ab7c6642 100644 --- a/PHOS/AliPHOSEmcRecPoint.h +++ b/PHOS/AliPHOSEmcRecPoint.h @@ -54,9 +54,9 @@ public: Int_t GetMultiplicity(void) const { return fMulDigit ; } // gets the number of digits making this recpoint Int_t GetMultiplicityAtLevel(const Float_t level) const ; // computes multiplicity of digits with // energy above relative level - Short_t GetNExMax(void){return fNExMax ;} //Number of maxima found in cluster in unfolding: - //0 : was no unfolging - //-1: unfolding failed + Short_t GetNExMax(void) const {return fNExMax ;} // Number of maxima found in cluster in unfolding: + // 0: was no unfolging + //-1: unfolding failed void SetNExMax(Int_t nmax){fNExMax = static_cast(nmax) ;} virtual Int_t GetNumberOfLocalMax(AliPHOSDigit ** maxAt, Float_t * maxAtEnergy, Float_t locMaxCut,TClonesArray * digits ) const ; diff --git a/PHOS/AliPHOSGeometry.cxx b/PHOS/AliPHOSGeometry.cxx index 302456a0f8d..c4ec62590fa 100644 --- a/PHOS/AliPHOSGeometry.cxx +++ b/PHOS/AliPHOSGeometry.cxx @@ -50,6 +50,19 @@ ClassImp(AliPHOSGeometry) ; AliPHOSGeometry * AliPHOSGeometry::fgGeom = 0 ; Bool_t AliPHOSGeometry::fgInit = kFALSE ; +//____________________________________________________________________________ +AliPHOSGeometry::AliPHOSGeometry(void) +{ + // default ctor + // must be kept public for root persistency purposes, + // but should never be called by the outside world + fPHOSAngle = 0 ; + fGeometryEMCA = 0; + fGeometrySUPP = 0; + fGeometryCPV = 0; + fgGeom = 0; + fRotMatrixArray = 0; +} //____________________________________________________________________________ AliPHOSGeometry::~AliPHOSGeometry(void) { @@ -342,15 +355,18 @@ void AliPHOSGeometry::ImpactOnEmc(const Double_t theta, const Double_t phi, Int_ } } +//____________________________________________________________________________ Bool_t AliPHOSGeometry::Impact(const TParticle * particle) const { - Bool_t In=kFALSE; - Int_t ModuleNumber=0; + // Check if a particle being propagates from IP along the straight line impacts EMC + + Bool_t in=kFALSE; + Int_t moduleNumber=0; Double_t z,x; - ImpactOnEmc(particle->Theta(),particle->Phi(),ModuleNumber,z,x); - if(ModuleNumber) In=kTRUE; - else In=kFALSE; - return In; + ImpactOnEmc(particle->Theta(),particle->Phi(),moduleNumber,z,x); + if(moduleNumber) in=kTRUE; + else in=kFALSE; + return in; } //____________________________________________________________________________ diff --git a/PHOS/AliPHOSGeometry.h b/PHOS/AliPHOSGeometry.h index c337d4b7251..6ea980602ce 100644 --- a/PHOS/AliPHOSGeometry.h +++ b/PHOS/AliPHOSGeometry.h @@ -16,8 +16,6 @@ // //*-- Author: Yves Schutz (SUBATECH) -#include - // --- ROOT system --- #include "TString.h" @@ -38,20 +36,11 @@ class AliPHOSGeometry : public AliGeometry { public: - AliPHOSGeometry() { - // default ctor - // must be kept public for root persistency purposes, but should never be called by the outside world - fPHOSAngle = 0 ; - fGeometryEMCA = 0; - fGeometrySUPP = 0; - fGeometryCPV = 0; - fgGeom = 0; - fRotMatrixArray = 0; } + AliPHOSGeometry() ; AliPHOSGeometry(const AliPHOSGeometry & geom) { // cpy ctor requested by Coding Convention but not yet needed - - assert(0==1) ; + Fatal("cpy ctor", "not implemented") ; } virtual ~AliPHOSGeometry(void) ; @@ -63,8 +52,7 @@ public: AliPHOSGeometry & operator = (const AliPHOSGeometry & rvalue) const { // assignement operator requested by coding convention but not needed - assert(0==1) ; - return *(GetInstance()) ; + Fatal("operator =", "not implemented") ; return *(GetInstance()) ; } // General diff --git a/PHOS/AliPHOSGetter.cxx b/PHOS/AliPHOSGetter.cxx index d0708a47a8a..d52cb66c5a2 100644 --- a/PHOS/AliPHOSGetter.cxx +++ b/PHOS/AliPHOSGetter.cxx @@ -76,7 +76,7 @@ ClassImp(AliPHOSGetter) AliPHOSGetter * AliPHOSGetter::fgObjGetter = 0 ; - TFile * AliPHOSGetter::fFile = 0 ; + TFile * AliPHOSGetter::fgFile = 0 ; //____________________________________________________________________________ AliPHOSGetter::AliPHOSGetter(const char* headerFile, const char* branchTitle, const Bool_t toSplit ) @@ -113,17 +113,17 @@ AliPHOSGetter::AliPHOSGetter(const char* headerFile, const char* branchTitle, co if ( fHeaderFile != "aliroot" ) { // to call the getter without a file //open headers file - fFile = static_cast(gROOT->GetFile(fHeaderFile.Data() ) ) ; + fgFile = static_cast(gROOT->GetFile(fHeaderFile.Data() ) ) ; - if(!fFile) { //if file was not opened yet, read gAlice - fFile = TFile::Open(fHeaderFile.Data(),"update") ; - if (!fFile->IsOpen()) { + if(!fgFile) { //if file was not opened yet, read gAlice + fgFile = TFile::Open(fHeaderFile.Data(),"update") ; + if (!fgFile->IsOpen()) { Error("AliPHOSGetter", "Cannot open %s", fHeaderFile.Data() ) ; fFailed = kTRUE ; return ; } } - gAlice = dynamic_cast(fFile->Get("gAlice")) ; + gAlice = dynamic_cast(fgFile->Get("gAlice")) ; } if (!gAlice) { @@ -147,8 +147,9 @@ AliPHOSGetter::AliPHOSGetter(const char* headerFile, const char* branchTitle, co } //____________________________________________________________________________ -AliPHOSGetter::~AliPHOSGetter(){ - +AliPHOSGetter::~AliPHOSGetter() +{ + // dtor if (fPrimaries) { fPrimaries->Delete() ; delete fPrimaries ; @@ -161,10 +162,10 @@ AliPHOSGetter::~AliPHOSGetter(){ while ( (folder = static_cast(next())) ) phosF->Remove(folder) ; - if (fFile) { - fFile->Close() ; - delete fFile ; - fFile = 0 ; + if (fgFile) { + fgFile->Close() ; + delete fgFile ; + fgFile = 0 ; } fgObjGetter = 0 ; @@ -173,6 +174,8 @@ AliPHOSGetter::~AliPHOSGetter(){ //____________________________________________________________________________ void AliPHOSGetter::CloseFile() { + // delete gAlice + if(gAlice) delete gAlice ; gAlice = 0 ; @@ -230,7 +233,7 @@ AliPHOSGetter * AliPHOSGetter::GetInstance(const char* headerFile, } //First checks, if header file already opened - if(!fgObjGetter->fFile){ + if(!fgObjGetter->fgFile){ fgObjGetter = new AliPHOSGetter(headerFile,branchTitle,toSplit) ; if(fgObjGetter->fFailed) return 0; @@ -256,9 +259,9 @@ AliPHOSGetter * AliPHOSGetter::GetInstance(const char* headerFile, fgObjGetter->fModuleFolder->Remove(fgObjGetter->fModuleFolder->FindObject("PHOS")) ; delete gAlice ; } - if(fgObjGetter->fFile){ - fgObjGetter->fFile->Close() ; - fgObjGetter->fFile=0; + if(fgObjGetter->fgFile){ + fgObjGetter->fgFile->Close() ; + fgObjGetter->fgFile=0; } if(fgObjGetter->fToSplit) fgObjGetter->CloseSplitFiles() ; @@ -322,7 +325,7 @@ const Bool_t AliPHOSGetter::BranchExists(const TString recName) const file = TFile::Open(fSDigitsFileName.Data(),"update"); } else - file = fFile ; + file = fgFile ; tree = (TTree *)file->Get(name.Data()) ; @@ -365,6 +368,9 @@ const Bool_t AliPHOSGetter::BranchExists(const TString recName) const //____________________________________________________________________________ void AliPHOSGetter::ListBranches(Int_t event) const { + // Iterates over branches in each TreeH, TreeS, TreeD and TreeR and + // prints lists of branches to stdout + // (I don't know why this method is needed. Yu.Kharlov) TBranch * branch = 0 ; if (gAlice->GetEvent(event) == -1) @@ -417,6 +423,8 @@ void AliPHOSGetter::ListBranches(Int_t event) const //____________________________________________________________________________ void AliPHOSGetter::NewBranch(TString name, Int_t event) { + // Set titles for (S)Digits, RecPoints, TSegments and RecParticles branches + fBranchTitle = fSDigitsTitle = fDigitsTitle = fRecPointsTitle = fTrackSegmentsTitle = fRecParticlesTitle = name ; Event(event) ; } @@ -424,19 +432,20 @@ void AliPHOSGetter::NewBranch(TString name, Int_t event) //____________________________________________________________________________ Bool_t AliPHOSGetter::NewFile(TString name) { + // Open a new file fHeaderFile = name ; - fFile->Close() ; + fgFile->Close() ; fFailed = kFALSE; - fFile = static_cast(gROOT->GetFile(fHeaderFile.Data() ) ) ; - if(!fFile) { //if file was not opened yet, read gAlice - fFile = TFile::Open(fHeaderFile.Data(),"update") ; - if (!fFile->IsOpen()) { + fgFile = static_cast(gROOT->GetFile(fHeaderFile.Data() ) ) ; + if(!fgFile) { //if file was not opened yet, read gAlice + fgFile = TFile::Open(fHeaderFile.Data(),"update") ; + if (!fgFile->IsOpen()) { Error("NewFile", "Cannot open %s", fHeaderFile.Data() ) ; fFailed = kTRUE ; return fFailed ; } - gAlice = static_cast(fFile->Get("gAlice")) ; + gAlice = static_cast(fgFile->Get("gAlice")) ; } if (!gAlice) { @@ -461,6 +470,8 @@ const AliPHOS * AliPHOSGetter::PHOS() //____________________________________________________________________________ const AliPHOSGeometry * AliPHOSGetter::PHOSGeometry() { + // Returns PHOS geometry + AliPHOSGeometry * rv = 0 ; if (PHOS() ) rv = PHOS()->GetGeometry() ; @@ -633,8 +644,8 @@ TObject** AliPHOSGetter::SDigitsRef(const char * name, const char * foldername) //____________________________________________________________________________ const Bool_t AliPHOSGetter::PostSDigitizer(AliPHOSSDigitizer * sdigitizer) const -{ //---------- SDigitizer ------------------------- - +{ + //---------- SDigitizer ------------------------- // the hierarchy is //Folders/Tasks/SDigitizer/PHOS/sdigitsname @@ -667,6 +678,7 @@ const Bool_t AliPHOSGetter::PostSDigitizer(AliPHOSSDigitizer * sdigitizer) const //____________________________________________________________________________ TObject** AliPHOSGetter::SDigitizerRef(const char * name) const { + //---------- return task SDigitizer ------------------------- TTask * sd = dynamic_cast(fTasksFolder->FindObject("SDigitizer")) ; if ( !sd ) { @@ -686,9 +698,9 @@ TObject** AliPHOSGetter::SDigitizerRef(const char * name) const //____________________________________________________________________________ const Bool_t AliPHOSGetter::PostSDigitizer(const char * name, const char * file) const -{ //---------- SDigitizer ------------------------- - - // the hierarchy is //Folders/Tasks/SDigitizer/PHOS/sdigitsname +{ + //---------- SDigitizer ------------------------- + // the hierarchy is //Folders/Tasks/SDigitizer/PHOS/sdigitsname TTask * sd = dynamic_cast(fTasksFolder->FindObject("SDigitizer")) ; if ( !sd ) { @@ -749,9 +761,9 @@ const Bool_t AliPHOSGetter::PostDigits(const char * name) const //____________________________________________________________________________ TObject** AliPHOSGetter::DigitsRef(const char * name) const -{ //------- Digits ---------------------- - - // the hierarchy is //Folders/Run/Event/Data/PHOS/Digits/name +{ + //------- Digits ---------------------- + // the hierarchy is //Folders/Run/Event/Data/PHOS/Digits/name if ( !fDigitsFolder ) { Fatal("DigitsRef", "Folder //%s not found !", fDigitsFolder) ; @@ -773,7 +785,8 @@ TObject** AliPHOSGetter::DigitsRef(const char * name) const //____________________________________________________________________________ const Bool_t AliPHOSGetter::PostDigitizer(AliPHOSDigitizer * digitizer) const -{ //---------- Digitizer ------------------------- +{ + //---------- Digitizer ------------------------- TTask * sd = dynamic_cast(fTasksFolder->FindObject("Digitizer")) ; @@ -802,9 +815,9 @@ const Bool_t AliPHOSGetter::PostDigitizer(AliPHOSDigitizer * digitizer) const //____________________________________________________________________________ const Bool_t AliPHOSGetter::PostDigitizer(const char * name) const -{ //---------- Digitizer ------------------------- - - // the hierarchy is //Folders/Tasks/SDigitizer/PHOS/sdigitsname +{ + //---------- Digitizer ------------------------- + // the hierarchy is //Folders/Tasks/SDigitizer/PHOS/sdigitsname TTask * d = dynamic_cast(fTasksFolder->FindObject("Digitizer")) ; if ( !d ) { @@ -843,6 +856,7 @@ const Bool_t AliPHOSGetter::PostDigitizer(const char * name) const //____________________________________________________________________________ TObject** AliPHOSGetter::DigitizerRef(const char * name) const { + // -------------- Return Digitizer task ------------------------------------ TTask * sd = dynamic_cast(fTasksFolder->FindObject("Digitizer")) ; if ( !sd ) { Fatal("DigitizerRef", "Task //%s/Digitizer not found !", fTasksFolder) ; @@ -995,7 +1009,8 @@ const Bool_t AliPHOSGetter::PostClusterizer(AliPHOSClusterizer * clu) const //____________________________________________________________________________ TObject** AliPHOSGetter::ClusterizerRef(const char * name) const -{ // ------------------ AliPHOSClusterizer ------------------------ +{ + // ------------------ AliPHOSClusterizer ------------------------ TTask * tasks = dynamic_cast(fTasksFolder->FindObject("Reconstructioner")) ; @@ -1164,8 +1179,8 @@ const Bool_t AliPHOSGetter::PostTrackSegmentMaker(AliPHOSTrackSegmentMaker * tsm } //____________________________________________________________________________ const Bool_t AliPHOSGetter::PostTrackSegmentMaker(const char * name) const -{ //------------Track Segment Maker ------------------------------ - +{ + //------------Track Segment Maker ------------------------------ // the hierarchy is //Folders/Tasks/Reconstructioner/PHOS/sdigitsname TTask * tasks = dynamic_cast(fTasksFolder->FindObject("Reconstructioner")) ; @@ -1207,7 +1222,8 @@ const Bool_t AliPHOSGetter::PostTrackSegmentMaker(const char * name) const //____________________________________________________________________________ TObject** AliPHOSGetter::TSMakerRef(const char * name) const -{ //------------Track Segment Maker ------------------------------ +{ + //------------Track Segment Maker ------------------------------ TTask * tasks = dynamic_cast(fTasksFolder->FindObject("Reconstructioner")) ; @@ -1298,14 +1314,18 @@ TObject** AliPHOSGetter::RecParticlesRef(const char * name) const return phosFolder->GetListOfFolders()->GetObjectRef(tss) ; } //____________________________________________________________________________ -const UShort_t AliPHOSGetter::EventPattern(void){ +const UShort_t AliPHOSGetter::EventPattern(void) +{ + // Return the pattern (trigger bit register) of the beam-test event if(fBTE) return fBTE->GetPattern() ; else return 0 ; } //____________________________________________________________________________ -const Float_t AliPHOSGetter::BeamEnergy(void){ +const Float_t AliPHOSGetter::BeamEnergy(void) +{ + // Return the beam energy of the beam-test event if(fBTE) return fBTE->GetBeamEnergy() ; else @@ -1313,7 +1333,8 @@ const Float_t AliPHOSGetter::BeamEnergy(void){ } //____________________________________________________________________________ const Bool_t AliPHOSGetter::PostPID(AliPHOSPID * pid) const -{ // ------------AliPHOS PID ----------------------------- +{ + // ------------AliPHOS PID ----------------------------- TTask * tasks = dynamic_cast(fTasksFolder->FindObject("Reconstructioner")) ; @@ -1387,7 +1408,8 @@ const Bool_t AliPHOSGetter::PostPID(const char * name) const //____________________________________________________________________________ TObject** AliPHOSGetter::PIDRef(const char * name) const -{ //------------PID ------------------------------ +{ + //------------PID ------------------------------ TTask * tasks = dynamic_cast(fTasksFolder->FindObject("Reconstructioner")) ; @@ -2075,9 +2097,8 @@ Int_t AliPHOSGetter::ReadTreeS(const Int_t event) //____________________________________________________________________________ void AliPHOSGetter::ReadTreeS(TTree * treeS, Int_t input) - -{ // Read the summable digits fron treeS() - +{ + // Read the summable digits fron treeS() TString filename("mergefile") ; filename+= input ; @@ -2494,6 +2515,8 @@ void AliPHOSGetter::RemoveObjects(TString opt, TString name) const //____________________________________________________________________________ void AliPHOSGetter::RemoveSDigits() const { + // Clean SDigit array + TFolder * phos= dynamic_cast(fSDigitsFolder->FindObject("PHOS")) ; if (!phos) return ; @@ -2503,7 +2526,9 @@ void AliPHOSGetter::RemoveSDigits() const } //____________________________________________________________________________ -void AliPHOSGetter::CleanWhiteBoard(void){ +void AliPHOSGetter::CleanWhiteBoard(void) +{ + // Delete all PHOS objects from folders TFolder * phosmain = 0 ; TFolder * phos ; @@ -2657,6 +2682,8 @@ void AliPHOSGetter::CleanWhiteBoard(void){ //____________________________________________________________________________ void AliPHOSGetter::SetTitle(const char * branchTitle ) { + // Set branch titles and add folders with PHOS data + fBranchTitle = branchTitle ; fSDigitsTitle = branchTitle ; fDigitsTitle = branchTitle ; @@ -2730,7 +2757,9 @@ void AliPHOSGetter::SetTitle(const char * branchTitle ) } //____________________________________________________________________________ -void AliPHOSGetter::CloseSplitFiles(void){ +void AliPHOSGetter::CloseSplitFiles(void) +{ + // Close files opened in a split mode TFile * file ; file = static_cast(gROOT->GetFile(fSDigitsFileName.Data() ) ) ; if(file) diff --git a/PHOS/AliPHOSGetter.h b/PHOS/AliPHOSGetter.h index 0a7f911cd65..7c40cf34847 100644 --- a/PHOS/AliPHOSGetter.h +++ b/PHOS/AliPHOSGetter.h @@ -114,7 +114,7 @@ class AliPHOSGetter : public TObject { //=========== SDigits ============== TTree * TreeS(TString filename="") ; - TClonesArray * SDigits(const char * name = 0, const char * file=0) { + TClonesArray * SDigits(const char * name = 0, const char * file=0) const { return dynamic_cast(ReturnO("SDigits", name, file)) ; } //const AliPHOSDigit * SDigit(Int_t index) { return static_cast(SDigits()->At(index)) ;} !!! why no such method ? const AliPHOSSDigitizer * SDigitizer(const char * name =0) const { @@ -221,7 +221,7 @@ private: private: - static TFile * fFile; //! + static TFile * fgFile; //! Bool_t fToSplit ; //! Do we work in the split mode AliPHOSBeamTestEvent * fBTE ; //! Header if BeamTest Event TString fHeaderFile ; //! File in which gAlice lives diff --git a/PHOS/AliPHOSHit.cxx b/PHOS/AliPHOSHit.cxx index 4185f61cff6..18a6070c29c 100644 --- a/PHOS/AliPHOSHit.cxx +++ b/PHOS/AliPHOSHit.cxx @@ -22,18 +22,15 @@ //*-- Author: Maxime Volkov (RRC KI) & Yves Schutz (SUBATECH) & Dmitri Peressounko (RRC KI & SUBATECH) // --- ROOT system --- +#include "TVector3.h" // --- Standard library --- -#include -#include // --- AliRoot header files --- #include "AliPHOSHit.h" #include "AliRun.h" -#include "AliConst.h" -#include "AliPHOSGetter.h" -#include "AliPHOSGeometry.h" #include "AliPHOS.h" +#include "AliPHOSGeometry.h" ClassImp(AliPHOSHit) @@ -147,4 +144,23 @@ ostream& operator << (ostream& out, const AliPHOSHit& hit) } + + + + + + + + + + + + + + + + + + + diff --git a/PHOS/AliPHOSHit.h b/PHOS/AliPHOSHit.h index c8dd1e3f31f..f792c0eb3ad 100644 --- a/PHOS/AliPHOSHit.h +++ b/PHOS/AliPHOSHit.h @@ -12,7 +12,6 @@ //*-- Author: Maxime Volkov (RRC KI) & Yves Schutz (SUBATECH) // --- ROOT system --- -#include // --- AliRoot header files --- #include "AliHit.h" diff --git a/PHOS/AliPHOSIhepAnalyze.cxx b/PHOS/AliPHOSIhepAnalyze.cxx index 09d7bb31b39..04c78538b74 100644 --- a/PHOS/AliPHOSIhepAnalyze.cxx +++ b/PHOS/AliPHOSIhepAnalyze.cxx @@ -497,15 +497,15 @@ void AliPHOSIhepAnalyze::AnalyzeCPV2(Int_t Nevents) // 24 March 2001 - TH1F* hDrij_cpv_r = new TH1F("Drij_cpv_r","Distance between reconstructed hits in CPV",140,0,50); - TH1F* hDrij_cpv_g = new TH1F("Drij_cpv_g","Distance between generated hits in CPV",140,0,50); - TH1F* hDrij_cpv_ratio = new TH1F("Drij_cpv_ratio","R_{ij}^{rec}/R_{ij}^{gen} in CPV",140,0,50); + TH1F* hDrijCpvR = new TH1F("DrijCpvR","Distance between reconstructed hits in CPV",140,0,50); + TH1F* hDrijCpvG = new TH1F("Drij_cpv_g","Distance between generated hits in CPV",140,0,50); + TH1F* hDrijCpvRatio = new TH1F("DrijCpvRatio","R_{ij}^{rec}/R_{ij}^{gen} in CPV",140,0,50); // TH1F* hT0 = new TH1F("hT0","Type of entering particle",20000,-10000,10000); - hDrij_cpv_r->Sumw2(); - hDrij_cpv_g->Sumw2(); - hDrij_cpv_ratio->Sumw2(); //correct treatment of errors + hDrijCpvR->Sumw2(); + hDrijCpvG->Sumw2(); + hDrijCpvRatio->Sumw2(); //correct treatment of errors TList * fCpvImpacts = new TList(); TBranch * branchCPVimpacts; @@ -519,8 +519,8 @@ void AliPHOSIhepAnalyze::AnalyzeCPV2(Int_t Nevents) Int_t ntracks = gAlice->GetEvent(nev); please->Event(nev); - Int_t nrec_cpv = 0; // Reconstructed points in event - Int_t ngen_cpv = 0; // Impacts in event + Int_t nrecCPV = 0; // Reconstructed points in event + Int_t ngenCPV = 0; // Impacts in event // Get branch of CPV impacts if (! (branchCPVimpacts =gAlice->TreeH()->GetBranch("PHOSCpvImpacts")) ) return; @@ -557,19 +557,19 @@ void AliPHOSIhepAnalyze::AnalyzeCPV2(Int_t Nevents) Int_t nsum = hitsPerModule[iModule]->GetEntriesFast(); printf("CPV module %d has %d hits\n",iModule,nsum); - AliPHOSImpact* GenHit1; - AliPHOSImpact* GenHit2; + AliPHOSImpact* genHit1; + AliPHOSImpact* genHit2; Int_t irp1,irp2; for(irp1=0; irp1< nsum; irp1++) { - GenHit1 = (AliPHOSImpact*)((hitsPerModule[iModule])->At(irp1)); + genHit1 = (AliPHOSImpact*)((hitsPerModule[iModule])->At(irp1)); for(irp2 = irp1+1; irp2At(irp2)); - Float_t dx = GenHit1->X() - GenHit2->X(); - Float_t dz = GenHit1->Z() - GenHit2->Z(); + genHit2 = (AliPHOSImpact*)((hitsPerModule[iModule])->At(irp2)); + Float_t dx = genHit1->X() - genHit2->X(); + Float_t dz = genHit1->Z() - genHit2->Z(); Float_t dr = TMath::Sqrt(dx*dx + dz*dz); - hDrij_cpv_g->Fill(dr); + hDrijCpvG->Fill(dr); // Info("AnalyzeCPV1", "(dx dz dr): %f %f", dx, dz); } } @@ -579,48 +579,48 @@ void AliPHOSIhepAnalyze::AnalyzeCPV2(Int_t Nevents) //--------- Combinatoric distance between rec. hits in CPV TObjArray* cpvRecPoints = please->CpvRecPoints(); - nrec_cpv = cpvRecPoints->GetEntriesFast(); + nrecCPV = cpvRecPoints->GetEntriesFast(); - if(nrec_cpv) + if(nrecCPV) { - AliPHOSCpvRecPoint* RecHit1; - AliPHOSCpvRecPoint* RecHit2; - TIter next_cpv_rec1(cpvRecPoints); - while(TObject* obj1 = next_cpv_rec1() ) + AliPHOSCpvRecPoint* recHit1; + AliPHOSCpvRecPoint* recHit2; + TIter nextCPVrec1(cpvRecPoints); + while(TObject* obj1 = nextCPVrec1() ) { - TIter next_cpv_rec2(cpvRecPoints); - while (TObject* obj2 = next_cpv_rec2()) + TIter nextCPVrec2(cpvRecPoints); + while (TObject* obj2 = nextCPVrec2()) { if(!obj2->IsEqual(obj1)) { - RecHit1 = (AliPHOSCpvRecPoint*)obj1; - RecHit2 = (AliPHOSCpvRecPoint*)obj2; + recHit1 = (AliPHOSCpvRecPoint*)obj1; + recHit2 = (AliPHOSCpvRecPoint*)obj2; TVector3 locpos1; TVector3 locpos2; - RecHit1->GetLocalPosition(locpos1); - RecHit2->GetLocalPosition(locpos2); + recHit1->GetLocalPosition(locpos1); + recHit2->GetLocalPosition(locpos2); Float_t dx = locpos1.X() - locpos2.X(); Float_t dz = locpos1.Z() - locpos2.Z(); Float_t dr = TMath::Sqrt(dx*dx + dz*dz); - if(RecHit1->GetPHOSMod() == RecHit2->GetPHOSMod()) - hDrij_cpv_r->Fill(dr); + if(recHit1->GetPHOSMod() == recHit2->GetPHOSMod()) + hDrijCpvR->Fill(dr); } } } } Info("AnalyzeCPV1", " Event %d . Total of %d hits, %d rec.points.", - nev, ngen_cpv, nrec_cpv) ; + nev, ngenCPV, nrecCPV) ; delete [] hitsPerModule; } // End of loop over events. -// hDrij_cpv_g->Draw(); -// hDrij_cpv_r->Draw(); - hDrij_cpv_ratio->Divide(hDrij_cpv_r,hDrij_cpv_g); - hDrij_cpv_ratio->Draw(); +// hDrijCpvG->Draw(); +// hDrijCpvR->Draw(); + hDrijCpvRatio->Divide(hDrijCpvR,hDrijCpvG); + hDrijCpvRatio->Draw(); // hT0->Draw(); @@ -729,8 +729,8 @@ void AliPHOSIhepAnalyze::HitsCPV(TClonesArray& hits, Int_t nev) Int_t ntracks = gAlice->GetEvent(nev); please->Event(nev); -// Int_t nrec_cpv = 0; // Reconstructed points in event // 01.10.2001 -// Int_t ngen_cpv = 0; // Impacts in event +// Int_t nrecCPV = 0; // Reconstructed points in event // 01.10.2001 +// Int_t ngenCPV = 0; // Impacts in event // Get branch of CPV impacts if (! (branchCPVimpacts =gAlice->TreeH()->GetBranch("PHOSCpvImpacts")) ) return; @@ -831,11 +831,11 @@ void AliPHOSIhepAnalyze::HitsCPV(TClonesArray& hits, Int_t nev) // Info("AnalyzeCPV1", " PHOS module "<GetEntries()<<" charged CPV hits."); // } -Bool_t AliPHOSIhepAnalyze::IsCharged(Int_t pdg_code) +Bool_t AliPHOSIhepAnalyze::IsCharged(Int_t pdgCode) { // For HIJING - Info("AnalyzeCPV1", "pdg_code %d", pdg_code); - if(pdg_code==211 || pdg_code==-211 || pdg_code==321 || pdg_code==-321 || pdg_code==11 || pdg_code==-11 || pdg_code==2212 || pdg_code==-2212) return kTRUE; + Info("AnalyzeCPV1", "pdgCode %d", pdgCode); + if(pdgCode==211 || pdgCode==-211 || pdgCode==321 || pdgCode==-321 || pdgCode==11 || pdgCode==-11 || pdgCode==2212 || pdgCode==-2212) return kTRUE; else return kFALSE; } diff --git a/PHOS/AliPHOSIhepAnalyze.h b/PHOS/AliPHOSIhepAnalyze.h index 7601ecc4867..8d8b9e157cb 100644 --- a/PHOS/AliPHOSIhepAnalyze.h +++ b/PHOS/AliPHOSIhepAnalyze.h @@ -24,21 +24,22 @@ class AliPHOSIhepAnalyze : public TObject { AliPHOSIhepAnalyze() ; // ctor AliPHOSIhepAnalyze(Text_t * name) ; // ctor - + virtual ~AliPHOSIhepAnalyze(void) ; // dtor + void AnalyzeCPV1(Int_t Nevents); // resolutions, mult and cluster lengths for CPV void AnalyzeEMC1(Int_t Nevents); // resolutions, mult and cluster lengths for EMC void AnalyzeCPV2(Int_t Nevents); // delta(gen)/delta(rec) between hits void CpvSingle(Int_t Nevents); // signle particle analysis virtual void HitsCPV(TClonesArray& hits, Int_t event); - TString GetFileName() { return fFileName; } + const TString GetFileName() const { return fFileName; } private: - Bool_t IsCharged(Int_t pdg_code); + Bool_t IsCharged(Int_t pdgCode); private: - TString fFileName; + TString fFileName; //Name of file analyzed ClassDef(AliPHOSIhepAnalyze,1) // PHOSv1 event analyzis algorithm diff --git a/PHOS/AliPHOSImpact.cxx b/PHOS/AliPHOSImpact.cxx index dd66ec79b29..81ad525a8a6 100644 --- a/PHOS/AliPHOSImpact.cxx +++ b/PHOS/AliPHOSImpact.cxx @@ -71,7 +71,10 @@ AliPHOSImpact::AliPHOSImpact(Int_t shunt, Int_t primary, Int_t track, Int_t pid, //____________________________________________________________________________ void AliPHOSImpact::Print() { + //Print information of the impact printf("Impact Pid=%4d, p=(%6.2f,%6.2f,%6.2f,%6.2f) GeV, x=(%6.1f,%6.1f,%6.1f) cm\n", fPid,fMomentum.Px(),fMomentum.Py(),fMomentum.Pz(),fMomentum.E(), fX,fY,fZ); } + + diff --git a/PHOS/AliPHOSJet.cxx b/PHOS/AliPHOSJet.cxx index a3ef8e47efe..5249d95005a 100644 --- a/PHOS/AliPHOSJet.cxx +++ b/PHOS/AliPHOSJet.cxx @@ -13,9 +13,14 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ +/* $Id$ */ + //_________________________________________________________________________ // Class to calculate jet chararacteristics // +// This class implements for PHOS a jet finder for PHOS. It depends on a +// energy seed +// minimum energy, cone radius and movement of the cone. //*-- Author : D.Peressounko ////////////////////////////////////////////////////////////////////////////// @@ -32,6 +37,7 @@ ClassImp(AliPHOSJet) //____________________________________________________________________________ AliPHOSJet::AliPHOSJet():TObject() { + //Inicilize members fNpart = 0 ; fList = 0 ; // fMode = 0 ; @@ -52,6 +58,7 @@ AliPHOSJet::AliPHOSJet():TObject() { //____________________________________________________________________________ AliPHOSJet::~AliPHOSJet(){ + //dtor if(fList){ delete fList ; fList = 0 ; @@ -190,7 +197,8 @@ Bool_t AliPHOSJet::AcceptConeDeviation(const Double_t e,const Double_t eta,const } //____________________________________________________________________________ Bool_t AliPHOSJet::IsInCone(const TParticle * p)const -{// +{ + //Say if particle is inside the defined cone Double_t dEta ; Double_t dPhi ; if(!fEnergy){ //Final values not calculated yet, use intermediate @@ -216,7 +224,8 @@ Bool_t AliPHOSJet::IsInCone(const TParticle * p)const } //____________________________________________________________________________ Bool_t AliPHOSJet::IsInCone(const Double_t e,const Double_t eta,const Double_t phi)const -{// +{ + //Says if particle is inside the defined cone Double_t dEta ; Double_t dPhi ; if(!fEnergy){ //Final values not calculated yet, use intermediate @@ -260,7 +269,7 @@ Double_t AliPHOSJet::DistanceToJet(const TParticle *p)const{ } //____________________________________________________________________________ void AliPHOSJet::CalculateAll(void){ - + //Calculate all jet parameters if(fSumEnergy==0) return ; //Nothing to calculate @@ -274,6 +283,7 @@ void AliPHOSJet::CalculateAll(void){ } //____________________________________________________________________________ void AliPHOSJet::Print(Option_t * option){ + //Print jet parameters printf("-------------- AliPHOSJet ------------\n") ; printf(" Energy............. %f \n",fEnergy) ; printf(" Eta................ %f \n",fEta ) ; @@ -284,3 +294,6 @@ void AliPHOSJet::Print(Option_t * option){ printf(" N particles in jet %d \n",fNpart) ; printf("----------------------------------\n") ; } + + + diff --git a/PHOS/AliPHOSJet.h b/PHOS/AliPHOSJet.h index e547630e79b..1419fe3a805 100644 --- a/PHOS/AliPHOSJet.h +++ b/PHOS/AliPHOSJet.h @@ -1,8 +1,10 @@ -#ifndef ALIJET_H -#define ALIJET_H +#ifndef ALIPHOSJET_H +#define ALIPHOSJET_H /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ +/* $Id$ */ + //_________________________________________________________________________ // Base Class for Jets in ALICE // @@ -22,7 +24,10 @@ class AliPHOSJet : public TObject { public: AliPHOSJet() ; // ctor - AliPHOSJet(const AliPHOSJet & jet){} ; // ctor + AliPHOSJet(const AliPHOSJet & jet) { + // copy ctor: no implementation yet + Fatal("cpy ctor", "not implemented") ; + } virtual ~AliPHOSJet() ; void AddDigit(const Double_t e,const Double_t eta,const Double_t phi,const Int_t index) ; @@ -56,14 +61,18 @@ public: Int_t GetNJetParticles(void)const{return fNpart;} void Print(Option_t * option="") ; + AliPHOSJet & operator = (const AliPHOSJet & rvalue) { + // assignement operator requested by coding convention but not needed + Fatal("operator =", "not implemented") ; return *this ; + } private: Int_t fNpart ; //Number of particles in jet TArrayI * fList ; //Indexes of particles in list - Double_t fConeRad ; - Double_t fMaxConeMove ; - Double_t fMinConeMove ; + Double_t fConeRad ; // Cone radius + Double_t fMaxConeMove ;// Maximum Cone movement + Double_t fMinConeMove ;// Minimum Cone movement Double_t fSumEnergy ; //! Intermediate energy Double_t fSumEta ; //! Intermediate eta Double_t fSumPhi ; //! Intermediate phi @@ -78,4 +87,11 @@ private: }; -#endif // ALIJET_H +////////////////////////////////////////////////////// + +#endif // ALIPHOSJET_H + + + + + diff --git a/PHOS/AliPHOSJetFinder.cxx b/PHOS/AliPHOSJetFinder.cxx index 1258825da39..a94cb162855 100644 --- a/PHOS/AliPHOSJetFinder.cxx +++ b/PHOS/AliPHOSJetFinder.cxx @@ -15,8 +15,9 @@ //_________________________________________________________________________ // C++ version of UA2 and/or Lund jet finding algorithm -// UA1 jet algorithm from LUND JETSET (LUCELL) -// +// UA1 jet algorithm from LUND JETSET (LUCELL) +// Find jets at the level of no detector and Digits. +// Needs modifications. //*-- Author : D.Peressounko after UA1 coll. etc ////////////////////////////////////////////////////////////////////////////// @@ -40,7 +41,8 @@ ClassImp(AliPHOSJetFinder) //____________________________________________________________________________ AliPHOSJetFinder::AliPHOSJetFinder():TNamed("AliPHOSJetFinder","") { - fNJets = 0 ; + //Initialize jet parameters + fNJets = 0 ; fMode = 0 ; //No iterations fStatusCode = -999 ; //no selection @@ -61,6 +63,7 @@ ClassImp(AliPHOSJetFinder) //____________________________________________________________________________ AliPHOSJetFinder::~AliPHOSJetFinder() { + //dtor if(fParticles){ delete fParticles ; fParticles = 0 ; @@ -74,7 +77,7 @@ ClassImp(AliPHOSJetFinder) //____________________________________________________________________________ void AliPHOSJetFinder::FindJetsFromParticles(const TClonesArray * plist,TObjArray * jetslist) { - + //Find jets in the case without detector. TIter next(plist) ; TIter nextJet(jetslist) ; @@ -160,7 +163,7 @@ void AliPHOSJetFinder::FindJetsFromParticles(const TClonesArray * plist,TObjArr } //____________________________________________________________________________ void AliPHOSJetFinder::FindJetsFromDigits(const TClonesArray * digits, TObjArray * jets){ - + //Find jets in the case witht detector at the level of digits. if(digits->GetEntries()==0){ Error("JetsFromDigits","No entries in digits list \n") ; return ; @@ -314,6 +317,7 @@ Double_t AliPHOSJetFinder::Calibrate(const AliPHOSDigit * digit){ } //____________________________________________________________________________ void AliPHOSJetFinder::CalculateEEtaPhi(const AliPHOSDigit * d,Double_t &e, Double_t &eta, Double_t &phi){ + //Calculate direction of the jet e=Calibrate(d) ; AliPHOSGeometry * geom = AliPHOSGeometry::GetInstance("GPS2","") ; TVector3 pos ; @@ -323,6 +327,7 @@ void AliPHOSJetFinder::CalculateEEtaPhi(const AliPHOSDigit * d,Double_t &e, Doub } //____________________________________________________________________________ void AliPHOSJetFinder::Print(Option_t * option){ + //Print parameters of the found jet printf("\n --------------- AliPHOSJetFinder --------------- \n") ; printf(" Jets found .........%d \n",fNJets) ; printf(" Seed energy cut ....%f \n",fEtSeed) ; diff --git a/PHOS/AliPHOSJetFinder.h b/PHOS/AliPHOSJetFinder.h index 9f1e2158e38..7dd66dbc6ad 100644 --- a/PHOS/AliPHOSJetFinder.h +++ b/PHOS/AliPHOSJetFinder.h @@ -22,7 +22,10 @@ class AliPHOSJetFinder : public TNamed { public: AliPHOSJetFinder() ; // ctor - + AliPHOSJetFinder(const AliPHOSJetFinder & jet) { + // copy ctor: no implementation yet + Fatal("cpy ctor", "not implemented") ; + } virtual ~AliPHOSJetFinder() ; // dtor void FindJetsFromParticles(const TClonesArray * plist,TObjArray * jetslist) ; //Do the job @@ -36,28 +39,32 @@ public: void SetMaxConeMove(Double_t move){fMaxConeMove=move ; } ; void SetMinConeMove(Double_t move){fMinConeMove=move ; } ; void SetStatusCode(Int_t stc = 1){fStatusCode=stc ;} ; + AliPHOSJetFinder & operator = (const AliPHOSJetFinder & rvalue) { + // assignement operator requested by coding convention but not needed + Fatal("operator =", "not implemented") ; return *this ; + } private: Double_t Calibrate(const AliPHOSDigit * digit) ; void CalculateEEtaPhi(const AliPHOSDigit * d,Double_t &e, Double_t &Eta, Double_t &phi); private: - Int_t fNJets ; + Int_t fNJets ; //Number of jets Int_t fStatusCode ; //Status code of particles to handle Int_t fMode ; //Mode for background calculation Double_t fConeRad ; //Maximal radius of jet - Double_t fMaxConeMove ; - Double_t fMinConeMove ; - Double_t fEtSeed ; - Double_t fEtMin ; - Double_t fPrecBg ; - Double_t fSimGain ; - Double_t fSimPedestal ; + Double_t fMaxConeMove ; //Maximal cone movement + Double_t fMinConeMove ; //Minimum cone movement + Double_t fEtSeed ; //Transversal energy seed + Double_t fEtMin ; //Minimal transversal energy + Double_t fPrecBg ; //Precision due to background? + Double_t fSimGain ; //Simulated digit gain + Double_t fSimPedestal ; //Simulated digit pedestal - TClonesArray * fParticles ; - TObjArray * fJets ; + TClonesArray * fParticles ; //Particles array + TObjArray * fJets ; //Jets array ClassDef(AliPHOSJetFinder,1) //Class to find Jets diff --git a/PHOS/AliPHOSLink.h b/PHOS/AliPHOSLink.h index e17576f8968..6b99cd5c800 100644 --- a/PHOS/AliPHOSLink.h +++ b/PHOS/AliPHOSLink.h @@ -28,15 +28,15 @@ public: // dtor } Int_t Compare(const TObject * obj) const; - Int_t GetEmc(void) { + const Int_t GetEmc(void) const { // returns the index of EMC return fEmcN; } - Int_t GetPpsd(void) { + const Int_t GetPpsd(void) const { // returns the index of PPSD return fPpsdN ; } - Float_t GetR(void) { + const Float_t GetR(void) const { // returns the distance between EMC and PPSD return fR ; } -- 2.39.3