Changes requested by coding conventions
authorgamez <gamez@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 7 Oct 2002 11:19:21 +0000 (11:19 +0000)
committergamez <gamez@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 7 Oct 2002 11:19:21 +0000 (11:19 +0000)
CRT/AliCRTdigit.cxx
CRT/AliCRTdigit.h
CRT/AliCRThit.cxx
CRT/AliCRThit.h

index ff7824045af6b029e7a4b70b87d9c4cd1fdfad21..abd43d812cc6aebd17aa60b1ec031f2dd912e571 100644 (file)
@@ -82,3 +82,22 @@ AliCRTdigit::AliCRTdigit(const AliCRTdigit & digit)
   fTracks = new TArrayI(*digit.fTracks);
 
 }
+
+//_____________________________________________________________________________
+AliCRTdigit& AliCRTdigit::operator= (const AliCRTdigit & digit)
+{
+  //
+  //-- Asingment operator.
+  //
+  fSector = digit.fSector;
+  fPlate  = digit.fPlate;
+  fStrip  = digit.fStrip;
+  fPadx   = digit.fPadx;
+  fPadz   = digit.fPadz;
+  fNDigits = digit.fNDigits;
+  fTdc = new TArrayF(*digit.fTdc);  
+  fAdc = new TArrayF(*digit.fAdc);
+  fTracks = new TArrayI(*digit.fTracks);
+
+  return *this;
+}
index d5fa9d85d37c41657a863b4899ee939a8d5c4730..d6570c732219de49a061813ba63e6bb1e2f6315c 100644 (file)
 #include "AliDigit.h"
 #include "AliCRT.h"
 
-//___________________________________________
 class AliCRTdigit: public TObject  {
 
- public:
+public:
             AliCRTdigit();
             AliCRTdigit(Int_t tracknum, Int_t* vol, Float_t* digit);
             AliCRTdigit(const AliCRTdigit & digit);
+    AliCRTdigit& operator= (const AliCRTdigit& digit);
     virtual ~AliCRTdigit() {}
 
 protected:
@@ -32,7 +32,6 @@ protected:
   TArrayI   *fTracks;  // contributing tracks, kMAXDIGITS entries per
                      // 1 tdc value
 
-
 private:
     ClassDef(AliCRTdigit,1)  //Digit (Header) object for set : CRT (ACORDE)
 };
index 11e1da7695d2940d157295cd9015cab52eb8d152..b3201659aea137da97530e4a62788621ff4c55b1 100644 (file)
@@ -15,6 +15,8 @@
 
 /*
 $Log$
+Revision 1.2  2002/07/25 21:27:22  gamez
+Variables renamed to avoid floating exceptions
 
 */
 
@@ -22,28 +24,92 @@ $Log$
 
 ClassImp(AliCRThit)
 
+//____________________________________________________________________________
+AliCRThit::AliCRThit()
+{
+   //
+   // default ctor for AliCRThit object
+   //
+
+  fId     = 0.;
+  fX      = 0.;
+  fY      = 0.;
+  fZ      = 0.;
+  fPx     = 0.;
+  fPy     = 0.;
+  fPz     = 0.;
+  fMedium = 0.;
+  fELoss  = 0.;
+  fCRTh = 0.;
+  fCRTMod = 0.;
+  fCRTMag = 0.;
+  fCRTRICH = 0.;
+  fCRTTPC = 0.;
+
+  fCopy = 0;
+  for (Int_t i = 0; i < 5; i++ ) {
+    fVolume[i] = 0;
+  }
+
+}
+
+
 //____________________________________________________________________________
 AliCRThit::AliCRThit(const AliCRThit & hit)
 {
    //
-   // copy ctor for AliCRThit object
+   // copy ctor
+   //
+
+  fId     = hit.fId;
+  fX      = hit.fX;
+  fY      = hit.fY;
+  fZ      = hit.fZ;
+  fPx     = hit.fPx;
+  fPy     = hit.fPy;
+  fPz     = hit.fPz;
+  fMedium = hit.fMedium;
+  fELoss  = hit.fELoss;
+  fCRTh = hit.fCRTh;
+  fCRTMod = hit.fCRTMod;
+  fCRTMag = hit.fCRTMag;
+  fCRTRICH = hit.fCRTRICH;
+  fCRTTPC = hit.fCRTTPC;
+
+  fCopy = hit.fCopy;
+  fVolume = hit.fVolume;
+
+}
+
+//_____________________________________________________________________________
+AliCRThit& AliCRThit::operator= (const AliCRThit & hit)
+{
+   //
+   // aisngment operator.
    //
 
-  fnmou = hit.fnmou;
-  fId   = hit.fId;
-  fX    = hit.fX;
-  fY    = hit.fY;
-  fZ    = hit.fZ;
-  fpxug = hit.fpxug;
-  fpyug = hit.fpyug;
-  fpzug = hit.fpzug;
-  flay  = hit.flay;
-  fxver = hit.fxver;
-  fyver = hit.fyver;
-  fzver = hit.fzver;
+  fId     = hit.fId;
+  fX      = hit.fX;
+  fY      = hit.fY;
+  fZ      = hit.fZ;
+  fPx     = hit.fPx;
+  fPy     = hit.fPy;
+  fPz     = hit.fPz;
+  fMedium = hit.fMedium;
+  fELoss  = hit.fELoss;
+  fCRTh = hit.fCRTh;
+  fCRTMod = hit.fCRTMod;
+  fCRTMag = hit.fCRTMag;
+  fCRTRICH = hit.fCRTRICH;
+  fCRTTPC = hit.fCRTTPC;
+
+  fCopy = hit.fCopy;
+  fVolume = hit.fVolume;
+
+  return *this;
 }
