PandaRoot
PndSdsCalcStrip.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 //
14 // C++ Interface: PndSdsCalcStrip
15 //
16 // Description:
17 //
18 //
19 // Authors: HG Zaunick <hg.zaunick@physik.tu-dresden.de>, (C) 2007
20 // R Kliemt (Tu Dresden,Uni Bonn)
21 //
22 // Copyright: See COPYING file that comes with this distribution
23 //
24 //
25 #ifndef PNDSDSCALCSTRIP_H
26 #define PNDSDSCALCSTRIP_H
27 
28 #include "PndSdsStrip.h"
29 //#include "FairGeoVector.h"
30 #include "PndSdsStripDigiPar.h"
31 
32 #include <TVector2.h>
33 
34 #include <iostream>
35 #include <vector>
36 
37 #include "PndDetectorList.h"
38 
40 
46  public:
52 
65  PndSdsCalcStrip(Double_t pitch, Double_t orient, Int_t nrStrips, Int_t nrFeChannels, const TVector2 &firstStripAnchor, Double_t threshold, Double_t noise, Double_t csigma);
66 
68 
80  std::vector<PndSdsStrip> GetStrips(Double_t inx, Double_t iny, Double_t inz, Double_t outx, Double_t outy, Double_t outz, Double_t eLoss);
81 
82  // Calculate without diffusion
83  std::vector<PndSdsStrip> GetStripsNoDif(Double_t nuIn, Double_t nuOut, Double_t Q);
84 
85  // Calculate with diffusion
86  std::vector<PndSdsStrip> GetStripsDif(Double_t nuIn, Double_t nuOut, Double_t Q);
87  Double_t CalcFk(Double_t strip, Double_t x, Double_t sig);
88 
89  // for debugging; call one of the GetStrips* but returns the number of strips and int arrays to their channel/charge
90  Int_t GetStripsAlternative(Double_t nuIn, Double_t nuOut, Double_t Q, Int_t mode, std::vector<Int_t> &indice, std::vector<Double_t> &charges);
91 
97  Int_t CalcFEfromStrip(Int_t stripNr) const;
98 
104  Int_t CalcChannelfromStrip(Int_t stripNr) const;
105 
113  void CalcFeChToStrip(Int_t fe, Int_t channel, Int_t &strip, enum SensorSide &side) const;
114  void CalcStripPointOnLine(const Double_t strip, TVector2 &point) const;
115 
119  const TVector2 GetStripDirection() const { return fStripDir; }
120 
121  void SetVerboseLevel(Int_t level) { fVerboseLevel = level; }
122  // std::ostream& operator<<(std::ostream& out); // not implemented
123  Double_t GetThreshold() const { return fThreshold; }
124  Double_t GetNoise() const { return fNoise; }
125 
126  void Print() const;
127 
128  private:
129  Double_t fPitch;
130  Double_t fOrient;
131  Int_t fNrStrips;
132  Int_t fNrFeChannels;
133  TVector2 fAnchor;
134  Double_t fThreshold;
135  Double_t fNoise;
136  Double_t fCSigma;
137  TVector2 fStripDir;
138  TVector2 fOrthoDir;
139  Int_t fVerboseLevel;
140 
147  Double_t CalcStripFromPoint(Double_t x, Double_t y);
148 
149  Double_t ChargeFromEloss(Double_t eloss) const { return eloss / (3.61e-9); }
150  void InjectStripCharge(std::vector<PndSdsStrip> &array, Int_t istrip, Double_t charge);
151  Double_t SmearCharge(Double_t charge);
152 };
153 
154 #endif /* PNDSDSCALCSTRIP_H */
void CalcStripPointOnLine(const Double_t strip, TVector2 &point) const
Int_t CalcFEfromStrip(Int_t stripNr) const
void CalcFeChToStrip(Int_t fe, Int_t channel, Int_t &strip, enum SensorSide &side) const
Class for calculating strip indices from wafer hits.
Int_t GetStripsAlternative(Double_t nuIn, Double_t nuOut, Double_t Q, Int_t mode, std::vector< Int_t > &indice, std::vector< Double_t > &charges)
std::vector< PndSdsStrip > GetStrips(Double_t inx, Double_t iny, Double_t inz, Double_t outx, Double_t outy, Double_t outz, Double_t eLoss)
Digitization Parameter Class for MVD-Strip part.
SensorSide
Double_t CalcFk(Double_t strip, Double_t x, Double_t sig)
std::vector< PndSdsStrip > GetStripsDif(Double_t nuIn, Double_t nuOut, Double_t Q)
std::vector< PndSdsStrip > GetStripsNoDif(Double_t nuIn, Double_t nuOut, Double_t Q)
Double_t GetNoise() const
void Print() const
const TVector2 GetStripDirection() const
Double_t GetThreshold() const
void SetVerboseLevel(Int_t level)
Int_t CalcChannelfromStrip(Int_t stripNr) const