||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ! 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 !|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
114 {
115
116 MsgStream log(
msgSvc(), name() );
117
118 log << MSG::INFO << "Bhlumi initialize" << endmsg;
119
120 static const bool CREATEIFNOTTHERE( true );
121 StatusCode RndmStatus = service( "BesRndmGenSvc", p_BesRndmGenSvc, CREATEIFNOTTHERE );
122 if ( !RndmStatus.isSuccess() || 0 == p_BesRndmGenSvc )
123 {
124 log << MSG::ERROR << " Could not initialize Random Number Service" << endmsg;
125 return RndmStatus;
126 }
127 CLHEP::HepRandomEngine* engine = p_BesRndmGenSvc->GetEngine( "Bhlumi" );
128 engine->showStatus();
130
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146 int KeyGen = 3;
147 int KeyRem = 1;
148 KeyRem = 0;
149
150 int KeyWgt = 2;
151 KeyWgt = 0;
152 int KeyRnd = 1;
153 int KeyOpt = 1000 * KeyGen + 100 * KeyRem + 10 * KeyWgt + KeyRnd;
154
155
156 int KeyPia = 0;
157 int KeyMod = 2;
158 KeyPia = 2;
159 int KeyZet = 0;
160 KeyZet = 1;
161 int KeyRad = 1000 * KeyZet + 10 * KeyMod + KeyPia;
162
163 npar[0] = KeyOpt;
164 npar[1] = KeyRad;
165 double CmsEne = m_cmEnergy;
166 xpar[0] = CmsEne;
167 double th1, th2, thmin, thmax;
168 if ( m_angleMode == 0 )
169 {
170 th1 = m_minThetaAngle;
171 th2 = m_maxThetaAngle;
172 thmin = 0.7 * th1;
173 thmax = 2.0 * th2;
174 if ( thmin < 0. || thmax > 3.1415926 )
175 {
176 log << MSG::WARNING
177 << "input angles exceed range (0~pi), so effect will be unprospectable" << endmsg;
178 return StatusCode::FAILURE;
179 }
180 }
181 else if ( m_angleMode == 1 )
182 {
183 th1 = m_minThetaAngle * 3.1415926 / 180.;
184 th2 = m_maxThetaAngle * 3.1415926 / 180.;
185
186 thmin = th1;
187 thmax = th2;
188 }
189 else if ( m_angleMode == 2 )
190 {
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 {
199 log << MSG::FATAL << "unknown angle mode!" << endmsg;
200 return StatusCode::FAILURE;
201 }
202 if ( thmin < 0. || thmax > 3.1415926 )
203 {
204 log << MSG::FATAL << "input angles exceed range (0~pi), unprospectable" << endmsg;
205 return StatusCode::FAILURE;
206 }
207 else if ( thmin > thmax )
208 {
209 log << MSG::FATAL << "thmin>thmax, unprospectable" << endmsg;
210 return StatusCode::FAILURE;
211 }
212 if ( KeyWgt == 2 ) thmin = th1;
213 xpar[1] = CmsEne * CmsEne * ( 1 -
cos( thmin ) ) / 2;
214 xpar[2] = CmsEne * CmsEne * ( 1 -
cos( thmax ) ) / 2;
215 xpar[3] = m_infraredCut;
216
217
218
220
221 return StatusCode::SUCCESS;
222}
double cos(const BesAngle a)
static void setRandomEngine(CLHEP::HepRandomEngine *randomEngine)