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