GGS(GenericGEANT4Simulation)Software
2.7.0
Main Page
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Macros
include
montecarlo
readers
GGSTMCTruthReader.h
Go to the documentation of this file.
1
/*
2
* GGSTMCTruthReader.h
3
*
4
* Created on: 25 Aug 2011
5
* Author: Nicola Mori
6
*/
7
10
#ifndef GGSTMCTRUTHREADER_H_
11
#define GGSTMCTRUTHREADER_H_
12
13
// GGS headers
14
#include "montecarlo/dataobjs/GGSTMCTruthInfo.h"
15
#include "montecarlo/readers/GGSTChainReader.h"
16
17
// ROOT headers
18
class
TBranch;
19
25
class
GGSTMCTruthReader
:
public
GGSTChainReader
{
26
27
public
:
29
GGSTMCTruthReader
();
30
32
~GGSTMCTruthReader
();
33
40
bool
SetChain
(TChain *mcTruthChain);
41
46
void
GetEntry
(Long64_t entry);
47
53
GGSTParticle
*
GetPrimaryParticle
(UInt_t particleNumber) {
54
if
(_mcTruthInfo)
55
return
_mcTruthInfo->
GetPrimaryParticle
(particleNumber);
56
else
57
return
NULL;
58
}
59
64
UInt_t
GetNPrimaries
() {
65
if
(_mcTruthInfo)
66
return
_mcTruthInfo->
GetNPrimaries
();
67
else
68
return
0;
69
}
70
76
UInt_t
GetNDiscarded
() {
77
if
(_mcTruthInfo)
78
return
_mcTruthInfo->
nDiscarded
;
79
else
80
return
0;
81
}
82
83
private
:
84
GGSTMCTruthInfo
*_mcTruthInfo;
85
TChain *_mcTruthChain;
86
};
87
88
#endif
/* GGSTMCTRUTHREADER_H_ */
GGSTMCTruthInfo::GetNPrimaries
UInt_t GetNPrimaries()
Retrieves the number of primaries in this event.
Definition:
GGSTMCTruthInfo.h:32
GGSTMCTruthReader::GetEntry
void GetEntry(Long64_t entry)
Definition:
GGSTMCTruthReader.cpp:33
GGSTMCTruthReader::GetPrimaryParticle
GGSTParticle * GetPrimaryParticle(UInt_t particleNumber)
Returns a primary particle.
Definition:
GGSTMCTruthReader.h:53
GGSTMCTruthReader::~GGSTMCTruthReader
~GGSTMCTruthReader()
Destructor.
Definition:
GGSTMCTruthReader.cpp:18
GGSTChainReader
Abstract class defining the interface for tree readers.
Definition:
GGSTChainReader.h:23
GGSTMCTruthInfo::GetPrimaryParticle
GGSTParticle * GetPrimaryParticle(UInt_t particleNumber)
Retrieves a primary particle.
Definition:
GGSTMCTruthInfo.cpp:38
GGSTMCTruthReader
Class for reading output of GGSMCTruthAction.
Definition:
GGSTMCTruthReader.h:25
GGSTMCTruthReader::GetNPrimaries
UInt_t GetNPrimaries()
Returns the number of primaries in current event.
Definition:
GGSTMCTruthReader.h:64
GGSTParticle
Class to store G4 particles.
Definition:
GGSTParticle.h:19
GGSTMCTruthReader::SetChain
bool SetChain(TChain *mcTruthChain)
Sets the chain.
Definition:
GGSTMCTruthReader.cpp:22
GGSTMCTruthInfo
A class to store MC truth informations on ROOT files.
Definition:
GGSTMCTruthInfo.h:20
GGSTMCTruthReader::GetNDiscarded
UInt_t GetNDiscarded()
Returns the number of discarded events before the current one.
Definition:
GGSTMCTruthReader.h:76
GGSTMCTruthReader::GGSTMCTruthReader
GGSTMCTruthReader()
Constructor.
Definition:
GGSTMCTruthReader.cpp:14
GGSTMCTruthInfo::nDiscarded
UInt_t nDiscarded
The number of discarded + killed events the current event and the previous event saved in file...
Definition:
GGSTMCTruthInfo.h:66
Generated on Wed Jul 8 2020 07:29:44 for GGS(GenericGEANT4Simulation)Software by
1.8.5