/// /// For questions or suggestions about this module please contact the /// current responsible and CC in the oaAnalysis package manager. /// /// 10-Aug-2010: Current responsible for this module is, /// Takatomi Yano (tyano [*a*t*] stu.kobe-u.ac.jp) /// // Documentions are added by Takatomi Yano. 16-Jul-2012. #ifndef TBeamSummaryDataModule_hxx_seen #define TBeamSummaryDataModule_hxx_seen #include #include #include #include #include #include #include #include #include #include "IAnalysisHeaderModuleBase.hxx" #include "IAnalysisTruthModuleBase.hxx" namespace COMET { class IBeamSummaryDataModule; OA_EXCEPTION(EBeamSummaryDataModule,EoaAnalysis); OA_EXCEPTION(ENoBeamSummaryData, EBeamSummaryDataModule); }; /// An analysis module which carries some very simple event-level header /// information. It just contains the RunID, EventNumber, and a TRef reference /// back to the original event file. The latter does not work at this time. class COMET::IBeamSummaryDataModule : public IAnalysisHeaderModuleBase { public: /// class IBeamSummaryData : public TObject { public: IBeamSummaryData() {} virtual ~IBeamSummaryData(); Int_t BeamRunNumber; ///< Beam Run Number in neutrino beamline. Int_t SpillNumber; ///< Spill Number in 32 bit. Int_t GPS1TriggerTime; ///< GPS1 Trigger Time (Unix Time in sec) Int_t GPS1TriggerTimeNanoSecond; ///< GPS1 Trigger Time for sub-second (in nano sec) Double_t CT5ProtonsPerSpill; ///< Number of Protons in the SPILL counted by CT5, which is the most downstream charge transferer. [POT] Double_t CT5ProtonsPerBunch[8]; ///< Number of Protons in the BUNCH (1st-8th) counted by CT5, which is the most downstream charge transferer. [POT] Double_t CT5BeamBunchTiming[8]; ///< Timing of Proton beam BUNCH (1st-8th) measured by CT5, which is the most downstream charge transferer. Time 0 is Trigger Time. [micro sec] Int_t CT5BeamBunchFlag[8]; ///< Flag describing that the Proton Beam is detected by CT5 or not in the BUNCH (1st-8th). 1 = extracted, 0 = not extracted. Double_t Horn1CurrentSum; ///< Horn1 Current. [kA] Double_t Horn2CurrentSum; ///< Horn2 Current. [kA] Double_t Horn3CurrentSum; ///< Horn3 Current. [kA] Int_t GoodSpillFlag; ///< Good Spill Flag. 1 = Good Spill. Suitable for analysis., 0 = Bad Spill. Improper for physics analysis., Flag == 99 is applied for Horn-off run in early Run 3 (early 2012). TString BSDVersion; ///< BSD version information. Currently "v01" is the newest. class IOtherData : public TObject { public: IOtherData() {} virtual ~IOtherData(); Int_t MidasEvent; ///< MIDAS Event number in BSD root file. not for comet analysis. Int_t BeamRunNumber; ///< Beam Run Number in Neutrino beamline. Int_t SpillNumber; ///< Spill Number in 32 bit Int_t MRRunNumber; ///< Main Ring Run Number. //Int_t MRShotNumber; Int_t GPSStatus[2]; ///< Status of GPS. [0] = GPS1, [1] = GPS2. Int_t TriggerTime[3]; ///< Trigger Time (Unix Time in sec), [0] = GPS1, [1] = GPS2, [2] = Rb clock system. Int_t TriggerTimeNanoSecond[3]; ///< Trigger Time for sub-second (in nano sec), [0] = GPS1, [1] = GPS2, [2] = Rb clock system. Double_t ProtonsPerSpill[5]; ///< Number of Protons in the SPILL counted by CTs, [0] = CT1,..[4] = CT5. Double_t ProtonsPerBunch[5][9]; ///< Number of Protons in the BUNCH counted by CTs, [0-4] = CT1-CT5, [0-8] = Whole of bunches, 1st bunch, ... 8th bunch. Double_t BeamTiming[5]; ///< Timing of Proton beam measured by CTs. [0-4] = CT1-CT5. Time 0 is Trigger Time. [micro sec] Double_t BeamBunchTiming[5][9]; ///< Timing of Proton beam BUNCH measured by CTs. [0-4] = CT1-CT5, [0-8] = Whole of bunches, 1st bunch, ... 8th bunch. Time 0 is Trigger Time. [micro sec] Double_t BeamFlag[5]; ///< Flag describing that the Proton Beam is detected by CTs or not. 1 = extracted, 0 = not extracted. Double_t BeamBunchFlag[5][9]; ///< Flag describing that the Proton Beam is detected by CTs or not in the BUNCH (1st-8th). 1 = extracted, 0 = not extracted. Double_t HornCurrent[3]; ///< Horn Current. [0-3] = Horn1 - Horn3. [kA] Double_t HornBusBarCurrent[3][5]; ///< Horn Current for each busbar. [0..3][] = Horn1..Horn3. [][0..4] = individual ch. [kA] Double_t BeamPositionOnTarget[2]; ///< Beam Position on the target. [0..1] = [x and y]. [mm] Double_t BeamDirectionOnTarget[2]; ///< Beam Direction on the target. [0..1] = [x and y]. [mm] Double_t BeamSizeOnTarget[2]; ///< Beam Size on the target. [0..1] = [x and y]. [mm] Double_t MumonSiTotalQ; ///< MUMON Total Charge measured by the Si detectors. Double_t MumonSiPeak; ///< MUMON Si Peak Double_t MumonSiX; ///< Beam X Position on MUMON measured by the Si detectors. [mm] Double_t MumonSiwX; ///< Beam X Width on MUMON measured by the Si detectors. [mm] Double_t MumonSiY; ///< Beam Y Position on MUMON measured by the Si detectors. [mm] Double_t MumonSiwY; ///< Beam Y Width on MUMON measured by the Si detectors. [mm] Double_t MumonICTotalQ; ///< MUMON Total Charge measured by the ionization chambers. Double_t MumonICPeak; ///< MUMON Peak measured by the ionization chambers. Double_t MumonICX; ///< Beam X Position on MUMON measured by the ionization chambers [mm] Double_t MumonICwX; ///< Beam X Width on MUMON measured by the ionization chambers [mm] Double_t MumonICY; ///< Beam Y Position on MUMON measured by the ionization chambers [mm] Double_t MumonICwY; ///< Beam Y Width on MUMON measured by the ionization chambers [mm] Double_t OTRLightYield; ///< Light Yield of OTR Double_t OTRX; ///< Beam X Position measured by the OTR. [mm] Double_t OTRwX; ///< Beam X Width measured by the OTR. [mm] Double_t OTRY; ///< Beam Y Position measured by the OTR. [mm] Double_t OTRwY; ///< Beam Y Width measured by the OTR. [mm] Double_t OTRXError; ///< Error of OTRX [mm] Double_t OTRwXError; ///< Error of OTRwX [mm] Double_t OTRYError; ///< Error of OTRY [mm] Double_t OTRwYError; ///< Error of OTRwY [mm] Int_t GoodGPSFlag; ///< Status Flag of GPSs. 1 = GOOD. 0 = BAD. Int_t TriggerFlag; ///< Status Flag of Beam Trrigger. 1 = GOOD. 0 = BAD. Int_t SpillFlag; ///< Status Flag of Spill. 1 = GOOD. 0 = BAD. Int_t GoodSpillFlag; ///< Status Flag of Spill. This Flag contains all information above and should be used to definde the flag is suitable for physics analysis or not. 1 = GOOD. 0 = BAD. Double_t TargetEfficiency[3]; ///< Efficiency of the Trager. Int_t RunType ; //! Run Type. 1 = run for physics analysis. 0 = not for physiscs. Int_t MagSetID ; // ! Mag Set ID. /* Double_t CT1BeamTime[8]; Int_t CT1BeamFlag[8]; Double_t CT2ProtonsPerSpill; Double_t CT2ProtonsPerBunch[8]; Double_t CT2BeamTime[8]; Int_t CT2BeamFlag[8]; Double_t CT3ProtonsPerSpill; Double_t CT3ProtonsPerBunch[8]; Double_t CT3BeamTime[8]; Int_t CT3BeamFlag[8]; Double_t CT4ProtonsPerSpill; Double_t CT4ProtonsPerBunch[8]; Double_t CT4BeamTime[8]; Int_t CT4BeamFlag[8]; Double_t Horn2Currents[4]; Double_t Horn3Currents[4]; Double_t ProtonBeamDirection[2]; Double_t ProtonBeamSize[2]; Double_t MUMON[12]; Double_t OTR[13]; Int_t GoodGPSFlag; Int_t TriggerFlag; Int_t SpillFlag; */ private: ClassDef(IBeamSummaryDataModule::IBeamSummaryData::IOtherData, 1); }; IOtherData OtherData; private: ClassDef(IBeamSummaryDataModule::IBeamSummaryData, 1); }; public: IBeamSummaryDataModule(const char *name = "BeamSummaryData", const char *title = "Beam Summary Data"); virtual ~IBeamSummaryDataModule(); virtual Bool_t IsEnabledByDefault() const {return kTRUE;} /// Is meant to reference back to the original file /// [FIXME] The EventTRef does not currently work virtual Bool_t ProcessFirstEvent(COMET::ICOMETEvent&); protected: virtual void InitializeModule(); virtual void InitializeBranches(); virtual bool FillTree(COMET::ICOMETEvent&); virtual Bool_t Configure(std::string& option); private: COMET::IRawBeamData fRawBeamData; //! public: ///Tree Entries Int_t fBeamSummaryDataStatus; ///< Flag : Beam Summary Data is available or not in the spill. 1 = BSD is available. 0 is not. Int_t fCOMETSpill; ///< COMET Spill Number. 16 bit. TClonesArray *fBeamSummaryData; ///< Data structure which contains beam summary data information. private: ClassDef(IBeamSummaryDataModule,1); }; #endif