/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/BesEvent.h

Go to the documentation of this file.
00001 //
00002 // BesEvent.h
00003 //
00004 
00005 #ifndef BES_EVENT
00006 #define BES_EVENT
00007 
00008 #include <time.h>
00009 #include <TObject.h>
00010 #include <TString.h>
00011 
00012 #include "BesEventHeader.h"
00013 #include "BesGeoTrack.h"
00014 
00015 #include "RootEventData/TDigiEvent.h"
00016 #include "RootEventData/TRecTrackEvent.h"
00017 #include "RootEventData/TEvtHeader.h"
00018 #include "RootEventData/TDisTrack.h"
00019 #include "RootEventData/TTrigEvent.h"
00020 #include "RootEventData/TTrigData.h"
00021 #include "RootEventData/TRecEvTime.h"
00022 
00023 class BesEvent : public TObject {
00024 
00025 private:
00026     Double_t            f_Magnetic;
00027     BesEventHeader      fEventHeader;         // Event header
00028     TDigiEvent          *fDigiEvent;
00029     TEvtHeader          *fEvtHeader;
00030     TTrigEvent          *fTrigEvent;
00031     TRecEvTime          *fRecEvTime;
00032 
00033     TObjArray           *fMdcTrackCol;
00034     TObjArray           *fTofTrackCol;
00035     TObjArray           *fEmcTrackCol;
00036     TObjArray           *fMucTrackCol;
00037     TObjArray           *fExtTrackCol;
00038 
00039     bool                Is_tofBarrel(UInt_t status);
00040     bool                Is_tofCounter(UInt_t status);
00041 public:
00042     BesEvent();
00043     virtual ~BesEvent();
00044 
00045     virtual void Clear(Option_t *option = "");
00046     virtual void Delete(Option_t *option = "");
00047     virtual void Print(Option_t *option = "");
00048 
00049     //virtual void SetEvent(TDigiEvent *digiEvent, TDisTrack *recEvent, TEvtHeader *evtHeader, TTrigEvent *trigEvent);
00050     virtual void SetEvent(TDigiEvent *digiEvent, TDisTrack *recEvent, TEvtHeader *evtHeader, TRecEvTime *recEvTime);//, TTrigEvent *trigEvent);
00051     virtual void SetHits();
00052     virtual void SetTracks(TDisTrack *recEvent);
00053     virtual void SetMdcTracks(TDisTrack *recEvent);
00054     virtual void SetTofTracks(TDisTrack *recEvent);
00055     virtual void SetEmcShowers(TDisTrack *recEvent);
00056     virtual void SetMucTracks(TDisTrack *recEvent);
00057     virtual void SetExtTracks(TDisTrack *recEvent);
00058     virtual void ConstructMdcTrackFromRec(BesGeoTrack *mdcTrack, const TRecMdcTrack *recTrack,TDisTrack *recEvent);
00059     virtual void ConstructMucTrackFromRec(BesGeoTrack *mucTrack, const TRecMucTrack *recTrack);
00060     virtual void ConstructEmcTrackFromRec(BesGeoTrack *emcTrack, const TRecEmcShower *recTrack);
00061     //virtual void ConstructTofTrackFromRec(BesGeoTrack *tofTrack, const TRecBTofTrack *recBTrack);
00062     //virtual void ConstructTofTrackFromRec(BesGeoTrack *tofTrack, const TRecETofTrack *recETrack);
00063     virtual void ConstructTofTrackFromRec(BesGeoTrack *tofTrack, const TRecTofTrack *recTrack,TDisTrack *recEvent);
00064     //virtual void ConstructExtTrackFromRec(BesGeoTrack *extTrack, const TExtTrack *recTrack);
00065     virtual void DrawHits(Option_t *option);
00066     virtual void DrawTracks(Option_t *option);
00067 
00068 
00069     void SetMagnetic(Double_t input){f_Magnetic = input;};
00070     const TObjArray* GetMdcDigiCol() const      {
00071         if (fDigiEvent) return fDigiEvent->getMdcDigiCol();
00072         else return 0;
00073     };
00074     const TObjArray* GetTofDigiCol() const      {
00075         if (fDigiEvent) return fDigiEvent->getTofDigiCol();
00076         else return 0;
00077     };
00078     const TObjArray* GetEmcDigiCol() const      {
00079         if (fDigiEvent) return fDigiEvent->getEmcDigiCol();
00080         else return 0;
00081     };
00082     const TObjArray* GetMucDigiCol() const      {
00083         if (fDigiEvent) return fDigiEvent->getMucDigiCol();
00084         else return 0;
00085     };
00086     const Int_t      GetMdcDigiNum() const      {
00087         if (fDigiEvent) return fDigiEvent->getMdcDigiCol()->GetEntries();
00088         else return -1;
00089     };
00090     const Int_t      GetTofDigiNum() const      {
00091         if (fDigiEvent) return fDigiEvent->getTofDigiCol()->GetEntries();
00092         else return -1;
00093     };
00094     const Int_t      GetEmcDigiNum() const      {
00095         if (fDigiEvent) return fDigiEvent->getEmcDigiCol()->GetEntries();
00096         else return -1;
00097     };
00098     const Int_t      GetMucDigiNum() const      {
00099         if (fDigiEvent) return fDigiEvent->getMucDigiCol()->GetEntries();
00100         else return -1;
00101     };
00102     const TMdcDigi*  GetMdcDigi(Int_t i) const  {
00103         if (fDigiEvent) return fDigiEvent->getMdcDigi(i);
00104         else return 0;
00105     };
00106     const TTofDigi*  GetTofDigi(Int_t i) const  {
00107         if (fDigiEvent) return fDigiEvent->getTofDigi(i);
00108         else return 0;
00109     };
00110     const TEmcDigi*  GetEmcDigi(Int_t i) const  {
00111         if (fDigiEvent) return fDigiEvent->getEmcDigi(i);
00112         else return 0;
00113     };
00114     const TMucDigi*  GetMucDigi(Int_t i) const  {
00115         if (fDigiEvent) return fDigiEvent->getMucDigi(i);
00116         else return 0;
00117     };
00118     const TObjArray* GetMdcTrackCol(TDisTrack *recEvent) const       {
00119         if (recEvent)
00120             return recEvent->getRecMdcTrackCol();
00121         else return 0;
00122     };
00123     //const TObjArray* GetBTofTrackCol() const       {
00124     //    if (fRecEvent)
00125     //        return fRecEvent->getTofTrackCol();
00126     //    else return 0;
00127     //};
00128     const TObjArray* GetTofTrackCol(TDisTrack *recEvent) const       {
00129         if (recEvent)
00130             return recEvent->getTofTrackCol();
00131         else 
00132           return 0;
00133     };
00134     const TObjArray* GetEmcShowerCol(TDisTrack *recEvent) const       {
00135       //  if (recEvent)
00136       //      return recEvent->getEmcShowerCol();
00137       //  else 
00138           return 0;
00139     };
00140     const TObjArray* GetMucTrackCol(TDisTrack *recEvent) const       {
00141         if (recEvent)
00142             return recEvent->getMucTrackCol();
00143         else 
00144         return 0;
00145     };
00146     const TObjArray* GetExtTrackCol() const       {
00147          return 0;      // for test 
00148         //if (fRecEvent)
00149         //    return fRecEvent->getExtTrackCol();
00150         //else return 0;
00151     };
00152     const TObjArray* GetDedxCol(TDisTrack *recEvent)     const       {
00153      //   if (recEvent)
00154       //      return recEvent->getRecMdcDedxCol();
00155       //  else 
00156           return 0;
00157     };
00158     const Int_t      GetMdcTrackNum(TDisTrack *recEvent) const       {
00159        if (recEvent)
00160 //            return recEvent->getRecMdcTrackCol()->GetEntries();
00161        return recEvent->getMdcTrackNum();
00162      else 
00163           return -1;
00164     };
00165     //const Int_t      GetBTofTrackNum() const       {
00166     //    if (fRecEvent)
00167     //        return fRecEvent->getTofTrackCol()->GetEntries();
00168     //    else return -1;
00169     //};
00170     const Int_t      GetTofTrackNum(TDisTrack *recEvent) const       {
00171         if (recEvent)
00172    //         return recEvent->getTofTrackCol()->GetEntries();
00173        return recEvent->getTofTrackNum();
00174         else 
00175           return -1;
00176     };
00177     const Int_t      GetEmcShowerNum(TDisTrack *recEvent) const       {
00178       if (recEvent)
00179    //     return recEvent->getEmcShowerCol()->GetEntries();
00180      return recEvent->getEmcShowerNum(); 
00181        else 
00182           return -1;
00183     };
00184     const Int_t      GetMucTrackNum(TDisTrack *recEvent) const       {
00185         if (recEvent)
00186          return recEvent->getMucTrackNum();
00187      //       return recEvent->getMucTrackCol()->GetEntries();
00188         else 
00189           return -1;
00190     };
00191     const Int_t      GetExtTrackNum() const       {
00192         return -1;// for test 
00193         //if (fRecEvent)
00194         //    return fRecEvent->getExtTrackCol()->GetEntries();
00195         //else return -1;
00196     };
00197     const Int_t      GetDedxNum(TDisTrack *recEvent)     const       {
00198       //  if (fRecEvent)
00199       //      return fRecEvent->getRecMdcDedxCol()->GetEntries();
00200        // else 
00201           return -1;
00202     };
00203     const TRecMdcTrack*  GetMdcTrack(Int_t i,TDisTrack *recEvent) const  {
00204         if (recEvent)
00205             return recEvent->getRecMdcTrack(i);
00206         else return 0;
00207     };
00208     //const TRecBTofTrack*  GetBTofTrack(Int_t i) const  {
00209     //    if (fRecEvent)
00210     //        return fRecEvent->getBTofTrack(i);
00211     //    else return 0;
00212     //};
00213     const TRecTofTrack*  GetTofTrack(Int_t i,TDisTrack *recEvent) const  {
00214         if (recEvent)
00215             return recEvent->getTofTrack(i);
00216         else
00217           return 0;
00218     };
00219     const TRecEmcShower*  GetEmcShower(Int_t i,TDisTrack *recEvent) const  {
00220         if (recEvent)
00221             return recEvent->getEmcShower(i);
00222         else 
00223           return 0;
00224     };
00225     const TRecMucTrack*  GetMucTrack(Int_t i,TDisTrack *recEvent) const  {
00226         if (recEvent)
00227            return recEvent->getMucTrack(i);
00228         else 
00229           return 0;
00230     };
00231     //const TExtTrack*  GetExtTrack(Int_t i) const  {
00232     //    if (fRecEvent)
00233     //        return fRecEvent->getExtTrack(i);
00234     //    else return 0;
00235     //};
00236     const TRecMdcDedx*      GetDedx(Int_t i)     const  {
00237        // if (fRecEvent)
00238        //     return fRecEvent->getRecMdcDedx(i);
00239       //  else
00240           return 0;
00241     };
00242 
00243     // header access functions
00244     inline Long64_t GetRun()   {
00245         return fEventHeader.GetRunNumber();
00246     }
00247     inline Long64_t GetEvent() {
00248         return fEventHeader.GetEventNumber();
00249     }
00250     inline Int_t GetYear()  {
00251         return fEventHeader.GetEventYear();
00252     }
00253     inline Int_t GetMonth() {
00254         return fEventHeader.GetEventMonth();
00255     }
00256     inline Int_t GetDay()   {
00257         return fEventHeader.GetEventDay();
00258     }
00259     inline Int_t GetHour()  {
00260         return fEventHeader.GetEventHour();
00261     }
00262     inline Int_t GetMin()   {
00263         return fEventHeader.GetEventMin();
00264     }
00265     inline Int_t GetSec()   {
00266         return fEventHeader.GetEventSec();
00267     }
00268     inline Int_t GetMC()    {
00269         return fEventHeader.GetEventMC();
00270     }
00271     inline BesEventHeader GetHeader(){
00272         return fEventHeader;
00273     }
00274 
00275     ClassDef(BesEvent,0) // BesVis Event
00276 };
00277 
00278 R__EXTERN BesEvent *gEvent;
00279 
00280 #endif
00281 

Generated on Tue Nov 29 23:12:01 2016 for BOSS_7.0.2 by  doxygen 1.4.7