PandaRoot
PndCorrDistGenerator.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndCorrDistGenerator header file -----
3 // ----- Created 23/05/07 by Aida Galoyan -----
4 // -------------------------------------------------------------------------
5 
12 #ifndef PNDCORRDISTGENERATOR_H
13 #define PNDCORRDISTGENERATOR_H 1
14 
15 #include "FairGenerator.h"
16 #include "THParticle.h"
17 
18 // using namespace std;
19 
20 class TClonesArray;
21 class TFile;
22 class TH2F;
23 class TTree;
24 class TVirtualMCStack;
25 class FairPrimaryGenerator;
26 
27 class PndCorrDistGenerator : public FairGenerator {
28 
29  public:
32 
36  PndCorrDistGenerator(const Char_t *fileName);
37 
39  virtual ~PndCorrDistGenerator();
40 
45  virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen);
46  void SetParam() { fParam = kTRUE; };
47  void SetThetaRange(Double_t thetLow = 0., Double_t thetHigh = 0.)
48  {
49  fTheLow = thetLow;
50  fTheHigh = thetHigh;
51  };
52 
53  private:
54  Int_t iEvent;
55  const Char_t *fFileName;
56  TFile *fInputFile;
57  TH2F *fInputHist;
58  TClonesArray *fParticles;
59  Int_t fPdgType;
60  Bool_t fParam;
61  Double_t fTheLow, fTheHigh;
62 
65  void CloseInput();
66 
67  Double_t MaxBoltDistP(Double_t MeanP);
68 
69  Double_t MeanMomentum(Double_t thet);
70 
71  ClassDef(PndCorrDistGenerator, 3);
72 };
73 
74 #endif
virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen)
void SetThetaRange(Double_t thetLow=0., Double_t thetHigh=0.)
virtual ~PndCorrDistGenerator()