9 #ifndef VINCIA_History_H 10 #define VINCIA_History_H 12 #include "Pythia8/History.h" 13 #include "Pythia8/Info.h" 14 #include "Pythia8/Vincia.h" 15 #include "Pythia8/VinciaAntennaFunctions.h" 16 #include "Pythia8/VinciaMergingHooks.h" 51 ColourFlow() : nChains(0), nBeamChainsMin(0), nBeamChainsMax(0), nRes(0) {
52 for(
int i=0; i<4; i++) {countChainsByChargeIndex[i]=0;
53 countResByChargeIndex[i]=0;}}
58 void addChain(
int charge,
int flavStart,
int flavEnd,
bool hasInitialIn);
59 void selectResChains(
int index,
int iorder,
int id);
60 void selectBeamChains(
int index,
int iorder);
63 bool initHard(map<
int, map<int,int> >& countRes,
64 shared_ptr<VinciaMergingHooks> vinMergingHooksPtr);
67 bool checkChains(
int cIndex);
74 void print(
bool printpsch =
false);
95 map<int,int> chainEndToFlav;
104 void addChain(
int oldIndex,
int chainsIndex,
int iChain,
105 vector<int> & newIndices);
106 void selectPseudochain(vector<int> & psch);
107 void selectChain(
int iChain);
110 void addResonances(vector<int>& idsIn, map<
int, map<int,int> >& idCounter,
111 int charge,
bool fc);
114 int getChargeIndex(
int charge,
bool fc);
120 for (
int iPwr(iChains); iPwr>=0; --iPwr)
121 id += (psc.
chainlist.at(iPwr)+1)*pow(10,iChains-iPwr);
126 vector<int> pseudochainIDs;
130 int nBeamChainsMin, nBeamChainsMax, nRes;
131 map<int,int> countChainsByChargeIndex;
132 map<int,int> countResByChargeIndex;
149 clusterableChains = chainsIn;
161 vinComPtr = vinComPtrIn;
162 antSetFSRptr = antSetPtrIn;
168 int getNClusterings(shared_ptr<VinciaMergingHooks> vinMergingHooksPtr,
169 Logger* loggerPtr,
int verboseIn);
170 void setClusterList(shared_ptr<VinciaMergingHooks> vinMergingHooksPtr,
171 Logger* loggerPtr,
int verboseIn);
175 Logger* loggerPtr,
int verboseIn);
178 double xA()
const {
return 2. * state[3].e() / state[0].e();}
179 double xB()
const {
return 2. * state[4].e() / state[0].e();}
182 int idA()
const {
return state[3].id();}
183 int idB()
const {
return state[4].id();}
187 int colTypeB()
const {
return state[4].colType();}
216 vector<vector<int>>& clusChains,
Logger* loggerPtr,
int verboseIn);
220 return resPtr->q2sector(clusIn);}
222 return resPtr->q2evol(clusIn);}
238 map<double, VinciaClustering> clusterList;
241 typedef map<int, vector<HistoryNode> > HistoryNodes;
254 MergingHooksPtr mergingHooksPtrIn,
266 double getWeightCKKWL();
269 int getNClusterSteps();
272 double getRestartScale();
277 Event getNewProcess() {
return newProcess;}
278 bool doAbort() {
return aborted;}
283 void findBestHistory();
286 unsigned int countPerms();
292 bool assignResChains(map<
int, map<int,int>>& idCounter,
293 vector<ColourFlow>& flowsSoFar);
296 bool assignResFromEvent(map<
int, map<int,int>>& idCounter,
297 vector<ColourFlow>& flowsSoFar);
301 bool assignBeamChains(vector<ColourFlow>& flowsSoFar);
304 bool assignNext(vector<ColourFlow>& flowsSoFar,
bool isRes =
false,
305 int id = 0,
int cIndex = 0);
308 bool assignThis(vector<ColourFlow>& flowsSoFar,
int id,
int cIndex,
309 vector<int>& chains);
316 tuple<bool, double, HistoryNodes> findHistoryPerm(
ColourFlow& flow);
319 bool checkMergingCut(HistoryNodes& history);
322 HistoryNodes initHistoryNodes(
ColourFlow& flow );
326 map<int, vector<vector<int>>> getSystems(
ColourFlow& flow,
327 map<int, int>& sysToRes);
330 bool isBorn(
const HistoryNode& nodeIn,
bool isRes);
333 bool setupBeams(
const HistoryNode* node,
double scale2);
336 double calcME2guess(vector<HistoryNode>& history,
bool isRes);
338 double calcME2Born(
const HistoryNode& bornNode,
bool isRes);
345 double pT2now,
double pT2next);
351 double getStartScale(
Event& event,
bool isRes);
354 double qNextTrial(
double qStart,
Event& evtIn);
366 shared_ptr<VinciaMergingHooks> vinMergingHooksPtr{};
379 shared_ptr<VinciaFSR> fsrShowerPtr{};
380 shared_ptr<VinciaISR> isrShowerPtr{};
387 bool foundValidHistory;
393 HistoryNodes historyBest;
401 vector<vector<int>> colChainsSav;
404 map<int, bool> chainHasInitial;
407 map<int, vector<int>> resIDToIndices;
408 map<int, vector<int>> resIndexToChains;
411 vector<ColourFlow> colPerms;
417 int nQSave, nGluonLoopsSave;
427 bool hasNewProcessSav;
429 double newProcessScale;
History class for the Vincia shower.
Definition: VinciaHistory.h:247
VinciaClustering lastClustering
Information corresponding to the last clustering.
Definition: VinciaHistory.h:210
void initPtr(VinciaCommon *vinComPtrIn, Resolution *resPtrIn, AntennaSetFSR *antSetPtrIn)
Methods.
Definition: VinciaHistory.h:158
Event state
Current state.
Definition: VinciaHistory.h:196
The Event class holds all info on the generated event.
Definition: Event.h:453
Convenient shorthand for storing ordered list of chains.
Definition: VinciaHistory.h:24
Definition: BeamParticle.h:133
Simple struct to store information about a 3 -> 2 clustering.
Definition: VinciaCommon.h:278
bool hasRes
Resonance info.
Definition: VinciaHistory.h:199
vector< PseudoChain > beamChains
Remaining list of ordered chains after resonances stripped off.
Definition: VinciaHistory.h:82
map< int, int > chainStartToFlav
Map from chain to the flavour at the start or end of that chain.
Definition: VinciaHistory.h:94
int charge
Charge.
Definition: VinciaHistory.h:37
double xA() const
Get energy fractions (used in PDF ratios).
Definition: VinciaHistory.h:178
bool hasNewProcess()
Definition: VinciaHistory.h:276
bool isValid()
Check if a valid history was found.
Definition: VinciaHistory.h:260
map< int, vector< PseudoChain > > resChains
Members.
Definition: VinciaHistory.h:79
Definition: VinciaCommon.h:494
map< int, vector< int > > chainToIndices
Definition: VinciaHistory.h:91
Definition: PartonLevel.h:45
double getEvolNow() const
Get evolution scale (used in trial shower).
Definition: VinciaHistory.h:190
void setEvolScale(double scaleIn)
Setter methods.
Definition: VinciaHistory.h:193
int colTypeA() const
Get colour types of beams (used in PDF ratios).
Definition: VinciaHistory.h:186
bool isBelowMS()
Check if history failed merging scale cut.
Definition: VinciaHistory.h:263
ColourFlow()
Constructor.
Definition: VinciaHistory.h:51
Class for a single step in the history of a process.
Definition: VinciaHistory.h:140
Definition: VinciaHistory.h:46
A simple class for containing evolution variable definitions.
Definition: VinciaCommon.h:382
int cindex
Charge Index.
Definition: VinciaHistory.h:30
map< int, vector< PseudoChain > > pseudochains
Definition: VinciaHistory.h:87
int nMinQQbar
Minimal number of qqbar pairs.
Definition: VinciaHistory.h:204
The AntennaSetFSR class. Simple container of FF and RF antenna functions.
Definition: VinciaAntennaFunctions.h:1125
int idA() const
Get flavours of beams (used in PDF ratios).
Definition: VinciaHistory.h:182
Header for classes to set beam momentum and interaction vertex spread.
Definition: Analysis.h:20
vector< vector< int > > clusterableChains
List of unclusterable lists of colour-connected partons.
Definition: VinciaHistory.h:207
Definition: VinciaAntennaFunctions.h:1258
map< int, bool > hasInitial
Keep track of chains which contain an initial state parton.
Definition: VinciaHistory.h:97
HistoryNode()
Constructors.
Definition: VinciaHistory.h:145
bool hasInitial
Does any of the chains contain an initial state parton.
Definition: VinciaHistory.h:32
int flavStart
Flavour at start of first and end of last.
Definition: VinciaHistory.h:34
vector< int > chainlist
Ordered list of concatenated chains.
Definition: VinciaHistory.h:26
This class holds a map of all ParticleDataEntries.
Definition: ParticleData.h:422
map< int, int > chainToCharge
Keep track of charge information of chains.
Definition: VinciaHistory.h:99
int index
Index unique up to chain content (not ordering).
Definition: VinciaHistory.h:28