LCOV - code coverage report
Current view: top level - ITS/ITSrec - AliITSclustererV2.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 21 4.8 %
Date: 2016-06-14 17:26:59 Functions: 1 31 3.2 %

          Line data    Source code
       1             : #ifndef ALIITSCLUSTERERV2_H
       2             : #define ALIITSCLUSTERERV2_H
       3             : //--------------------------------------------------------------
       4             : //                       ITS clusterer V2
       5             : //
       6             : //   This can be a "wrapping" for the V1 cluster finding classes
       7             : //   if compiled with uncommented "#define V1" line 
       8             : //   in the AliITSclustererV2.cxx file.
       9             : //
      10             : //   Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch 
      11             : //--------------------------------------------------------------
      12             : #include <TObject.h>
      13             : 
      14             : class TFile;
      15             : class TTree;
      16             : class TClonesArray;
      17             : 
      18             : class AliITSclusterV2;
      19             : class AliRawReader;
      20             : class AliITSRawStream;
      21             : 
      22           0 : class AliITSclustererV2 : public TObject {
      23             : public:
      24             :   AliITSclustererV2();
      25             :   AliITSclustererV2(const Char_t *geom);
      26             : 
      27           0 :   void SetEvent(Int_t event) { fEvent=event; }
      28             :   Int_t Digits2Clusters(TTree *in, TTree *out);
      29             :   void Digits2Clusters(AliRawReader* rawReader);
      30             :   void FindClustersSPD(const TClonesArray *dig, TClonesArray *cls);
      31             :   void FindClustersSPD(AliITSRawStream* input, TClonesArray** clusters);
      32             :   void FindClustersSDD(const TClonesArray *dig, TClonesArray *cls);
      33             :   void FindClustersSDD(AliITSRawStream* input, TClonesArray** clusters);
      34             :   void FindClustersSSD(const TClonesArray *dig, TClonesArray *cls);
      35             :   void FindClustersSSD(AliITSRawStream* input, TClonesArray** clusters);
      36             : 
      37             :   void RecPoints2Clusters(const TClonesArray *p, Int_t idx, TClonesArray *c);
      38             : 
      39             :   class Ali1Dcluster {
      40             :   public:
      41           0 :     void SetY(Float_t y) {fY=y;}
      42           0 :     void SetQ(Float_t q) {fQ=q;}
      43           0 :     void SetNd(Int_t n)  {fNd=n;}
      44           0 :     void SetLabels(Int_t *lab) {fLab[0]=lab[0];fLab[1]=lab[1];fLab[2]=lab[2];}
      45           0 :     Float_t GetY() const {return fY;}
      46           0 :     Float_t GetQ() const {return fQ;}
      47           0 :     Int_t GetNd()const {return fNd;}
      48           0 :     Int_t GetLabel(Int_t lab) const { return fLab[lab]; }
      49             :   private:
      50             :     Float_t fY; //cluster position
      51             :     Float_t fQ; //cluster charge
      52             :     Int_t fNd;  //number of digits
      53             :     Int_t fLab[3]; //track label
      54             :   };
      55             :   class AliBin {
      56             :   public:
      57           0 :     AliBin():fIndex(0),fMask(0xFFFFFFFE),fQ(0) {}
      58           0 :     void SetIndex(UInt_t idx) {fIndex=idx;}
      59           0 :     void SetQ(UShort_t q)  {fQ=q;}
      60           0 :     void SetMask(UInt_t m) {fMask=m;}
      61             :     void Reset() {fIndex=0; fMask=0xFFFFFFFE; fQ=0;}
      62             : 
      63           0 :     void Use() {fMask&=0xFFFFFFFE;}
      64           0 :     Bool_t IsNotUsed() const {return (fMask&1);}
      65           0 :     Bool_t IsUsed() const {return !(IsNotUsed());}
      66             : 
      67           0 :     UInt_t   GetIndex() const {return fIndex;}
      68           0 :     UShort_t GetQ()     const {return fQ;}
      69           0 :     UInt_t   GetMask()  const {return fMask;}
      70             :   private:
      71             :     UInt_t fIndex; //digit index
      72             :     UInt_t fMask; //peak mask
      73             :     UShort_t fQ;  //signal
      74             :   };
      75             :   static Bool_t IsMaximum(Int_t k, Int_t max, const AliBin *bins);
      76             :   static void FindPeaks(Int_t k,Int_t m,AliBin*b,Int_t*idx,UInt_t*msk,Int_t&n);
      77             :   static void MarkPeak(Int_t k, Int_t max, AliBin *bins, UInt_t m);
      78             :   static void MakeCluster(Int_t k,Int_t max,AliBin *bins,UInt_t m,
      79             :    AliITSclusterV2 &c);
      80             :   void FindClustersSDD(AliBin* bins[2], Int_t nMaxBin, Int_t nMaxZ,
      81             :                        const TClonesArray *dig, TClonesArray *cls);
      82             :   void FindClustersSSD(Ali1Dcluster* neg, Int_t nn, 
      83             :                        Ali1Dcluster* pos, Int_t np,
      84             :                        TClonesArray *clusters);
      85             : 
      86             : 
      87             :   static void FindCluster(Int_t k,Int_t maxz,AliBin *bins,Int_t &n,Int_t *idx);
      88             : 
      89             : protected:
      90             :   Int_t fNModules;             // total number of modules
      91             : 
      92             : private:
      93             :   Int_t fEvent;           //event number
      94             : 
      95             :   Int_t fI;                     //index of the current subdetector
      96             :   Float_t fYshift[2200];       //y-shifts of detector local coor. systems 
      97             :   Float_t fZshift[2200];       //z-shifts of detector local coor. systems 
      98             :   Int_t fNdet[2200];            //detector index  
      99             :   Int_t fNlayer[2200];          //detector layer
     100             : 
     101             :   //SPD related values:
     102             :   Int_t fLastSPD1;       //index of the last SPD1 detector
     103             :   Int_t fNySPD;          //number of pixels in Y
     104             :   Int_t fNzSPD;          //number of pixels in Z
     105             :   Float_t fYpitchSPD;    //pixel size in Y
     106             :   Float_t fZ1pitchSPD,fZ2pitchSPD;    //pixel sizes in Z
     107             :   Float_t fHwSPD;        //half width of the SPD detector
     108             :   Float_t fHlSPD;        //half length of the SPD detector
     109             :   Float_t fYSPD[260];    //Y-coordinates of pixel centers
     110             :   Float_t fZSPD[170];    //Z-coordinates of pixel centers
     111             : 
     112             :   //SDD related values:
     113             :   Int_t fNySDD;           //number of "pixels" in Y
     114             :   Int_t fNzSDD;           //number of "pixels" in Z
     115             :   Float_t fYpitchSDD;     //"pixel size" in Y (drift direction)
     116             :   Float_t fZpitchSDD;     //"pixel sizes" in Z
     117             :   Float_t fHwSDD;         //half width of the SDD detector
     118             :   Float_t fHlSDD;         //half length of the SDD detector
     119             :   Float_t fYoffSDD;       //some delay in the drift channel   
     120             : 
     121             :   //SSD related values:
     122             :   Int_t fLastSSD1;        //index of the last SSD1 detector   
     123             :   Float_t fYpitchSSD;     //strip pitch (cm)
     124             :   Float_t fHwSSD;         //half-width of an SSD detector (cm)
     125             :   Float_t fHlSSD;         //half-length of an SSD detector (cm)
     126             :   Float_t fTanP;          //tangent of the stereo angle on the P side
     127             :   Float_t fTanN;          //tangent of the stereo angle on the N side
     128             : 
     129         116 :   ClassDef(AliITSclustererV2,1)  // ITS cluster finder V2
     130             : };
     131             : 
     132             : #endif

Generated by: LCOV version 1.11