CbmRoot
Loading...
Searching...
No Matches
CbmTrdTrianglePRF.h
Go to the documentation of this file.
1/* Copyright (C) 2018 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Florian Uhlig [committer] */
4
5#ifndef CBMTRDTRIANGLEPRF_H
6#define CBMTRDTRIANGLEPRF_H 1
7
8#include <TObject.h>
9
10#include <iostream>
11
12class TF1;
13
15
31class CbmTrdTrianglePRF : public TObject {
32public:
34 {
35 NC = 2,
36 NR = 1
37 };
44 CbmTrdTrianglePRF(Float_t W, Float_t H, Int_t n = 20);
45 virtual ~CbmTrdTrianglePRF();
46
55 Bool_t GetBin(Double_t x, Double_t y, Int_t& binx, Int_t& biny) const;
60 Double_t GetChargeFraction() const;
66 void GetCurrentBin(Int_t& bx, Int_t& by) const
67 {
68 bx = fBinx;
69 by = fBiny;
70 }
77 void GetCurrentPad(Int_t& col, Int_t& row, Int_t& u) const;
81 void GoToOriginX() { fBinx = fBinx0; }
85 void GoToOriginY() { fBiny = fBiny0; }
90 Bool_t NextBinX();
95 Bool_t NextBinY();
96 Double_t Norm() const { return fNorm; }
97 void Print(Option_t* opt = "") const;
102 Bool_t PrevBinX();
107 Bool_t PrevBinY();
114 Bool_t SetOrigin(Double_t x, Double_t y);
115
116private:
125 Int_t GetSide(const Float_t x, const Float_t y) const;
126
127 Int_t fN;
129 Int_t fBinx;
131 Int_t fBinx0;
133 Int_t fBiny;
135 Int_t fBiny0;
136 Double_t fX0;
137 Double_t fY0;
138 Double_t fW;
139 Double_t fH;
140 Double_t fdW;
141 Double_t fdH;
142 Double_t fSlope;
143 Double_t fNorm;
144 std::vector<Char_t> fUp;
145 std::vector<Double_t> fX;
146 std::vector<Double_t> fY;
147 TF1* fPRFx;
148 TF1* fPRFy;
149
150 ClassDef(CbmTrdTrianglePRF, 1)
151};
152#endif
Utility for converting energy to signal over the triangular pad geometry (Bucharest prototype)
Double_t fNorm
normalization factor for the 2D Gauss distribution
Bool_t NextBinX()
Move current bin to the right.
Bool_t PrevBinX()
Move current bin to the left.
std::vector< Double_t > fX
position of bin center along wires
TF1 * fPRFy
PRF model across wires.
CbmTrdTrianglePRF(const CbmTrdTrianglePRF &ref)
Bool_t SetOrigin(Double_t x, Double_t y)
Set map offset @ point (x,y)
Double_t fdH
bin half height
@ NC
no. of neighbor columns (except the hit) to be considered in cluster definition
@ NR
no. of neighbor rows (except the hit) to be considered in cluster definition
CbmTrdTrianglePRF(Float_t W, Float_t H, Int_t n=20)
Build map.
void GoToOriginX()
Move current binx to the origin binx0.
Double_t Norm() const
Double_t fH
pad height
Double_t fSlope
slope of triangle H/W
void GetCurrentBin(Int_t &bx, Int_t &by) const
Enquire the current status of the map iterator.
void Print(Option_t *opt="") const
TF1 * fPRFx
PRF model along wires.
Double_t GetChargeFraction() const
Compute charge fraction on the current bin.
Double_t fX0
Index of bin in the map corresponding to cluster center - y direction.
CbmTrdTrianglePRF & operator=(const CbmTrdTrianglePRF &ref)
void GetCurrentPad(Int_t &col, Int_t &row, Int_t &u) const
Compute the pad corresponding to current bin.
Bool_t NextBinY()
Move current bin up.
Double_t fY0
y coordinate of cluster
Int_t fBiny
Current bin in the map - y direction.
Int_t fBinx
Current bin in the map - x direction.
std::vector< Double_t > fY
position of bin center across wires
Int_t GetSide(const Float_t x, const Float_t y) const
Define triangular pad type.
Double_t fW
pad width
std::vector< Char_t > fUp
1 for the upper pad, -1 for the bottom pad and 0 on the boundary
Bool_t PrevBinY()
Move current bin down.
void GoToOriginY()
Move current biny to the origin biny0.
Bool_t GetBin(Double_t x, Double_t y, Int_t &binx, Int_t &biny) const
Find bin for point (x,y)
Double_t fdW
bin half width
Int_t fBiny0
Offset bin in the map - y direction.
Int_t fBinx0
Offset bin in the map - x direction.