Fixes for coding convention violations
authoramastros <amastros@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 13 Dec 2011 16:46:38 +0000 (16:46 +0000)
committeramastros <amastros@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 13 Dec 2011 16:46:38 +0000 (16:46 +0000)
ITS/UPGRADE/AliITSDigitUpgrade.cxx
ITS/UPGRADE/AliITSDigitUpgrade.h
ITS/UPGRADE/AliITSLoaderUpg.cxx
ITS/UPGRADE/AliITSLoaderUpg.h
ITS/UPGRADE/AliITSRecPointU.h
ITS/UPGRADE/AliITSlayerUpgrade.h

index 57e510e..d414000 100644 (file)
 
 ///////////////////////////////////////////////////////////////////
 //                                                               //
-// Class defining the digit object
-// for ITS upgrade
-// Inherits from AliDigit
+// Class defining the digit object                               //
+// for ITS upgrade                                               //
+// Inherits from AliDigit                                        //
 //                                                               //
 ///////////////////////////////////////////////////////////////////
 
 ClassImp(AliITSDigitUpgrade)
 //______________________________________________________________________
-  AliITSDigitUpgrade::AliITSDigitUpgrade():AliDigit(),
-                                          fPixId(9999),
-                                          fSignal(0),
-                                          fNLayer(0),
-                                          fModule(0),
-                                          fNelectrons(0),
-                                          fNTracksIdMC(0)
+  AliITSDigitUpgrade::AliITSDigitUpgrade():
+    AliDigit(),
+    fPixId(9999),
+    fSignal(0),
+    fNLayer(0),
+    fModule(0),
+    fNelectrons(0),
+    fNTracksIdMC(0)
 {
   for(Int_t i=0; i<kMaxLab ; i++) {
     fTrackIdMC[i]=-1;
@@ -43,13 +44,14 @@ ClassImp(AliITSDigitUpgrade)
   }
 } //default creator
 //_______________________________________________________________________
-AliITSDigitUpgrade::AliITSDigitUpgrade(Int_t *digits): AliDigit(digits),
-                                                      fPixId(9999), 
-                                                      fSignal(0),
-                                                      fNLayer(0),
-                                                      fModule(0), 
-                                                      fNelectrons(0),
-                                                      fNTracksIdMC(0)
+AliITSDigitUpgrade::AliITSDigitUpgrade(Int_t *digits): 
+  AliDigit(digits),
+  fPixId(9999), 
+  fSignal(0),
+  fNLayer(0),
+  fModule(0), 
+  fNelectrons(0),
+  fNTracksIdMC(0)
 {
   for(Int_t i=0; i<kMaxLab ; i++) {
     fTrackIdMC[i]=-1;
@@ -57,13 +59,14 @@ AliITSDigitUpgrade::AliITSDigitUpgrade(Int_t *digits): AliDigit(digits),
   }
 } //default creator
 //____________________________________________________________________________________________________
-AliITSDigitUpgrade::AliITSDigitUpgrade(ULong_t pixid, Float_t eloss): AliDigit(),
-                                                                     fPixId(pixid), 
-                                                                     fSignal(eloss),
-                                                                     fNLayer(0), 
-                                                                     fModule(0),
-                                                                     fNelectrons(0),
-                                                                     fNTracksIdMC(0)
+AliITSDigitUpgrade::AliITSDigitUpgrade(ULong_t pixid, Float_t eloss): 
+  AliDigit(),
+  fPixId(pixid), 
+  fSignal(eloss),
+  fNLayer(0), 
+  fModule(0),
+  fNelectrons(0),
+  fNTracksIdMC(0)
 {
   for(Int_t i=0; i<kMaxLab ; i++) {
     fTrackIdMC[i]=-1;
@@ -71,13 +74,14 @@ AliITSDigitUpgrade::AliITSDigitUpgrade(ULong_t pixid, Float_t eloss): AliDigit()
   }
 } //standard creator digits only
 //____________________________________________________________________________________________________
