FairRoot/PandaRoot
PndSdsStripDigiPar.cxx
Go to the documentation of this file.
1 #include <iostream>
2 #include "PndSdsStripDigiPar.h"
3 #include "TMath.h"
4 
5 PndSdsStripDigiPar::PndSdsStripDigiPar(const char* name, const char* title, const char* context)
6 : FairParGenericSet(name,title,context),
7  fTopPitch(0.),
8  fBotPitch(0.),
9  fOrient(0.),
10  fSkew(0.),
11  fThreshold(0.),
12  fNoise(0.),
13  fCSigma(0.),
14  fChargeCut(0.),
15  fSingleChargeCut(0.),
16  fFeBusClock(0.),
17  fTopAnchor(0.,0.),
18  fBotAnchor(0.,0.),
19  fFeChannels(0),
20  fTopNrFE(0),
21  fBotNrFE(0),
22  fClusterMod(0),
23  fClusterMean(0),
24  fRadChannel(0),
25  fRadTime(0),
26  fSensType(""),
27  fFeType(""),
28  fChargeConvMethod(0)
29 {
30  clear();
31 }
32 
33 void PndSdsStripDigiPar::putParams(FairParamList* list)
34 {
35  if(!list) return;
36 
37  list->add("top_pitch", fTopPitch);
38  list->add("bot_pitch", fBotPitch);
39  list->add("orient", fOrient);
40  list->add("skew", fSkew);
41  list->add("top_anchor_x", (Double_t)fTopAnchor.X());
42  list->add("top_anchor_y", (Double_t)fTopAnchor.Y());
43  list->add("bottom_anchor_x", (Double_t)fBotAnchor.X());
44  list->add("bottom_anchor_y", (Double_t)fBotAnchor.Y());
45  list->add("nr_fe_channels", fFeChannels);
46  list->add("nr_fe_top", fTopNrFE);
47  list->add("nr_fe_bottom", fBotNrFE);
48  list->add("charge_threshold", fThreshold);
49  list->add("charge_noise", fNoise);
50  list->add("QCloudSigma", fCSigma);
51  list->add("sens_Type", fSensType); //("sens_Type", fSensType, 's', 1)
52  list->add("fe_Type", fFeType); //("fe_Type", fFeType, 's', 1)
53  list->add("fe_BusClock", fFeBusClock);
54  list->add("cluster_mod", fClusterMod);
55  list->add("cluster_mean", fClusterMean);
56  list->add("cluster_radchan", fRadChannel);
57  list->add("cluster_radtime", fRadTime);
58  list->add("cluster_corrchargecut", fChargeCut);
59  list->add("cluster_singlechargecut", fSingleChargeCut);
60  list->add("chargeconv_method", fChargeConvMethod);
61  //TObjString* sens = new TObjString( fSensType.Data() );
62  //list->addObject("sens_Type", sens);
63  //TObjString* fe = new TObjString( fFeType.Data() );
64  //list->addObject("fe_Type", fe);
65 }
66 
68 {
69  if (!list) return kFALSE;
70 
71  if (!list->fill("top_pitch", &fTopPitch)) return kFALSE;
72  if (!list->fill("bot_pitch", &fBotPitch)) return kFALSE;
73  if (!list->fill("orient",&fOrient)) return kFALSE;
74  if (!list->fill("skew",&fSkew)) return kFALSE;
75  Double_t x,y;
76  if (!list->fill("top_anchor_x", &x)) return kFALSE;
77  if (!list->fill("top_anchor_y", &y)) return kFALSE;
78  fTopAnchor.Set(x,y);
79  if (!list->fill("bot_anchor_x", &x)) return kFALSE;
80  if (!list->fill("bot_anchor_y", &y)) return kFALSE;
81  fBotAnchor.Set(x,y);
82  if (!list->fill("nr_fe_channels", &fFeChannels)) return kFALSE;
83  if (!list->fill("nr_fe_top", &fTopNrFE)) return kFALSE;
84  if (!list->fill("nr_fe_bottom", &fBotNrFE)) return kFALSE;
85  if (!list->fill("charge_threshold",&fThreshold)) return kFALSE;
86  if (!list->fill("charge_noise",&fNoise)) return kFALSE;
87  if (!list->fill("QCloudSigma",&fCSigma)) return kFALSE;
88  Text_t stName[80];
89  if (!list->fill("sens_Type",stName,80)) return kFALSE;
90  fSensType = stName;
91  Text_t feName[80];
92  if (!list->fill("fe_Type",feName,80)) return kFALSE;
93  fFeType = feName;
94  if (!list->fill("fe_BusClock",&fFeBusClock)) return kFALSE;
95  if (!list->fill("cluster_mod", &fClusterMod)) return kFALSE;
96  if (!list->fill("cluster_mean", &fClusterMean)) return kFALSE;
97  if (!list->fill("cluster_radchan", &fRadChannel)) return kFALSE;
98  if (!list->fill("cluster_radtime", &fRadTime)) return kFALSE;
99  if (!list->fill("cluster_corrchargecut", &fChargeCut)) return kFALSE;
100  if (!list->fill("cluster_singlechargecut", &fSingleChargeCut)) return kFALSE;
101 
102  if (!list->fill("chargeconv_method", &fChargeConvMethod)) return kFALSE;
103 
104  return kTRUE;
105 }
106 
108 
110 {
111  std::cout<<"MVD Digitization Parameters:"<<std::endl;
112  std::cout<<" Sensor type name is = "<<fSensType.Data()<<std::endl;
113  std::cout<<" Top Pitch = "<<fTopPitch<<" cm"<<std::endl;
114  std::cout<<" Bottom Pitch = "<<fBotPitch<<" cm"<<std::endl;
115  std::cout<<" Strip Angle (Top) = "<<fOrient<<"rad = "<<fOrient/TMath::Pi()*180.<<" deg"<<std::endl;
116  std::cout<<" Skew Angle (Top->Bottom) = "<<fSkew<<"rad = "<<fSkew/TMath::Pi()*180.<<" deg"<<std::endl;
117  std::cout<<" Top Anchor = ("<<fTopAnchor.X()<<","<<fTopAnchor.Y()<<")"<<std::endl;
118  std::cout<<" Bottom Anchor= ("<<fBotAnchor.X()<<","<<fBotAnchor.Y()<<")"<<std::endl;
119  std::cout<<" FE Channels = "<<fFeChannels<<std::endl;
120  std::cout<<" Nr of Frontends (Top Side) = "<<fTopNrFE<<std::endl;
121  std::cout<<" Nr of Frontends (Bottom Side)= "<<fBotNrFE<<std::endl;
122  std::cout<<" Charge Threshold (e-) = "<<fThreshold<<std::endl;
123  std::cout<<" Noise (ENC+Dispersion) (e-) = "<<fNoise<<std::endl;
124  std::cout<<" Charge cloud sigma = "<<fCSigma<<" cm"<<std::endl;
125  std::cout<<" charge conv. (0:ideal, 1:TOT) = "<<fChargeConvMethod<<std::endl;
126  std::cout<<" Frontend type name is = "<<fFeType.Data()<<std::endl;
127  std::cout<<" Clusterfinder Mode = "<<fClusterMod<<std::endl;
128  std::cout<<" Clusterfinder Mean Algorithm = "<<fClusterMean<<std::endl;
129  std::cout<<" Clusterfinder Search Radius: Channels = "<<fRadChannel<<std::endl;
130  std::cout<<" Clusterfinder Search Radius: Time = "<<fRadTime<<std::endl;
131  std::cout<<" Top/Bottom Charge correlation cut = "<<fChargeCut<<std::endl;
132  return;
133 }
void putParams(FairParamList *list)
Double_t
Digitization Parameter Class for MVD-Strip part.
TString name
Double_t x
ClassImp(PndAnaContFact)
Double_t y
Double_t Pi
Bool_t getParams(FairParamList *list)
PndSdsStripDigiPar(const char *name="PndSdsParTest", const char *title="PndSds strip digi parameter", const char *context="TestDefaultContext")