forked from alisw/AliRoot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AliGenReaderHepMC.h
51 lines (40 loc) · 1.49 KB
/
AliGenReaderHepMC.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef ALIGENREADERHEPMC_H
#define ALIGENREADERHEPMC_H
// Realisations of the AliGenReader interface to be used with AliGenExFile.
// NextEvent() loops over events
// and NextParticle() loops over particles.
// This implementation reads HepMC output formats
// Author: [email protected], [email protected]
// Based on AliGenReaderSL by [email protected]
#include <TClonesArray.h>
#include "AliGenReader.h"
#include "AliGenEventHeader.h"
#include "THepMCParser.h"
namespace HepMC {
class IO_BaseClass;
class GenEvent;
}
class TParticle;
class AliGenReaderHepMC : public AliGenReader
{
public:
AliGenReaderHepMC();
AliGenReaderHepMC(const AliGenReaderHepMC &reader);
virtual ~AliGenReaderHepMC();
AliGenEventHeader * GetGenEventHeader() const {return fGenEventHeader;};
virtual void Init();
virtual Int_t NextEvent();
virtual TParticle* NextParticle();
virtual void RewindEvent();
AliGenReaderHepMC & operator=(const AliGenReaderHepMC & rhs);
protected:
HepMC::IO_BaseClass * fEventsHandle; // pointer to the HepMC file handler
HepMC::GenEvent * fGenEvent; // pointer to a generated event
TClonesArray * fParticleArray; // pointer to array containing particles of current event
TIter * fParticleIterator; // iterator coupled to the array
AliGenEventHeader * fGenEventHeader; // AliGenEventHeader
private:
void Copy(TObject&) const;
ClassDef(AliGenReaderHepMC, 1) //Generate particles from external file
};
#endif