]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Coding violations corrected
authorgustavo <gustavo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 14 Nov 2007 15:34:05 +0000 (15:34 +0000)
committergustavo <gustavo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 14 Nov 2007 15:34:05 +0000 (15:34 +0000)
EMCAL/AliEMCALGeometry.cxx
EMCAL/AliEMCALGeometry.h
EMCAL/AliEMCALRecPoint.cxx
EMCAL/AliEMCALRecPoint.h
EMCAL/AliEMCALSuperModule.cxx
EMCAL/AliEMCALSuperModule.h

index 161eb28263e9b2f14e1f73b62f618fd56e642966..b6cba1b5b5ea3f848ca40190c8ff696f54fd9c35 100644 (file)
@@ -36,7 +36,7 @@
 
 #include <assert.h>
 
-// --- AliRoot header files ---
+// --- Root header files ---
 #include <Riostream.h>
 #include <TBrowser.h>
 #include <TClonesArray.h>
@@ -412,7 +412,6 @@ void AliEMCALGeometry::Init(void){
   if(fGeoName.Contains("WSUC")) fNumberOfSuperModules = 1; // Jul 12, 2007
 
   fgInit = kTRUE; 
-  AliInfo(" is ended");  
 }
 
 void AliEMCALGeometry::PrintGeometry()
@@ -500,7 +499,6 @@ void AliEMCALGeometry::PrintGeometry()
       }
     }
   }
-  cout<<endl;
 }
 
 void AliEMCALGeometry::PrintCellIndexes(Int_t absId, int pri, char *tit)
