SRSpill.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // \file SRSpill.h
3 // \version $Id: SRSpill.h,v 1.5 2012-11-19 17:32:22 rocco Exp $
4 // \author $Author: edniner $
5 // \date $Date: 2012-11-19 17:32:22 $
6 ////////////////////////////////////////////////////////////////////////
7 #ifndef SRSPILL_H
8 #define SRSPILL_H
9 
12 #include <vector>
13 
14 namespace caf
15 {
16  /// The SRSpill contains information about the NuMI spill and POT
17  /// associated with the slice, as well as EventQuality info on
18  /// spill by spill basis.
19  class SRSpill
20  {
21  public:
22  SRSpill();
23  ~SRSpill();
24 
25  unsigned int run; ///< run number
26  unsigned int subrun; ///< subrun number
27  unsigned int evt; ///< ART event number, indexes trigger windows.
28 
29  Det_t det; ///< Detector, ND = 1, FD = 2, NDOS = 3
30  bool ismc; ///< data or MC? True if MC
31 
32  bool isgoodspill; ///< Was the pot for a spill good? (only applicable to data, default true)
33  unsigned long int spilltimesec; ///< Spill time in seconds [s]
34  unsigned long int spilltimensec; ///< Spill time in nanoseconds [ns]
35  unsigned long int gpsspilltimesec; ///< Spill time from GPS [s]
36  unsigned long int gpsspilltimensec; ///< Spill time from GPS [ns]
37  signed long long int deltaspilltimensec; ///< Delta time [ns]
38  float spillpot; ///< POT in spill including factor of 1e12 so that a
39  ///< user does not have to apply this correction
40  float livetime; ///< Length of readout [s]
41 
42  float hornI; ///< Horn current
43  bool isFHC; ///< Flags for horn direction
44  bool is0HC;
45  bool isRHC;
46 
47  std::vector<float> intx;
48  std::vector<float> inty;
49  std::vector<float> bposx;
50  std::vector<float> bposy;
51  float posx; ///< x position on target
52  float posy; ///< y position on target
53  float widthx; ///< Spill width in x dimension
54  float widthy; ///< Spill width in y dimension
55 
56  unsigned short dibfirst; ///< first diblock in detector configuration (1-14)
57  unsigned short diblast; ///< last diblock in detector configuration (1-14)
58  unsigned short dibmask; ///< diblock mask (bitfield, lowest bit = diblock 1)
59  /// 0 no mask found in DB, 1 mask used ok, 2 masking turned off. If 0 or
60  /// 2 dibmask is instead the configuration based on what RH says is
61  /// alive. dibfirst/last may be wrong in this case.
62  unsigned short maskstatus;
63 
64  unsigned int nmissingdcms; ///< \# of missing DCMs
65  float fracdcm3hits; ///< fraction of DCM3 hits in horizontal modules
66  unsigned int nouttimehits; ///< \# of out-of-time hits
67  unsigned int nnoisyapds; ///< \# of noisy APDs
68  unsigned int nmissingdcmslg; ///< \# of DCMS with 63 or more bad FEBs (LiveGeometry, subset of baddcmslg)
69  unsigned int nbaddcmslg; ///< \# of DCMS with too many bad channels (LiveGeometry)
70 
71  /// \brief How many hits at the DCM edge are matched in the adjacent DCM?
72  ///
73  /// Low values mean out-of-sync detector
75  unsigned int nmicroslices; ///< \# of micro slices
76  int ndcms; ///< \# of DCMs in partition; may not = # of LIVE DCMs = (hdr.diblast-hdr.dibfirst+1)*12
77 
78  /// Data Quality DAQ Header information
79  bool eventincomplete; ///< Is the event incomplete?
80 
81  int ndiblocks; ///< \# of diblocks reporting in event
82  int emptydatablock; ///< \# of empty data blocks
83  int nmicroblocks; ///< \# of many microblocks
84  int nemptymicroslice; ///< \# of empty micro slices
85  int ndroppedmicroblocks; ///< \# of dropped micro blocks
86  int ndatablockmissingdata; ///< \# of occurances of isMissingData
87  int nmicroslicedatanotpresent; ///< \# of microslices with !DataPresent
88  int nnanoslices; ///< \# of nano slices in the event
89  int nanoslicedatanotpresent; ///< \# of nanoslices reporting !DataPresent
90  int nanoslicenolinkstatus; ///< \# of nanoslices reporting !LinkPresent
91  int nanoslicebufferempty; ///< \# of nanoslices reporting BufferEmpty
92  int nanoslicebufferfull; ///< \# of nanoslices reporting BufferFull
93  int nanoslicecommerror; ///< \# of nanoslices reporting CommError
94  int nanoslicepacketerror; ///< \# of nanoslices reporting PacketError
95  int nanosliceoverflowerror; ///< \# of nanoslices reporting OverflowError
96  int nanosliceadcerror; ///< \# of nanoslices reporting ADCError
97 
98  unsigned char trigger; ///< The trigger type from RawTrigger::fTriggerMask_TriggerType
99 
100  std::vector<SRCosmicCVN> cosmiccvn; ///< Contain cosmic CVN scores for all time windows in event
101  short ncosmiccvn;
102  };
103 
104 } // end namespace caf
105 
106 #endif // SRSPILL_H
107 //////////////////////////////////////////////////////////////////////////////
std::vector< float > intx
Definition: SRSpill.h:47
Det_t
Which NOvA detector?
Definition: SREnums.h:7
unsigned long int spilltimesec
Spill time in seconds [s].
Definition: SRSpill.h:33
unsigned int nmissingdcmslg
# of DCMS with 63 or more bad FEBs (LiveGeometry, subset of baddcmslg)
Definition: SRSpill.h:68
std::vector< float > bposx
Definition: SRSpill.h:49
bool is0HC
Definition: SRSpill.h:44
int nanoslicebufferempty
# of nanoslices reporting BufferEmpty
Definition: SRSpill.h:91
std::vector< SRCosmicCVN > cosmiccvn
Contain cosmic CVN scores for all time windows in event.
Definition: SRSpill.h:100
bool isFHC
Flags for horn direction.
Definition: SRSpill.h:43
int nanosliceadcerror
# of nanoslices reporting ADCError
Definition: SRSpill.h:96
std::vector< float > inty
Definition: SRSpill.h:48
int ndiblocks
# of diblocks reporting in event
Definition: SRSpill.h:81
std::vector< float > bposy
Definition: SRSpill.h:50
int nemptymicroslice
# of empty micro slices
Definition: SRSpill.h:84
unsigned int nouttimehits
# of out-of-time hits
Definition: SRSpill.h:66
unsigned int run
run number
Definition: SRSpill.h:25
int nanoslicedatanotpresent
# of nanoslices reporting !DataPresent
Definition: SRSpill.h:89
int emptydatablock
# of empty data blocks
Definition: SRSpill.h:82
int nanoslicenolinkstatus
# of nanoslices reporting !LinkPresent
Definition: SRSpill.h:90
Det_t det
Detector, ND = 1, FD = 2, NDOS = 3.
Definition: SRSpill.h:29
unsigned int nmissingdcms
# of missing DCMs
Definition: SRSpill.h:64
float posy
y position on target
Definition: SRSpill.h:52
float dcmedgematchfrac
How many hits at the DCM edge are matched in the adjacent DCM?
Definition: SRSpill.h:74
int ndatablockmissingdata
# of occurances of isMissingData
Definition: SRSpill.h:86
float fracdcm3hits
fraction of DCM3 hits in horizontal modules
Definition: SRSpill.h:65
unsigned short dibfirst
first diblock in detector configuration (1-14)
Definition: SRSpill.h:56
int nnanoslices
# of nano slices in the event
Definition: SRSpill.h:88
float hornI
Horn current.
Definition: SRSpill.h:42
unsigned int nbaddcmslg
# of DCMS with too many bad channels (LiveGeometry)
Definition: SRSpill.h:69
int nanoslicepacketerror
# of nanoslices reporting PacketError
Definition: SRSpill.h:94
unsigned int subrun
subrun number
Definition: SRSpill.h:26
unsigned short diblast
last diblock in detector configuration (1-14)
Definition: SRSpill.h:57
bool isgoodspill
Was the pot for a spill good? (only applicable to data, default true)
Definition: SRSpill.h:32
unsigned long int gpsspilltimensec
Spill time from GPS [ns].
Definition: SRSpill.h:36
unsigned int nmicroslices
# of micro slices
Definition: SRSpill.h:75
short ncosmiccvn
Definition: SRSpill.h:101
unsigned int evt
ART event number, indexes trigger windows.
Definition: SRSpill.h:27
bool isRHC
Definition: SRSpill.h:45
float widthy
Spill width in y dimension.
Definition: SRSpill.h:54
int nanosliceoverflowerror
# of nanoslices reporting OverflowError
Definition: SRSpill.h:95
unsigned short maskstatus
Definition: SRSpill.h:62
unsigned long int gpsspilltimesec
Spill time from GPS [s].
Definition: SRSpill.h:35
float widthx
Spill width in x dimension.
Definition: SRSpill.h:53
float livetime
Length of readout [s].
Definition: SRSpill.h:40
int nmicroslicedatanotpresent
# of microslices with !DataPresent
Definition: SRSpill.h:87
unsigned short dibmask
Definition: SRSpill.h:58
int ndcms
# of DCMs in partition; may not = # of LIVE DCMs = (hdr.diblast-hdr.dibfirst+1)*12 ...
Definition: SRSpill.h:76
signed long long int deltaspilltimensec
Delta time [ns].
Definition: SRSpill.h:37
int nanoslicebufferfull
# of nanoslices reporting BufferFull
Definition: SRSpill.h:92
unsigned int nnoisyapds
# of noisy APDs
Definition: SRSpill.h:67
int nanoslicecommerror
# of nanoslices reporting CommError
Definition: SRSpill.h:93
bool eventincomplete
Data Quality DAQ Header information.
Definition: SRSpill.h:79
unsigned long int spilltimensec
Spill time in nanoseconds [ns].
Definition: SRSpill.h:34
int ndroppedmicroblocks
# of dropped micro blocks
Definition: SRSpill.h:85
float spillpot
Definition: SRSpill.h:38
This module creates Common Analysis Files.
Definition: FileReducer.h:10
unsigned char trigger
The trigger type from RawTrigger::fTriggerMask_TriggerType.
Definition: SRSpill.h:98
bool ismc
data or MC? True if MC
Definition: SRSpill.h:30
float posx
x position on target
Definition: SRSpill.h:51
int nmicroblocks
# of many microblocks
Definition: SRSpill.h:83