CbmRoot
CbmEventGenerator.h
Go to the documentation of this file.
1 
7 #ifndef CBMEVENTGENERATOR_H
8 #define CBMEVENTGENERATOR_H 1
9 
10 
11 #include "CbmBeamProfile.h"
12 #include "CbmTarget.h"
13 #include <FairPrimaryGenerator.h>
14 #include <memory>
15 
16 class FairGenericStack;
17 
18 
34 class CbmEventGenerator : public FairPrimaryGenerator {
35 
36 public:
39 
40 
42  virtual ~CbmEventGenerator();
43 
44 
51  void ForceVertexAtZ(Double_t zVertex);
52 
53 
57  void ForceVertexInTarget(Bool_t choice = kTRUE) {
58  fForceVertexInTarget = choice;
59  }
60 
61 
66 
67 
79  virtual Bool_t GenerateEvent(FairGenericStack* stack);
80 
81 
83  virtual void Print(Option_t* opt = "") const;
84 
85 
100  void SetBeamAngle(Double_t meanThetaX,
101  Double_t meanThetaY,
102  Double_t sigmaThetaX = -1.,
103  Double_t sigmaThetaY = -1.);
104 
105 
119  void SetBeamPosition(Double_t meanX,
120  Double_t meanY,
121  Double_t sigmaX = -1.,
122  Double_t sigmaY = -1.,
123  Double_t zF = 0.);
124 
125 
135  void SetTarget(std::shared_ptr<const CbmTarget> target) { fTarget = target; }
136 
137 
138 private:
140  std::shared_ptr<const CbmTarget> fTarget;
143  Double_t fVertexZ;
144 
145 
153  virtual void MakeBeamAngle() {};
154 
155 
170  virtual void MakeVertex();
171 
172 
177  void MakeVertexAtZ();
178 
179 
184  virtual void MakeVertexInFocalPlane();
185 
186 
191  virtual void MakeVertexInTarget();
192 
193 
195 };
196 
197 
198 #endif /* CBMEVENTGENERATOR_H */
CbmEventGenerator::MakeVertexInTarget
virtual void MakeVertexInTarget()
Generate event vertex position in the target.
Definition: CbmEventGenerator.cxx:154
CbmEventGenerator::fBeamProfile
CbmBeamProfile fBeamProfile
Beam properties.
Definition: CbmEventGenerator.h:139
CbmEventGenerator::fVertexZ
Double_t fVertexZ
forced z coordinate of event vertex
Definition: CbmEventGenerator.h:143
CbmBeamProfile.h
CbmEventGenerator::MakeBeamAngle
virtual void MakeBeamAngle()
Generate beam angle.
Definition: CbmEventGenerator.h:153
CbmEventGenerator::ClassDef
ClassDef(CbmEventGenerator, 2)
CbmEventGenerator
CbmEventGenerator.
Definition: CbmEventGenerator.h:34
CbmEventGenerator::fTarget
std::shared_ptr< const CbmTarget > fTarget
Definition: CbmEventGenerator.h:140
CbmEventGenerator::SetBeamAngle
void SetBeamAngle(Double_t meanThetaX, Double_t meanThetaY, Double_t sigmaThetaX=-1., Double_t sigmaThetaY=-1.)
Set the beam angle in the focal plane.
Definition: CbmEventGenerator.cxx:231
CbmEventGenerator::SetBeamPosition
void SetBeamPosition(Double_t meanX, Double_t meanY, Double_t sigmaX=-1., Double_t sigmaY=-1., Double_t zF=0.)
Set the beam position in the focal plane.
Definition: CbmEventGenerator.cxx:241
CbmEventGenerator::Print
virtual void Print(Option_t *opt="") const
Log output.
Definition: CbmEventGenerator.cxx:212
CbmEventGenerator::ForceVertexInTarget
void ForceVertexInTarget(Bool_t choice=kTRUE)
Enable or disable forcing the vertex to be in the target.
Definition: CbmEventGenerator.h:57
CbmEventGenerator::GenerateEvent
virtual Bool_t GenerateEvent(FairGenericStack *stack)
Generate the input event.
Definition: CbmEventGenerator.cxx:48
CbmEventGenerator::ForceVertexAtZ
void ForceVertexAtZ(Double_t zVertex)
Force event vertex to be at a given z.
Definition: CbmEventGenerator.cxx:39
CbmEventGenerator::MakeVertexAtZ
void MakeVertexAtZ()
Generate event vertex position at a given z.
Definition: CbmEventGenerator.cxx:126
CbmEventGenerator::GetBeamProfile
const CbmBeamProfile & GetBeamProfile()
Beam profile.
Definition: CbmEventGenerator.h:65
CbmTarget.h
CbmEventGenerator::CbmEventGenerator
CbmEventGenerator()
Default constructor
Definition: CbmEventGenerator.cxx:19
CbmBeamProfile
Definition: CbmBeamProfile.h:31
CbmEventGenerator::fForceVertexInTarget
Bool_t fForceVertexInTarget
Target properties.
Definition: CbmEventGenerator.h:141
CbmEventGenerator::SetTarget
void SetTarget(std::shared_ptr< const CbmTarget > target)
Set target properties.
Definition: CbmEventGenerator.h:135
CbmEventGenerator::fForceVertexAtZ
Bool_t fForceVertexAtZ
If set, vertex must be at given z.
Definition: CbmEventGenerator.h:142
CbmEventGenerator::~CbmEventGenerator
virtual ~CbmEventGenerator()
Destructor
Definition: CbmEventGenerator.cxx:34
CbmEventGenerator::MakeVertex
virtual void MakeVertex()
Generate event vertex position.
Definition: CbmEventGenerator.cxx:113
CbmEventGenerator::MakeVertexInFocalPlane
virtual void MakeVertexInFocalPlane()
Generate event vertex position in the beam focal plane.
Definition: CbmEventGenerator.cxx:141