9 #include "PhaseSpace.h"
10 #include "UserHooks.h"
27 double UserHooks::multiplySigmaBy(
const SigmaProcess* sigmaProcessPtr,
28 const PhaseSpace* phaseSpacePtr,
bool inEvent) {
63 return ((inEvent && sigmaProcessPtr->code() == 0
64 && phaseSpacePtr->sHat() < 0.) ? 0. : 1.);
79 double UserHooks::biasSelectionBy(
const SigmaProcess* sigmaProcessPtr,
80 const PhaseSpace* phaseSpacePtr,
bool inEvent) {
124 return ((inEvent && sigmaProcessPtr->code() == 0
125 && phaseSpacePtr->sHat() < 0.) ? 0. : 1.);
132 void UserHooks::omitResonanceDecays(
const Event& process) {
138 for (
int i = 0; i < process.size(); ++i) {
140 bool isFinal =
false;
141 if (i < 3) doCopy =
true;
145 int iMother = process[i].mother1();
146 if (iMother == 1 || iMother == 2) doCopy =
true;
149 else if (iMother > 2) {
150 int iGrandMother = process[iMother].mother1();
151 if (iGrandMother == 1 || iGrandMother == 2) {
160 int iNew = workEvent.append( process[i]);
162 workEvent[iNew].statusPos();
163 workEvent[iNew].daughters( 0, 0);
174 void UserHooks::subEvent(
const Event& event,
bool isHardest) {
181 if (!isHardest) iSys = partonSystemsPtr->sizeSys() - 1;
184 for (
int i = 0; i < partonSystemsPtr->sizeOut(iSys); ++i) {
185 int iOld = partonSystemsPtr->getOut( iSys, i);
188 int iNew = workEvent.append( event[iOld]);
191 workEvent[iNew].mothers( 0, 0);
192 workEvent[iNew].daughters( iOld, iOld);
205 double SuppressSmallPT::multiplySigmaBy(
const SigmaProcess* sigmaProcessPtr,
206 const PhaseSpace* phaseSpacePtr,
bool ) {
213 double eCM = phaseSpacePtr->ecm();
214 double pT0Ref = settingsPtr->parm(
"MultipartonInteractions:pT0Ref");
215 double ecmRef = settingsPtr->parm(
"MultipartonInteractions:ecmRef");
216 double ecmPow = settingsPtr->parm(
"MultipartonInteractions:ecmPow");
217 double pT0 = pT0timesMPI * pT0Ref * pow(eCM / ecmRef, ecmPow);
224 if (useSameAlphaSasMPI) {
225 alphaSvalue = settingsPtr->parm(
"MultipartonInteractions:alphaSvalue");
226 alphaSorder = settingsPtr->mode(
"MultipartonInteractions:alphaSorder");
228 alphaSvalue = settingsPtr->parm(
"SigmaProcess:alphaSvalue");
229 alphaSorder = settingsPtr->mode(
"SigmaProcess:alphaSorder");
231 alphaS.init( alphaSvalue, alphaSorder);
238 int nFinal = sigmaProcessPtr->nFinal();
239 if (nFinal != 2)
return 1.;
242 double pTHat = phaseSpacePtr->pTHat();
243 double pT2 = pTHat * pTHat;
244 double wt = pow2( pT2 / (pT20 + pT2) );
246 if (numberAlphaS > 0) {
248 double Q2RenOld = sigmaProcessPtr->Q2Ren();
249 double alphaSOld = sigmaProcessPtr->alphaSRen();
252 double Q2RenNew = pT20 + Q2RenOld;
253 double alphaSNew = alphaS.alphaS(Q2RenNew);
254 wt *= pow( alphaSNew / alphaSOld, numberAlphaS);