/afs/hep.man.ac.uk/u/markowen/ATLAS/SFrameProof/2011EPS/manTree/manTree/MEventInfo.h

00001 #ifndef _MANTREE_MEVENTINFO_H__
00002 #define _MANTREE_MEVENTINFO_H__
00003 
00004 #include <string>
00005 #include <iosfwd>
00006 
00007 #include "TObject.h"
00008 
00009 #ifdef _ATHENA_CLASSES__
00010 #include "EventInfo/EventInfo.h"
00011 #endif
00012 
00013 namespace manchester {
00014 
00020 class MEventInfo : public TObject {
00021 public:
00022 
00025 
00026     enum EventFlagSubDet { Pixel, SCT, TRT, LAr, Tile, Muon, ForwardDet, Core };
00028 
00029 
00030     enum EventFlagErrorState { NotSet, Warning, Error };
00032     
00033 
00035     MEventInfo(double w=1., unsigned int rn=0, unsigned int en=0, unsigned int lb=0, unsigned int bcid=0);
00036 
00038     MEventInfo(const MEventInfo& aei);
00039 
00040 #ifdef _ATHENA_CLASSES__
00042     MEventInfo(const EventInfo& ei);
00043 #endif
00044 
00045     virtual ~MEventInfo();
00046 
00048     unsigned int RunNumber() const;
00049 
00051     unsigned int EventNumber() const;
00052 
00054     unsigned int LumiBlock() const;
00055 
00057     unsigned int BCID() const;
00058     
00060     Float_t AverageInteractionsPerCrossing() const;
00061 
00063     std::string DataPeriod() const;
00064 
00066     double MCEventWeight() const;
00067 
00069     void SetMCEventWeight(double mcWeight);
00070     
00071     // Get result from heavy flavour overlap removal tool
00072     int HforType() const;
00073 
00074     void SetHforType(int type);
00075 
00076     //for aTGC MC@NLO samples
00078     std::vector<double> MCEventWeightaTGC() const;
00079 
00081     void SetMCEventWeightaTGC(std::vector<double> mcWeight);
00082 
00084     EventFlagErrorState errorState(EventFlagSubDet subDet) const;
00085 
00087     std::string Type() const;
00088 
00090     MEventInfo& operator= (const MEventInfo& p);
00091 
00093     std::ostream& PrintContent(std::ostream& os) const;
00094 
00095 private:
00097     unsigned int m_runNum;
00098 
00100     unsigned int m_evNum;
00101 
00103     unsigned int m_lumiBlockNum;
00104 
00106     unsigned int m_bcid;
00107 
00109     Float_t m_avIntPerCrossing;
00110 
00112     double m_mcWeight;
00113 
00114     // result from HFOR tool
00115     int m_hfor_type;
00116 
00117     //for aTGC MC@NLO samples
00119     std::vector<double> m_mcWeightaTGC;
00120 
00121 
00122     enum { EF_BITS        = 0x0FFFFFFF, 
00123            EF_ERROR_BITS  = 0xF0000000, 
00124            EF_ERROR_SHIFT = 28 
00125     };
00127     std::vector<unsigned int>   m_event_flags;
00128 
00129 
00130 
00131 #ifndef DOXYGEN_IGNORE
00132     ClassDef(MEventInfo, 7);
00133 #endif // DOXYGEN_IGNORE
00134 
00135 }; // class MEventInfo
00136 
00138 inline MEventInfo::EventFlagErrorState 
00139 MEventInfo::errorState(EventFlagSubDet subDet) const
00140 {
00141   if ((unsigned)subDet < m_event_flags.size()) {
00142     return (EventFlagErrorState((EF_ERROR_BITS & m_event_flags[subDet]) >> EF_ERROR_SHIFT));
00143   }
00144   return NotSet;
00145 }
00146 
00147 } // namespace manchester
00148 
00149 std::ostream& operator<< (std::ostream& os, const manchester::MEventInfo& o);
00150 
00151 #endif

Generated on Thu Jun 30 11:40:04 2011 for manTreeSFrame by  doxygen 1.4.7