]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Code clean up
authordecaro <decaro@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 27 Aug 2008 18:00:28 +0000 (18:00 +0000)
committerdecaro <decaro@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 27 Aug 2008 18:00:28 +0000 (18:00 +0000)
TOF/AliTOFClusterFinder.cxx
TOF/AliTOFDDLRawData.cxx
TOF/AliTOFDigitizer.cxx
TOF/AliTOFcluster.cxx
TOF/AliTOFcluster.h
TOF/AliTOFdigit.cxx

index 064bc931a14c51841d00695ac9939eaac2ab187e..6b4c7eecf4a660b95ac7b2685869a3fbe8b1c03b 100644 (file)
@@ -760,7 +760,8 @@ void AliTOFClusterFinder::Raw2Digits(Int_t iEvent, AliRawReader *rawReader)
 
       AliTOFrawData *tofRawDatum = (AliTOFrawData*)clonesRawData->UncheckedAt(iRawData);
 
-      if (!tofRawDatum->GetTOT() || !tofRawDatum->GetTOF()) continue;
+      //if (!tofRawDatum->GetTOT() || !tofRawDatum->GetTOF()) continue;
+      if (tofRawDatum->GetTOF()==-1) continue;
 
       tofInput.EquipmentId2VolumeId(indexDDL, tofRawDatum->GetTRM(), tofRawDatum->GetTRMchain(),
                                    tofRawDatum->GetTDC(), tofRawDatum->GetTDCchannel(), detectorIndex);
@@ -848,7 +849,8 @@ void AliTOFClusterFinder::Raw2Digits(AliRawReader *rawReader, TTree* digitsTree)
 
       AliTOFrawData *tofRawDatum = (AliTOFrawData*)clonesRawData->UncheckedAt(iRawData);
 
-      if (!tofRawDatum->GetTOT() || !tofRawDatum->GetTOF()) continue;
+      //if (!tofRawDatum->GetTOT() || !tofRawDatum->GetTOF()) continue;
+      if (tofRawDatum->GetTOF()==-1) continue;
 
       tofInput.EquipmentId2VolumeId(indexDDL, tofRawDatum->GetTRM(), tofRawDatum->GetTRMchain(),
                                    tofRawDatum->GetTDC(), tofRawDatum->GetTDCchannel(), detectorIndex);
@@ -959,6 +961,19 @@ void AliTOFClusterFinder::FillRecPoint()
     GetClusterPars(detectorIndex,posClus,covClus);
     new(lRecPoints[ii]) AliTOFcluster(volIdClus,posClus[0],posClus[1],posClus[2],covClus[0],covClus[1],covClus[2],covClus[3],covClus[4],covClus[5],trackLabels,detectorIndex, parTOF,status,digitIndex);
 
+    AliDebug(2, Form(" %4i  %4i  %f %f %f  %f %f %f %f %f %f  %3i %3i %3i  %2i %1i %2i %1i %2i  %4i %3i %3i %4i %4i  %1i  %4i", 
+                    ii, volIdClus, posClus[0], posClus[1], posClus[2],
+                    fTofClusters[ii]->GetSigmaX2(),
+                    fTofClusters[ii]->GetSigmaXY(),
+                    fTofClusters[ii]->GetSigmaXZ(),
+                    fTofClusters[ii]->GetSigmaY2(),
+                    fTofClusters[ii]->GetSigmaYZ(),
+                    fTofClusters[ii]->GetSigmaZ2(),
+                    trackLabels[0], trackLabels[1], trackLabels[2],
+                    detectorIndex[0], detectorIndex[1], detectorIndex[2], detectorIndex[3], detectorIndex[4],
+                    parTOF[0], parTOF[1], parTOF[2], parTOF[3], parTOF[4],
+                    status, digitIndex));
+
   } // loop on clusters
 
 }
index 4623f11fe5569bd67774205a0878837f7b6dc5ab..cc9725b5953bd7845a656e26fab37f33f6421a0e 100644 (file)
@@ -182,6 +182,8 @@ Int_t AliTOFDDLRawData::RawDataTOF(TBranch* branch)
   
   GetDigits();
 
+  //if (!fPackedAcquisition) fMatchingWindow = 2097152;//AdC
+
   Int_t jj = -1;
   Int_t iDDL = -1;
   Int_t nDDL = -1;
index 44e98e1fb48f7870b904f0ea6510060171781e28..9711df7ef91f169aec86212e2f7695c32d96dafc 100644 (file)
@@ -277,7 +277,9 @@ void AliTOFDigitizer::CreateDigits()
       
       Int_t tdc=tofsdigit->GetTdc(islot); digit[0]=tdc;
       Int_t adc=tofsdigit->GetAdc(islot); digit[1]=adc;
-      
+
+      //if (tdc>=8192) continue;//AdC
+
       tracknum[0]=tofsdigit->GetTrack(islot,0);
       tracknum[1]=tofsdigit->GetTrack(islot,1);
       tracknum[2]=tofsdigit->GetTrack(islot,2);
index 7b5ff21f92445f06322426fae9021bd98a044262..f2ff14182451c748105cb3c3011067c6d0b0404e 100644 (file)
@@ -62,7 +62,7 @@ AliTOFcluster::AliTOFcluster():
 AliTOFcluster::AliTOFcluster(UShort_t volId, 
    Float_t x,   Float_t y,   Float_t z,
    Float_t sx2, Float_t sxy, Float_t sxz,
-                Float_t sy2, Float_t syz, 
+                Float_t sy2, Float_t syz,
                              Float_t sz2, Int_t *lab, Int_t *ind, Int_t *par, Bool_t status, Int_t idx):
   AliCluster3D(volId,x,y,z,sx2,sxy,sxz,sy2,syz,sz2,lab),
   fIdx(idx),
@@ -84,8 +84,8 @@ AliTOFcluster::AliTOFcluster(UShort_t volId,
    
    Float_t xyz[3];
    GetGlobalXYZ(xyz);
-   fR=TMath::Sqrt(xyz[0]*xyz[0] + xyz[1]*xyz[1]);   
-   fPhi=TMath::ATan2(xyz[1], xyz[0]);
+   fR   = TMath::Sqrt(xyz[0]*xyz[0] + xyz[1]*xyz[1]);   
+   fPhi = TMath::ATan2(xyz[1], xyz[0]);
 
 }
 //-------------------------------------------------------------------------
index 9adef299803864d72ffbcb36991a5913056f971b..4fd99f3cbce08d5fc5774ef277dcd7adca0f77c8 100644 (file)
@@ -21,36 +21,41 @@ class AliTOFcluster : public AliCluster3D {
   AliTOFcluster(UShort_t volId, 
      Float_t x,   Float_t y,   Float_t z,
      Float_t sx2, Float_t sxy, Float_t sxz,
-                  Float_t sy2, Float_t syz, 
-                               Float_t sz2, Int_t *lab, Int_t *ind, Int_t *par, Bool_t status, Int_t idx); // ctor
+                  Float_t sy2, Float_t syz,
+                               Float_t sz2,
+               Int_t *lab, Int_t *ind, Int_t *par, 
+               Bool_t status, Int_t idx); // ctor
   AliTOFcluster(const AliTOFcluster & cluster); // copy ctor
   virtual ~AliTOFcluster(); // dtor
 
   // Getters and Setters
   Double_t GetR() const   {return fR;}   // Cluster Radius
   Double_t GetPhi() const {return fPhi;} // Cluster Phi
-  Int_t GetTDC() const {return fTDC;} // Cluster ToF
-  Int_t GetTDCND() const {return fTdcND;} // Cluster ToF
-  Int_t GetTDCRAW() const {return fTdcRAW;} // Cluster Raw time
-  Int_t GetADC() const {return TMath::Abs(fADC);}  // Cluster Charge
-  Int_t GetToT() const {return fToT;}  // Cluster Charge
-  Int_t IsUsed() const {return (fADC<0) ? 1 : 0;}  // Flagging
-  Int_t GetDetInd(Int_t n) const {return fdetIndex[n];} // Cluster Detector Indeces
-  Int_t GetIndex() const         {return fIdx;}         // Cluster Index
-  void     Use(Int_t = 0) {fADC=-fADC;}
-  Double_t GetQuality() const {return fQuality;}
-  void     SetQuality(Double_t quality) {fQuality = quality;}
-  Bool_t   GetStatus() const {return fStatus;}
-  void     SetStatus(Bool_t status) {fStatus = status;}
-  void     SetToT(Int_t ToT) {fToT = ToT;}
-  void     SetTDC(Int_t Tdc) {fTDC = Tdc;}
-  void     SetTDCND(Int_t Tdc) {fTdcND = Tdc;}
-  void     SetTDCRAW(Int_t Tdc) {fTdcRAW = Tdc;}
+
+  Double_t GetQuality() const {return fQuality;} // Cluster quality getter
+  Bool_t   GetStatus()  const {return fStatus;}  // Cluster status getter
+  Int_t GetToT()    const {return fToT;}    // Cluster Charge getter
+  Int_t GetTDC()    const {return fTDC;}    // Cluster ToF getter
+  Int_t GetTDCND()  const {return fTdcND;}  // Cluster ToF getter
+  Int_t GetTDCRAW() const {return fTdcRAW;} // Cluster Raw time getter
+  Int_t GetADC()    const {return TMath::Abs(fADC);} // Cluster Charge getter
+  Int_t IsUsed()    const {return (fADC<0) ? 1 : 0;} // Flagging
+  Int_t GetDetInd(Int_t n) const {return fdetIndex[n];} // Cluster Detector Indices getter
+  Int_t GetIndex()  const {return fIdx;} // Digit Index getter
+
+  void  Use(Int_t = 0) {fADC=-fADC;}        //  setter
+  void  SetQuality(Double_t quality) {fQuality = quality;} // Cluster quality setter
+  void  SetStatus(Bool_t status) {fStatus = status;}       // Cluster status setter
+  void  SetToT(Int_t ToT) {fToT = ToT;}       // Cluster ToT setter
+  void  SetTDC(Int_t Tdc) {fTDC = Tdc;}       // Cluster ToF setter
+  void  SetTDCND(Int_t Tdc) {fTdcND = Tdc;}   // Cluster ToFnd setter
+  void  SetTDCRAW(Int_t Tdc) {fTdcRAW = Tdc;} // Cluster ToF-raw setter
 
  private:
 
