CbmRoot
Loading...
Searching...
No Matches
CbmEventGenerator.h
Go to the documentation of this file.
1/* Copyright (C) 2019-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Volker Friese [committer] */
4
11#ifndef CBMEVENTGENERATOR_H
12#define CBMEVENTGENERATOR_H 1
13
14
15#include "CbmBeamProfile.h"
16#include "CbmTarget.h"
17
18#include <FairPrimaryGenerator.h>
19
20#include <memory>
21
22class FairGenericStack;
23
24
40class CbmEventGenerator : public FairPrimaryGenerator {
41
42public:
45
46
48 virtual ~CbmEventGenerator();
49
50
57 void ForceVertexAtZ(Double_t zVertex);
58
59
63 void ForceVertexInTarget(Bool_t choice = kTRUE) { fForceVertexInTarget = choice; }
64
65
70
71
83 virtual Bool_t GenerateEvent(FairGenericStack* stack);
84
85
87 virtual void Print(Option_t* opt = "") const;
88
89
104 void SetBeamAngle(Double_t meanThetaX, Double_t meanThetaY, Double_t sigmaThetaX = -1., Double_t sigmaThetaY = -1.);
105
106
120 void SetBeamPosition(Double_t meanX, Double_t meanY, Double_t sigmaX = -1., Double_t sigmaY = -1., Double_t zF = 0.);
121
122
132 void SetTarget(std::shared_ptr<const CbmTarget> target) { fTarget = target; }
133
134
135private:
137 std::shared_ptr<const CbmTarget> fTarget;
140 Double_t fVertexZ;
141
142
150 virtual void MakeBeamAngle() {};
151
152
167 virtual void MakeVertex();
168
169
174 void MakeVertexAtZ();
175
176
181 virtual void MakeVertexInFocalPlane();
182
183
188 virtual void MakeVertexInTarget();
189
190
192};
193
194
195#endif /* CBMEVENTGENERATOR_H */
CbmEventGenerator.
virtual void Print(Option_t *opt="") const
Log output.
virtual Bool_t GenerateEvent(FairGenericStack *stack)
Generate the input event.
Double_t fVertexZ
forced z coordinate of event vertex
void SetBeamAngle(Double_t meanThetaX, Double_t meanThetaY, Double_t sigmaThetaX=-1., Double_t sigmaThetaY=-1.)
Set the beam angle in the focal plane.
CbmEventGenerator()
Default constructor
void MakeVertexAtZ()
Generate event vertex position at a given z.
Bool_t fForceVertexInTarget
Target properties.
virtual ~CbmEventGenerator()
Destructor
Bool_t fForceVertexAtZ
If set, vertex must be at given z.
void SetTarget(std::shared_ptr< const CbmTarget > target)
Set target properties.
void ForceVertexAtZ(Double_t zVertex)
Force event vertex to be at a given z.
virtual void MakeVertexInFocalPlane()
Generate event vertex position in the beam focal plane.
virtual void MakeBeamAngle()
Generate beam angle.
const CbmBeamProfile & GetBeamProfile()
Beam profile.
virtual void MakeVertex()
Generate event vertex position.
CbmBeamProfile fBeamProfile
Beam properties.
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.
ClassDef(CbmEventGenerator, 2)
std::shared_ptr< const CbmTarget > fTarget
void ForceVertexInTarget(Bool_t choice=kTRUE)
Enable or disable forcing the vertex to be in the target.
virtual void MakeVertexInTarget()
Generate event vertex position in the target.