]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
New member functions for CPV clusterization
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 25 Oct 2000 08:31:16 +0000 (08:31 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 25 Oct 2000 08:31:16 +0000 (08:31 +0000)
PHOS/AliPHOSClusterizer.h
PHOS/AliPHOSClusterizerv1.cxx
PHOS/AliPHOSClusterizerv1.h

index eedc652e26e6f409aadb77dfce963c6ae00eb970..d6c6bdcc7d7610a0afad6de4dc9ecb8703589226 100644 (file)
@@ -36,6 +36,8 @@ public:
   virtual Float_t GetEmcEnergyThreshold() = 0 ;  
   virtual Float_t GetLocalMaxCut() = 0 ; 
   virtual Float_t GetLogWeightCut() = 0 ; 
   virtual Float_t GetEmcEnergyThreshold() = 0 ;  
   virtual Float_t GetLocalMaxCut() = 0 ; 
   virtual Float_t GetLogWeightCut() = 0 ; 
+  virtual Float_t GetLocalMaxCutCPV() = 0 ; 
+  virtual Float_t GetLogWeightCutCPV() = 0 ; 
   virtual Float_t GetPpsdClusteringThreshold() = 0 ; 
   virtual Float_t GetPpsdEnergyThreshold() = 0 ; 
 
   virtual Float_t GetPpsdClusteringThreshold() = 0 ; 
   virtual Float_t GetPpsdEnergyThreshold() = 0 ; 
 
@@ -46,6 +48,8 @@ public:
   virtual void SetEmcEnergyThreshold(Float_t enth) = 0 ;  
   virtual void SetLocalMaxCut(Float_t cut) = 0 ; 
   virtual void SetLogWeightCut(Float_t w) = 0 ; 
   virtual void SetEmcEnergyThreshold(Float_t enth) = 0 ;  
   virtual void SetLocalMaxCut(Float_t cut) = 0 ; 
   virtual void SetLogWeightCut(Float_t w) = 0 ; 
+  virtual void SetLocalMaxCutCPV(Float_t cut) = 0 ; 
+  virtual void SetLogWeightCutCPV(Float_t w) = 0 ; 
   virtual void SetPpsdClusteringThreshold(Float_t cluth) = 0 ; 
   virtual void SetPpsdEnergyThreshold(Float_t enth) = 0 ; 
  
   virtual void SetPpsdClusteringThreshold(Float_t cluth) = 0 ; 
   virtual void SetPpsdEnergyThreshold(Float_t enth) = 0 ; 
  
index bcd64355da1835b0523ceb3963224d8125709c0e..8c09b37fdfd40905e43d4598255d426021cdc513 100644 (file)
 
 /* $Id$ */
 
 
 /* $Id$ */
 
+/* $Log:
+   1 October 2000. Yuri Kharlov:
+     AreNeighbours()
+     PPSD upper layer is considered if number of layers>1
+
+   18 October 2000. Yuri Kharlov:
+     AliPHOSClusterizerv1()
+     CPV clusterizing parameters added
+
+     MakeClusters()
+     After first PPSD digit remove EMC digits only once
+*/
+
 //_________________________________________________________________________
 //  Implementation version 1 of the clusterization algorithm 
 // 
 //_________________________________________________________________________
 //  Implementation version 1 of the clusterization algorithm 
 // 
@@ -52,10 +65,12 @@ AliPHOSClusterizerv1::AliPHOSClusterizerv1()
   fNumberOfPpsdClusters    = 0 ; 
   fEmcClusteringThreshold  = 0.1;   
   fEmcEnergyThreshold      = 0.01;    
   fNumberOfPpsdClusters    = 0 ; 
   fEmcClusteringThreshold  = 0.1;   
   fEmcEnergyThreshold      = 0.01;    
-  fPpsdClusteringThreshold = 0.00000015; 
-  fPpsdEnergyThreshold     = 0.0000001;  
+  fPpsdClusteringThreshold = 0.0;
+  fPpsdEnergyThreshold     = 0.1;  
   fW0                      = 4.5 ;
   fLocMaxCut               = 0.06 ;
   fW0                      = 4.5 ;
   fLocMaxCut               = 0.06 ;
+  fW0CPV                   = 4.5 ;
+  fLocMaxCutCPV            = 0.06 ;
 }
 
 //____________________________________________________________________________
 }
 
 //____________________________________________________________________________
@@ -95,7 +110,12 @@ Int_t AliPHOSClusterizerv1::AreNeighbours(AliPHOSDigit * d1, AliPHOSDigit * d2)
       rv=2 ;
 
   }
       rv=2 ;
 
   }