-AliITSDigitUpgrade::AliITSDigitUpgrade(const AliITSDigitUpgrade &d):AliDigit(d),
-                                                                   fPixId(d.fPixId),
-                                                                   fSignal(d.fSignal),
-                                                                   fNLayer(d.fNLayer), 
-                                                                   fModule(d.fModule), 
-                                                                   fNelectrons(d.fNelectrons),
-                                                                   fNTracksIdMC(d.fNTracksIdMC)
+AliITSDigitUpgrade::AliITSDigitUpgrade(const AliITSDigitUpgrade &d):
+  AliDigit(d),
+  fPixId(d.fPixId),
+  fSignal(d.fSignal),
+  fNLayer(d.fNLayer), 
+  fModule(d.fModule), 
+  fNelectrons(d.fNelectrons),
+  fNTracksIdMC(d.fNTracksIdMC)
 {
   for(Int_t i=0; i<kMaxLab ; i++) {
     fTrackIdMC[i]=d.fTrackIdMC[i];
@@ -101,6 +105,10 @@ void AliITSDigitUpgrade::AddTrackID(Int_t tid) {
 
 //____________________________________________________________________________________________________
 void  AliITSDigitUpgrade::GetPosition(Int_t ilayer, Int_t nx, Int_t nz, Double_t &xloc, Double_t &zloc){
+  //
+  // Determines the local coordinates of the center of the pixel (a digit is a pixel)
+  //
+
   AliITSsegmentationUpgrade *s =new AliITSsegmentationUpgrade();
   if(s->GetCellSizeX(ilayer)!=0) xloc= (nx)*(s->GetCellSizeX(ilayer))+0.5*(s->GetCellSizeX(ilayer));
   else AliError("Upgrade segmentation not initalized");
@@ -112,7 +120,10 @@ void  AliITSDigitUpgrade::GetPosition(Int_t ilayer, Int_t nx, Int_t nz, Double_t
 }
 //____________________________________________________________________________________________________
 void AliITSDigitUpgrade::PrintInfo(){
+  //
   //Standard output format for this class
+  //
+
   Double_t xz[2]={-1,-1};
   GetPosition(fNLayer,GetxPixelNumber(),GetzPixelNumber(),xz[0],xz[1]);
    
index 9f20445..1d99732 100644 (file)
@@ -60,8 +60,8 @@ class AliITSDigitUpgrade: public AliDigit {
   Int_t    GetzPixelNumber() const {return fPixId%100000;}
   Int_t    GetNTracksIdMC() const {return fNTracksIdMC;}
   Int_t*   GetTracks() {return fTrackIdMC; }
-  Int_t    GetTrackID(Int_t ipart)  {if(ipart<0 || ipart>=kMaxLab) return -1; else return fTrackIdMC[ipart];}
-  Float_t  GetSignalID(Int_t ipart) {if(ipart<0 || ipart>=kMaxLab) return -1; else return fSignalID[ipart];}
+  Int_t    GetTrackID(Int_t ipart) const  {if(ipart<0 || ipart>=kMaxLab) return -1; else return fTrackIdMC[ipart];}
+  Float_t  GetSignalID(Int_t ipart) const {if(ipart<0 || ipart>=kMaxLab) return -1; else return fSignalID[ipart];}
     
   void GetPosition(Int_t ilayer, Int_t nx, Int_t nz, Double_t &xloc, Double_t &zloc);
     
@@ -71,14 +71,14 @@ class AliITSDigitUpgrade: public AliDigit {
    
  protected:
     
-  ULong_t fPixId;
+  ULong_t fPixId;    // ID number of the fired pixel in a module
   Float_t fSignal;   // Signal as Eloss in the medium
-  Int_t fNLayer;     
-  Int_t fModule;     
-  Double_t fNelectrons; 
-  Int_t fNTracksIdMC;
+  Int_t fNLayer;     // Layer 
+  Int_t fModule;     // Module in the layer
+  Double_t fNelectrons; // released charge due to E loss
+  Int_t fNTracksIdMC;  // Number of MC particles which produced the Digit
   Int_t fTrackIdMC[kMaxLab];  // MC track labels 
-  Float_t fSignalID[kMaxLab];
+  Float_t fSignalID[kMaxLab]; // E loss
   
 
  private:
index 496a478..0099a09 100644 (file)
 // V0 and cascade
 // and tracks propagated to the origin
 //////////////////////////////////////////////////////////////////////////
-const TString AliITSLoaderUpg::fgkDefaultRawClustersContainerName = "TreeC";
-const TString AliITSLoaderUpg::fgkDefaultBackTracksContainerName = "TreeB";
-const TString AliITSLoaderUpg::fgkDefaultVerticesContainerName = "Vertex";
-const TString AliITSLoaderUpg::fgkDefaultV0ContainerName = "V0";
-const TString AliITSLoaderUpg::fgkDefaultCascadeContainerName = "Cascade";
 ClassImp(AliITSLoaderUpg)
 
 /**********************************************************************/
@@ -51,35 +46,37 @@ AliITSLoaderUpg::AliITSLoaderUpg(const Char_t *name,const Char_t *topfoldername)
 AliLoader(name,topfoldername),
 fGeom(0){
   //Constructor   
+  TString rawContainerName = "TreeC";
     AliDataLoader* rawClustersDataLoader = new AliDataLoader(
-        fDetectorName + ".RawCl.root",fgkDefaultRawClustersContainerName,
+        fDetectorName + ".RawCl.root",rawContainerName,
         "Raw Clusters");
     fDataLoaders->Add(rawClustersDataLoader);
     rawClustersDataLoader->SetEventFolder(fEventFolder);
     rawClustersDataLoader->SetFolder(GetDetectorDataFolder());
 
+  TString  backTracksContainerName= "TreeB";
     AliDataLoader* backTracksDataLoader =  new AliDataLoader(
-        fDetectorName + ".BackTracks.root",fgkDefaultBackTracksContainerName,
+        fDetectorName + ".BackTracks.root",backTracksContainerName,
         "Back Propagated Tracks");
     fDataLoaders->Add(backTracksDataLoader);
     backTracksDataLoader->SetEventFolder(fEventFolder);
     backTracksDataLoader->SetFolder(GetDetectorDataFolder());
-
+  TString verticesContainerName="Vertex"; 
     AliDataLoader* vertexDataLoader = new AliDataLoader(
-        fDetectorName + ".Vertex.root",fgkDefaultVerticesContainerName,
+        fDetectorName + ".Vertex.root",verticesContainerName,
         "Primary Vertices","O");
     fDataLoaders->Add(vertexDataLoader);
     vertexDataLoader->SetEventFolder(fEventFolder);
     vertexDataLoader->SetFolder(GetDetectorDataFolder());
-
+ TString v0ContainerName="V0";
     AliDataLoader* v0DataLoader = new AliDataLoader(
-        fDetectorName + ".V0s.root",fgkDefaultV0ContainerName,"V0 Vertices");
+        fDetectorName + ".V0s.root",v0ContainerName,"V0 Vertices");
     fDataLoaders->Add(v0DataLoader);
     v0DataLoader->SetEventFolder(fEventFolder);
     v0DataLoader->SetFolder(GetDetectorDataFolder());
-
+  TString cascadeContainerName="Cascade";
     AliDataLoader* cascadeDataLoader = new AliDataLoader(
-        fDetectorName + ".Cascades.root",fgkDefaultCascadeContainerName,
+        fDetectorName + ".Cascades.root",cascadeContainerName,
         "Cascades");
     fDataLoaders->Add(cascadeDataLoader);
     cascadeDataLoader->SetEventFolder(fEventFolder);
@@ -90,35 +87,36 @@ AliITSLoaderUpg::AliITSLoaderUpg(const Char_t *name,TFolder *topfolder):
   AliLoader(name,topfolder),
 fGeom(0){
   //ctor  
+   TString rawContainerName="TreeC";
     AliDataLoader*  rawClustersDataLoader = new AliDataLoader(
-        fDetectorName + ".RawCl.root",fgkDefaultRawClustersContainerName,
+        fDetectorName + ".RawCl.root",rawContainerName,
         "Raw Clusters"); 
     fDataLoaders->Add(rawClustersDataLoader);
     rawClustersDataLoader->SetEventFolder(fEventFolder);
     rawClustersDataLoader->SetFolder(GetDetectorDataFolder());
-
+   TString backTracksContainerName="TreeB";
     AliDataLoader*  backTracksDataLoader =  new AliDataLoader(
-        fDetectorName + ".BackTracks.root",fgkDefaultBackTracksContainerName,
+        fDetectorName + ".BackTracks.root",backTracksContainerName,
         "Back Propagated Tracks");
     fDataLoaders->Add(backTracksDataLoader);
     backTracksDataLoader->SetEventFolder(fEventFolder);
     backTracksDataLoader->SetFolder(GetDetectorDataFolder());
-
+  TString verticesContainerName="Vertex";
     AliDataLoader* vertexDataLoader = new AliDataLoader(
-        fDetectorName + ".Vertex.root",fgkDefaultVerticesContainerName,
+        fDetectorName + ".Vertex.root",verticesContainerName,
         "Primary Vertices","O");
     fDataLoaders->Add(vertexDataLoader);
     vertexDataLoader->SetEventFolder(fEventFolder);
     vertexDataLoader->SetFolder(GetDetectorDataFolder());
-
+  TString v0ContainerName="V0";
     AliDataLoader* v0DataLoader = new AliDataLoader(
-        fDetectorName + ".V0.root",fgkDefaultV0ContainerName,"V0 Vertices");
+        fDetectorName + ".V0.root",v0ContainerName,"V0 Vertices");
     fDataLoaders->Add(v0DataLoader);
     v0DataLoader->SetEventFolder(fEventFolder);
     v0DataLoader->SetFolder(GetDetectorDataFolder());
-
+  TString cascadeContainerName="Cascade";
     AliDataLoader* cascadeDataLoader = new AliDataLoader(
-        fDetectorName + ".Cascade.root",fgkDefaultCascadeContainerName,
+        fDetectorName + ".Cascade.root",cascadeContainerName,
         "Cascades");
     fDataLoaders->Add(cascadeDataLoader);
     cascadeDataLoader->SetEventFolder(fEventFolder);
@@ -129,9 +127,8 @@ fGeom(0){
 /**********************************************************************/
 AliITSLoaderUpg::~AliITSLoaderUpg(){
     //destructor
-    AliDataLoader* dl = 0;
     UnloadRawClusters();
-    dl = GetRawClLoader();
+    AliDataLoader *dl = GetRawClLoader();
     fDataLoaders->Remove(dl);
 
     UnloadBackTracks();
index b3bf762..2ac1983 100644 (file)
@@ -133,11 +133,6 @@ class AliITSLoaderUpg: public AliLoader{
         return GetCascadeDataLoader()->GetBaseLoader(0)->Post();}
 
     // DATA
-    static const TString fgkDefaultRawClustersContainerName;  //default for Raw Clusters container name
-    static const TString fgkDefaultBackTracksContainerName;   //default for Back propag. tracks container name
-    static const TString fgkDefaultVerticesContainerName;     //default for primary vertices container name
-    static const TString fgkDefaultV0ContainerName;           //default for V0 container name
-    static const TString fgkDefaultCascadeContainerName;      //default fo cascade container name
     AliITSgeom *fGeom;     //! pointer to the ITS geometry class
 
 
index 2e24423..9b17072 100644 (file)
@@ -24,9 +24,9 @@ public :
   void SetNTracksIdMC(Int_t nLabels) {fNTracksIdMC = nLabels;}
   void AddTrackID(Int_t tid); 
 
-  Int_t GetModule(){return fModule;}
+  Int_t GetModule() const {return fModule;}
   Int_t GetNTracksIdMC() const {return fNTracksIdMC;}
-  Int_t GetTrackID(Int_t ipart) {if(ipart<0 || ipart >=kMaxLab) return -1; else return fTrackIdMC[ipart];}
+  Int_t GetTrackID(Int_t ipart) const {if(ipart<0 || ipart >=kMaxLab) return -1; else return fTrackIdMC[ipart];}
 
   enum {kMaxLab=24}; // maximum number of MC labels associated to the cluster
   void CleanLabels() {SetNTracksIdMC(0); for(Int_t i=0; i<kMaxLab ; i++) fTrackIdMC[i]=-3; }
@@ -35,7 +35,7 @@ public :
 
  protected:
 
-  Int_t fModule;
+  Int_t fModule;         // segmentation element within the same layer
   Int_t fNTracksIdMC;     // total number of associated MC labels (could be more than 3!)
   Int_t fTrackIdMC[kMaxLab];  // MC track labels 
 
index 44c8221..b655271 100644 (file)
@@ -5,9 +5,9 @@
 
 /* $Id$ */
 #include <TObject.h>
-#include "AliITStrackerMI.h"
 #include "AliITSRecPoint.h"
 #include "AliITSRecoParam.h"
+
  class AliITSlayerUpgrade : public TObject {
 
   public: