]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HMPID/AliHMPIDCluster.h
Access to the PYTHIA include files (Christian)
[u/mrichter/AliRoot.git] / HMPID / AliHMPIDCluster.h
index c4729607d2e08945a246bfe865acd51148143a3d..f0b59455392fc620d716b5c64d32f1579eb306fe 100644 (file)
@@ -2,7 +2,14 @@
 #define AliHMPIDCluster_h
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
-
+//
+// Implementation class: AliHMPIDCluster
+//   
+//   class to reconstruct clester in HMPID
+//   it is forseen to Solve (split) the raw cluster in 
+//   several clusters (# local maxima in the raw cluster -> deconvolution
+//   according to a Mathieson profile of the charge 
+//
 #include "AliHMPIDDigit.h"  //DigAdd()
 #include <TObjArray.h>     //DigAdd()      
 class TClonesArray;        //Solve()
@@ -10,7 +17,7 @@ class TClonesArray;        //Solve()
 class AliHMPIDCluster :public TObject
 {
 public:
-  enum EClusterStatus {kFrm,kCoG,kLo1,kUnf,kMax,kNot,kEdg,kSi1,kNoLoc,kEmp=-1};      //status flags    
+  enum EClusterStatus {kFrm,kCoG,kLo1,kUnf,kMax,kNot,kEdg,kSi1,kNoLoc,kAbn,kEmp=-1};      //status flags    
   AliHMPIDCluster():TObject( ),fCh(-1),fSi(-1),fSt(kEmp),fBox(-1),fNlocMax(-1),fMaxQpad(-1),fMaxQ(-1),fQRaw(0),fQ(0),fErrQ(-1),fX(0),fErrX(-1),fY(0),fErrY(-1),fChi2(-1),fDigs(0) {} //empty ctor
   
   
@@ -28,7 +35,7 @@ public:
 //framework part                   
          void           Draw   (Option_t *opt=""                                  );                       //overloaded TObject::Print() to draw cluster in current canvas
          void           Print  (Option_t *opt=""                                  )const;                  //overloaded TObject::Print() to print cluster info
-  static void           FitFunc(Int_t &, Double_t *, Double_t &, Double_t *, Int_t);                       //fit function to be used by MINUIT
+  static void           FitFunc(Int_t &iNpars, Double_t* /*deriv*/, Double_t &chi2, Double_t *par, Int_t /* */);//fit function to be used by MINUIT
 //private part  
          Int_t          Box      (                                         )const{return fBox;                                  }
          void           CoG      (                                         );                                                      //calculates center of gravity
@@ -36,19 +43,22 @@ public:
          Int_t          Ch       (                                         )const{return fCh;                                    } //chamber number
   inline void           DigAdd   (AliHMPIDDigit *pDig                      );                                                      //add new digit ot the cluster
          AliHMPIDDigit* Dig      (Int_t i                                  )const{return (AliHMPIDDigit*)fDigs->At(i);           } //pointer to i-th digi 
-  inline Bool_t         IsInPc   ();                                                                                        //check if is in the current PC
+  inline Bool_t         IsInPc   ();                                                                                               //check if is in the current PC
   inline void           Reset    (                                         );                                                      //cleans the cluster
          Int_t          Size     (                                         )const{return fSi;                                    } //returns number of pads in formed cluster 
          Int_t          Solve    (TClonesArray *pCluLst,Bool_t isUnfold    );                                                      //solve cluster: MINUIT fit or CoG
-         Int_t          Status  (                                          ) const{return fSt;}                                   //Status of cluster                                  
+         Int_t          Status   (                                         ) const{return fSt;}                                    //Status of cluster                                  
          Double_t       QRaw     (                                         )const{return fQRaw;                                  } //raw cluster charge in QDC channels 
          Double_t       Q        (                                         )const{return fQ;                                     } //given cluster charge in QDC channels 
          Double_t       Qe       (                                         )const{return fErrQ;                                  } //Error in cluster charge in QDC channels 
          Double_t       X        (                                         )const{return fX;                                     } //cluster x position in LRS
          Double_t       Xe       (                                         )const{return fErrX;                                  } //cluster charge in QDC channels 
          Double_t       Y        (                                         )const{return fY;                                     } //cluster y position in LRS 
-         Double_t       Ye       (                                         )const{return fErrY;                                    } //cluster charge in QDC channels 
-         Double_t       Chi2     (                                         )const{return fChi2;                                  } 
+         Double_t       Ye       (                                         )const{return fErrY;                                  } //cluster charge in QDC channels 
+         Double_t       Chi2     (                                         )const{return fChi2;                                  } //chi2 of the fit
+         void           DoCorrSin(Bool_t doCorrSin                         ){fgDoCorrSin=doCorrSin;}                                // Set sinoidal correction
+         void           SetX     (Double_t x                               ){fX=x;}                                                // Setter
+         void           SetY     (Double_t y                               ){fY=y;}                                                // Setter
 protected:
   Int_t         fCh;          //chamber number
   Int_t         fSi;          //size of the formed cluster from which this cluster deduced
@@ -66,17 +76,16 @@ protected:
   Double_t      fErrY;        //error on y postion, [cm]
   Double_t      fChi2;        //some estimator of the fit quality
   TObjArray    *fDigs;        //! list of digits forming this cluster
+  static  Bool_t fgDoCorrSin; //flag to switch on/off correction for Sinusoidal to cluster reco
   ClassDef(AliHMPIDCluster,6) //HMPID cluster class
 };//class AliHMPIDCluster
 
-typedef AliHMPIDCluster AliRICHCluster; // for backward compatibility
-
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 void AliHMPIDCluster::DigAdd(AliHMPIDDigit *pDig)
 {
 // Adds a given digit to the list of digits belonging to this cluster, cluster is not owner of digits
 // Arguments: pDig - pointer to digit to be added  
-//   Returns: none  
+// Returns: none  
   if(!fDigs) {fSi=0;fDigs = new TObjArray;} //create list of digits in the first invocation
   fDigs->Add(pDig);
   fSt=kFrm;
@@ -85,6 +94,9 @@ void AliHMPIDCluster::DigAdd(AliHMPIDDigit *pDig)
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 void AliHMPIDCluster::Reset()
 {
+  //
+  //
+  //
   if(fDigs) delete fDigs; 
   fDigs=0; 
   fSt=kEmp;
@@ -96,11 +108,14 @@ void AliHMPIDCluster::Reset()
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 Bool_t AliHMPIDCluster::IsInPc()
 {
+  //Check if (X,Y) position is inside the PC limits
+  //Arguments:
+  //  Returns: True or False
   Int_t pc = ((AliHMPIDDigit*)fDigs->At(0))->Pc();
  
   
-  if ( fX < AliHMPIDDigit::fMinPcX[pc] || fX > AliHMPIDDigit::fMaxPcX[pc] || 
-       fY < AliHMPIDDigit::fMinPcY[pc] || fY > AliHMPIDDigit::fMaxPcY[pc] ) return kFALSE;
+  if ( fX < AliHMPIDDigit::MinPcX(pc) || fX > AliHMPIDDigit::MaxPcX(pc) || 
+       fY < AliHMPIDDigit::MinPcY(pc) || fY > AliHMPIDDigit::MaxPcY(pc) ) return kFALSE;
   
   return kTRUE;