-  if((relid1[1]>0) && (relid1[1]<16) ) rv = 2 ; //Do NOT clusterize upper PPSD  
+
+  //Do NOT clusterize upper PPSD  
+  if(fGeom->GetNumberOfCPVLayers() > 1 &&
+     relid1[1] > 0                     &&
+     relid1[1] < fGeom->GetNumberOfPadsPhi()*fGeom->GetNumberOfPadsPhi() ) rv = 2 ;
+
   return rv ; 
 }
 
   return rv ; 
 }
 
@@ -110,9 +130,6 @@ void AliPHOSClusterizerv1::FillandSort(const DigitsList * dl, TObjArray * tl)
   TIter next(dl) ; 
   AliPHOSDigit * digit ;
   
   TIter next(dl) ; 
   AliPHOSDigit * digit ;
   
-
   while ( (digit = (AliPHOSDigit *)next()) ) { 
 
 //     cout << " clusterizerv1 " << endl ;
   while ( (digit = (AliPHOSDigit *)next()) ) { 
 
 //     cout << " clusterizerv1 " << endl ;
@@ -189,15 +206,14 @@ void AliPHOSClusterizerv1::MakeClusters(const DigitsList * dl,
 
     AliPHOSDigit ** clusterdigitslist = new AliPHOSDigit*[dl->GetEntries()] ;   
     Int_t index ;
 
     AliPHOSDigit ** clusterdigitslist = new AliPHOSDigit*[dl->GetEntries()] ;   
     Int_t index ;
-    if (( ( IsInEmc(digit) ) && ( Calibrate(digit->GetAmp() ) > fEmcClusteringThreshold ) ) || 
+    if (( (  IsInEmc(digit) ) && ( Calibrate(digit->GetAmp() ) > fEmcClusteringThreshold  ) ) || 
         ( ( !IsInEmc(digit) ) && ( Calibrate(digit->GetAmp() ) > fPpsdClusteringThreshold ) ) ) {
   
       Int_t iDigitInCluster = 0 ; 
 
       if  ( IsInEmc(digit) ) {   
        // start a new EMC RecPoint
         ( ( !IsInEmc(digit) ) && ( Calibrate(digit->GetAmp() ) > fPpsdClusteringThreshold ) ) ) {
   
       Int_t iDigitInCluster = 0 ; 
 
       if  ( IsInEmc(digit) ) {   
        // start a new EMC RecPoint
-       if(fNumberOfEmcClusters >= emcl->GetSize())
-         emcl->Expand(2*fNumberOfEmcClusters+1) ;
+       if(fNumberOfEmcClusters >= emcl->GetSize()) emcl->Expand(2*fNumberOfEmcClusters+1) ;
        (*emcl)[fNumberOfEmcClusters] = new  AliPHOSEmcRecPoint(fW0, fLocMaxCut) ;
        clu = (AliPHOSEmcRecPoint *) emcl->At(fNumberOfEmcClusters) ; 
        fNumberOfEmcClusters++ ; 
        (*emcl)[fNumberOfEmcClusters] = new  AliPHOSEmcRecPoint(fW0, fLocMaxCut) ;
        clu = (AliPHOSEmcRecPoint *) emcl->At(fNumberOfEmcClusters) ; 
        fNumberOfEmcClusters++ ; 
@@ -206,16 +222,18 @@ void AliPHOSClusterizerv1::MakeClusters(const DigitsList * dl,
        iDigitInCluster++ ; 
        tempodigitslist.Remove(digit) ; 
 
        iDigitInCluster++ ; 
        tempodigitslist.Remove(digit) ; 
 
-      }
-
-      else { 
+      } else { 
        
        // start a new PPSD cluster
        
        // start a new PPSD cluster
-       if(fNumberOfPpsdClusters >= ppsdl->GetSize())
-         ppsdl->Expand(2*fNumberOfPpsdClusters+1) ;
-       
-       (*ppsdl)[fNumberOfPpsdClusters] = new AliPHOSPpsdRecPoint() ;
-       clu =  (AliPHOSPpsdRecPoint *) ppsdl->At(fNumberOfPpsdClusters)  ;  
+       if(fNumberOfPpsdClusters >= ppsdl->GetSize()) ppsdl->Expand(2*fNumberOfPpsdClusters+1);
+       if      (strcmp(fGeom->GetName(),"GPS2") == 0) {
+         (*ppsdl)[fNumberOfPpsdClusters] = new AliPHOSPpsdRecPoint() ;
+         clu =  (AliPHOSPpsdRecPoint *) ppsdl->At(fNumberOfPpsdClusters)  ;  
+       }
+       else if (strcmp(fGeom->GetName(),"IHEP") == 0) {
+         (*ppsdl)[fNumberOfPpsdClusters] = new AliPHOSEmcRecPoint(fW0CPV, fLocMaxCutCPV) ;
+         clu =  (AliPHOSEmcRecPoint *) ppsdl->At(fNumberOfPpsdClusters)  ;  
+       }
        fNumberOfPpsdClusters++ ; 
        clu->AddDigit(*digit, Calibrate(digit->GetAmp()) ) ;    
        clusterdigitslist[iDigitInCluster] = digit  ;   
        fNumberOfPpsdClusters++ ; 
        clu->AddDigit(*digit, Calibrate(digit->GetAmp()) ) ;    
        clusterdigitslist[iDigitInCluster] = digit  ;   
@@ -226,17 +244,14 @@ void AliPHOSClusterizerv1::MakeClusters(const DigitsList * dl,
        // Here we remove resting EMC digits, which cannot make cluster
 
         if( notremoved ) { 
        // Here we remove resting EMC digits, which cannot make cluster
 
         if( notremoved ) { 
-         
          while( ( digit = (AliPHOSDigit *)nextdigit() ) ) {
          while( ( digit = (AliPHOSDigit *)nextdigit() ) ) {
-           
             if( IsInEmc(digit) ) 
              tempodigitslist.Remove(digit) ;
             else 
              break ;
             if( IsInEmc(digit) ) 
              tempodigitslist.Remove(digit) ;
             else 
              break ;
-         
-         } // while digit  
-         
-       } // if notremoved 
+         }
+         notremoved = kFALSE ;
+       }
        
       } // else        
       
        
       } // else        
       
@@ -248,10 +263,10 @@ void AliPHOSClusterizerv1::MakeClusters(const DigitsList * dl,
        digit =  clusterdigitslist[index]  ;      
        index++ ; 
         while ( (digitN = (AliPHOSDigit *)nextdigit()) ) { // scan over the reduced list of digits 
        digit =  clusterdigitslist[index]  ;      
        index++ ; 
         while ( (digitN = (AliPHOSDigit *)nextdigit()) ) { // scan over the reduced list of digits 
-         Int_t ineb = AreNeighbours(digit, digitN);   //  call (digit,digitN) in THAT oder !!!!!
+         Int_t ineb = AreNeighbours(digit, digitN);       // call (digit,digitN) in THAT oder !!!!!
           switch (ineb ) {
           case 0 :   // not a neighbour
           switch (ineb ) {
           case 0 :   // not a neighbour
-           break ;      
+           break ;
          case 1 :   // are neighbours 
            clu->AddDigit(*digitN, Calibrate( digitN->GetAmp() ) ) ;
            clusterdigitslist[iDigitInCluster] = digitN ; 
          case 1 :   // are neighbours 
            clu->AddDigit(*digitN, Calibrate( digitN->GetAmp() ) ) ;
            clusterdigitslist[iDigitInCluster] = digitN ; 
@@ -268,8 +283,8 @@ void AliPHOSClusterizerv1::MakeClusters(const DigitsList * dl,
        nextdigit.Reset() ; 
        
       } // loop over cluster     
        nextdigit.Reset() ; 
        
       } // loop over cluster     
-   }  //below energy theshold  
-  
+    }  //below energy theshold  
+    
     delete[] clusterdigitslist ; 
     
   } // while digit
     delete[] clusterdigitslist ; 
     
   } // while digit
index a433f24c8471096a69e6ffcf3ec5a44b51965753..7b3e45ac0afa9a5e3301fac66b19690c2c352f8c 100644 (file)
@@ -35,12 +35,14 @@ public:
   virtual void GetNumberOfClustersFound(Int_t * numb) ; 
  
   virtual void GetCalibrationParameters(Float_t & A, Float_t &B) { A = fA; B = fB; } 
   virtual void GetNumberOfClustersFound(Int_t * numb) ; 
  
   virtual void GetCalibrationParameters(Float_t & A, Float_t &B) { A = fA; B = fB; } 
-  virtual Float_t GetEmcClusteringThreshold() { return fEmcClusteringThreshold;}
-  virtual Float_t GetEmcEnergyThreshold() { return fEmcEnergyThreshold; }  
-  virtual Float_t GetLocalMaxCut() { return fLocMaxCut;} 
-  virtual Float_t GetLogWeightCut() { return fW0;}  
+  virtual Float_t GetEmcClusteringThreshold()  { return fEmcClusteringThreshold;}
+  virtual Float_t GetEmcEnergyThreshold()      { return fEmcEnergyThreshold; }  
+  virtual Float_t GetLocalMaxCut()             { return fLocMaxCut;} 
+  virtual Float_t GetLogWeightCut()            { return fW0;}  
+  virtual Float_t GetLocalMaxCutCPV()          { return fLocMaxCutCPV;} 
+  virtual Float_t GetLogWeightCutCPV()         { return fW0CPV;}  
   virtual Float_t GetPpsdClusteringThreshold() { return fPpsdClusteringThreshold;  } 
   virtual Float_t GetPpsdClusteringThreshold() { return fPpsdClusteringThreshold;  } 
-  virtual Float_t GetPpsdEnergyThreshold() { return  fPpsdEnergyThreshold;  }
+  virtual Float_t GetPpsdEnergyThreshold()     { return fPpsdEnergyThreshold;  }
 
   virtual Bool_t IsInEmc(AliPHOSDigit * digit) ;                      // Tells if id digit is in EMC
   virtual void MakeClusters(const DigitsList * dl, 
 
   virtual Bool_t IsInEmc(AliPHOSDigit * digit) ;                      // Tells if id digit is in EMC
   virtual void MakeClusters(const DigitsList * dl, 
@@ -48,12 +50,14 @@ public:
                            AliPHOSRecPoint::RecPointsList * ppsdl) ; // does the job 
   virtual void PrintParameters() ;  
   virtual void SetCalibrationParameters(Float_t A,Float_t B){ fA = A ; fB = B;} 
                            AliPHOSRecPoint::RecPointsList * ppsdl) ; // does the job 
   virtual void PrintParameters() ;  
   virtual void SetCalibrationParameters(Float_t A,Float_t B){ fA = A ; fB = B;} 
-  virtual void SetEmcClusteringThreshold(Float_t cluth) { fEmcClusteringThreshold = cluth ; }
-  virtual void SetEmcEnergyThreshold(Float_t enth) { fEmcEnergyThreshold = enth ; } 
-  virtual void SetLocalMaxCut(Float_t cut) { fLocMaxCut = cut ; }
-  virtual void SetLogWeightCut(Float_t w) { fW0 = w ; }
+  virtual void SetEmcClusteringThreshold(Float_t cluth)  { fEmcClusteringThreshold = cluth ; }
+  virtual void SetEmcEnergyThreshold(Float_t enth)       { fEmcEnergyThreshold = enth ; } 
+  virtual void SetLocalMaxCut(Float_t cut)               { fLocMaxCut = cut ; }
+  virtual void SetLogWeightCut(Float_t w)                { fW0 = w ; }
+  virtual void SetLocalMaxCutCPV(Float_t cut)            { fLocMaxCutCPV = cut ; }
+  virtual void SetLogWeightCutCPV(Float_t w)             { fW0CPV = w ; }
   virtual void SetPpsdClusteringThreshold(Float_t cluth) { fPpsdClusteringThreshold = cluth ; }
   virtual void SetPpsdClusteringThreshold(Float_t cluth) { fPpsdClusteringThreshold = cluth ; }
-  virtual void SetPpsdEnergyThreshold(Float_t enth) { fPpsdEnergyThreshold = enth ; } 
+  virtual void SetPpsdEnergyThreshold(Float_t enth)      { fPpsdEnergyThreshold = enth ; } 
   
 private:
   
   
 private:
   
@@ -62,12 +66,15 @@ private:
   AliPHOSGeometry * fGeom ;          // pointer to geometry
   Float_t fEmcClusteringThreshold ;  // minimum energy to include a EMC digit in a cluster
   Float_t fEmcEnergyThreshold ;      // minimum energy of EMC digit to be considered
   AliPHOSGeometry * fGeom ;          // pointer to geometry
   Float_t fEmcClusteringThreshold ;  // minimum energy to include a EMC digit in a cluster
   Float_t fEmcEnergyThreshold ;      // minimum energy of EMC digit to be considered
-  Float_t fLocMaxCut ;               // minimum energy difference to distinguish local maxima in a cluster
   Int_t   fNumberOfEmcClusters ;     // number of EMC clusters found 
   Int_t   fNumberOfPpsdClusters ;    // number of PPSD clusters found
   Float_t fPpsdClusteringThreshold ; // minimum energy to include a PPSD digit in a cluster
   Float_t fPpsdEnergyThreshold ;     // minimum energy of PPSD digit to be considered
   Int_t   fNumberOfEmcClusters ;     // number of EMC clusters found 
   Int_t   fNumberOfPpsdClusters ;    // number of PPSD clusters found
   Float_t fPpsdClusteringThreshold ; // minimum energy to include a PPSD digit in a cluster
   Float_t fPpsdEnergyThreshold ;     // minimum energy of PPSD digit to be considered
+  Float_t fLocMaxCut ;               // minimum energy difference to distinguish local maxima in a cluster
   Float_t fW0 ;                      // logarithmic weight for the cluster center of gravity calculation
   Float_t fW0 ;                      // logarithmic weight for the cluster center of gravity calculation
+
+  Float_t fLocMaxCutCPV ;            // minimum energy difference to distinguish local maxima in a CPV cluster
+  Float_t fW0CPV ;                   // logarithmic weight for the CPV cluster center of gravity calculation
     
   ClassDef(AliPHOSClusterizerv1,1)  // Clusterizer implementation version 1
 
     
   ClassDef(AliPHOSClusterizerv1,1)  // Clusterizer implementation version 1