LCOV - code coverage report
Current view: top level - TPC/TPCrec - AliTPCclusterer.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 19 22 86.4 %
Date: 2016-06-14 17:26:59 Functions: 5 11 45.5 %

          Line data    Source code
       1             : #ifndef ALITPCCLUSTERER_H
       2             : #define ALITPCCLUSTERER_H
       3             : 
       4             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       5             :  * See cxx source for full Copyright notice                               */
       6             : 
       7             : /* $Id$ */
       8             : 
       9             : 
      10             : 
      11             : //-------------------------------------------------------
      12             : //                       TPC clusterer
      13             : //
      14             : //   Origin: Marian Ivanov  
      15             : //-------------------------------------------------------
      16             : #include <Rtypes.h>
      17             : #include <TObject.h>
      18             : #include <AliTPCRecoParam.h>
      19             : #define kMAXCLUSTER 2500
      20             : 
      21             : class TFile;
      22             : class TClonesArray;
      23             : class AliTPCParam;
      24             : class AliTPCRecoParam;
      25             : class AliTPCclusterMI;
      26             : class AliTPCClustersRow;
      27             : class AliRawReader;
      28             : class AliSimDigits;
      29             : class TTree;
      30             : class TTreeSRedirector;
      31             : class  AliRawEventHeaderBase;
      32             : class AliTPCCalROC;
      33             : 
      34             : class AliTPCclusterer : public TObject{
      35             : public:
      36             :   AliTPCclusterer(const AliTPCParam* par, const AliTPCRecoParam * recoParam = 0);
      37             :   virtual ~AliTPCclusterer();
      38             :   virtual void Digits2Clusters();
      39             :   virtual void Digits2Clusters(AliRawReader* rawReader);
      40             :   virtual void SetInput(TTree * tree);  // set input tree with digits
      41             :   virtual void SetOutput(TTree * tree); // set output tree with 
      42             :   virtual void FillRow();               // fill the output container - Tree or TObjArray
      43           0 :   TObjArray * GetOutputArray(){return fOutputArray;}
      44           0 :   TClonesArray * GetOutputClonesArray(){return fOutputClonesArray;}
      45             : 
      46           0 :   void StoreInClonesArray(Bool_t bOutput = kTRUE) {fBClonesArray = bOutput;} // store output clusters in TClonesArray
      47             : 
      48           4 :   void SetUseHLTClusters(Int_t useHLTClusters) {fUseHLTClusters = useHLTClusters;} // set usage from HLT clusters from rec.C options
      49             : 
      50             : private:
      51             :   AliTPCclusterer(const AliTPCclusterer &param); // copy constructor
      52             :   AliTPCclusterer &operator = (const AliTPCclusterer & param); //assignment
      53             : 
      54             :   void InitClustererArrays();
      55             : 
      56             :   Bool_t IsMaximum(Float_t k, Int_t max, const Float_t *bins) const; 
      57             :   void MakeCluster2(Int_t k,Int_t max,Float_t *bins,UInt_t m,
      58             :    AliTPCclusterMI &c);  
      59             :   void MakeCluster(Int_t k,Int_t max,Float_t *bins,UInt_t m,
      60             :    AliTPCclusterMI &c); 
      61             :   Float_t  GetSigmaY2(Int_t iz);
      62             :   Float_t  GetSigmaZ2(Int_t iz);
      63             :   Float_t  FitMax(Float_t vmatrix[5][5], Float_t y, Float_t z, Float_t sigmay, Float_t sigmaz);
      64             :   void AddCluster(AliTPCclusterMI &c, bool addtoarray, Float_t *matrix = NULL, Int_t pos = 0);  // add the cluster to the array
      65             :   void AddCluster(AliTPCclusterMI &c, Float_t *matrix = NULL, Int_t pos = 0) {  // add the cluster to the array
      66      129896 :     return AddCluster(c, true, matrix, pos);
      67             :   }
      68             :   void UnfoldCluster(Float_t * matrix[7], Float_t recmatrix[5][5], 
      69             :                      Float_t & meani, Float_t & meanj, Float_t & sum, Float_t &overlap );
      70             :   void FindClusters(AliTPCCalROC * noiseROC);
      71             :   Bool_t AcceptCluster(AliTPCclusterMI*c);
      72             :   Double_t  ProcesSignal(Float_t * signal, Int_t nchannels, Int_t id[3], Double_t &rms, Double_t &pedestalCalib);
      73             :   void ProcessSectorData();
      74             :   Int_t ReadHLTClusters();
      75             :   
      76             :   Float_t * fBins;       //!digits array
      77             :   Int_t   * fSigBins; //!digits array containg only timebins above threshold
      78             :   Int_t     fNSigBins;//!size of fSigBins
      79             :   Int_t fLoop;         //loop - cf in 2 loops
      80             :   Int_t fMaxBin;       //current ( for current sector)  maximal bin
      81             :   Int_t fMaxTime;      //current ( for current sector)  maximal time
      82             :   Int_t fMaxTimeBook;  //largest possible maxTime among recoparams
      83             :   Int_t fMaxPad;       //current ( for current sector)  maximal pad
      84             :   Int_t fSector;      //!current sector
      85             :   Int_t fRow;         //!current row
      86             :   Float_t fSign;      //!current sign 
      87             :   Float_t fRx;        // current radius
      88             :   Float_t fPadWidth;  // the width of the pad
      89             :   Float_t fPadLength;  // the width of the pad
      90             :   Float_t fZWidth;     //the z bin width
      91             :   Bool_t  fPedSubtraction; // perform pedestal subtraction or not
      92             :   AliRawEventHeaderBase *fEventHeader; //! event header information
      93             :   UInt_t  fTimeStamp;   // Time Stamp
      94             :   UInt_t  fEventType;   // Event Type
      95             :   TTree * fInput;   //!input  tree with digits - object not owner
      96             :   TTree * fOutput;   //!output tree with digits - object not owner
      97             :   TObjArray *fOutputArray;     //! output TObjArray with pointers arrays of cluster
      98             :   TClonesArray *fOutputClonesArray; //! output TClonesArray with clusters
      99             :   AliTPCClustersRow * fRowCl;  //! current cluster row
     100             :   AliSimDigits * fRowDig;      //! current digits row
     101             :   const AliTPCParam * fParam;        //! tpc parameters
     102             :   Int_t fNcluster;             // number of clusters - for given row
     103             :   Int_t fNclusters;            // tot number of clusters
     104             :   TTreeSRedirector *fDebugStreamer;     //!debug streamer
     105             :   const AliTPCRecoParam  * fRecoParam;        //! reconstruction parameters
     106             :   Bool_t  fBDumpSignal; // dump signal flag
     107             :   Bool_t  fBClonesArray; // output clusters stored in TClonesArray 
     108             :   Int_t  fUseHLTClusters; // use HLT clusters instead of offline clusters
     109             : 
     110             :   // Non-persistent arrays
     111             : 
     112             :   Float_t** fAllBins; //! All sector bins
     113             :   Int_t** fAllSigBins;//! All signal bins in a sector
     114             :   Int_t*  fAllNSigBins;//! Number of signal bins in a sector
     115             :   TObject* fHLTClusterAccess;// interface to HLT clusters
     116             : 
     117          40 :   ClassDef(AliTPCclusterer,0)  // TPC cluster finder
     118             : };
     119             : 
     120             : inline Bool_t AliTPCclusterer::IsMaximum(Float_t q,Int_t max,const Float_t *bins) const {
     121             :   //is this a local maximum ?
     122     1348356 :   if (bins[-max] >= q) return kFALSE;
     123      539308 :   if (bins[-1  ] >= q) return kFALSE; 
     124      322020 :   if (bins[+max] > q) return kFALSE; 
     125      235490 :   if (bins[+1  ] > q) return kFALSE; 
     126      104518 :   if (bins[-max-1] >= q) return kFALSE;
     127      101548 :   if (bins[+max-1] >= q) return kFALSE; 
     128       96900 :   if (bins[+max+1] > q) return kFALSE; 
     129       92506 :   if (bins[-max+1] >= q) return kFALSE;
     130             :   //
     131             :   //
     132       85790 :   if (fRecoParam->GetClusterMaxRange(1)>0){  //local maxima in z on more than 1 time bin 
     133       88312 :     if (bins[-2] > q) return kFALSE;
     134       86128 :     if (bins[ 2] > q) return kFALSE;
     135             :   }
     136       80408 :   if (fRecoParam->GetClusterMaxRange(0)>0){  //local maxima in y on more than pad 
     137       81254 :     if (bins[-2*max] > q) return kFALSE;
     138       80610 :     if (bins[ 2*max] > q) return kFALSE;
     139             :   }
     140             : 
     141       78514 :   return kTRUE; 
     142      580188 : }
     143             : 
     144             : 
     145             : 
     146             : //-----------------------------------------------------------------
     147             : 
     148             : #endif
     149             : 
     150             : 

Generated by: LCOV version 1.11