eventAnalysis  7.0-49-g0ac7482
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
TBeamSummaryDataModule.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 /// 10-Aug-2010: Current responsible for this module is,
6 /// Ryan Terri (r.terri [*a*t*] qmul.ac.uk)
7 ///
8 
9 // Documentions are added by Takatomi Yano. 16-Jul-2012. Edited by Ryan Terri
10 // 8-May-2013
11 #ifndef TBeamSummaryDataModule_hxx_seen
12 #define TBeamSummaryDataModule_hxx_seen
13 
14 #include <TChain.h>
15 #include <TClonesArray.h>
16 #include <TNamed.h>
17 #include <TTree.h>
18 #include <TRawBeamData.hxx>
19 
20 #include <TND280Event.hxx>
21 #include <map>
22 #include <string>
23 #include <vector>
26 
27 namespace ND {
28 class TBeamSummaryDataModule;
29 OA_EXCEPTION(EBeamSummaryDataModule, EeventAnalysis);
30 OA_EXCEPTION(ENoBeamSummaryData, EBeamSummaryDataModule);
31 };
32 
33 /// An analysis module which carries some very simple event-level header
34 /// information. It just contains the RunID, EventNumber, and a TRef reference
35 /// back to the original event file. The latter does not work at this time.
37  public:
38  ///
39  class TBeamSummaryData : public TObject {
40  public:
42  virtual ~TBeamSummaryData();
43 
44  Int_t BeamRunNumber; ///< Beam Run Number in neutrino beamline.
45  Int_t SpillNumber; ///< Spill Number in 32 bit.
46  Int_t GPS1TriggerTime; ///< GPS1 Trigger Time (Unix Time in sec)
47  Int_t GPS1TriggerTimeNanoSecond; ///< GPS1 Trigger Time for sub-second (innano sec)
48  Double_t CT5ProtonsPerSpill; ///< Number of Protons in the SPILL counted byCT5, which is the most downstream chargetransferer. [POT]
49  Double_t CT5ProtonsPerBunch[8]; ///< Number of Protons in the BUNCH(1st-8th) counted by CT5, which is themost downstream charge transferer. [POT]
50  Double_t CT5BeamBunchTiming[8]; ///< Timing of Proton beam BUNCH (1st-8th)measured by CT5, which is the mostdownstream charge transferer. Time 0 isTrigger Time. [micro sec]
51  Int_t CT5BeamBunchFlag[8]; ///< Flag describing that the Proton Beam isdetected by CT5 or not in the BUNCH(1st-8th). 1 = extracted, 0 = not extracted.
52  Double_t OfficialProtonsPerSpill; ///< Number of Protons in the SPILL forthe official analysis, normally CT5.[POT]
53  Double_t OfficialCTNumber; ///< Gives the CT used for the POT calculation.Usually CT5.
54  Double_t OfficialProtonsPerBunch[8]; ///< Number of Protons in the BUNCH(1st-8th) counted in the officialanalysis, normally from CT5. [POT]
55  Double_t OfficialBeamBunchTiming[8]; ///< Timing of Proton beam BUNCH(1st-8th) in the official analysis,usually CT5. Time 0 is TriggerTime. [micro sec]
56  Int_t OfficialBeamBunchFlag[8]; ///< Flag describing that the Proton Beamis detected or not in the BUNCH(1st-8th) for the official CT for agiven spill. 1 = extracted, 0 = notextracted.
57  Int_t OfficialBeamFlag; ///< Flag describing that the Proton Beam isdetected or not for the official CT for a givenspill. 1 = extracted, 0 = not extracted.
58  Double_t Horn1CurrentSum; ///< Horn1 Current. [kA]
59  Double_t Horn2CurrentSum; ///< Horn2 Current. [kA]
60  Double_t Horn3CurrentSum; ///< Horn3 Current. [kA]
61  Int_t GoodSpillFlag; ///< Good Spill Flag. Values >=1 = Good Spill, with 1being at 250 kA, 2 at 200 kA, 100 at 0 kA, etc..Suitable for analysis., 0 = Bad Spill. Improper forphysics analysis., Flag == 99 is applied forHorn-off run in early Run 3 (early 2012) (need tocheck if this is still valid).
62  TString BSDVersion; ///< BSD version information. Currently "v01" is thenewest.
63 
64  class TOtherData : public TObject {
65  public:
67  virtual ~TOtherData();
68 
69  Int_t MidasEvent; ///< MIDAS Event number in BSD root file. not for nd280analysis.
70  Int_t BeamRunNumber; ///< Beam Run Number in Neutrino beamline.
71  Int_t SpillNumber; ///< Spill Number in 32 bit
72  Int_t MRRunNumber; ///< Main Ring Run Number.
73  // Int_t MRShotNumber;
74  Int_t GPSStatus[2]; ///< Status of GPS. [0] = GPS1, [1] = GPS2.
75  Int_t TriggerTime[3]; ///< Trigger Time (Unix Time in sec), [0] = GPS1,[1] = GPS2, [2] = Rb clock system.
76  Int_t TriggerTimeNanoSecond[3]; ///< Trigger Time for sub-second (in nanosec), [0] = GPS1, [1] = GPS2, [2] = Rbclock system.
77  Double_t ProtonsPerSpill[5]; ///< Number of Protons in the SPILL countedby CTs, [0] = CT1,..[4] = CT5.
78  Double_t ProtonsPerBunch[5][9]; ///< Number of Protons in the BUNCHcounted by CTs, [0-4] = CT1-CT5, [0-8]= Whole of bunches, 1st bunch, ... 8thbunch.
79  Double_t BeamTiming[5]; ///< Timing of Proton beam measured by CTs. [0-4]= CT1-CT5. Time 0 is Trigger Time. [micro sec]
80  Double_t BeamBunchTiming[5][9]; ///< Timing of Proton beam BUNCH measuredby CTs. [0-4] = CT1-CT5, [0-8] = Wholeof bunches, 1st bunch, ... 8th bunch.Time 0 is Trigger Time. [micro sec]
81  Double_t BeamFlag[5]; ///< Flag describing that the Proton Beam isdetected by CTs or not. 1 = extracted, 0 = notextracted.
82  Double_t BeamBunchFlag[5][9]; ///< Flag describing that the Proton Beamis detected by CTs or not in the BUNCH(1st-8th). 1 = extracted, 0 = notextracted.
83 
84  Double_t HornCurrent[3]; ///< Horn Current. [0-3] = Horn1 - Horn3. [kA]
85  Double_t HornBusBarCurrent[3][5]; ///< Horn Current for each busbar.[0..3][] = Horn1..Horn3. [][0..4] =individual ch. [kA]
86  Double_t BeamPositionOnTarget[2]; ///< Beam Position on the target.[0..1] = [x and y]. [mm]
87  Double_t BeamDirectionOnTarget[2]; ///< Beam Direction on the target.[0..1] = [x and y]. [mm]
88  Double_t BeamSizeOnTarget[2]; ///< Beam Size on the target. [0..1] = [xand y]. [mm]
89 
90  Double_t
91  MumonSiTotalQ; ///< MUMON Total Charge measured by the Si detectors.
92  Double_t MumonSiPeak; ///< MUMON Si Peak
93  Double_t MumonSiX; ///< Beam X Position on MUMON measured by the Sidetectors. [mm]
94  Double_t MumonSiwX; ///< Beam X Width on MUMON measured by the Sidetectors. [mm]
95  Double_t MumonSiY; ///< Beam Y Position on MUMON measured by the Sidetectors. [mm]
96  Double_t MumonSiwY; ///< Beam Y Width on MUMON measured by the Sidetectors. [mm]
97 
98  Double_t MumonICTotalQ; ///< MUMON Total Charge measured by theionization chambers.
99  Double_t
100  MumonICPeak; ///< MUMON Peak measured by the ionization chambers.
101  Double_t MumonICX; ///< Beam X Position on MUMON measured by theionization chambers [mm]
102  Double_t MumonICwX; ///< Beam X Width on MUMON measured by the ionizationchambers [mm]
103  Double_t MumonICY; ///< Beam Y Position on MUMON measured by theionization chambers [mm]
104  Double_t MumonICwY; ///< Beam Y Width on MUMON measured by the ionizationchambers [mm]
105 
106  Double_t OTRLightYield; ///< Light Yield of OTR
107  Double_t OTRX; ///< Beam X Position measured by the OTR. [mm]
108  Double_t OTRwX; ///< Beam X Width measured by the OTR. [mm]
109  Double_t OTRY; ///< Beam Y Position measured by the OTR. [mm]
110  Double_t OTRwY; ///< Beam Y Width measured by the OTR. [mm]
111  Double_t OTRXError; ///< Error of OTRX [mm]
112  Double_t OTRwXError; ///< Error of OTRwX [mm]
113  Double_t OTRYError; ///< Error of OTRY [mm]
114  Double_t OTRwYError; ///< Error of OTRwY [mm]
115 
116  Int_t GoodGPSFlag; ///< Status Flag of GPSs. 1 = GOOD. 0 = BAD.
117  Int_t TriggerFlag; ///< Status Flag of Beam Trrigger. 1 = GOOD. 0 = BAD.
118  Int_t SpillFlag; ///< Status Flag of Spill. 1 = GOOD. 0 = BAD.
119  Int_t GoodSpillFlag; ///< Status Flag of Spill. This Flag contains allinformation above and should be used to defindethe flag is suitable for physics analysis or not.0 = BAD. Any others starts depending on runconditions.
120 
121  Double_t TargetEfficiency[3]; ///< Efficiency of the Trager.
122 
123  Int_t RunType; //! Run Type. 1 = run for physics analysis. 0 = not for
124  //! physiscs.
125  Int_t MagSetID; // ! Mag Set ID.
126 
127 
128  private:
130  };
131 
133 
134  private:
136  };
137 
138  public:
139  TBeamSummaryDataModule(const char *name = "BeamSummaryData",
140  const char *title = "Beam Summary Data");
141 
142  virtual ~TBeamSummaryDataModule();
143 
144  virtual Bool_t IsEnabledByDefault() const { return kTRUE; }
145 
146  /// Is meant to reference back to the original file
147  /// [FIXME] The EventTRef does not currently work
148 
149  virtual Bool_t ProcessFirstEvent(ND::TND280Event &);
150 
151  protected:
152  virtual void InitializeModule();
153 
154  virtual void InitializeBranches();
155  virtual bool FillTree(ND::TND280Event &);
156  void FillConfigTree(TTree* configTree);
157 
158  virtual Bool_t Configure(std::string &option);
159 
160  public:
161  /// Tree Entries
162  Int_t fBeamSummaryDataStatus; ///< Flag : Beam Summary Data is available ornot in the spill. 1 = BSD is available. 0 isnot.
163  Int_t fND280Spill; ///< ND280 Spill Number. 16 bit.
164  TClonesArray *fBeamSummaryData; ///< Data structure which contains beamsummary data information.
165 
166  private:
167  // Counters to keep track of total events and events with no BSD
170 };
171 #endif
void FillConfigTree(TTree *configTree)
ClassDef(TBeamSummaryDataModule::TBeamSummaryData::TOtherData, 1)
Double_t BeamPositionOnTarget[2]
Beam Position on the target.[0..1] = [x and y]. [mm].
An analysis module which carries some very simple event-level header information. ...
Double_t MumonSiwY
Beam Y Width on MUMON measured by the Sidetectors. [mm].
Int_t GPSStatus[2]
Status of GPS. [0] = GPS1, [1] = GPS2.
OA_EXCEPTION(EeventAnalysis, EoaCore)
Generate a base exception for the Analysis library.
Double_t MumonICwY
Beam Y Width on MUMON measured by the ionizationchambers [mm].
Int_t fND280Spill
ND280 Spill Number. 16 bit.
virtual Bool_t ProcessFirstEvent(ND::TND280Event &)
Is meant to reference back to the original file [FIXME] The EventTRef does not currently work...
virtual bool FillTree(ND::TND280Event &)
Fill all the stuff that goes in the output tree.
Int_t GoodSpillFlag
Good Spill Flag. Values &gt;=1 = Good Spill, with 1being at 250 kA, 2 at 200 kA, 100 at 0 kA...
virtual void InitializeBranches()
Initialize Branches. Don&#39;t do anything else in this function.
Int_t OfficialBeamFlag
Flag describing that the Proton Beam isdetected or not for the official CT for a givenspill. 1 = extracted, 0 = not extracted.
Double_t ProtonsPerSpill[5]
Number of Protons in the SPILL countedby CTs, [0] = CT1,..[4] = CT5.
Double_t BeamBunchFlag[5][9]
Flag describing that the Proton Beamis detected by CTs or not in the BUNCH(1st-8th). 1 = extracted, 0 = notextracted.
Double_t OTRX
Beam X Position measured by the OTR. [mm].
Double_t HornCurrent[3]
Horn Current. [0-3] = Horn1 - Horn3. [kA].
Double_t MumonSiY
Beam Y Position on MUMON measured by the Sidetectors. [mm].
Int_t GoodSpillFlag
Status Flag of Spill. This Flag contains allinformation above and should be used to defindethe flag i...
Int_t BeamRunNumber
Beam Run Number in neutrino beamline.
Int_t TriggerFlag
Status Flag of Beam Trrigger. 1 = GOOD. 0 = BAD.
Double_t CT5BeamBunchTiming[8]
Timing of Proton beam BUNCH (1st-8th)measured by CT5, which is the mostdownstream charge transferer...
Double_t BeamTiming[5]
Timing of Proton beam measured by CTs. [0-4]= CT1-CT5. Time 0 is Trigger Time. [micro sec]...
TBeamSummaryDataModule(const char *name="BeamSummaryData", const char *title="Beam Summary Data")
Double_t CT5ProtonsPerBunch[8]
Number of Protons in the BUNCH(1st-8th) counted by CT5, which is themost downstream charge transferer...
Int_t BeamRunNumber
Beam Run Number in Neutrino beamline.
Int_t CT5BeamBunchFlag[8]
Flag describing that the Proton Beam isdetected by CT5 or not in the BUNCH(1st-8th). 1 = extracted, 0 = not extracted.
Double_t MumonSiwX
Beam X Width on MUMON measured by the Sidetectors. [mm].
Double_t OTRwY
Beam Y Width measured by the OTR. [mm].
Int_t SpillFlag
Status Flag of Spill. 1 = GOOD. 0 = BAD.
TClonesArray * fBeamSummaryData
Data structure which contains beamsummary data information.
Int_t fBeamSummaryDataStatus
Tree Entries.
Double_t CT5ProtonsPerSpill
Number of Protons in the SPILL counted byCT5, which is the most downstream chargetransferer. [POT].
Double_t MumonICTotalQ
MUMON Total Charge measured by theionization chambers.
Int_t GoodGPSFlag
Status Flag of GPSs. 1 = GOOD. 0 = BAD.
Double_t BeamSizeOnTarget[2]
Beam Size on the target. [0..1] = [xand y]. [mm].
virtual void InitializeModule()
Initialize Module, override if necessary.
Double_t BeamDirectionOnTarget[2]
Beam Direction on the target.[0..1] = [x and y]. [mm].
Int_t TriggerTimeNanoSecond[3]
Trigger Time for sub-second (in nanosec), [0] = GPS1, [1] = GPS2, [2] = Rbclock system.
Double_t OTRwX
Beam X Width measured by the OTR. [mm].
ClassDef(TBeamSummaryDataModule::TBeamSummaryData, 1)
Double_t BeamBunchTiming[5][9]
Timing of Proton beam BUNCH measuredby CTs. [0-4] = CT1-CT5, [0-8] = Wholeof bunches, 1st bunch, ... 8th bunch.Time 0 is Trigger Time. [micro sec].
Double_t OTRY
Beam Y Position measured by the OTR. [mm].
virtual Bool_t Configure(std::string &option)
A function that allows the module to be configured from an external class without any dependencies...
Double_t MumonSiX
Beam X Position on MUMON measured by the Sidetectors. [mm].
Double_t OfficialBeamBunchTiming[8]
Timing of Proton beam BUNCH(1st-8th) in the official analysis,usually CT5. Time 0 is TriggerTime...
Int_t GPS1TriggerTime
GPS1 Trigger Time (Unix Time in sec)
A base class for analysis output modules which contain event header information.
Double_t OfficialCTNumber
Gives the CT used for the POT calculation.Usually CT5.
virtual Bool_t IsEnabledByDefault() const
Is the module is enabled by default.
Double_t MumonICY
Beam Y Position on MUMON measured by theionization chambers [mm].
Int_t MidasEvent
MIDAS Event number in BSD root file. not for nd280analysis.
Int_t OfficialBeamBunchFlag[8]
Flag describing that the Proton Beamis detected or not in the BUNCH(1st-8th) for the official CT for ...
Double_t MumonICPeak
MUMON Peak measured by the ionization chambers.
TString BSDVersion
BSD version information. Currently &quot;v01&quot; is thenewest.
Double_t HornBusBarCurrent[3][5]
Horn Current for each busbar.[0..3][] = Horn1..Horn3. [][0..4] =individual ch. [kA].
Double_t MumonSiTotalQ
MUMON Total Charge measured by the Si detectors.
Int_t TriggerTime[3]
Trigger Time (Unix Time in sec), [0] = GPS1,[1] = GPS2, [2] = Rb clock system.
Double_t MumonICX
Beam X Position on MUMON measured by theionization chambers [mm].
Double_t OfficialProtonsPerBunch[8]
Number of Protons in the BUNCH(1st-8th) counted in the officialanalysis, normally from CT5...
Int_t GPS1TriggerTimeNanoSecond
GPS1 Trigger Time for sub-second (innano sec)
Double_t MumonICwX
Beam X Width on MUMON measured by the ionizationchambers [mm].
Double_t OfficialProtonsPerSpill
Number of Protons in the SPILL forthe official analysis, normally CT5.[POT].
Double_t ProtonsPerBunch[5][9]
Number of Protons in the BUNCHcounted by CTs, [0-4] = CT1-CT5, [0-8]= Whole of bunches, 1st bunch, ... 8thbunch.
Double_t BeamFlag[5]
Flag describing that the Proton Beam isdetected by CTs or not. 1 = extracted, 0 = notextracted...

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 doxygen 1.8.5