ROOT logo
#ifndef ALIITSCLUSTERFINDERSDDFAST_H
#define ALIITSCLUSTERFINDERSDDFAST_H

//----------------------------------------------------------------------
//              ITS clusterer for SDD - fast algorithm
//
//   Origin: Simone Capodicasa, Universita e INFN, capodica@to.infn.it
//----------------------------------------------------------------------

#include "AliITSClusterFinder.h"
#include "AliITSDetTypeRec.h"
#include <vector>

class TBits;
class TClonesArray;
class AliRawReader;
class AliITSRawStream;
class AliITSCalibrationSDD;
class AliITSsegmentationSDD;

class AliITSClusterFinderSDDfast : public AliITSClusterFinder {
 public:
  AliITSClusterFinderSDDfast(AliITSDetTypeRec* dettyp);
  virtual ~AliITSClusterFinderSDDfast();
  virtual void FindRawClusters(Int_t mod);
  virtual void RawdataToClusters(AliRawReader* rawReader);
  void SetPeakSelection(Float_t looseCut=15., Float_t tightCut=30., Float_t maxTime=2000.){
    fCutOnPeakLoose=looseCut;
    fCutOnPeakTight=tightCut;
    fMaxDrTimeForTightCut=maxTime;
  }
  
  enum {kHybridsPerDDL = 24};   // number of hybrids in each DDL
  enum {kModulesPerDDL = 12};   // number of modules in each DDL
  
 protected:
  AliITSClusterFinderSDDfast(const AliITSClusterFinderSDDfast &source); // copy constructor
  // assignment operator
  AliITSClusterFinderSDDfast& operator=(const AliITSClusterFinderSDDfast &source);
  void FindClustersSDD(TClonesArray *digits);
  void FindClustersSDD(std::vector<int>& bins0, std::vector<int>& bins1, const Int_t map0[], const Int_t map1[], TClonesArray *dig, TClonesArray *clusters=0x0, Int_t jitter=0);
  
  void FindClustersSDD(AliITSRawStream* input);
  virtual AliITSCalibrationSDD* GetResp(Int_t mod)const{
    return (AliITSCalibrationSDD*) fDetTypeRec->GetCalibrationModel(mod);}
  virtual AliITSsegmentationSDD* GetSeg()const{
    return (AliITSsegmentationSDD*)fDetTypeRec->GetSegmentationModel(1);}
  
  Int_t fNAnodes;                   // number of anodes
  Int_t fNTimeBins;                 // number of time bins
  Int_t fNZbins;                    // number of cells along anodes
  Int_t fNXbins;                    // number of cells along time
  std::vector<std::vector<int> > fDDLBins; // container for digits for 1 DDL
  Float_t fCutOnPeakLoose;          // loose cut on peak (for all drift times)
  Float_t fCutOnPeakTight;          // tight cut on peak (for small drift times)
  Float_t fMaxDrTimeForTightCut;    // max. drift time for fCutOnPeakTight
  
  ClassDef(AliITSClusterFinderSDDfast,1)  // ITS cluster finder fast for SDD
    };

#endif
 AliITSClusterFinderSDDfast.h:1
 AliITSClusterFinderSDDfast.h:2
 AliITSClusterFinderSDDfast.h:3
 AliITSClusterFinderSDDfast.h:4
 AliITSClusterFinderSDDfast.h:5
 AliITSClusterFinderSDDfast.h:6
 AliITSClusterFinderSDDfast.h:7
 AliITSClusterFinderSDDfast.h:8
 AliITSClusterFinderSDDfast.h:9
 AliITSClusterFinderSDDfast.h:10
 AliITSClusterFinderSDDfast.h:11
 AliITSClusterFinderSDDfast.h:12
 AliITSClusterFinderSDDfast.h:13
 AliITSClusterFinderSDDfast.h:14
 AliITSClusterFinderSDDfast.h:15
 AliITSClusterFinderSDDfast.h:16
 AliITSClusterFinderSDDfast.h:17
 AliITSClusterFinderSDDfast.h:18
 AliITSClusterFinderSDDfast.h:19
 AliITSClusterFinderSDDfast.h:20
 AliITSClusterFinderSDDfast.h:21
 AliITSClusterFinderSDDfast.h:22
 AliITSClusterFinderSDDfast.h:23
 AliITSClusterFinderSDDfast.h:24
 AliITSClusterFinderSDDfast.h:25
 AliITSClusterFinderSDDfast.h:26
 AliITSClusterFinderSDDfast.h:27
 AliITSClusterFinderSDDfast.h:28
 AliITSClusterFinderSDDfast.h:29
 AliITSClusterFinderSDDfast.h:30
 AliITSClusterFinderSDDfast.h:31
 AliITSClusterFinderSDDfast.h:32
 AliITSClusterFinderSDDfast.h:33
 AliITSClusterFinderSDDfast.h:34
 AliITSClusterFinderSDDfast.h:35
 AliITSClusterFinderSDDfast.h:36
 AliITSClusterFinderSDDfast.h:37
 AliITSClusterFinderSDDfast.h:38
 AliITSClusterFinderSDDfast.h:39
 AliITSClusterFinderSDDfast.h:40
 AliITSClusterFinderSDDfast.h:41
 AliITSClusterFinderSDDfast.h:42
 AliITSClusterFinderSDDfast.h:43
 AliITSClusterFinderSDDfast.h:44
 AliITSClusterFinderSDDfast.h:45
 AliITSClusterFinderSDDfast.h:46
 AliITSClusterFinderSDDfast.h:47
 AliITSClusterFinderSDDfast.h:48
 AliITSClusterFinderSDDfast.h:49
 AliITSClusterFinderSDDfast.h:50
 AliITSClusterFinderSDDfast.h:51
 AliITSClusterFinderSDDfast.h:52
 AliITSClusterFinderSDDfast.h:53
 AliITSClusterFinderSDDfast.h:54
 AliITSClusterFinderSDDfast.h:55
 AliITSClusterFinderSDDfast.h:56
 AliITSClusterFinderSDDfast.h:57
 AliITSClusterFinderSDDfast.h:58
 AliITSClusterFinderSDDfast.h:59
 AliITSClusterFinderSDDfast.h:60
 AliITSClusterFinderSDDfast.h:61