General¶
Interactive mode of Herwig¶
One can access the interactive mode of Herwig by typing in at command prompt:
Herwig build
Helpful commands in the interactive mode of Herwig¶
- help all
- Shows all commands which can be used in the interactive mode.
- ls
- Lists the current directory of the Herwig repository.
- describe
- Gives more information about an entry.
- set
- Used to set parameters and references
- get
- Used to get the current value of parameters and references
- do
- Used to execute a command
Why is LHC.log almost empty?¶
By default, log files like LHC.log only contain summarizing information for the entire run. Detailed output for single events, as described in EventRecordFormat, is now only written to the log file if you enable at least the first debugging level, e.g.
Herwig run LHC.run -N1000 -d1
You can change the number of events written to the log file using
set /Herwig/Generators/EventGenerator:PrintEvent NumberOfEvents
in your .in file.
How do I make Herwig write out events as HepMC?¶
Add the following lines to your .in configuration file:
insert /Herwig/Generators/EventGenerator:AnalysisHandlers[0] /Herwig/Analysis/HepMCFile
set /Herwig/Analysis/HepMCFile:PrintEvent 100
set /Herwig/Analysis/HepMCFile:Format GenEvent
set /Herwig/Analysis/HepMCFile:Units GeV_mm
You may wish to change the number of events written out, but be aware that HepMC files can become very large as they contain many intermediate (and unphysical!) entries for debugging purposes. Note also that the units used by some experiments are different from the MC convention recommended above; in particular, MeV is sometimes used as the base energy unit in place of GeV (due to an historical accident involving the now-defunct CLHEP package.)
Which HepMC status codes are used? What do they mean?¶
Since Herwig++ 2.4.0, we assign status codes according to this scheme:
- 0 : an empty entry, with no meaningful information and therefore to be skipped unconditionally
- 1 : a final-state particle, i.e. a particle that is not decayed further by the generator (may also include unstable particles that are to be decayed later, as part of the detector simulation). Such particles must always be labelled ‘1’.
- 2 : a decayed Standard Model hadron or tau or mu lepton, excepting virtual intermediate states thereof (i.e. the particle must undergo a normal decay, not e.g. a shower branching). Such particles must always be labelled ‘2’. No other particles can be labelled ‘2’.
- 3 : a documentation entry
- 4 : an incoming beam particle
- 11 - 200 : an intermediate (decayed/branched/…) particle that does not fulfill the criteria of status code 2, with a generator-dependent classification of its nature
For now we are not making any further distinction in the 11-200 range, everything that cannot be 1, 2 or 4 will be labelled 11. 0 and 3 are not used.
Please note: Analyses which rely on code 11 particles are fragile and sensitive to the exact generator version used. We do not guarantee that their behaviour stays the same between versions, and they may disappear altogether in future.
How can I set up a built-in Rivet analysis?¶
You will need a ThePEG that was configured with Rivet support. In your input file you can then write
create ThePEG::RivetAnalysis Rivet RivetAnalysis.so
insert Rivet:Analyses 0 MC_TEST_1
insert Rivet:Analyses 0 MC_TEST_2
insert Rivet:Analyses 0 MC_TEST_3
insert EventGenerator:AnalysisHandlers 0 Rivet
Replace MC_TEST_* with the actual analyses that you would like to use. Rivet’s output stream is appended to the end of the .log files.