8 #ifndef Pythia8_DireMerging_H
9 #define Pythia8_DireMerging_H
11 #define DIRE_MERGING_VERSION "2.002"
13 #include "Pythia8/Basics.h"
14 #include "Pythia8/BeamParticle.h"
15 #include "Pythia8/Event.h"
16 #include "Pythia8/Info.h"
17 #include "Pythia8/ParticleData.h"
18 #include "Pythia8/PartonLevel.h"
19 #include "Pythia8/PythiaStdlib.h"
20 #include "Pythia8/Settings.h"
21 #include "Pythia8/StandardModel.h"
22 #include "Pythia8/Merging.h"
23 #include "Pythia8/MergingHooks.h"
24 #include "Pythia8/LesHouches.h"
26 #include "Pythia8/DireHistory.h"
27 #include "Pythia8/DireMergingHooks.h"
28 #include "Pythia8/DireWeightContainer.h"
46 sudakovs(1.), asRatios(1.), pdfRatios(1.), psweights(0), first(
true) {
48 signalProbSave.insert(make_pair(
"higgs",tmp));
49 bkgrndProbSave.insert(make_pair(
"higgs",tmp));
50 signalProbSave.insert(make_pair(
"higgs-subt",tmp));
51 bkgrndProbSave.insert(make_pair(
"higgs-subt",tmp));
52 signalProbSave.insert(make_pair(
"higgs-nosud",tmp));
53 bkgrndProbSave.insert(make_pair(
"higgs-nosud",tmp));
54 signalProbSave.insert(make_pair(
"qed",tmp));
55 bkgrndProbSave.insert(make_pair(
"qed",tmp));
56 signalProbSave.insert(make_pair(
"qcd",tmp));
57 bkgrndProbSave.insert(make_pair(
"qcd",tmp));
58 settingsPtr = 0; infoPtr = 0; particleDataPtr = 0; rndmPtr = 0;
59 beamAPtr = 0; beamBPtr = 0; trialPartonLevelPtr = 0;
60 mergingHooksPtr = 0; myHistory = 0; fsr = 0; isr = 0;
61 direInfoPtr = 0; sum_time_1 = sum_time_2 = 0.; sum_paths = 0;
62 enforceCutOnLHE = doMOPS = applyTMSCut = doMerging
64 = allowReject = doMECs = doMEM = doGenerateSubtractions
65 = doGenerateMergingWeights = doExitAfterMerging
66 = allowIncompleteReal =
false;
72 void setShowerPtrs( shared_ptr<DireTimes> timesPtr,
73 shared_ptr<DireSpace> spacePtr) {fsr = timesPtr; isr = spacePtr; }
76 shared_ptr<DireSpace> spacePtr,
DireInfo* direInfoIn) {
80 direInfoPtr = direInfoIn;
83 shared_ptr<DireTimes> fsr;
84 shared_ptr<DireSpace> isr;
89 if (myHistory)
delete myHistory;
97 virtual void statistics();
102 virtual int mergeProcess(
Event& process);
105 void getSudakovs(
double & wt )
const { wt = sudakovs;
return; }
106 void getASratios(
double & wt )
const { wt = asRatios;
return; }
107 void getPDFratios(
double & wt )
const { wt = pdfRatios;
return; }
109 void getSudakovExp(
int order,
double & wt )
const {
111 if (order >= 0 && order <
int(sudakovsExp.size()))
112 wt = sudakovsExp[order];
115 void getASratioExp(
int order,
double & wt )
const {
117 if (order >= 0 && order <
int(asRatiosExp.size()))
118 wt = asRatiosExp[order];
121 void getPDFratioExp(
int order,
double & wt )
const {
123 if (order >= 0 && order <=
int(pdfRatiosExp.size()))
124 wt = pdfRatiosExp[order];
129 stoppingScalesSave.clear();
130 startingScalesSave.clear();
138 vector<double> getStoppingScales() {
139 return stoppingScalesSave;
141 vector<double> getStartingScales() {
142 return startingScalesSave;
144 void getStoppingInfo(
double scales [100][100],
double masses [100][100]);
145 vector<double> stoppingScalesSave, startingScalesSave, mDipSave;
146 vector<int> radSave, emtSave, recSave;
148 double generateSingleSudakov (
double pTbegAll,
149 double pTendAll,
double m2dip,
int idA,
int type,
double s = -1.,
152 vector<double> getSignalProb(
string key) {
return signalProbSave[key]; }
153 vector<double> getBkgrndProb(
string key) {
return bkgrndProbSave[key]; }
154 vector<double> getTotalProb() {
return totalProbSave; }
155 vector<double> totalProbSave;
156 map<string, vector<double> > signalProbSave, bkgrndProbSave;
157 void clearClassifier() {
158 for ( map<
string, vector<double> >::iterator it = signalProbSave.begin();
159 it != signalProbSave.end(); ++it)
for (
size_t i=0; i<it->second.size();
160 ++i) it->second[i]=0.;
161 for ( map<
string, vector<double> >::iterator it = bkgrndProbSave.begin();
162 it != bkgrndProbSave.end(); ++it)
for (
size_t i=0; i<it->second.size();
163 ++i) it->second[i]=0.;
164 for (
size_t i=0; i<totalProbSave.size(); ++i) totalProbSave[i]=0.;
174 int mergeProcessCKKWL(
Event& process);
177 int mergeProcessUMEPS(
Event& process);
180 int mergeProcessNL3(
Event& process);
183 int mergeProcessUNLOPS(
Event& process);
186 bool cutOnProcess(
Event& process);
189 int calculate(
Event& process);
193 bool generateHistories(
const Event& process,
bool orderedOnly =
true);
196 double getPathIndex(
bool useAll =
false);
197 int calculateWeights(
double RNpath,
bool useAll =
false);
198 int getStartingConditions(
double RNpath,
Event& process );
200 void setSudakovs(
double wt ) { sudakovs = wt;
return; }
201 void setASratios(
double wt ) { asRatios = wt;
return; }
202 void setPDFratios(
double wt ) { pdfRatios = wt;
return; }
204 void setSudakovExp( vector<double> wts ) {
208 sudakovsExp.insert(sudakovsExp.end(), wts.begin(), wts.end());
211 void setASratioExp( vector<double> wts ) {
215 asRatiosExp.insert(asRatiosExp.end(), wts.begin(), wts.end());
218 void setPDFratiosExp( vector<double> wts ) {
220 pdfRatiosExp.clear();
222 pdfRatiosExp.insert(pdfRatiosExp.end(), wts.begin(), wts.end());
226 void clearSubtractions() { subtractions.clear(); }
227 void appendSubtraction(
double wt,
const Event& event ) {
228 subtractions.push_back( make_pair(wt, event) );
231 bool calculateSubtractions();
233 bool generateUnorderedPoint(
Event& process);
235 double sudakovs, asRatios, pdfRatios;
236 vector<double> sudakovsExp, asRatiosExp, pdfRatiosExp;
237 vector<pair<double,Event> > subtractions;
241 double sum_time_1, sum_time_2;
244 bool enforceCutOnLHE, doMOPS, applyTMSCut, doMerging,
245 usePDF, allowReject, doMECs, doMEM, doGenerateSubtractions,
246 doGenerateMergingWeights, doExitAfterMerging, allowIncompleteReal;
257 #endif // end Pythia8_DireMerging_H