NCFS-Pack
A generic (astro)particle physics analysis framework
 
Loading...
Searching...
No Matches
NcCollider.h
Go to the documentation of this file.
1#ifndef NcCollider_h
2#define NcCollider_h
3// Copyright(c) 2002 NCFS/IIHE, All Rights Reserved.
4// See cxx source for full Copyright notice.
5
6#include "TSystem.h"
7#include "TPythia6.h"
8#include "TString.h"
9#include "TFile.h"
10#include "TTree.h"
11#include "TArrayI.h"
12
13#include "NcEvent.h"
14#include "NcRandom.h"
15#include "NcBoost.h"
16#include "NcTreeMaker.h"
17
19
20class NcCollider : public TPythia6
21{
22 public:
23 NcCollider(); // Default constructor
24 virtual ~NcCollider(); // Default destructor
25 NcTreeMaker* SetOutputFile(TString fname,Int_t mode=0); // Initialise the output data file(s)
26 void SetVertexMode(Int_t mode); // Select mode for (sec.) vertex structure creation
27 Int_t GetVertexMode() const; // Provide vertex structure creation mode
28 void SetResolution(Double_t res); // Set resolution (in meter) for resolving (sec.) vertices
29 Double_t GetResolution() const; // Provide (sec.) vertex resolving resolution (in meter)
30 void SetRunNumber(Int_t run); // Set user defined run number
31 Int_t GetRunNumber() const; // Provide the user defined run number
32 void SetPrintFreq(Int_t n); // Set print frequency for every 'n' events
33 Int_t GetPrintFreq() const; // Provide the print frequency
34 Int_t Init(TString frame,TString beam,TString target,Float_t win,Nc3Vector* pbeam=0,Nc3Vector* ptarget=0,Int_t wxsec=1,Double_t fact=0); // Standard Pythia initialisation
35 Int_t Init(TString frame,Int_t zp,Int_t ap,Int_t zt,Int_t at,Float_t win,Nc3Vector* pbeam=0,Nc3Vector* ptarget=0,Int_t wxsec=1); // Nucleus-Nucleus initialisation
36 void SetMomentum(Nc3Vector& p,Int_t mode); // Set the beam or target particle 3-momentum
37 void SetStable(Int_t id,Int_t mode=1,Int_t cls=0); // Declare a certain particle (class) as stable or not
38 void SelectEvent(Int_t id); // Select only events containing specified particles
39 Int_t GetSelectionFlag() const; // Return the selection flag for this event
40 Int_t MakeEvent(Int_t npt=0,Int_t mlist=-1,Int_t medit=1);// Generate a single event with npt participant nucleons
41 void EndRun(); // Properly close all buffers and output file
42 NcEvent* GetEvent(Int_t select=0) const; // Provide pointer to the generated event structure
43 void SetSpectatorPmin(Float_t pmin); // Set minimal momentum for spectator track to be stored
44 Float_t GetSpectatorPmin() const; // Provide the minimal momentum for spectator tracks
45 void SetUserControl(Int_t flag); // Selection of full user control w.r.t. MC parameters.
46 Int_t GetUserControl() const; // Provide the value of the user control flag.
47 void SetElastic(Int_t flag); // Selection flag for elastic and diffractive processes.
48 Int_t GetElastic() const; // Provide the value of the elastic selection flag.
49 void SetMultiple(Int_t flag); // Selection flag for multiple interactions.
50 Int_t GetMultiple() const; // Provide the value of the multiple selection flag.
51 void SetEcmsMin(Double_t ecms); // Set minimal CMS energy (in GeV) for events to get generated
52 Double_t GetEcmsMin() const; // Provide the minimal CMS energy (in GeV) for events to get generated
53 void SetRandomSeed(Int_t iseed); // Initialise a specific random number sequence.
54 Int_t GetRandomSeed(); // Provide the current random number sequence seed.
55 Float_t GetWin() const; // Provide the Pythia energy indicator (in GeV) used for initialisation
56
57 // Facilities for the p+p and p+gamma modeling for the jet of (obscured) astrophysical objects
58 void SetJetProtonSpectrum(Double_t pmin,Double_t pmax=-1,TF1* fspec=0,TH1* hspec=0,Int_t mode=0); // Set the proton (beam) spectrum of the Jet
59 void SetJetGammaSpectrum(Double_t pmin,Double_t pmax=-1,TF1* fspec=0,TH1* hspec=0,Int_t mode=0); // Set the gamma (target) spectrum of the Jet
60 TH1* GetJetProtonSpectrum(Double_t* pmin=0,Double_t* pmax=0); // Get the proton (beam) spectrum of the Jet
61 TH1* GetJetGammaSpectrum(Double_t* pmin=0,Double_t* pmax=0); // Get the gamma (target) spectrum of the Jet
62 void ProcessJet(Double_t np,Double_t gfrac,TString flux,Double_t dthmax=0,Int_t nlist=1,Int_t ntrymax=1000,Int_t wxsec=0,Double_t finit=0,Int_t full=0); // Perform the astrophysical Jet simulation
63
64 protected:
65 Int_t fVertexmode; // The vertex structure creation mode
66 Double_t fResolution; // The resolution (in meter) for resolving (sec.) vertices
67 Int_t fRunnum; // The user defined run number
68 Int_t fEventnum; // The automatically updated event number
69 Int_t fPrintfreq; // The user selected print frequency
70 TString fFrame; // The Pythia frame indicator
71 Float_t fWin; // The Pythia energy indicator
72 NcTrack fBeam; // Track parameters for the beam particle in the selected experimental frame
73 NcTrack fTarget; // Track parameters for the target particle in the selected experimental frame
74 Int_t fNucl; // Flag to denote nucleus-nucleus (1) or standard Pythia (0) running
75 Int_t fZproj; // Z of the projectile particle
76 Int_t fAproj; // A of the projectile particle
77 Int_t fZtarg; // Z of the target particle
78 Int_t fAtarg; // A of the target particle
79 Float_t fFracpp; // Fraction of p+p collisions
80 Float_t fFracnp; // Fraction of n+p collisions
81 Float_t fFracpn; // Fraction of p+n collisions
82 Float_t fFracnn; // Fraction of n+n collisions
83 NcRandom fRan; // Random number generator
84 NcEvent* fEvent; // The produced event structure
85 Float_t fSpecpmin; // The minimal momentum for spectator tracks to be stored
86 Int_t fUserctrl; // Flag to denote the user control selection w.r.t. MC parameters
87 Int_t fElastic; // Flag to denote inclusion of elastic and difractive processes.
88 Int_t fMultiple; // Flag to denote inclusion of multiple interactions.
89 Double_t fEcmsmin; // Minimal CMS energy (in GeV) for events to get generated
90 Int_t fWxsec; // Flag to denote event weighting by cross section for variable energy runs
91 NcBoost fLorbo; // The Lorentz boost for the case of forced CMS processing
92
93 TFile* fOutFile; // The user defined output file for the NcEvent data structures
94 TTree* fOutTree; // The ROOT output tree with the NcEvent data structures
95
96 TArrayI* fSelections; // The particle KC codes for event selection
97 Int_t fSelect; // Flag to indicate whether the total event is selected (1) or not (0)
98
99 NcTreeMaker* fMktree; // The TreeMaker task processor
100 NcJob* fJob; // The NcJob to perform all (sub)tasks
101 NcSignal fEvtuser; // Storage for event user data
102
103 // Parameters for the astrophysical Jet modeling
104 Double_t fJetPpmin; // The Jet minimum proton (beam) momentum
105 Double_t fJetPpmax; // The Jet maximum proton (beam) momentum
106 Double_t fJetGpmin; // The Jet minimum gamma (target) momentum
107 Double_t fJetGpmax; // The Jet maximum gamma (target) momentum
108 TH1* fJetPspectrum; // The Jet proton (beam) spectrum
109 Int_t fJetPscale; // Linear, Log10 or Ln scale indicator for fJetPspectrum X-axis
110 TH1* fJetGspectrum; // The Jet gamma (target) specrrum
111 Int_t fJetGscale; // Linear, Log10 or Ln scale indicator for fJetGspectrum X-axis
112 NcAstrolab fLab; // To provide facilities for the astrophysical Jet modeling
113
114 Int_t IsSelected(); // Check whether (sub)event passed the selection criteria
115 void GetFractions(Float_t zp,Float_t ap,Float_t zt,Float_t at); // Determine various N-N collision fractions
116 TString GetPyname(Int_t kf); // Provide the correctly truncated Pythia particle name for PDG code kf
117
118 ClassDef(NcCollider,10) // Pythia based universal (astro)physics event generator
119};
120#endif
Handling of 3-vectors in various reference frames.
Definition Nc3Vector.h:15
Virtual lab to provide (astro)physical parameters, treat data and relate observations with astrophysi...
Definition NcAstrolab.h:47
Perform various Lorentz transformations.
Definition NcBoost.h:17
void SetRunNumber(Int_t run)
Int_t Init(TString frame, TString beam, TString target, Float_t win, Nc3Vector *pbeam=0, Nc3Vector *ptarget=0, Int_t wxsec=1, Double_t fact=0)
Int_t fPrintfreq
Definition NcCollider.h:69
void SetElastic(Int_t flag)
Float_t fSpecpmin
Definition NcCollider.h:85
Double_t fJetGpmax
Definition NcCollider.h:107
void SetUserControl(Int_t flag)
Int_t fZproj
Definition NcCollider.h:75
virtual ~NcCollider()
NcRandom fRan
Definition NcCollider.h:83
TString fFrame
Definition NcCollider.h:70
void SetEcmsMin(Double_t ecms)
Double_t fJetPpmax
Definition NcCollider.h:105
Int_t fWxsec
Definition NcCollider.h:90
Double_t fJetGpmin
Definition NcCollider.h:106
Int_t GetVertexMode() const
Double_t fResolution
Definition NcCollider.h:66
void SetSpectatorPmin(Float_t pmin)
Double_t GetEcmsMin() const
NcEvent * GetEvent(Int_t select=0) const
Int_t GetSelectionFlag() const
void SetVertexMode(Int_t mode)
void SetMomentum(Nc3Vector &p, Int_t mode)
Double_t fEcmsmin
Definition NcCollider.h:89
NcJob * fJob
Definition NcCollider.h:100
TH1 * fJetPspectrum
Definition NcCollider.h:108
void SetJetGammaSpectrum(Double_t pmin, Double_t pmax=-1, TF1 *fspec=0, TH1 *hspec=0, Int_t mode=0)
void SetStable(Int_t id, Int_t mode=1, Int_t cls=0)
Int_t fUserctrl
Definition NcCollider.h:86
TH1 * GetJetGammaSpectrum(Double_t *pmin=0, Double_t *pmax=0)
Int_t fJetPscale
Definition NcCollider.h:109
Int_t fRunnum
Definition NcCollider.h:67
Float_t fFracnn
Definition NcCollider.h:82
TArrayI * fSelections
Definition NcCollider.h:96
Int_t fAproj
Definition NcCollider.h:76
NcTreeMaker * fMktree
Definition NcCollider.h:99
Double_t GetResolution() const
void SetMultiple(Int_t flag)
NcSignal fEvtuser
Definition NcCollider.h:101
Int_t GetMultiple() const
NcEvent * fEvent
Definition NcCollider.h:84
TTree * fOutTree
Definition NcCollider.h:94
Int_t fElastic
Definition NcCollider.h:87
TH1 * GetJetProtonSpectrum(Double_t *pmin=0, Double_t *pmax=0)
NcAstrolab fLab
Definition NcCollider.h:112
Int_t fAtarg
Definition NcCollider.h:78
Double_t fJetPpmin
Definition NcCollider.h:104
Int_t fMultiple
Definition NcCollider.h:88
Int_t fZtarg
Definition NcCollider.h:77
void SetJetProtonSpectrum(Double_t pmin, Double_t pmax=-1, TF1 *fspec=0, TH1 *hspec=0, Int_t mode=0)
TH1 * fJetGspectrum
Definition NcCollider.h:110
Int_t GetUserControl() const
Float_t GetSpectatorPmin() const
void GetFractions(Float_t zp, Float_t ap, Float_t zt, Float_t at)
Int_t fSelect
Definition NcCollider.h:97
Float_t fFracpn
Definition NcCollider.h:81
Float_t fFracnp
Definition NcCollider.h:80
NcTreeMaker * SetOutputFile(TString fname, Int_t mode=0)
Int_t fEventnum
Definition NcCollider.h:68
Float_t fFracpp
Definition NcCollider.h:79
NcTrack fBeam
Definition NcCollider.h:72
void SetRandomSeed(Int_t iseed)
Int_t IsSelected()
Int_t fJetGscale
Definition NcCollider.h:111
Int_t fNucl
Definition NcCollider.h:74
void SetResolution(Double_t res)
Int_t fVertexmode
Definition NcCollider.h:65
NcBoost fLorbo
Definition NcCollider.h:91
Float_t fWin
Definition NcCollider.h:71
Int_t GetRandomSeed()
void SelectEvent(Int_t id)
Int_t GetRunNumber() const
Float_t GetWin() const
void SetPrintFreq(Int_t n)
NcTrack fTarget
Definition NcCollider.h:73
void ProcessJet(Double_t np, Double_t gfrac, TString flux, Double_t dthmax=0, Int_t nlist=1, Int_t ntrymax=1000, Int_t wxsec=0, Double_t finit=0, Int_t full=0)
TString GetPyname(Int_t kf)
TFile * fOutFile
Definition NcCollider.h:93
Int_t GetPrintFreq() const
Int_t MakeEvent(Int_t npt=0, Int_t mlist=-1, Int_t medit=1)
Int_t GetElastic() const
Creation and investigation of an NCFS generic event structure.
Definition NcEvent.h:15
Base class for top level job in a task based procedure.
Definition NcJob.h:18
Generate universal random numbers and sequences on all common machines.
Definition NcRandom.h:16
Generic handling of (extrapolated) detector signals.
Definition NcSignal.h:23
Handling of the attributes of a reconstructed particle track.
Definition NcTrack.h:19
TTask derived class to generate a plain ROOT tree from NCFS generic event structures.
Definition NcTreeMaker.h:17