Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
CorrFitMask1D.h
1/*
2 * CorrFitMask1D.h
3 *
4 * Created on: 12 lut 2023
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9#ifndef HAL_ANALYSIS_FEMTO_CORRFIT_CORRFITOPT_CORRFITMASK1D_H_
10#define HAL_ANALYSIS_FEMTO_CORRFIT_CORRFITOPT_CORRFITMASK1D_H_
11
12#include "CorrFitMask.h"
13
14#include <vector>
15
16#include <RtypesCore.h>
17
18namespace Hal {
19 class CorrFitMask1D : public CorrFitMask {
20 Int_t fBins;
21 Double_t fMin, fMax;
22 std::vector<Short_t> fRawMask;
23
24 public:
25 CorrFitMask1D(Int_t bins = 100, Double_t min = 0, Double_t max = 1);
26 void ApplyRange(Double_t min, Double_t max, Bool_t additive = kTRUE);
27 void SetBin(Int_t bin, Bool_t state = true);
28 void Reset(Bool_t state = kTRUE);
29 Bool_t Init();
30 Bool_t GetBinFlag(Int_t no) const { return fRawMask[no]; };
31 Bool_t AreCompatible(TObject* cf) const;
32 void ApplyThreshold(const TH1& h, Double_t threshold = 0);
33 Int_t GetNBins() const { return fRawMask.size() - 2; };
34 Double_t GetMin() const { return fMin; };
35 Double_t GetMax() const { return fMax; }
36 virtual ~CorrFitMask1D() {};
37 ClassDef(CorrFitMask1D, 1)
38 };
39
40} // namespace Hal
41#endif /* HAL_ANALYSIS_FEMTO_CORRFIT_CORRFITOPT_CORRFITMASK1D_H_ */