BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
MpdPlutoGenerator.h
Go to the documentation of this file.
1// -------------------------------------------------------------------------
2// ----- MpdPlutoGenerator header file -----
3// ----- Created 13/07/04 by V. Friese / D.Bertini -----
4// ----- Modified from FairPlutoGenerator for MPD by V. Zhezher -----
5// -------------------------------------------------------------------------
6
7/** MpdPlutoGenerator.h
8 *@author V.Friese <v.friese@gsi.de>
9 *@author D.Bertini <d.bertini@gsi.de>
10 *
11 The MpdPlutoGenerator reads the PLUTO output file (ROOT format)
12 and inserts the tracks into the FairStack via the FairPrimaryGenerator.
13 Derived from FairGenerator.
14**/
15
16#ifndef MPD_PLUTOGENERATOR_H
17#define MPD_PLUTOGENERATOR_H
18
19#include "FairGenerator.h"
20
21class TClonesArray;
22class TFile;
23class TTree;
24class TVirtualMCStack;
25class FairPrimaryGenerator;
26
28{
29
30 public:
31 /** Default constructor (should not be used) **/
33
34 /** Standard constructor
35 ** @param fileName The input (PLUTO) file name
36 **/
37 MpdPlutoGenerator(const Char_t* fileName, Double_t ekin);
38
39 /** Destructor **/
40 virtual ~MpdPlutoGenerator();
41
42 /** Reads on event from the input file and pushes the tracks onto
43 ** the stack. Abstract method in base class.
44 ** @param primGen pointer to the FairPrimaryGenerator
45 **/
46 virtual Bool_t ReadEvent(FairPrimaryGenerator* primGen);
47
48 // Skip some events in file
49 Bool_t SkipEvents(Int_t count);
50
51 private:
52 Int_t iEvent; //! Event number
53 Double_t fEkin; //! Target energy in lab system
54 const Char_t* fFileName; //! Input file name
55 TFile* fInputFile; //! Pointer to input file
56 TTree* fInputTree; //! Pointer to input tree
57 TClonesArray* fParticles; //! Particle array from PLUTO
58
59 /** Private method CloseInput. Just for convenience. Closes the
60 ** input file properly. Called from destructor and from ReadEvent. **/
61 void CloseInput();
62
64};
65
66#endif
bool Bool_t
int Int_t
char Char_t
double Double_t
#define ClassDef(name, id)
TClonesArray * fParticles
Pointer to input tree.
Double_t fEkin
Event number.
TTree * fInputTree
Pointer to input file.
MpdPlutoGenerator()
Default constructor (should not be used).
void CloseInput()
Particle array from PLUTO.
Bool_t SkipEvents(Int_t count)
virtual ~MpdPlutoGenerator()
Destructor.
const Char_t * fFileName
Target energy in lab system.
TFile * fInputFile
Input file name.
virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen)
Reads on event from the input file and pushes the tracks onto the stack.