LCOV - code coverage report
Current view: top level - PYTHIA8/pythia8210dev/include/Pythia8 - PartonLevel.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 9 0.0 %
Date: 2016-06-14 17:26:59 Functions: 0 11 0.0 %

          Line data    Source code
       1             : // PartonLevel.h is a part of the PYTHIA event generator.
       2             : // Copyright (C) 2015 Torbjorn Sjostrand.
       3             : // PYTHIA is licenced under the GNU GPL version 2, see COPYING for details.
       4             : // Please respect the MCnet Guidelines, see GUIDELINES for details.
       5             : 
       6             : // This file contains the main class for parton-level event generation
       7             : // PartonLevel: administrates showers, multiparton interactions and remnants.
       8             : 
       9             : #ifndef Pythia8_PartonLevel_H
      10             : #define Pythia8_PartonLevel_H
      11             : 
      12             : #include "Pythia8/Basics.h"
      13             : #include "Pythia8/BeamParticle.h"
      14             : #include "Pythia8/BeamRemnants.h"
      15             : #include "Pythia8/ColourReconnection.h"
      16             : #include "Pythia8/Event.h"
      17             : #include "Pythia8/HardDiffraction.h"
      18             : #include "Pythia8/Info.h"
      19             : #include "Pythia8/JunctionSplitting.h"
      20             : #include "Pythia8/MergingHooks.h"
      21             : #include "Pythia8/MultipartonInteractions.h"
      22             : #include "Pythia8/ParticleData.h"
      23             : #include "Pythia8/PartonSystems.h"
      24             : #include "Pythia8/PythiaStdlib.h"
      25             : #include "Pythia8/ResonanceDecays.h"
      26             : #include "Pythia8/RHadrons.h"
      27             : #include "Pythia8/Settings.h"
      28             : #include "Pythia8/SigmaTotal.h"
      29             : #include "Pythia8/SpaceShower.h"
      30             : #include "Pythia8/StandardModel.h"
      31             : #include "Pythia8/StringLength.h"
      32             : #include "Pythia8/TimeShower.h"
      33             : #include "Pythia8/UserHooks.h"
      34             : 
      35             : 
      36             : namespace Pythia8 {
      37             : 
      38             : //==========================================================================
      39             : 
      40             : // The PartonLevel class contains the top-level routines to generate
      41             : // the partonic activity of an event.
      42             : 
      43           0 : class PartonLevel {
      44             : 
      45             : public:
      46             : 
      47             :   // Constructor.
      48           0 :   PartonLevel() : userHooksPtr(0) {}
      49             : 
      50             :   // Initialization of all classes at the parton level.
      51             :   bool init( Info* infoPtrIn, Settings& settings,
      52             :     ParticleData* particleDataPtrIn, Rndm* rndmPtrIn,
      53             :     BeamParticle* beamAPtrIn, BeamParticle* beamBPtrIn,
      54             :     BeamParticle* beamPomAPtrIn, BeamParticle* beamPomBPtrIn,
      55             :     Couplings* couplingsPtrIn, PartonSystems* partonSystemsPtrIn,
      56             :     SigmaTotal* sigmaTotPtr, TimeShower* timesDecPtrIn,
      57             :     TimeShower* timesPtrIn, SpaceShower* spacePtrIn,
      58             :     RHadrons* rHadronsPtrIn, UserHooks* userHooksPtrIn,
      59             :     MergingHooks* mergingHooksPtr, bool useAsTrial);
      60             : 
      61             :   // Generate the next parton-level process.
      62             :   bool next( Event& process, Event& event);
      63             : 
      64             :   // Perform showers in resonance decay chains. (For special cases.)
      65             :   void setupShowerSys( Event& process, Event& event);
      66             :   bool resonanceShowers( Event& process, Event& event, bool skipForR);
      67             : 
      68             :   // Perform decays and showers of W and Z emitted in shower.
      69             :   bool wzDecayShowers( Event& event);
      70             : 
      71             :   // Tell whether failure was due to vetoing.
      72           0 :   bool hasVetoed() const {return doVeto;}
      73           0 :   bool hasVetoedDiff() const {return doDiffVeto;}
      74             : 
      75             :   // Accumulate, print and reset statistics.
      76           0 :   void accumulate() {if (isResolved && !isDiff) multiPtr->accumulate();}
      77             :   void statistics(bool reset = false) {
      78           0 :     if (doMPI) multiMB.statistics(reset);}
      79             :     // For now no separate statistics for diffraction??
      80             :     //if (doMPISDA && doDiffraction) multiSDA.statistics(reset);
      81             :     //if (doMPISDB && doDiffraction) multiSDB.statistics(reset);}
      82           0 :   void resetStatistics() { if (doMPI) multiMB.resetStatistics(); }
      83             : 
      84             :   // Reset PartonLevel object for trial shower usage.
      85             :   void resetTrial();
      86             :   // Provide the pT scale of the last branching in the shower.
      87           0 :   double pTLastInShower(){ return pTLastBranch; }
      88             :   // Provide the type of the last branching in the shower.
      89           0 :   int typeLastInShower(){ return typeLastBranch; }
      90             : 
      91             : private:
      92             : 
      93             :   // Constants: could only be changed in the code itself.
      94             :   static const int NTRY;
      95             : 
      96             :   // Initialization data, mainly read from Settings.
      97             :   bool   doNonDiff, doDiffraction, doMPI, doMPIMB, doMPISDA, doMPISDB,
      98             :          doMPICD, doMPIinit, doISR, doFSRduringProcess, doFSRafterProcess,
      99             :          doFSRinResonances, doRemnants, doSecondHard, hasOneLeptonBeam,
     100             :          hasTwoLeptonBeams, hasPointLeptons, canVetoPT, canVetoStep,
     101             :          canVetoMPIStep, canVetoEarly, canSetScale, allowRH, earlyResDec,
     102             :          vetoWeakJets, canReconResSys, doReconnect, doHardDiff,
     103             :          forceResonanceCR;
     104             :   double mMinDiff, mWidthDiff, pMaxDiff, vetoWeakDeltaR2;
     105             : 
     106             :   // Event generation strategy. Number of steps. Maximum pT scales.
     107             :   bool   doVeto;
     108             :   int    nMPI, nISR, nFSRinProc, nFSRinRes, nISRhard, nFSRhard,
     109             :          typeLatest, nVetoStep, typeVetoStep, nVetoMPIStep, iSysNow,
     110             :          reconnectMode, sampleTypeDiff;
     111             :   double pTsaveMPI, pTsaveISR, pTsaveFSR, pTvetoPT;
     112             : 
     113             :   // Current event properties.
     114             :   bool   isNonDiff, isDiffA, isDiffB, isDiffC, isDiff, isSingleDiff,
     115             :          isDoubleDiff, isCentralDiff, isResolved, isResolvedA,
     116             :          isResolvedB, isResolvedC, isHardDiffA, isHardDiffB, isHardDiff,
     117             :          isSetupDiff, doDiffVeto;
     118             :   int    sizeProcess, sizeEvent, nHardDone, nHardDoneRHad, iDS;
     119             :   double eCMsave;
     120             :   vector<bool> inRHadDecay;
     121             :   vector<int>  iPosBefShow;
     122             : 
     123             :   // Pointer to various information on the generation.
     124             :   Info*          infoPtr;
     125             : 
     126             :   // Pointer to the particle data table.
     127             :   ParticleData*  particleDataPtr;
     128             : 
     129             :   // Pointer to the random number generator.
     130             :   Rndm*          rndmPtr;
     131             : 
     132             :   // Pointers to the two incoming beams.
     133             :   BeamParticle*  beamAPtr;
     134             :   BeamParticle*  beamBPtr;
     135             : 
     136             :   // Spare copies of normal pointers. Pointers to Pomeron beam-inside-beam.
     137             :   BeamParticle*  beamHadAPtr;
     138             :   BeamParticle*  beamHadBPtr;
     139             :   BeamParticle*  beamPomAPtr;
     140             :   BeamParticle*  beamPomBPtr;
     141             : 
     142             :   // Pointers to Standard Model couplings.
     143             :   Couplings*     couplingsPtr;
     144             : 
     145             :   // Pointer to information on subcollision parton locations.
     146             :   PartonSystems* partonSystemsPtr;
     147             : 
     148             :   // Pointer to userHooks object for user interaction with program.
     149             :   UserHooks*     userHooksPtr;
     150             : 
     151             :   // Pointers to timelike showers for resonance decays and the rest.
     152             :   TimeShower*    timesDecPtr;
     153             :   TimeShower*    timesPtr;
     154             : 
     155             :   // Pointer to spacelike showers.
     156             :   SpaceShower*   spacePtr;
     157             : 
     158             :   // The generator classes for multiparton interactions.
     159             :   MultipartonInteractions  multiMB;
     160             :   MultipartonInteractions  multiSDA;
     161             :   MultipartonInteractions  multiSDB;
     162             :   MultipartonInteractions  multiCD;
     163             :   MultipartonInteractions* multiPtr;
     164             : 
     165             :   // The generator class to construct beam-remnant kinematics.
     166             :   BeamRemnants remnants;
     167             : 
     168             :   // The RHadrons class is used to fragment off and decay R-hadrons.
     169             :   RHadrons*    rHadronsPtr;
     170             : 
     171             :   // ResonanceDecay object does sequential resonance decays.
     172             :   ResonanceDecays resonanceDecays;
     173             : 
     174             :   // The Colour reconnection class used to do colour reconnection.
     175             :   ColourReconnection colourReconnection;
     176             : 
     177             :   // The Junction splitting class used to split junctions systems.
     178             :   JunctionSplitting junctionSplitting;
     179             : 
     180             :   // The Diffraction class is for hard diffraction selection.
     181             :   HardDiffraction hardDiffraction;
     182             : 
     183             :   // Resolved diffraction: find how many systems should have it.
     184             :   int decideResolvedDiff( Event& process);
     185             : 
     186             :   // Set up an unresolved process, i.e. elastic or diffractive.
     187             :   bool setupUnresolvedSys( Event& process, Event& event);
     188             : 
     189             :   // Set up the hard process, excluding subsequent resonance decays.
     190             :   void setupHardSys( Event& process, Event& event);
     191             : 
     192             :   // Resolved diffraction: pick whether to have it and set up for it.
     193             :   void setupResolvedDiff( Event& process);
     194             : 
     195             :   // Resolved diffraction: restore normal behaviour.
     196             :   void leaveResolvedDiff( int iHardLoop, Event& process, Event& event);
     197             : 
     198             :   // Hard diffraction: set up the process record.
     199             :   void setupHardDiff( Event& process);
     200             : 
     201             :   // Hard diffraction: leave the process record.
     202             :   void leaveHardDiff( Event& process, Event& event);
     203             : 
     204             :   // Pointer to MergingHooks object for user interaction with the merging.
     205             :   MergingHooks* mergingHooksPtr;
     206             :   // Parameters to specify trial shower usage.
     207             :   bool doTrial;
     208             :   int nTrialEmissions;
     209             :   // Parameters to store to veto trial showers.
     210             :   double pTLastBranch;
     211             :   int typeLastBranch;
     212             :   // Parameters to specify merging usage.
     213             :   bool canRemoveEvent, canRemoveEmission;
     214             : 
     215             : };
     216             : 
     217             : //==========================================================================
     218             : 
     219             : } // end namespace Pythia8
     220             : 
     221             : #endif // Pythia8_PartonLevel_H

Generated by: LCOV version 1.11