-  Int_t fIdx;         // index of this cluster
-  Int_t fdetIndex[5]; // Cluster detector Indeces (sector,plate,strip,padz,padx)
+  Int_t fIdx;         // index of the digit related to this cluster
+  Int_t fdetIndex[5]; // Cluster detector indices
+                      // (sector, plate, strip, padz, padx)
   // Cluster Quality
   Double_t fQuality;  // quality of the best track 
 
@@ -59,12 +64,12 @@ class AliTOFcluster : public AliCluster3D {
   Double_t fPhi;      // phi-coordinate
 
   // TOF Signal parameters
-  Int_t  fTDC;      // TDC count
-  Int_t  fToT;       // ToT
-  Int_t  fADC;      // ADC count
+  Int_t  fTDC;        // TDC count
+  Int_t  fToT;        // ToT
+  Int_t  fADC;        // ADC count
   Int_t  fTdcND;      // TDC count
-  Int_t  fTdcRAW;      // RAW TDC count
-  Bool_t fStatus;      // cluster online status 
+  Int_t  fTdcRAW;     // RAW TDC count
+  Bool_t fStatus;     // cluster online status 
 
   ClassDef(AliTOFcluster, 6) // TOF cluster
 };
index 854b9c7c1b98bc8cbb68c6f241e90a8e4f7c13b1..bde6b425dd647ff944a50a7533e77947495c4b48 100644 (file)
@@ -54,7 +54,7 @@ AliTOFdigit::AliTOFdigit()
 {
 }
 //______________________________________________________________________________
-AliTOFdigit::AliTOFdigit(Int_t *tracks, Int_t *vol,Int_t *digit)
+AliTOFdigit::AliTOFdigit(Int_t *tracks, Int_t *vol, Int_t *digit)
   :AliDigit(tracks),
    fSector(-1),
    fPlate(-1),
@@ -108,9 +108,9 @@ AliTOFdigit::AliTOFdigit(const AliTOFdigit & digit)
   fPadx   = digit.fPadx;
   fPadz   = digit.fPadz;
   fTdc    = digit.fTdc;
-  fTdcND    = digit.fTdcND;
+  fTdcND  = digit.fTdcND;
   fAdc    = digit.fAdc;
-  fToT = digit.fToT;
+  fToT    = digit.fToT;
 
 }
 
@@ -136,24 +136,24 @@ AliTOFdigit::AliTOFdigit(Int_t sector, Int_t plate, Int_t strip, Int_t padx,
   fPadx   = padx;
   fPadz   = padz;  
   fTdc    = tdc;   
-  fTdcND    = 0;   
+  fTdcND  = 0;   
   fAdc    = adc;     
-  fToT = 0;
+  fToT    = 0;
 }
    
 //______________________________________________________________________________
-void AliTOFdigit::GetLocation(Int_t *Loc) const
+void AliTOFdigit::GetLocation(Int_t *loc) const
 {
 //
 // Get the cohordinates of the digit
 // in terms of Sector - Plate - Strip - Pad
 //
 
-   Loc[0]=fSector;
-   Loc[1]=fPlate;
-   Loc[2]=fStrip;
-   Loc[3]=fPadx;
-   Loc[4]=fPadz;
+   loc[0] = fSector;
+   loc[1] = fPlate;
+   loc[2] = fStrip;
+   loc[3] = fPadx;
+   loc[4] = fPadz;
 }
 
 //______________________________________________________________________________