FairRoot/PandaRoot
PndLmdDigiPara.cxx
Go to the documentation of this file.
1 /*
2  * PndLmdDigiPara.cxx
3  * Created on: Jul 29, 2009 Author: huagen
4  */
5 #include "PndLmdDigiPara.h"
6 #include "TMath.h"
7 #include "TVector2.h"
8 #include <iostream>
9 using namespace std;
10 
11 PndLmdDigiPara :: PndLmdDigiPara(const char* name,const char* title,const char* context)
12  : FairParGenericSet(name,title,context)
13 {
14 // const char* name="PndLmdDigiPara";
15 // const char* title="PndLmdDigi Parameter";
16 // const char* context="PndLmdDigi";
17  clear();
18 }
19 
20 //public method putParams to read the parameters from container
21 void PndLmdDigiPara :: putParams (FairParamList* list)
22 {
23  if(!list) return;
24  list->add("circle_pitch",fCirclePitch);
25  list->add("right_pitch",fRightPitch);
26  list->add("left_pitch",fLeftPitch);
27  list->add("left_orient",fLeftOrient);
28  list->add("right_orient",fRightOrient);
29  list->add("circle_anchor_x",(Double_t)fCircleAnchor.X());
30  list->add("circle_anchor_y",(Double_t)fCircleAnchor.Y());
31  list->add("right_anchor_x",(Double_t)fRightAnchor.X());
32  list->add("right_anchor_y",(Double_t)fRightAnchor.Y());
33  list->add("left_anchor_x",(Double_t)fLeftAnchor.X());
34  list->add("left_anchor_y",(Double_t)fLeftAnchor.Y());
35  list->add("nr_fe_channels",fNrFeChannels);
36  list->add("nr_fe_circle",fNrCircleFe);
37  list->add("nr_fe_right",fNrRightFe);
38  list->add("nr_fe_left",fNrLeftFe);
39  list->add("charge_threshold",fThreshold);
40  list->add("charge_noise",fNoise);
41  list->add("sens_type",fSensType);
42  list->add("fe_type",fFeType);
43  list->add("gaus_sigma",fSigma);
44 }
45 /*
46 circle_pitch:Double_t 0.0050
47 right_pitch:Double_t 0.0050
48 left_pitch:Double_t 0.0050
49 left_orient:Double_t 0.1607815213
50 right_orient:Double_t 2.9808111327
51 circle_anchor_x:Double_t 0.0
52 circle_anchor_y:Double_t 2.500
53 right_anchor_x:Double_t 2.665
54 right_anchor_y:Double_t -2.500
55 left_anchor_x:Double_t -2.665.
56 left_anchor_y:Double_t -2.500
57 nr_fe_channels:Int_t 128
58 nr_fe_circle:Int_t 10
59 nr_fe_right:Int_t 10
60 nr_fe_left:Int_t 10
61 charge_threshold:Double_t 10000
62 charge_noise:Double_t 2000
63 sens_type:Text_t Trap
64 fe_type:Text_t APV25
65 */
66 //public method setParams to set parameters
67 Bool_t PndLmdDigiPara::getParams(FairParamList* list)
68 {
69  if(!list) return kFALSE;
70  if(!list->fill("circle_pitch", &fCirclePitch)) return kFALSE;
71  if(!list->fill("right_pitch", &fRightPitch)) return kFALSE;
72  if(!list->fill("left_pitch", &fLeftPitch)) return kFALSE;
73  if(!list->fill("left_orient", &fLeftOrient)) return kFALSE;
74  if(!list->fill("right_orient", &fRightOrient)) return kFALSE;
75  Double_t x, y;
76  if(!list->fill("circle_anchor_x", &x)) return kFALSE;
77  if(!list->fill("circle_anchor_y",&y)) return kFALSE;
78  fCircleAnchor.Set(x,y);
79  if(!list->fill("right_anchor_x", &x)) return kFALSE;
80  if(!list->fill("right_anchor_y", &y)) return kFALSE;
81  fRightAnchor.Set(x,y);
82  if(!list->fill("left_anchor_x", &x)) return kFALSE;
83  if(!list->fill("left_anchor_y", &y)) return kFALSE;
84  fLeftAnchor.Set(x,y);
85 
86  if(!list->fill("nr_fe_channels", &fNrFeChannels)) return kFALSE;
87  if(!list->fill("nr_fe_circle", &fNrCircleFe)) return kFALSE;
88  if(!list->fill("nr_fe_right", &fNrRightFe)) return kFALSE;
89  if(!list->fill("nr_fe_left", &fNrLeftFe)) return kFALSE;
90  if(!list->fill("charge_threshold", &fThreshold)) return kFALSE;
91  if(!list->fill("charge_noise", &fNoise)) return kFALSE;
92  Text_t stName[80];
93  if(!list->fill("sens_type", stName,80)) return kFALSE;
94  fSensType = stName;
95  Text_t feName[80];
96  if(!list->fill("fe_type", feName, 80)) return kFALSE;
97  fFeType = feName;
98  if(!list->fill("gaus_sigma",&fSigma)) return kFALSE;
99 
100  return kTRUE;
101 
102 }
103 
104 //public method print implementation which print out the digitization parameters
106 {
107  cout<<"The digitization parameters for short strips or curve strips"<<endl;
108  cout<<"Circle_pitch = "<<fCirclePitch<<endl;
109  cout<<"Right_pitch ="<<fRightPitch<<endl;
110  cout<<"Left_pitch ="<<fLeftPitch<<endl;
111  cout<<"Left_orient ="<<fLeftOrient<<" rad ="<<fLeftOrient/TMath::Pi()*180<<" degree"<<endl;
112  cout<<"Right_orient ="<<fRightOrient<<" rad = "<<fRightOrient/TMath::Pi()*180<<" degree"<<endl;
113  cout<<"Circle_anchor = ("<<fCircleAnchor.X()<<","<<fCircleAnchor.Y()<<")"<<endl;
114  cout<<"Right_anchor = ("<<fRightAnchor.X()<<","<<fRightAnchor.Y()<<")"<<endl;
115  cout<<"Left_anchor = ("<<fLeftAnchor.X()<<","<<fLeftAnchor.Y()<<")"<<endl;
116  cout<<"Sigma of diffusion = "<<fSigma<<endl;
117  cout<<"Threshold ="<<fThreshold<<endl;
118  cout<<"Noise = "<<fNoise<<endl;
119  cout<<"Sensor_type ="<<fSensType<<endl;
120  cout<<"FE_type="<<fFeType<<endl;
121 
122 
123 }
124 
PndLmdDigiPara(const char *name="PndLmdDigiParameter", const char *title="PndLmd Strip Digi Parameter", const char *context="Pnd Lmd Digitization parameters")
Double_t fRightPitch
TVector2 fCircleAnchor
Double_t fRightOrient
Double_t fLeftOrient
Double_t
void putParams(FairParamList *list)
Double_t fLeftPitch
TString name
Double_t x
TVector2 fLeftAnchor
ClassImp(PndAnaContFact)
Double_t y
Double_t Pi
Bool_t getParams(FairParamList *list)
TVector2 fRightAnchor
Double_t fCirclePitch
Double_t fThreshold