PandaRoot
PndLmdCalStrip.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  * PndLmdCalStrip.h *
15  * Created on: Jul 28, 2009
16  * Author: huagen
17  */
18 //*************************************************************************************
19 // this class PndLmdCalStrip will handle the different strip structure of the silicon
20 // sensor.The different strip structure shall be covered, for example, short strips in
21 // two segments, curved strips in one segment etc. Due to thin sensor the strips shall
22 // be made in one side.
23 // The charge diffusion after ionization will be taken into consideration. The gaussian
24 // smearing with sigma 8um was employeed for the charge diffussion
25 // For each strip fired the noise shall be added
26 //**************************************************************************************
27 
28 #ifndef PNDLMDCALSTRIP_H_
29 #define PNDLMDCALSTRIP_H_
30 
31 #include <iostream>
32 #include <cmath>
33 #include "PndLmdDigiPara.h"
34 #include "TRandom.h"
35 
36 #include "PndLmdStrips.h"
37 
38 #include "TVector2.h"
39 #include <vector>
40 #include "PndDetectorList.h"
41 
43  public:
44  // default constructor
46  // pitch @param the width of the strip
47  // orient @param the strip orient angle cross with x axis
48  // firstStripAnchor @param the first pitch point
49  // threshold @param the threshold of the signal
50  // noise @param the electric noise
51  // nrStrips @param the number of strips
52  // nrFeChannels @param the number of channels per FE modules
53  PndLmdCalStrip(Double_t pitch, Double_t orient, Int_t nrStrips, Int_t nrFeChannels, const TVector2 &firstStripAnchor, Double_t threshold, Double_t noise, Double_t sigma);
54 
55  // fdigipara @ the digitization parameters stored with ASCii file
56  // segment @ the segment of the sensor, left or right
57  PndLmdCalStrip(const PndLmdDigiPara *digipara, SensorSegment segment = kLEFT);
58  // for curve strips
59  // PndLmdCalStrip(const PndLmdDigiPara *digipara, SensorSide side = SensorSide::kTOP);
60 
62 
63  // public method for strips number calculation
64  std::vector<PndLmdStrips> GetStrips(Double_t inx, Double_t iny, Double_t inz, Double_t outx, Double_t outy, Double_t outz, Double_t eloss);
65  // digi the strips
66  std::vector<PndLmdStrips> DigiStripFromPoint(Double_t inx, Double_t iny, Double_t inz, Double_t outx, Double_t outy, Double_t outz, Double_t eloss);
67 
68  std::vector<PndLmdStrips> GetCurveStrip(Double_t inx, Double_t iny, Double_t inz, Double_t outx, Double_t outy, Double_t outz, Double_t eLoss);
69 
70  // calculate the channels
71  Int_t CalChannelFromStrip(Int_t stripNr);
72 
73  // calculate the FE number
74  Int_t CalFeFromStrip(Int_t stripNr);
75 
76  // Smear noise to the signal
77  Double_t AddNoise(Double_t charge);
78 
79  // charge diffusion during collection
80  Double_t ChargeDiffusion(Double_t u, Double_t a, Double_t path, Double_t dir, Double_t Q);
81 
82  void print() const;
83 
84  private:
85  Double_t fPitch; // the width of strip
86  Double_t fOrient; // the strip orientation
87  TVector2 fAnchor; // anchor point for first strip
88  Int_t fNrStrips; // the number of strips in active area
89  Int_t fNrFEChannels; // the number of channels per FE
90  Double_t fThreshold;
91  Double_t fNoise;
92  TVector2 fStripDir;
93  TVector2 fOrthoDir;
94  Double_t fSigma;
95 
96  // calculate the strip number based on the point information
97  // the coordinate x, and y in the local coordinate system of the sensor
98  // return the strip number with double_t
99  Double_t CalStripFromPoint(Double_t x, Double_t y);
100 
101  Double_t CalCurveStripFromPoint(Double_t x, Double_t y);
102 
103  // the conversion from Eloss to charge.
104  Double_t ChargeFromEloss(Double_t eloss) const;
105 
106  ClassDef(PndLmdCalStrip, 3);
107 };
108 
109 #endif /* PNDLMDCALSTRIP_H_ */
Double_t ChargeDiffusion(Double_t u, Double_t a, Double_t path, Double_t dir, Double_t Q)
std::vector< PndLmdStrips > GetStrips(Double_t inx, Double_t iny, Double_t inz, Double_t outx, Double_t outy, Double_t outz, Double_t eloss)
Double_t AddNoise(Double_t charge)
Int_t CalFeFromStrip(Int_t stripNr)
Int_t CalChannelFromStrip(Int_t stripNr)
void print() const
std::vector< PndLmdStrips > GetCurveStrip(Double_t inx, Double_t iny, Double_t inz, Double_t outx, Double_t outy, Double_t outz, Double_t eLoss)
std::vector< PndLmdStrips > DigiStripFromPoint(Double_t inx, Double_t iny, Double_t inz, Double_t outx, Double_t outy, Double_t outz, Double_t eloss)