BmnRoot
Loading...
Searching...
No Matches
MpdVHLLEGenerator.h
Go to the documentation of this file.
1/*
2 * File: MpdVHLLEGenerator.h
3 * Author: Pavel Batyuk
4 *
5 * Created on April 27, 2016
6 */
7
8#ifndef MPDVHLLEGENERATOR_H
9#define MPDVHLLEGENERATOR_H
10
11#include <iostream>
12#include "FairGenerator.h"
13#include "FairMCEventHeader.h"
14#include "FairPrimaryGenerator.h"
15#include "TFile.h"
16#include "TChain.h"
17
18using namespace std;
19using namespace TMath;
20
21const UInt_t dim = 1e5;
22
23class TVirtualMCStack;
24class FairPrimaryGenerator;
25
26class MpdVHLLEGenerator : public FairGenerator {
27public:
28
30 MpdVHLLEGenerator(TString fileName, Bool_t isCascade);
32
33 Bool_t ReadEvent(FairPrimaryGenerator* primGen);
34
35 void SkipEvents(Int_t ev) {
36 fEventNumber = ev;
37 cout << "NUMBER OF SKIPPED EVENTS = " << ev << endl;
38 }
39
40private:
41 TFile* fInputFile;
42 TString fFileName;
43 TChain* fDstTree;
44 Float_t fPx[dim];
45 Float_t fPy[dim];
46 Float_t fPz[dim];
47 Float_t fX[dim];
48 Float_t fY[dim];
49 Float_t fZ[dim];
50 Float_t fE[dim];
51 Int_t fPID[dim];
52 Int_t fNpart;
53 Int_t fEventNumber;
54 TString fBranch;
55
56 void SetCascade(Bool_t flag) {
57 fBranch = (flag) ? "treefin" : "treeini";
58 }
59
60 MpdVHLLEGenerator(const MpdVHLLEGenerator&) = delete;
61 MpdVHLLEGenerator& operator=(const MpdVHLLEGenerator&) = delete;
62
63 ClassDef(MpdVHLLEGenerator, 1);
64};
65#endif
void SkipEvents(Int_t ev)
Bool_t ReadEvent(FairPrimaryGenerator *primGen)
const UInt_t dim
const UInt_t dim
STL namespace.