FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairYPtGenerator.h
Go to the documentation of this file.
1 /*
2  * FairYPtGenerator.h
3  *
4  * Created on: 6 mar 2020
5  * Author: Daniel Wielanek
6  * E-mail: daniel.wielanek@gmail.com
7  * Warsaw University of Technology, Faculty of Physics
8  * This generator generates particles by using 2D histogram with distribution of
9  * Y (x-axis) and pt (y-axis).
10  */
11 #ifndef FAIRYPTGENERATOR_H_
12 #define FAIRYPTGENERATOR_H_
13 
14 #include "FairBaseMCGenerator.h"
15 #include "TH2D.h"
16 
18 {
19  public:
21  void SetYPt(const TH2D& yPt);
22  virtual Bool_t Init();
23  virtual Bool_t ReadEvent(FairPrimaryGenerator* primGen);
24  virtual FairGenerator* CloneGenerator() const;
25  virtual ~FairYPtGenerator();
26 
27  protected:
30  Double_t GetMass2() const { return GetPDGMass() * GetPDGMass(); };
31  void GetYPt(Double_t& y, Double_t& pt);
32 
33  private:
34  TH2D fYPt; // Y-Pt distribution
35  ClassDef(FairYPtGenerator, 1);
36 };
37 
38 #endif /* CBM_NOV_ANALYSIS_CBMFEMTO_HELPERS_FAIRYPTGENERATOR_H_ */
virtual Bool_t Init()
void SetYPt(const TH2D &yPt)
virtual FairGenerator * CloneGenerator() const
void GetYPt(Double_t &y, Double_t &pt)
Double_t GetPDGMass() const
virtual ~FairYPtGenerator()
Double_t GetMass2() const
FairYPtGenerator & operator=(const FairYPtGenerator &rhs)
virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen)