PandaRoot
PndSdsCalcPixelDif.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 #ifndef PNDSDSCALCPIXELDIF_H
14 #define PNDSDSCALCPIXELDIF_H
15 
16 #include "PndSdsPixel.h"
17 #include "FairGeoVector.h"
18 #include <iostream>
19 #include <vector>
20 //#include <XYVector.h>
21 //#include "CLHEP/Vector/TwoVector.h"
23 
37 class PndSdsPixelDigiPar;
38 
40  public:
43 
50  PndSdsCalcPixelDif(Double_t w, Double_t l, Double_t qspread = 0, Double_t threshold = 0, Double_t noise = 0, Double_t nrows = 10, Double_t ncols = 10);
51  PndSdsCalcPixelDif(const PndSdsPixelDigiPar &digi_par);
52 
54  std::vector<PndSdsPixel> GetPixels(Double_t inx, Double_t iny, Double_t outx, Double_t outy, Double_t energy);
55 
56  Int_t GetPixelsAlternative(Double_t inx, Double_t iny, Double_t outx, Double_t outy, Double_t energy, std::vector<Int_t> &cols, std::vector<Int_t> &rows,
57  std::vector<Double_t> &charges);
58 
59  void SetVerboseLevel(Int_t level) { fVerboseLevel = level; };
60  std::ostream &operator<<(std::ostream &out);
61 
62  private:
63  Double_t ChargeFromEloss(Double_t eloss) const { return eloss / (3.61e-9); }
64  void InjectPixelCharge(Int_t col, Int_t row, Double_t charge);
65 
66  std::vector<PndSdsPixel> fPixels;
67  PndSdsPixel fActivePixel;
68 
69  Double_t fPixelSizeX;
70  Double_t fPixelSizeY;
71  Double_t fRows;
72  Double_t fCols;
73  Double_t fThreshold;
74  Double_t fNoise;
75  Double_t fQspread;
76  Double_t fEnergy;
77 
78  Int_t fVerboseLevel;
79 };
80 
81 #endif
Int_t GetPixelsAlternative(Double_t inx, Double_t iny, Double_t outx, Double_t outy, Double_t energy, std::vector< Int_t > &cols, std::vector< Int_t > &rows, std::vector< Double_t > &charges)
void SetVerboseLevel(Int_t level)
std::ostream & operator<<(std::ostream &out)
std::vector< PndSdsPixel > GetPixels(Double_t inx, Double_t iny, Double_t outx, Double_t outy, Double_t energy)
Main function to calculate the vector<PndSdsPixel> of fired pixel.
PndSdsCalcPixelDif()
Default constructor.
Digitization Parameter Class for SDS-Pixel part.