Adding cut on too noisy pads (Marian)
[u/mrichter/AliRoot.git] / HMPID / AliHMPIDCalib.h
CommitLineData
21f61e25 1#ifndef AliHMPIDCalib_h
2#define AliHMPIDCalib_h
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6// Class of HMPID to manage digits ---> pads
7//.
8//.
9//.
3e60bb92 10
11//#include "TTreePlayer.h"
12//#include <TTree.h>
21f61e25 13#include <TH1.h>
0f1281b2 14#include <TH2.h>
15#include <TH1S.h>
3e60bb92 16#include <TMath.h>
3c8e86a0 17#include <TFile.h>
0f1281b2 18#include "AliHMPIDParam.h"
19#include "AliHMPIDRawStream.h"
21f61e25 20
3c8e86a0 21class TH1I;
22class TFile;
21f61e25 23class AliHMPIDCalib: public TObject {
24
25
26public:
27 AliHMPIDCalib();
28 virtual ~AliHMPIDCalib();
29 void Init();
0f1281b2 30 void FillPedestal(Int_t pad,Int_t q); //absolute pad number and the charge of the pad
3c8e86a0 31 void FillErrors(Int_t nDDL,Int_t nErrType, Int_t nErr); //Fill the errors from RawStream
32 Bool_t CalcPedestal(Int_t nDDL, Char_t* name, Int_t nEv); //number of the DDL, name of the output file and the number of events processed
33 Bool_t WriteErrors(Int_t nDDL, Char_t* name, Int_t nEv); //number of the DDL, name of the output file and the number of events processed
34 void InitHisto(Int_t q,Int_t histocnt,Char_t* name); //Init the pad histograms
35 void FillHisto(Int_t histocnt,Int_t q); //Fill the ADC histograms
36 void InitFile(Int_t nDDL); //Init the ADC histo output file (one per LDC)
37 void CloseFile(Int_t nDDL); //Close the file
38 void SetRunParams(ULong_t runNum,Int_t timeStamp, Int_t ldcId); //Set Run Parameters such as Run Number, TimeStamp, LDCid
39 inline void SetSigCut(Int_t nSigCut) { fSigCut=nSigCut;} //Set Sigma Cuts from Setter
40 void SetSigCutFromFile(Char_t* name); //Set Sigma Cuts from File
41 inline void SetWriteHistoPads(Bool_t isOn) {fWritePads=isOn;} //Set wether ADC histos of pads are written or not
42 inline Bool_t GetWritePads() {return fWritePads;} //Set wether ADC histos of pads are written or not
21f61e25 43protected:
3c8e86a0 44
45 Bool_t *faddl; //check is ddl is filled
46 Float_t fsq[AliHMPIDRawStream::kNDDL+1][AliHMPIDRawStream::kNRows+1][AliHMPIDRawStream::kNDILOGICAdd+1][AliHMPIDRawStream::kNPadAdd+1]; //Sum of pad Q
47 Float_t fsq2[AliHMPIDRawStream::kNDDL+1][AliHMPIDRawStream::kNRows+1][AliHMPIDRawStream::kNDILOGICAdd+1][AliHMPIDRawStream::kNPadAdd+1]; //Sum of pad Q^2
48 Int_t fErr[AliHMPIDRawStream::kNDDL+1][AliHMPIDRawStream::kSumErr+1]; // Store the numner of errors for a given error type and a given DDL
49 TH1I **fPadAdc; //Charge distribution for pads
50 Bool_t *fIsPad; //Check if the ADC histo for the pad is booked or not
51 TFile *fFile; //ADC histo output file (one per LDC)
52 UInt_t fLdcId; //Ldc ID
53 UInt_t fTimeStamp; //Time Stamp
54 Int_t fRunNum; //Run Number
55 Int_t fSigCut; //n. of pedestal distribution sigmas used to create zero suppresion table
56 Bool_t fWritePads; //Select wether to write ADC pad histograms or not
57 ClassDef(AliHMPIDCalib,2) //HMPID calibration and pedestal class
21f61e25 58};
59#endif