PandaRoot
PndCorrDistGenerator.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 // ----- PndCorrDistGenerator header file -----
15 // ----- Created 23/05/07 by Aida Galoyan -----
16 // -------------------------------------------------------------------------
17 
24 #ifndef PNDCORRDISTGENERATOR_H
25 #define PNDCORRDISTGENERATOR_H 1
26 
27 #include "FairGenerator.h"
28 #include "THParticle.h"
29 
30 // using namespace std;
31 
32 class TClonesArray;
33 class TFile;
34 class TH2F;
35 class TTree;
36 class TVirtualMCStack;
37 class FairPrimaryGenerator;
38 
39 class PndCorrDistGenerator : public FairGenerator {
40 
41  public:
44 
48  PndCorrDistGenerator(const Char_t *fileName);
49 
51  virtual ~PndCorrDistGenerator();
52 
57  virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen);
58  void SetParam() { fParam = kTRUE; };
59  void SetThetaRange(Double_t thetLow = 0., Double_t thetHigh = 0.)
60  {
61  fTheLow = thetLow;
62  fTheHigh = thetHigh;
63  };
64 
65  private:
66  Int_t iEvent;
67  const Char_t *fFileName;
68  TFile *fInputFile;
69  TH2F *fInputHist;
70  TClonesArray *fParticles;
71  Int_t fPdgType;
72  Bool_t fParam;
73  Double_t fTheLow, fTheHigh;
74 
77  void CloseInput();
78 
79  Double_t MaxBoltDistP(Double_t MeanP);
80 
81  Double_t MeanMomentum(Double_t thet);
82 
83  ClassDef(PndCorrDistGenerator, 3);
84 };
85 
86 #endif
virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen)
void SetThetaRange(Double_t thetLow=0., Double_t thetHigh=0.)
virtual ~PndCorrDistGenerator()