00001 00002 // 00003 // NtpStRecord 00004 // 00005 // NtpStRecord is a standard reconstruction & mc ntuple record. 00006 // 00007 // S. Kasahara 11/04 00008 // Based on Roy Lee's CandEventSR/TTreeSR class 00010 00011 #ifndef NTPSTRECORD_H 00012 #define NTPSTRECORD_H 00013 00014 #include <iosfwd> 00015 #include <vector> 00016 00017 #ifndef RECRECORDIMP_H 00018 #include "Record/RecRecordImp.h" // base class 00019 #endif 00020 #ifndef RECCANDHEADER_H 00021 #include "Record/RecCandHeader.h" 00022 #endif 00023 #include "MCNtuple/NtpMCSummary.h" 00024 #include "MCNtuple/NtpMCPhotonResult.h" 00025 #include "MCNtuple/NtpMCDetSimResult.h" 00026 #include "CandNtupleSR/NtpSREventSummary.h" 00027 #include "CandNtupleSR/NtpSRShieldSummary.h" 00028 #include "CandNtupleSR/NtpSRCosmicRay.h" 00029 #include "CandNtupleSR/NtpSRDmxStatus.h" 00030 #include "CandNtupleSR/NtpSRDetStatus.h" 00031 #include "CandNtupleSR/NtpSRTimeStatus.h" 00032 #include "CandNtupleSR/NtpSRCalStatus.h" 00033 #include "CandNtupleSR/NtpSRDataQuality.h" 00034 #include "Conventions/ReleaseType.h" 00035 00036 // ROOT forward declaration 00037 class TClonesArray; 00038 00039 // MINOS forward declaration 00040 class NtpSREvent; 00041 class NtpSRShower; 00042 class NtpSRStrip; 00043 class NtpSRTrack; 00044 class NtpMCStdHep; 00045 class NtpMCTruth; 00046 class NtpTHEvent; 00047 class NtpTHTrack; 00048 class NtpTHShower; 00049 00050 class NtpStRecord: public RecRecordImp<RecCandHeader> { 00051 00052 public: 00053 NtpStRecord(); 00054 NtpStRecord(const RecCandHeader& header); 00055 virtual ~NtpStRecord(); 00056 00057 // State changing methods 00058 void Clear(Option_t* option = ""); 00059 void ClearStrips(Option_t* option = ""); 00060 00061 // State testing methods 00062 // print methods 00063 virtual std::ostream& Print(std::ostream& os) const; 00064 virtual void Print(Option_t* option = "") const; 00065 ReleaseType::Release_t GetRelease() const; 00066 00067 // standard reconstruction accessors 00068 std::vector< const NtpSREvent* > GetEvents() const; 00069 std::vector< const NtpSRTrack* > GetTracks(int event_index = -1) const; 00070 std::vector< const NtpSRShower* > GetShowers(int event_index = -1) const; 00071 std::vector< const NtpSRStrip* > GetStrips(int event_index = -1) const; 00072 00073 // mc truth accessors 00074 std::vector< const NtpMCTruth* > GetMCTruths() const; 00075 std::vector< const NtpMCStdHep* > GetMCStdHeps(int mctruth_index = -1) const; 00076 00077 // truth helper accessors 00078 std::vector< const NtpTHEvent* > GetTHEvents() const; 00079 std::vector< const NtpTHTrack* > GetTHTracks( int event_index = -1 ) const; 00080 std::vector< const NtpTHShower* > GetTHShowers(int event_index = -1 ) const; 00081 00082 // specialized accessors 00084 const NtpMCTruth* GetEventMCTruth(int event_index) const; 00085 00086 private: 00087 // private methods 00088 void Init(); 00089 00090 public: 00091 // Ntuple is treated like a C-struct with public data members and 00092 // rule-breaking field data members not prefaced by "f" and all 00093 // lowercase, by popular demand. 00094 00095 NtpSREventSummary evthdr; // sr summary data 00096 NtpSRShieldSummary vetohdr; // veto shield summary data 00097 NtpSRCosmicRay crhdr; // cr data, filled from last recons. trk vtx 00098 NtpSRDmxStatus dmxstatus; // status of demux 00099 NtpSRDetStatus detstatus; // status of detector 00100 NtpSRTimeStatus timestatus; // status of timing system, esp ND 00101 NtpSRCalStatus calstatus; // status of calibration 00102 NtpSRDataQuality dataquality;// quality of data 00103 NtpMCSummary mchdr; // mc summary data 00104 NtpMCPhotonResult photon; // summary data from photon transport mc 00105 NtpMCDetSimResult detsim; // summary data from det sim mc 00106 00107 // Standard reconstruction arrays 00108 TClonesArray* vetostp; //-> array of shield strips of type NtpSRShieldStrip 00109 TClonesArray* vetoexp; //-> array of shield expected hits of type NtpSRShieldExpected 00110 TClonesArray* deadchips; //-> array of dead chips of type NtpSRDeadChip 00111 00112 TClonesArray* stp; //-> array of strips of type NtpSRStrip 00113 TClonesArray* slc; //-> array of slices of type NtpSRSlice 00114 TClonesArray* clu; //-> array of clusters of type NtpSRCluster 00115 TClonesArray* shw; //-> array of showers of type NtpSRShower 00116 TClonesArray* trk; //-> array of tracks of type NtpSRTrack 00117 TClonesArray* evt; //-> array of events of type NtpSREvent 00118 00119 // MC truth arrays 00120 TClonesArray* mc; //-> array of NtpMCTruth 00121 TClonesArray* stdhep; //-> array of NtpMCStdHep 00122 TClonesArray* digihit; //-> array of NtpMCDigiScintHit 00123 00124 // Truth helper arrays 00125 TClonesArray* thstp; //-> array of NtpTHStrip 00126 TClonesArray* thslc; //-> array of NtpTHSlice 00127 TClonesArray* thshw; //-> array of NtpTHShower 00128 TClonesArray* thtrk; //-> array of NtpTHTrack 00129 TClonesArray* thevt; //-> array of NtpTHEvent 00130 00131 ClassDef(NtpStRecord,10) 00132 }; 00133 00134 #endif // NTPSTRECORD_H
1.3.9.1