eventAnalysis
7.0-49-g0ac7482
Main Page
Related Pages
Namespaces
Classes
Files
Workbook
oaAnalysis format description
Cross referenced source code
T2K git site
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
TBasicHeaderModule.hxx
Go to the documentation of this file.
1
///
2
/// For questions or suggestions about this module please contact the
3
/// current responsible and CC in the eventAnalysis package manager.
4
///
5
/// 23-May-2014: Current responsible for this module is,
6
/// Luke Pickering (lp208 [*a*t*] ic.ac.uk)
7
#ifndef TBasicHeaderModule_hxx_seen
8
#define TBasicHeaderModule_hxx_seen
9
#include <TNamed.h>
10
#include <TRef.h>
11
#include <TTree.h>
12
#include <TFieldManager.hxx>
13
#include <TND280Event.hxx>
14
#include <TOAMagneticField.hxx>
15
#include <string>
16
#include "
TAnalysisHeaderModuleBase.hxx
"
17
#include "TG4PrimaryParticle.hxx"
18
#include "TGeomInfo.hxx"
19
namespace
ND {
20
class
TBasicHeaderModule;
21
};
22
/// An analysis module which carries some simple event-level header
23
/// information. It contains the RunID, EventNumber, and a TRef reference
24
/// back to the original event file. The latter does not work at this time.
25
class
ND::TBasicHeaderModule
:
public
TAnalysisHeaderModuleBase
{
26
public
:
27
TBasicHeaderModule
(
const
char
*name =
"BasicHeader"
,
28
const
char
*title =
"Basic Header Module"
);
29
virtual
~TBasicHeaderModule
();
30
virtual
Bool_t
IsEnabledByDefault
()
const
{
return
kTRUE; }
31
void
SayAvailableOpts
(std::string indent =
""
) {
32
std::cout << indent
33
<<
"={software_version}: Will save software version as determined by\n"
34
<< indent <<
"\t$ND280ROOT (cmt) \n"
35
<< indent <<
"\t or \n "
36
<< indent <<
"\t$ND280SOFTWAREMASTERROOT (cmake) \n"
37
<< indent <<
"=noVersion: Will not save software version\n"
38
<< indent <<
"=OverrideSWVersion_<n>: Will save software version as\n"
39
<< indent
40
<<
"\tn, useful for developing versioned upstream \n"
41
<< indent <<
"\tcode. This overrides TBasicHeaderModule=software_version"
42
<< std::endl;
43
}
44
UInt_t
GetEventTime
() {
return
fEventTime
; }
45
virtual
Bool_t
ProcessFirstEvent
(ND::TND280Event &);
46
Bool_t
P0DWaterStatus
();
47
Bool_t
Configure
(std::string &);
48
protected
:
49
virtual
void
InitializeBranches
();
50
virtual
bool
FillTree
(ND::TND280Event &);
51
public
:
52
//*******************Tree Entries********************
53
///\short Time of the relevant ND::TND280Event's last GPS pulse in Unix time.
54
///\details Revtrieved from the ND::TND280Event header like
55
///\dontinclude TBasicHeaderModule.cxx
56
///\skipline GetMCMSecond
57
UInt_t
fEventTime
;
///< Time of the relevant ND::TND280Events last GPS pulse in Unix time.
58
///\short Bits containing various information from the MCMs including
59
/// event/spill numbers and trigger flags.
60
///\details For bit definitions see ND::TND280Event::Header::GetTriggerWord
61
///\dontinclude TBasicHeaderModule.cxx
62
///\skipline GetTriggerWord
63
ULong64_t
fTriggerWord
;
///< Information from the MCMs
64
/// FGD Cosmic trigger flag.
65
/// Uses bits from TBasicHeaderModule::fTriggerWord
66
///\dontinclude TBasicHeaderModule.cxx
67
///\skipline ULong64_t shift
68
///\skipline shift&fTriggerWord
69
Bool_t
fFGDCosmicEvent
;
///< FGD Cosmic trigger flag.
70
/// TRIP-t Cosmic trigger flag.
71
/// Uses bits from TBasicHeaderModule::fTriggerWord
72
///\dontinclude TBasicHeaderModule.cxx
73
///\skip shift&fTriggerWord
74
///\skip shift =
75
///\until shift&fTriggerWord
76
Bool_t
fTripTCosmicEvent
;
///< TRIP-t Cosmic trigger flag.
77
/// Contains the bit patterns from the cosmic trigger module.
78
///\dontinclude TBasicHeaderModule.cxx
79
///\skip ULong64_t shift
80
///\skip for
81
///\until }
82
ULong64_t
fCTMTriggerPattern
[3];
///< Bit patterns from the cosmic trigger module.
83
/// TripT Cosmic Trigger type: trigger codes from 0-14, -1 means off.
84
///\dontinclude TBasicHeaderModule.cxx
85
///\skip fTripTCosmicTriggerType =
86
///\skip if
87
///\until }
88
/// From comments in <b>cosmicTriggerGeant4Sim/src/TTripTTrigger.cxx:1196</b>\n
89
/// Value corresponds to which "detector walls" were hit:
90
/// <ul><li>-1. Unused</li>
91
/// <li>0. Top and Bottom</li>
92
/// <li>1. Top and Left</li>
93
/// <li>2. Top and Right</li>
94
/// <li>3. Left and Bottom</li>
95
/// <li>4. Top and Bottom</li>
96
/// <li>5. Left and Right</li>
97
/// <li>6. Top and Front(P0D)</li>
98
/// <li>7. Top and End(DsECal)</li>
99
/// <li>8. Left and Front(P0D)</li>
100
/// <li>9. Left and End(DsECal)</li>
101
/// <li>10. Right and Front(P0D)</li>
102
/// <li>11. Right and End(DsECal)</li>
103
/// <li>12. Front and Bottom</li>
104
/// <li>13. End(DsECal) and Back</li>
105
/// <li>14. Front(P0D) and End(DsECal)</li></ul>
106
Int_t
fTripTCosmicTriggerType
;
///< TripT Cosmic Trigger type:
107
/// If cosmic muon is detmined to be *upward going*, 0 or 1.
108
///\dontinclude TBasicHeaderModule.cxx
109
///\skip fTripTCosmicTriggerUpward =
110
///\skip if
111
///\until ;
112
Int_t
fTripTCosmicTriggerUpward
;
///< If cosmic muon is detmined to be *upward going*, 0 or 1.
113
/// MC event weighting to correct for differences between cosmic MC and data.
114
/// Weights individual cosmic trigger configurations, e.g. SMRD Primitive 5 +
115
/// DsECal Primitive 32.
116
/// See
117
/// http://www.t2k.org/nd280/physics/cosmics/meetings/May09/Clarkprescale
118
/// for detailed explanation.
119
///\dontinclude TBasicHeaderModule.cxx
120
///\skip fCosmicPrescaleWeight =
121
///\until }
122
Double_t
fCosmicPrescaleWeight
;
///< MC event weighting to correct for differences between cosmic MC and data.
123
/// Event Spill number.
124
/// Retrieved from ND::TND280Context::GetSpill
125
Int_t
fSpill
;
///< Spill number
126
/// The subdetector configuration in which the data was taken
127
/// Valid values are defined in ND::TND280Context as
128
/// <ul><li>kGlobalPartition = 1</li>
129
/// <li>kP0DClockPresent = 1<<1</li>
130
/// <li>kTPCClockPresent = 1<<2</li>
131
/// <li>kFGDClockPresent = 1<<3</li>
132
/// <li>kECalClockPresent = 1<<4</li>
133
/// <li>kSMRDClockPresent = 1<<5</li>
134
/// <li>kINGRIDClockPresent = 1<<6</li>
135
/// <li>kMCData = 1<<16</li> </ul>
136
Int_t
fPartition
;
///< subdetector configuration
137
/// The unix time stamp of the event context.
138
/// Retrieved from ND::TND280Context::GetTimeStamp
139
Int_t
fTimeStamp
;
///< unix time stamp of the event
140
/// Whether this is detector data.
141
/// Retrieved from ND::TND280Context::IsDetector
142
Bool_t
fIsDetector
;
///< Whether this is detector data.
143
/// Whether this is an MC event.
144
/// Retrieved from ND::TND280Context::IsMC
145
Bool_t
fIsMC
;
///< Whether this is an MC event
146
/// Whether this is a Sand Muon MC event.
147
/// Calculated from the run number, assumes that it of the form described in
148
/// http://www.t2k.org/nd280/datacomp/production005/mcp/sand_mc\n
149
/// Run Number 9ABCDEEE, where <tt>IsSand = true</tt> if
150
///<tt>fIsMC == true</tt> and <tt>D == 7</tt>.
151
///\warning This is no longer definite as the Gas Interaction control sample
152
/// uses <tt>D == 7</tt>. This branch will be turned off for now. 2015-3-30
153
Bool_t
fIsSand
;
///< Whether this is a Sand Muon MC event.
154
/// Whether the P0D is filled with water or not.
155
/// Ascertained by querying the geometry.
156
///\dontinclude TBasicHeaderModule.cxx
157
///\skip bool ND::TBasicHeaderModule::P0DWaterStatus
158
///\until else
159
///\until }
160
Bool_t
fP0DWaterStatus
;
///< Whether the P0D is filled with water or not.
161
/// Event Geometry SHA1 Hash (ID)
162
UInt_t
fGeometryHash
[5];
///< Event Geometry SHA1 Hash
163
/// Event Alignment SHA1 Hash (ID)
164
/// The alignment identifier is a SHA1 hash code of the alignment constants
165
/// plus a documentation string.
166
UInt_t
fAlignmentId
[5];
///< Event Alignment SHA1 Hash (ID)
167
/// MC "intensity", will be 0 if unused.
168
/// The intensity corresponds to Protons/Spill for Beam MC.
169
Float_t
fMCIntensity
;
///<The intensity corresponds to Protons/Spill for Beam MC.
170
/// The software version string.
171
/// If -O TBasicHeaderModule=*version* is passed on the CLI then this will get
172
/// its value from the envvar $ND280ROOT
173
/// If -O TBasicHeadModule=OverrideSWVersion_v123r456p789 is passed on the CLI
174
/// then this will be set to v123r456p789.
175
///\note The OverrideVersion version will take precedence.
176
Char_t
fSoftwareVersion
[50];
///< The nd280 software version
177
/// Holder for the Software Override Version String
178
std::string
fSoftwareOverrideVersionString
;
///< Software Override Version
179
/// The magnetic field strength at the center of TPC1.
180
///\dontinclude TBasicHeaderModule.cxx
181
///\skip fMagneticFieldStrength =
182
///\until ;
183
Double_t
fMagneticFieldStrength
;
///< magnetic field strength at the center of TPC1.
184
private
:
185
/// Whether we are saving the software version from $ND280ROOT.
186
bool
fSoftware
;
187
/// Whether we are using a supplied software version. Will override fSoftware.
188
Bool_t
fSoftwareUseOverrideVersion
;
189
/// Whether we have found the version already, so no need to do it again.
190
bool
fFoundSoftwareVersion
;
191
};
192
#endif
ND::TBasicHeaderModule::fSoftwareUseOverrideVersion
Bool_t fSoftwareUseOverrideVersion
Whether we are using a supplied software version. Will override fSoftware.
Definition:
TBasicHeaderModule.hxx:188
ND::TBasicHeaderModule::fGeometryHash
UInt_t fGeometryHash[5]
Event Geometry SHA1 Hash (ID)
Definition:
TBasicHeaderModule.hxx:162
ND::TBasicHeaderModule::fMCIntensity
Float_t fMCIntensity
MC "intensity", will be 0 if unused.
Definition:
TBasicHeaderModule.hxx:169
ND::TBasicHeaderModule::InitializeBranches
virtual void InitializeBranches()
Initialize Branches. Don't do anything else in this function.
Definition:
TBasicHeaderModule.cxx:113
ND::TBasicHeaderModule::fCosmicPrescaleWeight
Double_t fCosmicPrescaleWeight
MC event weighting to correct for differences between cosmic MC and data.
Definition:
TBasicHeaderModule.hxx:122
ND::TBasicHeaderModule::ProcessFirstEvent
virtual Bool_t ProcessFirstEvent(ND::TND280Event &)
Is called after the first event is loaded in.
Definition:
TBasicHeaderModule.cxx:287
ND::TBasicHeaderModule::fSoftware
bool fSoftware
Whether we are saving the software version from $ND280ROOT.
Definition:
TBasicHeaderModule.hxx:186
ND::TBasicHeaderModule::fTriggerWord
ULong64_t fTriggerWord
Bits containing various information from the MCMs including event/spill numbers and trigger flags...
Definition:
TBasicHeaderModule.hxx:63
ND::TBasicHeaderModule::IsEnabledByDefault
virtual Bool_t IsEnabledByDefault() const
Is the module is enabled by default.
Definition:
TBasicHeaderModule.hxx:30
ND::TBasicHeaderModule::P0DWaterStatus
Bool_t P0DWaterStatus()
Definition:
TBasicHeaderModule.cxx:290
ND::TBasicHeaderModule::fIsSand
Bool_t fIsSand
Whether this is a Sand Muon MC event.
Definition:
TBasicHeaderModule.hxx:153
ND::TBasicHeaderModule::fPartition
Int_t fPartition
The subdetector configuration in which the data was taken Valid values are defined in ND::TND280Conte...
Definition:
TBasicHeaderModule.hxx:136
ND::TBasicHeaderModule::fTimeStamp
Int_t fTimeStamp
The unix time stamp of the event context.
Definition:
TBasicHeaderModule.hxx:139
ND::TBasicHeaderModule::fTripTCosmicTriggerUpward
Int_t fTripTCosmicTriggerUpward
If cosmic muon is detmined to be upward going, 0 or 1.
Definition:
TBasicHeaderModule.hxx:112
ND::TBasicHeaderModule::fIsMC
Bool_t fIsMC
Whether this is an MC event.
Definition:
TBasicHeaderModule.hxx:145
TAnalysisHeaderModuleBase.hxx
ND::TBasicHeaderModule::Configure
Bool_t Configure(std::string &)
A function that allows the module to be configured from an external class without any dependencies...
Definition:
TBasicHeaderModule.cxx:44
ND::TBasicHeaderModule::GetEventTime
UInt_t GetEventTime()
Definition:
TBasicHeaderModule.hxx:44
ND::TBasicHeaderModule::SayAvailableOpts
void SayAvailableOpts(std::string indent="")
Subclasses should override this to let a user know what options are available.
Definition:
TBasicHeaderModule.hxx:31
ND::TBasicHeaderModule::fMagneticFieldStrength
Double_t fMagneticFieldStrength
The magnetic field strength at the center of TPC1.
Definition:
TBasicHeaderModule.hxx:183
ND::TBasicHeaderModule::fSoftwareVersion
Char_t fSoftwareVersion[50]
The software version string.
Definition:
TBasicHeaderModule.hxx:176
ND::TBasicHeaderModule::fSoftwareOverrideVersionString
std::string fSoftwareOverrideVersionString
Holder for the Software Override Version String.
Definition:
TBasicHeaderModule.hxx:178
ND::TBasicHeaderModule::fTripTCosmicTriggerType
Int_t fTripTCosmicTriggerType
TripT Cosmic Trigger type: trigger codes from 0-14, -1 means off.
Definition:
TBasicHeaderModule.hxx:106
ND::TBasicHeaderModule::fIsDetector
Bool_t fIsDetector
Whether this is detector data.
Definition:
TBasicHeaderModule.hxx:142
ND::TBasicHeaderModule::fAlignmentId
UInt_t fAlignmentId[5]
Event Alignment SHA1 Hash (ID) The alignment identifier is a SHA1 hash code of the alignment constant...
Definition:
TBasicHeaderModule.hxx:166
ND::TBasicHeaderModule::fTripTCosmicEvent
Bool_t fTripTCosmicEvent
TRIP-t Cosmic trigger flag.
Definition:
TBasicHeaderModule.hxx:76
ND::TBasicHeaderModule::fEventTime
UInt_t fEventTime
Time of the relevant ND::TND280Event's last GPS pulse in Unix time.
Definition:
TBasicHeaderModule.hxx:57
ND::TBasicHeaderModule::fCTMTriggerPattern
ULong64_t fCTMTriggerPattern[3]
Contains the bit patterns from the cosmic trigger module.
Definition:
TBasicHeaderModule.hxx:82
ND::TAnalysisHeaderModuleBase
A base class for analysis output modules which contain event header information.
Definition:
TAnalysisHeaderModuleBase.hxx:15
ND::TBasicHeaderModule::TBasicHeaderModule
TBasicHeaderModule(const char *name="BasicHeader", const char *title="Basic Header Module")
For questions or suggestions about this module please contact the current responsible and CC in the e...
Definition:
TBasicHeaderModule.cxx:24
ND::TBasicHeaderModule
An analysis module which carries some simple event-level header information.
Definition:
TBasicHeaderModule.hxx:25
ND::TBasicHeaderModule::~TBasicHeaderModule
virtual ~TBasicHeaderModule()
Definition:
TBasicHeaderModule.cxx:40
ND::TBasicHeaderModule::fSpill
Int_t fSpill
Event Spill number.
Definition:
TBasicHeaderModule.hxx:125
ND::TBasicHeaderModule::fP0DWaterStatus
Bool_t fP0DWaterStatus
Whether the P0D is filled with water or not.
Definition:
TBasicHeaderModule.hxx:160
ND::TBasicHeaderModule::fFGDCosmicEvent
Bool_t fFGDCosmicEvent
FGD Cosmic trigger flag.
Definition:
TBasicHeaderModule.hxx:69
ND::TBasicHeaderModule::fFoundSoftwareVersion
bool fFoundSoftwareVersion
Whether we have found the version already, so no need to do it again.
Definition:
TBasicHeaderModule.hxx:190
ND::TBasicHeaderModule::FillTree
virtual bool FillTree(ND::TND280Event &)
Fill all the stuff that goes in the output tree.
Definition:
TBasicHeaderModule.cxx:153
Package Summary
Package Name
: eventAnalysis
Package Version
: 7.0-49-g0ac7482
Package Manager
:
Generated on Mon Mar 25 2024 14:43:58 for eventAnalysis by 
1.8.5