-//______________________________________________________________________________
+
+//_____________________________________________________________________________
 AliCRThit::AliCRThit(Int_t shunt, Int_t track, Int_t *vol,
                      Float_t *hits) :AliHit(shunt, track)
 {
@@ -51,17 +117,26 @@ AliCRThit::AliCRThit(Int_t shunt, Int_t track, Int_t *vol,
 // Constructor of hit object
 //
 
-  fnmou = hits[0];
-  fId   = hits[1];
-  fX    = hits[2];
-  fY    = hits[3];
-  fZ    = hits[4];
-  fpxug = hits[5];
-  fpyug = hits[6];
-  fpzug = hits[7];
-  flay  = hits[8];
-  fxver = hits[9];
-  fyver = hits[10];
-  fzver = hits[11];
+  fId     = hits[0];
+  fX      = hits[1];
+  fY      = hits[2];
+  fZ      = hits[3];
+  fPx     = hits[4];
+  fPy     = hits[5];
+  fPz     = hits[6];
+  fMedium = hits[7];
+  fELoss  = hits[8];
+  fCRTh = hits[9];
+  fCRTMod = hits[10];
+  fCRTMag = hits[11];
+  fCRTRICH = hits[12];
+  fCRTTPC = hits[13];
+
+  //fTrack = (Int_t)hits[9];
+
+  for (Int_t i = 0; i < 5 ; i++ ) {
+    fVolume[i] = vol[i];
+  }
+
 }
 
index 15f7a3d4b892b3a777e52063bf82b3f952f499aa..a07f70c0c160d0fef09b0cfd53905c588d8c7b93 100644 (file)
@@ -1,3 +1,10 @@
+#ifndef ALICRTHIT_H
+#define ALICRTHIT_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+
 ////////////////////////////////////////////////
 //                                            //
 //  Hit class for CRT                         //
 //                                            //
 ////////////////////////////////////////////////
 
-#ifndef ALICRTHIT_H
-#define ALICRTHIT_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice                               */
-
-/* $Id$ */
-
 #include "AliHit.h"
 
 class AliCRThit : public AliHit {
   
 public:
-  AliCRThit() {}
+  AliCRThit();
   AliCRThit(Int_t shunt, Int_t track, Int_t* vol, Float_t *hits);
-  AliCRThit(const AliCRThit & hit) ;
+  AliCRThit(const AliCRThit & hit);
+  AliCRThit& operator= (const AliCRThit& hit);
   virtual ~AliCRThit() {}
 
-       // getters for AliCRThit object
-  Float_t Getnmou() const {return fnmou;}
+  // getters for AliCRThit object
   Float_t GetId()   const {return fId;}
   Float_t GetX()     const {return fX;}
   Float_t GetY()     const {return fY;}
   Float_t GetZ()     const {return fZ;}
-  Float_t Getpxug()     const {return fpxug;}
-  Float_t Getpyug()     const {return fpyug;}
-  Float_t Getpzug()     const {return fpzug;}
-  Float_t Getlay()     const {return flay;}
-  Float_t Getxver()     const {return fxver;}
-  Float_t Getyver()     const {return fyver;}
-  Float_t Getzver()     const {return fzver;}
-
-  Int_t fVolume;
-  Int_t fCopy;
-  Float_t      fnmou; 
-  Float_t      fId;
-  Float_t    fX;      //
-  Float_t    fY;    // 
-  Float_t    fZ;    // 
-  Float_t    fpxug;     //
-  Float_t    fpyug;      //
-  Float_t    fpzug;      //
-  Float_t    flay;    //
-  Float_t    fxver;      //
-  Float_t    fyver;      //
-  Float_t    fzver;      //
-  
+  Float_t GetPx()     const {return fPx;}
+  Float_t GetPy()     const {return fPy;}
+  Float_t GetPz()     const {return fPz;}
+  Float_t GetMedium()     const {return fMedium;}
+  Float_t GetELoss()   const {return fELoss;}
+  Float_t GetCRT() const {return fCRTh;}
+  Float_t GetCRTMod() const {return fCRTMod;}
+  Float_t GetCRTMag() const {return fCRTMag;}
+  Float_t GetCRTRICH() const {return fCRTRICH;}
+  Float_t GetCRTTPC() const {return fCRTTPC;}
+
+  const Int_t* GetVolume() const {return fVolume;}
+
+protected:
+  Int_t   fVolume[5];
+  Int_t   fCopy;
+  Float_t fId;     
+  Float_t fPx;          //
+  Float_t fPy;          //
+  Float_t fPz;          //
+  Float_t fMedium;      //
+  Float_t fELoss;       //
+  Float_t fCRTh;
+  Float_t fCRTMod;
+  Float_t fCRTMag;
+  Float_t fCRTRICH;
+  Float_t fCRTTPC;
+
 private:
-  
   ClassDef(AliCRThit,1)  // Hit for CRT (ACORDE)
 
 };