1 /**************************************************************************
2 * Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 ///////////////////////////////////////////////////////////////////
18 // Implementation of the base class for SDD detector algorithms //
19 // Origin: F.Prino, Torino, prino@to.infn.it //
21 ///////////////////////////////////////////////////////////////////
23 #include "AliITSOnlineSDD.h"
26 ClassImp(AliITSOnlineSDD)
27 //______________________________________________________________________
28 AliITSOnlineSDD::AliITSOnlineSDD():TObject(),fDDL(0),fCarlos(0),fSide(0),fFirstGoodTB(0),fLastGoodTB(0)
30 // default constructor
34 //______________________________________________________________________
35 AliITSOnlineSDD::AliITSOnlineSDD(Int_t nddl, Int_t ncarlos, Int_t sid):TObject(),fDDL(0),fCarlos(0),fSide(0),fFirstGoodTB(0),fLastGoodTB(0)
37 // standard constructor
44 //______________________________________________________________________
45 TH2F* AliITSOnlineSDD::ApplyZeroSuppression(TH2F* hRaw, Float_t basl, Int_t tL, Int_t tH){
46 // apply zero suppression
48 Int_t nx=hRaw->GetNbinsX();
49 Float_t xmin=hRaw->GetXaxis()->GetXmin();
50 Float_t xmax=hRaw->GetXaxis()->GetXmax();
51 Int_t ny=hRaw->GetNbinsY();
52 Float_t ymin=hRaw->GetYaxis()->GetXmin();
53 Float_t ymax=hRaw->GetYaxis()->GetXmax();
54 TH2F* hZeroSupp=new TH2F(Form("%s_ZeroSupp",hRaw->GetName()),"",nx,xmin,xmax,ny,ymin,ymax);
55 for(Int_t ix=1; ix<=nx;ix++){
56 for(Int_t iy=1; iy<=ny;iy++){
58 // Get "quintuple": WCE
60 Float_t cC=hRaw->GetBinContent(ix,iy)-basl;
61 Int_t nLow=0, nHigh=0;
63 hZeroSupp->SetBinContent(ix,iy,0.);
66 nLow++; // cC is greater than tL
69 if(iy>0) wW=hRaw->GetBinContent(ix,iy-1)-basl;
73 if(iy<ny) eE=hRaw->GetBinContent(ix,iy+1)-basl;
77 if(ix<nx) nN=hRaw->GetBinContent(ix+1,iy)-basl;
81 if(ix>0) sS=hRaw->GetBinContent(ix-1,iy)-basl;
84 if(nLow>=2 && nHigh>=1){
85 hZeroSupp->SetBinContent(ix,iy,cC);
87 hZeroSupp->SetBinContent(ix,iy,0.);