PandaRoot
detectors/hyp/hypTools/PndHypBupGenerator.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 // -------------------------------------------------------------------------
14 // ----- PndHypBupGenerator header file -----
15 // ----- Created by Alicia Sanchez -----
16 // -------------------------------------------------------------------------
17 
29 #ifndef PNDHYPBUPGENERATOR_H
30 #define PNDHYPBUPGENERATOR_H 1
31 
32 #include "THParticle.h"
33 
34 #include "FairGenerator.h"
35 
36 class TClonesArray;
37 class TFile;
38 class TTree;
39 class TVirtualMCStack;
40 
41 class PndPrimaryGenerator;
42 // class CbmParticle;
43 
44 class PndHypBupGenerator : public FairGenerator {
45 
46  public:
49 
53  PndHypBupGenerator(const char *fileName);
54 
56  virtual ~PndHypBupGenerator();
57 
60  void SetPhiRange(Double32_t phimin = 0, Double32_t phimax = 360)
61  {
62  fPhiMin = phimin;
63  fPhiMax = phimax;
64  };
65 
66  void SetThetaRange(Double32_t thetamin = 0, Double32_t thetamax = 90)
67  {
68  fThetaMin = thetamin;
69  fThetaMax = thetamax;
70  fThetaRangeIsSet = kTRUE;
71  };
72 
73  void SetPRange(Double32_t pmin = 0, Double32_t pmax = 10)
74  {
75  fPMin = pmin;
76  fPMax = pmax;
77  fPRangeIsSet = kTRUE;
78  }
79 
80  void GammaEmissPar(Bool_t On = kFALSE) { fGamOn = On; }
81 
86  virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen);
87 
88  private:
90  Int_t iEvent;
91  const Char_t *fFileName;
92  TFile *fInputFile;
93  TTree *fInputTree;
94  TClonesArray *fParticles;
95 
96  Double32_t fPMin, fPMax;
97  Double32_t fPhiMin, fPhiMax;
98  Double32_t fThetaMin, fThetaMax;
99  Bool_t fThetaRangeIsSet; // True if theta range is set
100  Bool_t fPRangeIsSet; // True if abs.momentum range is set
101  Bool_t fGamOn; // True if. gamma emission is selected
102 
105  void CloseInput();
106 
110  // Int_t RegisterIons();
111 
113  // std::map<TString,CbmParticle*> fIonMap; //!
114 
115  ClassDef(PndHypBupGenerator, 2);
116 };
117 
118 #endif
virtual ~PndHypBupGenerator()
void SetPRange(Double32_t pmin=0, Double32_t pmax=10)
void SetPhiRange(Double32_t phimin=0, Double32_t phimax=360)
void SetThetaRange(Double32_t thetamin=0, Double32_t thetamax=90)
virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen)