]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Some bug fixes, and other changes nessesary for related code.
authornilsen <nilsen@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 22 Sep 2000 12:30:31 +0000 (12:30 +0000)
committernilsen <nilsen@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 22 Sep 2000 12:30:31 +0000 (12:30 +0000)
ITS/AliITSRawCluster.cxx
ITS/AliITSRawCluster.h

index 150834b06f9406d9d148b27ed8b7e5216828ac2e..314f733aeca83c9ef0088bb0e66ce74d53c50e71 100644 (file)
@@ -7,15 +7,17 @@ ClassImp(AliITSRawCluster)
  
 ClassImp(AliITSRawClusterSDD)
 //--------------------------------------
-AliITSRawClusterSDD::AliITSRawClusterSDD(Int_t wing, Float_t Anode,Float_t Time,Float_t Charge,Float_t PeakAmplitude,Float_t Asigma, Float_t Tsigma,Float_t DriftPath,Float_t AnodeOffset,Int_t Samples) {
+AliITSRawClusterSDD::AliITSRawClusterSDD(Int_t wing, Float_t Anode,Float_t Time,Float_t Charge,Float_t PeakAmplitude,Int_t PeakPosition,Float_t Asigma, Float_t Tsigma,Float_t DriftPath,Float_t AnodeOffset,Int_t Samples) {
   // constructor
   fWing = wing;
   fAnode = Anode;
   fTime = Time;
   fQ = Charge;
   fPeakAmplitude = PeakAmplitude;
+  fPeakPosition = PeakPosition;
   fNanodes = 1;
   fNsamples = Samples;
+  fMultiplicity=fNsamples;
   Int_t sign = 1;
   for(Int_t i=0;i<fWing; i++) sign*=(-1);
   fX = DriftPath*sign/10000.;
@@ -32,7 +34,11 @@ void AliITSRawClusterSDD::Add(AliITSRawClusterSDD* clJ) {
   fQ += clJ->Q();
   fNsamples += (Int_t) (clJ->Samples());
   (fNanodes)++;
-  if(clJ->PeakAmpl() > fPeakAmplitude) fPeakAmplitude = clJ->PeakAmpl();
+  fMultiplicity=fNsamples;
+  if(clJ->PeakAmpl() > fPeakAmplitude) {
+     fPeakAmplitude = clJ->PeakAmpl();
+     fPeakPosition = clJ->PeakPos();
+  }
   
   return;
 } 
index a7fdd0d7010ecebc044cbf780d5fb80d351fa29e..0060faf74f4cb4fd47b40078bf34408cb960da75 100644 (file)
 
 class AliITSRawCluster : public TObject {
   
-  // this class is subject to changes ! - info used for declustering 
+  // this class is subject to changes !!! - info used for declustering 
   // and  eventual debugging
   
 public:
   
   AliITSRawCluster() {
     fMultiplicity=0;
-    /*
-      for (int k=0;k<100;k++) {
-          fIndexMap[k]=-1;
-      }
-      fNcluster[0]=fNcluster[1]=-1;
-      fChi2=-1; 
-    */
   }
   
   virtual ~AliITSRawCluster() {
@@ -38,9 +31,6 @@ public:
 public:
 
   Int_t       fMultiplicity;        // cluster multiplicity
-  //Int_t       fIndexMap[100];     // indices of digits
-  //Int_t       fNcluster[2];
-  //Float_t     fChi2;
   
   ClassDef(AliITSRawCluster,1)  // AliITSRawCluster class
     };
@@ -55,9 +45,10 @@ public:
   
   AliITSRawClusterSPD() {
     // constructor
-    fX=fZ=fQ;
-    fZStart=fZStop;
-    fNClZ=fNClX=fXStart=fXStop=fXStartf=fXStopf=fZend=fNTracks;
+    fX=fZ=fQ=0;
+    fZStart=fZStop=0;
+    fNClZ=fNClX=fXStart=fXStop=fXStartf=fXStopf=fZend=fNTracks=0;
+    fTracks[0]=fTracks[1]=fTracks[2]=-3;
        }
   
   AliITSRawClusterSPD(Float_t clz,Float_t clx,Float_t Charge,Int_t ClusterSizeZ,Int_t ClusterSizeX,Int_t xstart,Int_t xstop,Int_t xstartf,Int_t xstopf,Float_t zstart,Float_t zstop,Int_t zend);
@@ -172,14 +163,16 @@ public:
   
   AliITSRawClusterSDD() {
     // constructor
-    fX=fZ=fQ;
+    fX=fZ=fQ=0;
     fWing=fNsamples=0;
     fNanodes=1;
     fAnode=fTime=fPeakAmplitude=0;
+    fPeakPosition=-1;
+    fMultiplicity=0;
   }
   
   AliITSRawClusterSDD(Int_t wing, Float_t Anode,Float_t Time,Float_t Charge,
-                     Float_t PeakAmplitude,Float_t Asigma, Float_t Tsigma,Float_t DriftPath, Float_t AnodeOffset,Int_t Samples);
+                     Float_t PeakAmplitude,Int_t PeakPosition,Float_t Asigma, Float_t Tsigma,Float_t DriftPath, Float_t AnodeOffset,Int_t Samples);
   virtual ~AliITSRawClusterSDD() {
     // destructor
   }
@@ -187,6 +180,17 @@ public:
   void Add(AliITSRawClusterSDD* clJ); 
   Bool_t Brother(AliITSRawClusterSDD* cluster,Float_t dz,Float_t dx);
   void PrintInfo();
+  // Setters
+  void SetX(Float_t x) {fX=x;}
+  void SetZ(Float_t z) {fZ=z;}
+  void SetQ(Float_t q) {fQ=q;}
+  void SetAnode(Float_t anode) {fAnode=anode;}
+  void SetTime(Float_t time) {fTime=time;}
+  void SetWing(Int_t wing) {fWing=wing;}
+  void SetNanodes(Int_t na) {fNanodes=na;}
+  void SetNsamples(Int_t ns) {fNsamples=ns;}
+  void SetPeakAmpl(Float_t ampl) {fPeakAmplitude=ampl;}
+  void SetPeakPos(Int_t pos) {fPeakPosition=pos;}
   // Getters
   Float_t X() const {
     //X
@@ -224,8 +228,9 @@ public:
     //PeakAmpl
     return fPeakAmplitude ;
   }
+  Int_t PeakPos() {return fPeakPosition;}
   
-protected:
+public:
   
   Float_t   fX;                 // X of cluster
   Float_t   fZ;                 // Z of cluster
@@ -234,6 +239,7 @@ protected:
   Float_t   fAnode;             // Anode number
   Float_t   fTime;              // Drift Time
   Float_t   fPeakAmplitude;     // Peak Amplitude
+  Int_t     fPeakPosition;      // index of digit corresponding to peak
   Int_t     fNanodes;           // N of anodes used for the cluster
   Int_t     fNsamples;          // N of samples used for the cluster