@@ -855,7 +853,7 @@ Bool_t AliEMCALGeometry::RelPosCellInSModule(Int_t absId, Double_t &xr, Double_t
 
   // Shift index taking into account the difference between standard SM 
   // and SM of half size in phi direction
-  const Int_t phiIndexShift = fCentersOfCellsPhiDir.GetSize()/4; // Nov 22, 2006; was 6 for cas 2X2
+  const Int_t kphiIndexShift = fCentersOfCellsPhiDir.GetSize()/4; // Nov 22, 2006; was 6 for cas 2X2
   static Int_t nSupMod, nModule, nIphi, nIeta, iphi, ieta;
   if(!CheckAbsCellId(absId)) return kFALSE;
 
@@ -868,7 +866,7 @@ Bool_t AliEMCALGeometry::RelPosCellInSModule(Int_t absId, Double_t &xr, Double_t
   if(nSupMod<10) {
     yr = fCentersOfCellsPhiDir.At(iphi);
   } else {
-    yr = fCentersOfCellsPhiDir.At(iphi + phiIndexShift);
+    yr = fCentersOfCellsPhiDir.At(iphi + kphiIndexShift);
   }
   AliDebug(1,Form("absId %i nSupMod %i iphi %i ieta %i xr %f yr %f zr %f ",absId,nSupMod,iphi,ieta,xr,yr,zr));
 
@@ -912,7 +910,7 @@ Bool_t AliEMCALGeometry::RelPosCellInSModule(Int_t absId, Double_t distEff, Doub
 
   // Shift index taking into account the difference between standard SM 
   // and SM of half size in phi direction
-  const  Int_t phiIndexShift = fCentersOfCellsPhiDir.GetSize()/4; // Nov 22, 2006; was 6 for cas 2X2
+  const  Int_t kphiIndexShift = fCentersOfCellsPhiDir.GetSize()/4; // Nov 22, 2006; was 6 for cas 2X2
   static Int_t nSupMod, nModule, nIphi, nIeta, iphi, ieta;
   static Int_t iphim, ietam;
   static AliEMCALShishKebabTrd1Module *mod = 0;
@@ -931,7 +929,7 @@ Bool_t AliEMCALGeometry::RelPosCellInSModule(Int_t absId, Double_t distEff, Doub
   if(nSupMod<10) {
     yr = fCentersOfCellsPhiDir.At(iphi);
   } else {
-    yr = fCentersOfCellsPhiDir.At(iphi + phiIndexShift);
+    yr = fCentersOfCellsPhiDir.At(iphi + kphiIndexShift);
   }
   AliDebug(1,Form("absId %i nSupMod %i iphi %i ieta %i xr %f yr %f zr %f ",absId,nSupMod,iphi,ieta,xr,yr,zr));
 
@@ -953,7 +951,7 @@ Bool_t AliEMCALGeometry::RelPosCellInSModule(Int_t absId, Int_t maxAbsId, Double
 
   // Shift index taking into account the difference between standard SM 
   // and SM of half size in phi direction
-  const  Int_t phiIndexShift = fCentersOfCellsPhiDir.GetSize()/4; // Nov 22, 2006; was 6 for cas 2X2
+  const  Int_t kphiIndexShift = fCentersOfCellsPhiDir.GetSize()/4; // Nov 22, 2006; was 6 for cas 2X2
   static Int_t nSupMod, nModule, nIphi, nIeta, iphi, ieta;
   static Int_t iphim, ietam;
   static AliEMCALShishKebabTrd1Module *mod = 0;
@@ -995,7 +993,7 @@ Bool_t AliEMCALGeometry::RelPosCellInSModule(Int_t absId, Int_t maxAbsId, Double
   if(nSupMod<10) {
     yr = fCentersOfCellsPhiDir.At(iphi);
   } else {
-    yr = fCentersOfCellsPhiDir.At(iphi + phiIndexShift);
+    yr = fCentersOfCellsPhiDir.At(iphi + kphiIndexShift);
   }
   AliDebug(1,Form("absId %i nSupMod %i iphi %i ieta %i xr %f yr %f zr %f ",absId,nSupMod,iphi,ieta,xr,yr,zr));
 
@@ -1050,7 +1048,7 @@ void AliEMCALGeometry::CreateListOfTrd1Modules()
   fCentersOfCellsPhiDir.Set(fNPhi*fNPHIdiv);
   fPhiCentersOfCells.Set(fNPhi*fNPHIdiv);
 
-  Double_t R0 = GetIPDistance() + GetLongModuleSize()/2.;
+  Double_t r0 = GetIPDistance() + GetLongModuleSize()/2.;
   for(Int_t it=0; it<fNPhi; it++) { // cycle on modules
     ytCenterModule = -fParSM[1] + fPhiModuleSize*(2*it+1)/2;  // center of module
     for(Int_t ic=0; ic<fNPHIdiv; ic++) { // cycle on cells in module
@@ -1065,7 +1063,7 @@ void AliEMCALGeometry::CreateListOfTrd1Modules()
       // Define grid on phi direction
       // Grid is not the same for different eta bin;
       // Effect is small but is still here
-      phi = TMath::ATan2(ytCenterCell, R0);
+      phi = TMath::ATan2(ytCenterCell, r0);
       fPhiCentersOfCells.AddAt(phi, ind);
 
       AliDebug(2,Form(" ind %2.2i : y %8.3f ", ind, fCentersOfCellsPhiDir.At(ind))); 
@@ -1349,19 +1347,22 @@ AliEMCALShishKebabTrd1Module* AliEMCALGeometry::GetShishKebabModule(Int_t neta)
   return trd1;
 }
 
-void AliEMCALGeometry::Browse(TBrowser* b)
+void AliEMCALGeometry::Browse(TBrowser* b) const
 {
+  //Browse the modules
   if(fShishKebabTrd1Modules) b->Add(fShishKebabTrd1Modules);
 }
 
 Bool_t AliEMCALGeometry::IsFolder() const
 {
+  //Check if fShishKebabTrd1Modules is in folder
   if(fShishKebabTrd1Modules) return kTRUE;
   else                       return kFALSE;
 }
 
 Double_t AliEMCALGeometry::GetPhiCenterOfSM(Int_t nsupmod) const
 {
+  //returns center of supermodule in phi 
   static int i = nsupmod/2;
   return fPhiCentersOfSM[i];
 
index 12069361f1c0009653eff29d71922ce67e82e0f8..2c313886f1922b54e8cb3378e6ff43411e7e9fee 100644 (file)
@@ -20,14 +20,20 @@ class TObjArray;
 class TVector3;
 class TGeoMatrix;
 class TParticle ; 
-class AliEMCALGeometry;
-class AliEMCALShishKebabTrd1Module;
-class AliEMCALRecPoint;
 class TClonesArray ;
+#include <TMath.h>
+#include <TArrayD.h>
+class assert;
+class Riostream;
+class TClonesArray;
+class TGeoNode;
+class TGeoManager;
 
 // --- AliRoot header files ---
-#include <TArrayD.h>
-#include <TMath.h>
+class AliEMCALGeometry;
+class AliEMCALShishKebabTrd1Module;
+class AliEMCALRecPoint;
+class AliEMCALDigit;
 
 #include "AliGeometry.h"
 
@@ -47,7 +53,7 @@ public:
   static Char_t* GetDefaulGeometryName() {return fgDefaultGeometryName;}
   void PrintGeometry();                                           //*MENU*  
   void PrintCellIndexes(Int_t absId=0, int pri=0, char *tit="");  //*MENU*
-  virtual void Browse(TBrowser* b);
+  virtual void Browse(TBrowser* b) const ;
   virtual Bool_t  IsFolder() const;
 
   void GetCellPhiEtaIndexInSModuleFromTRUIndex(Int_t itru, Int_t iphitru, Int_t ietatru, Int_t &ietaSM, Int_t &iphiSM) const ; // Tranforms Eta-Phi Cell index in TRU into Eta-Phi index in Super Module
@@ -306,9 +312,8 @@ private:
   char *fAdditionalOpts[6];  //! some additional options for the geometry type and name
   int  fNAdditionalOpts;     //! size of additional options parameter
 
-  // Options for Geant (MIP business) - will call in AliEMCAL
-  Int_t fILOSS;
-  Int_t fIHADR;
+  Int_t fILOSS; // Options for Geant (MIP business) - will call in AliEMCAL
+  Int_t fIHADR; // Options for Geant (MIP business) - will call in AliEMCAL
 
   ClassDef(AliEMCALGeometry, 13) // EMCAL geometry class 
 };
index 94b38907f965815469aafa120492f32a02ea2fcd..d4d633e5344aa19f9c5f2d1945fa6b54ad962249 100644 (file)
@@ -155,6 +155,8 @@ AliEMCALRecPoint::~AliEMCALRecPoint()
 //____________________________________________________________________________
 AliEMCALRecPoint& AliEMCALRecPoint::operator= (const AliEMCALRecPoint &rp)
 {
+  // assignment operator
+
   if(&rp == this) return *this;
 
   fGeomPtr = rp.fGeomPtr;
@@ -711,15 +713,15 @@ void AliEMCALRecPoint::GetDeffW0(const Double_t esum , Double_t &deff,  Double_t
   // Look to:  http://rhic.physics.wayne.edu/~pavlinov/ALICE/SHISHKEBAB/RES/CALIB/GEOMCORR/deffandW0VaEgamma_2.gif
   //
   static Double_t e=0.0;
-  const  Double_t dp0=9.25147, dp1=1.16700; // Hard coded now
-  const  Double_t wp0=4.83713, wp1=-2.77970e-01, wp2 = 4.41116;
+  const  Double_t kdp0=9.25147, kdp1=1.16700; // Hard coded now
+  const  Double_t kwp0=4.83713, kwp1=-2.77970e-01, kwp2 = 4.41116;
 
   // No extrapolation here
   e = esum<0.5?0.5:esum;
   e = e>100.?100.:e;
 
-  deff = dp0 + dp1*TMath::Log(e);
-  w0   = wp0 / (1. + TMath::Exp(wp1*(e+wp2)));
+  deff = kdp0 + kdp1*TMath::Log(e);
+  w0   = kwp0 / (1. + TMath::Exp(kwp1*(e+kwp2)));
   //printf("<I> AliEMCALRecPoint::GetDeffW0 esum %5.2f : deff %5.2f : w0 %5.2f \n", esum, deff, w0); 
 }
 
@@ -1157,7 +1159,7 @@ Double_t AliEMCALRecPoint::TmaxInCm(const Double_t e , const Int_t key)
   // key  =  0(gamma, default)
   //     !=  0(electron)
   static Double_t ca = 4.82;  // shower max parameter - first guess; ca=TMath::Log(1000./8.07)
-  static Double_t X0 = 1.23;  // radiation lenght (cm)
+  static Double_t x0 = 1.23;  // radiation lenght (cm)
   static Double_t tmax = 0.;   // position of electromagnetic shower max in cm
 
   tmax = 0.0;
@@ -1165,7 +1167,7 @@ Double_t AliEMCALRecPoint::TmaxInCm(const Double_t e , const Int_t key)
     tmax = TMath::Log(e) + ca;
     if      (key==0) tmax += 0.5; 
     else             tmax -= 0.5;
-    tmax *= X0; // convert to cm
+    tmax *= x0; // convert to cm
   }
   return tmax;
 }
@@ -1228,6 +1230,7 @@ void AliEMCALRecPoint::Print(Option_t *opt) const
 //___________________________________________________________
 Double_t  AliEMCALRecPoint::GetPointEnergy() const
 {
+  //Returns energy ....
   static double e;
   e=0.0;
   for(int ic=0; ic<GetMultiplicity(); ic++) e += double(fEnergyList[ic]);
index 772eff5132f2ab034c62d2cca200a1495c1e6070..79d5272317151d9adf61bb3f12b2a6dc7fe56b85 100644 (file)
 
 // --- ROOT system ---
 #include <TVector3.h>
+class TGeoManager;
+class TGeoPhysicalNode;
+class TPad;
+class TPaveText;
+class TGraph;
+class Riostream;
 
 // --- Standard library ---
 
@@ -20,6 +26,7 @@
 class AliEMCALDigit;
 class AliDigitNew;
 class AliEMCALGeometry;
+class  AliEMCALHit;
 
 class AliEMCALRecPoint : public AliCluster {
 
@@ -35,7 +42,7 @@ class AliEMCALRecPoint : public AliCluster {
 
   virtual ~AliEMCALRecPoint();
 
-  virtual void    AddDigit(AliDigitNew &){ 
+  virtual void    AddDigit(AliDigitNew &) const 
     Fatal("AddDigit", "use AddDigit(AliEMCALDigit & digit, Float_t Energy )") ; 
   }
   virtual void    AddDigit(AliEMCALDigit & digit, Float_t Energy); 
@@ -88,8 +95,8 @@ class AliEMCALRecPoint : public AliCluster {
   Int_t       GetMultiplicityAtLevel(Float_t level) const ;  // computes multiplicity of digits with 
   Int_t *     GetAbsId() const {return fAbsIdList;}
   Int_t       GetAbsId(int i) const {if(i>=0 && i<fMulDigit)return fAbsIdList[i]; else return -1;}
-  Int_t       GetAbsIdMaxDigit() {return GetAbsId(fDigitIndMax);}
-  Int_t       GetIndMaxDigit() {return fDigitIndMax;}
+  Int_t       GetAbsIdMaxDigit() const {return GetAbsId(fDigitIndMax);}
+  Int_t       GetIndMaxDigit() const {return fDigitIndMax;}
   void        SetIndMaxDigit(const Int_t ind) {fDigitIndMax = ind;}
   void            SetIndexInList(Int_t val) { fIndexInList = val ; }
 
index bf698e438d87d05e606f9bbe1857b5b1c743cb08..4b6f8db062b447bd510874b52e97342edbc96e17 100644 (file)
  **************************************************************************/
 
 /* 
-$Log$ 
+$Log$
+Revision 1.2  2007/09/11 19:38:15  pavlinov
+added pi0 calibration, linearity, shower profile
 */
 
 //_________________________________________________________________________
@@ -22,6 +25,8 @@ $Log$
 // super Modules (SM), modules, towers, set of hists and so on.
 //  TObjectSet -> TFolder; Sep 6, 2007
 //
+//
+//
 //*-- Author: Aleksei Pavlinov (WSU, Detroit, USA) 
 
 #include "AliEMCALSuperModule.h"
@@ -45,12 +50,32 @@ ClassImp(AliEMCALSuperModule)
 AliEMCALSuperModule::AliEMCALSuperModule() : TFolder()
 , fParent(0),fLh(0),fSMNumber(0)
 {
+  //default ctor
 }
 
 AliEMCALSuperModule::AliEMCALSuperModule(const Int_t m, const char* title) : 
 TFolder(Form("SM%2.2i",m), title)
 , fParent(0),fLh(0),fSMNumber(m)
 { 
+  //ctor
+} 
+
+AliEMCALSuperModule::AliEMCALSuperModule(const AliEMCALSuperModule &sm) : 
+TFolder(), fParent(sm.fParent),fLh(sm.fLh),fSMNumber(sm.fSMNumber)
+{ 
+  //copy ctor
+} 
+
+AliEMCALSuperModule & AliEMCALSuperModule::operator =(const AliEMCALSuperModule &sm)
+{ 
+    // assignment operator
+//   if(this == &sm)return *this;
+//   ((TObject *)this)->operator=(sm);
+
+  fParent = sm.fParent; 
+  fLh = sm.fLh;
+  fSMNumber = sm.fSMNumber;
+
 } 
 
 AliEMCALSuperModule::~AliEMCALSuperModule()
@@ -60,6 +85,8 @@ AliEMCALSuperModule::~AliEMCALSuperModule()
 
 void AliEMCALSuperModule::Init()
 {
+  //Initialization method
+
   if(GetHists()==0) {
     fLh = BookHists();
     Add(fLh);
@@ -68,6 +95,7 @@ void AliEMCALSuperModule::Init()
 
 void  AliEMCALSuperModule::AddCellToEtaRow(AliEMCALCell *cell, const Int_t etaRow)
 {
+  //Adds cells to corresponding Super module Eta Row
   static TFolder *set;
   set = dynamic_cast<TFolder*>(FindObject(Form("ETA%2.2i",etaRow))); 
   if(set==0) {
@@ -79,6 +107,8 @@ void  AliEMCALSuperModule::AddCellToEtaRow(AliEMCALCell *cell, const Int_t etaRo
 
 void AliEMCALSuperModule::FitForAllCells()
 {
+  //Fit histograms of each cell
+
   Int_t ncells=0;
   for(int eta=0; eta<48; eta++) { // eta row
     TFolder *setEta = dynamic_cast<TFolder*>(FindObject(Form("ETA%2.2i",eta)));
@@ -109,6 +139,7 @@ void AliEMCALSuperModule::FitForAllCells()
 
 void AliEMCALSuperModule::FitEffMassHist()
 {
+  //Fit effective mass histogram
   TH1* h = (TH1*)GetHists()->At(0);
   AliEMCALCell::FitHist(h, GetName());
 }
@@ -116,6 +147,7 @@ void AliEMCALSuperModule::FitEffMassHist()
 
 void AliEMCALSuperModule::PrintInfo()
 {
+  //Print
   printf(" Super Module :   %s    :   %i \n", GetName(), fSMNumber);
   printf(" # of active cells                %i \n", GetNumberOfCells());
   TH1* h = (TH1*)GetHists()->At(0);
@@ -124,6 +156,7 @@ void AliEMCALSuperModule::PrintInfo()
 
 void AliEMCALSuperModule::DrawCC(int iopt)
 {
+  //Draw different cell histograms
   TCanvas *c=0; 
   if(iopt==1) c = new TCanvas("ccInOut","ccInOut");
  
@@ -159,6 +192,7 @@ void AliEMCALSuperModule::DrawCC(int iopt)
 
 Int_t AliEMCALSuperModule::GetNumberOfCells()
 {
+  //Returns number of cells in SM
   Int_t ncells=0;
   TList* l = (TList*)GetListOfFolders();
   for(int eta=0; eta<l->GetSize(); eta++) { // cycle on eta row
@@ -173,11 +207,13 @@ Int_t AliEMCALSuperModule::GetNumberOfCells()
 
 TList* AliEMCALSuperModule::BookHists()
 {
+  //Initializes histograms
+
   gROOT->cd();
   TH1::AddDirectory(1);
 
-  AliEMCALFolder* EMCAL = (AliEMCALFolder*)GetParent(); 
-  Int_t it = EMCAL->GetIterationNumber();
+  AliEMCALFolder* emcal = (AliEMCALFolder*)GetParent(); 
+  Int_t it = emcal->GetIterationNumber();
 
   new TH1F("00_EffMass",  "effective mass of #gamma,#gamma(m_{#pi^{0}}=134.98 MeV) ", 250,0.0,0.5);
   new TH1F("01_CCInput",  "input CC dist.(MEV) ", 200, 5., 25.);
index 226f4f59718ea6f40b5ed5c84e49597cb267c1a8..21e077fd443b9ae6991d02759b764a11a2ee20f2 100644 (file)
 //  Super Module folder
 //  Initial version was created with TDataSet staf
 //  TObjectSet -> TFolder; Sep 6, 2007
-
+//
+//
 
 #include <TFolder.h>
 
 class TList;
+class TStyle ;
+class TROOT;
+
 class AliEMCALCell;
 
 class AliEMCALSuperModule : public TFolder {
 
  public:
   
-  AliEMCALSuperModule(); 
-  AliEMCALSuperModule(const Int_t m, const char* title="Emcal Super Module");
-
-  virtual ~AliEMCALSuperModule();
+  AliEMCALSuperModule();  // default ctor
+  AliEMCALSuperModule(const Int_t m, const char* title="Emcal Super Module");//ctor
+  AliEMCALSuperModule( const AliEMCALSuperModule & sm);// cpy ctor
+  AliEMCALSuperModule &operator = (const AliEMCALSuperModule & sm);// cpy assignment
+  virtual ~AliEMCALSuperModule();//virtual dtor
 
   void Init();
   void   AddCellToEtaRow(AliEMCALCell *cell, const Int_t etaRow);
@@ -46,7 +51,7 @@ class AliEMCALSuperModule : public TFolder {
   //
   TObject* fParent; // parent
   TList*   fLh;     // List of hists
-  Int_t    fSMNumber;
+  Int_t    fSMNumber; //Super Module Number
 
   ClassDef(AliEMCALSuperModule,2) // EMCAL SuperModule