PandaRoot
PndFlukaGenerator.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 // ----- PndFlukaGenerator header file -----
15 // ----- -----
16 // -------------------------------------------------------------------------
17 
25 #ifndef PND_FLUKAGENERATOR_H
26 #define PND_FLUKAGENERATOR_H
27 
28 #include "FairGenerator.h"
29 #include "TString.h"
30 #include <fstream>
31 
32 class TClonesArray;
33 class TFile;
34 class TTree;
35 class TVirtualMCStack;
36 class FairPrimaryGenerator;
37 class TF1;
38 
39 class PndFlukaGenerator : public FairGenerator {
40 
41  public:
44 
48  PndFlukaGenerator(const Char_t *fileName);
49 
51  virtual ~PndFlukaGenerator();
52 
57  virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen);
58 
59  protected:
60  Bool_t ReadRootEvent(FairPrimaryGenerator *primGen);
61  Bool_t Init();
62 
63  private:
64  Bool_t SetBranchAddresses();
65 
66  Int_t iEvent;
67  Int_t iEntry;
68  TString fFileName;
69  TFile *fInputRootFile;
70  TTree *fInputTree;
71 
72  Double_t fpx, fpy, fpz;
73  Double_t fvx, fvy, fvz;
74  Int_t fpid;
75  Int_t fnpart;
76 
79  void CloseInput();
80 
81  ClassDef(PndFlukaGenerator, 2);
82 };
83 
84 #endif
virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen)
Bool_t ReadRootEvent(FairPrimaryGenerator *primGen)
virtual ~PndFlukaGenerator()