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));
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;
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];
130 startingScalesSave.clear();
138 vector<double> getStoppingScales() {
141 vector<double> getStartingScales() {
142 return startingScalesSave;
145 double masses[100][100]);
146 vector<double> startingScalesSave;
149 double m2dip,
int idA,
int type,
double s = -1.,
double x = -1.);
151 vector<double> getSignalProb(
string key) {
return signalProbSave[key]; }
152 vector<double> getBkgrndProb(
string key) {
return bkgrndProbSave[key]; }
153 vector<double> getTotalProb() {
return totalProbSave; }
154 vector<double> totalProbSave;
155 map<string, vector<double> > signalProbSave, bkgrndProbSave;
156 void clearClassifier() {
157 for ( map<
string, vector<double> >::iterator it = signalProbSave.begin();
158 it != signalProbSave.end(); ++it)
for (
size_t i=0; i<it->second.size();
159 ++i) it->second[i]=0.;
160 for ( map<
string, vector<double> >::iterator it = bkgrndProbSave.begin();
161 it != bkgrndProbSave.end(); ++it)
for (
size_t i=0; i<it->second.size();
162 ++i) it->second[i]=0.;
163 for (
size_t i=0; i<totalProbSave.size(); ++i) totalProbSave[i]=0.;
199 void setSudakovs(
double wt ) { sudakovs = wt;
return; }
200 void setASratios(
double wt ) { asRatios = wt;
return; }
201 void setPDFratios(
double wt ) { pdfRatios = wt;
return; }
207 sudakovsExp.insert(sudakovsExp.end(), wts.begin(), wts.end());
214 asRatiosExp.insert(asRatiosExp.end(), wts.begin(), wts.end());
219 pdfRatiosExp.clear();
221 pdfRatiosExp.insert(pdfRatiosExp.end(), wts.begin(), wts.end());
225 void clearSubtractions() { subtractions.clear(); }
226 void appendSubtraction(
double wt,
const Event& event ) {
227 subtractions.push_back( make_pair(wt, event) );
234 double sudakovs, asRatios, pdfRatios;
235 vector<double> sudakovsExp, asRatiosExp, pdfRatiosExp;
236 vector<pair<double,Event> > subtractions;
240 double sum_time_1, sum_time_2;
243 bool enforceCutOnLHE, doMOPS, applyTMSCut, doMerging,
244 usePDF, allowReject, doMECs, doMEM, doGenerateSubtractions,
245 doGenerateMergingWeights, doExitAfterMerging, allowIncompleteReal;
DireMerging()
Constructor.
Definition: DireMerging.h:45
Definition: DireHistory.h:167
void tagHistories()
Definition: DireMerging.cc:1595
Settings * settingsPtr
Pointer to the settings database.
Definition: PhysicsBase.h:81
void getSudakovs(double &wt) const
Return CKKW-L weight.
Definition: DireMerging.h:105
The Event class holds all info on the generated event.
Definition: Event.h:453
int calculate(Event &process)
Function to perform CKKW-L merging on the event.
virtual int mergeProcess(Event &process)
Functions that implement matrix element merging.
Definition: DireMerging.cc:402
virtual void statistics()
Function to print statistics.
Definition: DireMerging.cc:94
Rndm * rndmPtr
Pointer to the random number generator.
Definition: PhysicsBase.h:93
Definition: DireMerging.h:40
Definition: DireBasics.h:374
bool cutOnProcess(Event &process)
Function to apply the merging scale cut on an input event.
Definition: DireMerging.cc:2136
void storeInfos()
Definition: DireMerging.cc:128
ParticleData * particleDataPtr
Pointer to the particle data table.
Definition: PhysicsBase.h:84
virtual double generateSingleSudakov(double pTbegAll, double pTendAll, double m2dip, int idA, int type, double s=-1., double x=-1.)
Function to generate Sudakov factors for MCatNLO-Delta.
Definition: DireMerging.cc:160
vector< double > stoppingScalesSave
Definition: Merging.h:131
virtual void getStoppingInfo(double scales[100][100], double masses[100][100])
Definition: DireMerging.cc:147
PartonLevel * trialPartonLevelPtr
Pointer to trial PartonLevel object.
Definition: Merging.h:83
bool calculateSubtractions()
Function to set up all histories for an event.
Definition: DireMerging.cc:1688
~DireMerging()
Destructor.
Definition: DireMerging.h:88
Container for all shower weights, including handling.
Definition: DireWeightContainer.h:82
int mergeProcessCKKWL(Event &process)
Function to perform CKKW-L merging on the event.
Definition: DireMerging.cc:605
void setPDFratiosExp(vector< double > wts)
Definition: DireMerging.h:217
int mergeProcessUMEPS(Event &process)
Function to perform UMEPS merging on the event.
Definition: DireMerging.cc:828
void setASratioExp(vector< double > wts)
Definition: DireMerging.h:210
Header for classes to set beam momentum and interaction vertex spread.
Definition: Analysis.h:20
The Pythia class contains the top-level routines to generate an event.
Definition: Pythia.h:71
Info * infoPtr
Definition: PhysicsBase.h:78
int mergeProcessUNLOPS(Event &process)
Function to perform UNLOPS merging on the event.
Definition: DireMerging.cc:1226
MergingHooksPtr mergingHooksPtr
Pointer to trial MergingHooks object.
Definition: Merging.h:86
bool generateHistories(const Event &process, bool orderedOnly=true)
Function to set up all histories for an event.
Definition: DireMerging.cc:1543
int mergeProcessNL3(Event &process)
Function to perform NL3 NLO merging on the event.
Definition: DireMerging.cc:1000
virtual void init()
Initialisation function for internal use inside Pythia source code.
Definition: DireMerging.cc:65
int getStartingConditions(double RNpath, Event &process)
Function to perform UNLOPS merging on this event.
Definition: DireMerging.cc:2048
double getPathIndex(bool useAll=false)
Definition: DireMerging.cc:1652
bool generateUnorderedPoint(Event &process)
Function to steer different merging prescriptions.
Definition: DireMerging.cc:178
Definition: DireBasics.h:82
void setSudakovExp(vector< double > wts)
Definition: DireMerging.h:203
int calculateWeights(double RNpath, bool useAll=false)
Function to calulate the weights used for UNLOPS merging.
Definition: DireMerging.cc:1781