||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ! User should cross-check the folowing two output cross sections ! which are calculated and printed at the very end of the output: ! Workshop95, Table14, BARE1 WW for zmin=0.5: KeyGen=3, KeyPia=0, KeyZet=0 ! Workshop95, Table18, CALO2 WW for zmin=0.5: KeyGen=3, KeyPia=2, KeyZet=1 !|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
119 {
120
121 MsgStream log(messageService(), name());
122
123 log << MSG::INFO << "Bhlumi initialize" << endreq;
124
125 static const bool CREATEIFNOTTHERE(true);
126 StatusCode RndmStatus = service("BesRndmGenSvc", p_BesRndmGenSvc, CREATEIFNOTTHERE);
127 if (!RndmStatus.isSuccess() || 0 == p_BesRndmGenSvc)
128 {
129 log << MSG::ERROR << " Could not initialize Random Number Service" << endreq;
130 return RndmStatus;
131 }
132 CLHEP::HepRandomEngine* engine = p_BesRndmGenSvc->
GetEngine(
"Bhlumi");
133 engine->showStatus();
135
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151 int KeyGen = 3;
152 int KeyRem = 1;
153 KeyRem = 0;
154
155 int KeyWgt = 2;
156 KeyWgt = 0;
157 int KeyRnd = 1;
158 int KeyOpt =1000*KeyGen +100*KeyRem +10*KeyWgt +KeyRnd;
159
160
161 int KeyPia = 0;
162 int KeyMod = 2;
163 KeyPia = 2;
164 int KeyZet = 0;
165 KeyZet = 1;
166 int KeyRad =1000*KeyZet +10*KeyMod +KeyPia;
167
168 npar[0]= KeyOpt;
169 npar[1]= KeyRad;
170 double CmsEne = m_cmEnergy;
171 xpar[0]= CmsEne;
172 double th1,th2,thmin,thmax;
173 if(m_angleMode==0){
174 th1 = m_minThetaAngle;
175 th2 = m_maxThetaAngle;
176 thmin = 0.7*th1;
177 thmax = 2.0*th2;
178 if(thmin<0.||thmax>3.1415926) {
179 log << MSG::WARNING << "input angles exceed range (0~pi), so effect will be unprospectable" << endreq;
180 return StatusCode::FAILURE;
181 }
182 }
183 else if(m_angleMode==1){
184 th1 = m_minThetaAngle*3.1415926/180.;
185 th2 = m_maxThetaAngle*3.1415926/180.;
186
187 thmin = th1;
188 thmax = th2;
189 }
190 else if(m_angleMode==2){
191 th1 = acos(max(m_minThetaAngle,m_maxThetaAngle));
192 th2 = acos(min(m_minThetaAngle,m_maxThetaAngle));
193
194 thmin = th1;
195 thmax = th2;
196 }
197 else{
198 log << MSG::FATAL << "unknown angle mode!" << endreq;
199 return StatusCode::FAILURE;
200 }
201 if(thmin<0.||thmax>3.1415926) {
202 log << MSG::FATAL << "input angles exceed range (0~pi), unprospectable" << endreq;
203 return StatusCode::FAILURE;
204 }
205 else if(thmin>thmax) {
206 log << MSG::FATAL << "thmin>thmax, unprospectable" << endreq;
207 return StatusCode::FAILURE;
208 }
209 if(KeyWgt == 2) thmin=th1;
210 xpar[1]= CmsEne*CmsEne*(1-
cos(thmin))/2;
211 xpar[2]= CmsEne*CmsEne*(1-
cos(thmax))/2;
212 xpar[3]= m_infraredCut;
213
214
215
217
218 return StatusCode::SUCCESS;
219}
double cos(const BesAngle a)
static void setRandomEngine(CLHEP::HepRandomEngine *randomEngine)
virtual CLHEP::HepRandomEngine * GetEngine(const std::string &StreamName)=0
Interface to the CLHEP engine.