BOSS 7.0.6
BESIII Offline Software System
Loading...
Searching...
No Matches
BesMdcDigitizerMessenger Class Reference

#include <BesMdcDigitizerMessenger.hh>

+ Inheritance diagram for BesMdcDigitizerMessenger:

Public Member Functions

 BesMdcDigitizerMessenger (BesMdcDigitizer *)
 
 ~BesMdcDigitizerMessenger ()
 
void SetNewValue (G4UIcommand *command, G4String newValues)
 

Detailed Description

Definition at line 24 of file BesMdcDigitizerMessenger.hh.

Constructor & Destructor Documentation

◆ BesMdcDigitizerMessenger()

BesMdcDigitizerMessenger::BesMdcDigitizerMessenger ( BesMdcDigitizer pointer)

Definition at line 21 of file BesMdcDigitizerMessenger.cc.

22:mdcDigitizer(pointer)
23{
24 noiseDirectory = new G4UIdirectory("/mdc/noise/");
25 noiseDirectory->SetGuidance("BESIII MDC noise control");
26
27 //Noise On/Off command
28 noiseFlag = new G4UIcmdWithAnInteger("/mdc/noise/flag",this);
29 noiseFlag->SetGuidance("whether to add noise to MdcDigi.");
30 noiseFlag->SetParameterName("MdcNoiseFlag",false);
31 noiseFlag->SetRange("MdcNoiseFlag>=0");
32 // noiseFlag->SetDefaultValue(0);
33
34 //Noise type command
35 noiseType = new G4UIcmdWithAnInteger("/mdc/noise/type",this);
36 noiseType->SetGuidance("select noise type.");
37 noiseType->SetParameterName("MdcNoiseType",false);
38 noiseType->SetRange("MdcNoiseType>=0");
39 // noiseType->SetDefaultValue(3);
40
41 //Noise Level command
42 noiseLevel = new G4UIcmdWithADouble("/mdc/noise/level",this);
43 noiseLevel->SetGuidance("noise level");
44 noiseLevel->SetParameterName("MdcNoiseLevel",false);
45 noiseLevel->SetRange("MdcNoiseLevel>=0.");
46 // noiseLevel->SetDefaultValue(0.1);
47
48 digiDirectory = new G4UIdirectory("/mdc/digi/");
49 digiDirectory->SetGuidance("BESIII MDC digitizer control");
50
51 //T channel smear On/Off command
52 smearFlag = new G4UIcmdWithAnInteger("/mdc/digi/smearflag",this);
53 smearFlag->SetGuidance("whether to do T smear to MdcDigi.");
54 smearFlag->SetParameterName("MdcSmearFlag",true);
55 smearFlag->SetRange("MdcSmearFlag>=0");
56 smearFlag->SetDefaultValue(1);
57
58 //Space resolution command
59 mdcDRes = new G4UIcmdWithADouble("/mdc/digi/spaceres",this);
60 mdcDRes->SetGuidance("value of space resolution");
61 mdcDRes->SetParameterName("MdcDRes",false);
62 mdcDRes->SetRange("MdcDRes>0");
63
64 effDirectory = new G4UIdirectory("/mdc/eff/");
65 effDirectory->SetGuidance("BESIII MDC wire efficiency control");
66
67 //Eff. source command
68 effFlag = new G4UIcmdWithAnInteger("/mdc/eff/flag",this);
69 effFlag->SetGuidance("Get eff. from 0: CalSvc; 1: mac file");
70 effFlag->SetParameterName("MdcEffFlag",false);
71 effFlag->SetRange("MdcEffFlag>=0");
72 // effFlag->SetDefaultValue(0);
73
74 G4UIparameter* parameter;
75 G4bool omittable;
76
77 //Eff. command
78 layerEff = new G4UIcommand("/mdc/eff/eff",this);
79 layerEff->SetGuidance("Set eff. of MDC layers");
80
81 parameter = new G4UIparameter("layer",'i',omittable = false);
82 parameter->SetGuidance("Which layer to be modified");
83 parameter->SetParameterRange("layer >= -1 && layer < 43");
84 parameter->SetDefaultValue(-1);
85 layerEff->SetParameter(parameter);
86
87 parameter = new G4UIparameter("eff",'d',omittable = false);
88 parameter->SetGuidance("Eff. value");
89 parameter->SetParameterRange("eff >= 0. && eff <=1.");
90 parameter->SetDefaultValue(1.);
91 layerEff->SetParameter(parameter);
92}
double precision pisqo6 parameter(pi=3.14159265358979d0, pisq=pi *pi, pisqo6=pisq/6d0) double precision zip

◆ ~BesMdcDigitizerMessenger()

BesMdcDigitizerMessenger::~BesMdcDigitizerMessenger ( )

Definition at line 94 of file BesMdcDigitizerMessenger.cc.

95{
96 delete noiseDirectory;
97 delete noiseFlag;
98 delete noiseType;
99 delete noiseLevel;
100 delete digiDirectory;
101 delete smearFlag;
102 delete mdcDRes;
103 delete effDirectory;
104 delete effFlag;
105 delete layerEff;
106}

Member Function Documentation

◆ SetNewValue()

void BesMdcDigitizerMessenger::SetNewValue ( G4UIcommand *  command,
G4String  newValues 
)

Definition at line 108 of file BesMdcDigitizerMessenger.cc.

109{
110 if( command == noiseFlag) {
111 mdcDigitizer->SetNoiseFlag(noiseFlag->GetNewIntValue(newValue));
112 }else if(command==noiseType){
113 mdcDigitizer->SetNoiseType(noiseType->GetNewIntValue(newValue));
114 }else if(command==noiseLevel){
115 mdcDigitizer->SetNoiseLevel(noiseLevel->GetNewDoubleValue(newValue));
116 }else if(command==smearFlag){
117 mdcDigitizer->SetSmearFlag(smearFlag->GetNewIntValue(newValue));
118 }else if(command==mdcDRes){
119 mdcDigitizer->SetMdcDRes(mdcDRes->GetNewDoubleValue(newValue));
120 }else if(command==effFlag){
121 mdcDigitizer->SetEffFlag(effFlag->GetNewIntValue(newValue));
122 }else if(command==layerEff){
123 G4int layer;
124 G4double eff;
125 std::istringstream is ((char*)newValue.data());
126 is >> layer >> eff;
127 mdcDigitizer->SetEff(layer, eff);
128 }
129}
void SetMdcDRes(G4double res)
void SetNoiseType(G4int type)
void SetNoiseFlag(G4int flag)
void SetEffFlag(G4int flag)
void SetNoiseLevel(G4double level)
void SetSmearFlag(G4int flag)
void SetEff(G4int layer, G4double eff)

The documentation for this class was generated from the following files: