ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/EventHeader.h
Revision: 1.18
Committed: Wed Dec 2 23:17:37 2009 UTC (15 years, 5 months ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_012e, Mit_012d
Changes since 1.17: +6 -3 lines
Log Message:
Added physics bit

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.18 // $Id: EventHeader.h,v 1.17 2009/07/13 11:00:29 loizides Exp $
3 loizides 1.1 //
4     // EventHeader
5     //
6 loizides 1.14 // Class to hold event specific information. If Skimmed() returns value > 0 then the event
7 loizides 1.9 // content has been removed from events tree, and only meta information for book keeping
8     // purposes have been kept. This is used in conjunction with skimming.
9 loizides 1.1 //
10     // Authors: C.Loizides
11     //--------------------------------------------------------------------------------------------------
12    
13 loizides 1.11 #ifndef MITANA_DATATREE_EVENTHEADER_H
14     #define MITANA_DATATREE_EVENTHEADER_H
15 loizides 1.2
16 loizides 1.8 #include "MitAna/DataTree/interface/DataBase.h"
17 loizides 1.2
18 loizides 1.1 namespace mithep
19     {
20 loizides 1.8 class EventHeader : public DataBase
21 loizides 1.1 {
22     public:
23 loizides 1.16 EventHeader();
24     EventHeader(UInt_t run, UInt_t evt, UInt_t lumi);
25    
26     Int_t BunchCrossing() const { return fBunchCrossing; }
27     Int_t ExpType() const { return fExpType; }
28     UInt_t EvtNum() const { return fEvtNum; }
29     Bool_t IsMC() const { return fIsMC; }
30 loizides 1.18 Bool_t IsPhysDec() const { return fIsPhysDec; }
31 loizides 1.16 UInt_t LumiSec() const { return fLumiSec; }
32     EObjType ObjType() const { return kEventHeader; }
33     Int_t OrbitNumber() const { return fOrbitNumber; }
34     Int_t RunEntry() const { return fRunEntry; }
35     UInt_t RunNum() const { return fRunNum; }
36     UChar_t Skimmed() const { return fSkimmed; }
37     Int_t StoreNumber() const { return fStoreNumber; }
38     ULong64_t TimeStamp() const { return fTimeStamp; }
39     Double_t Weight() const { return fWeight; }
40     void SetBunchCrossing(Int_t b) { fBunchCrossing = b; }
41     void SetEvtNum(UInt_t i) { fEvtNum = i; }
42     void SetExpType(Int_t e) { fExpType = e; }
43     void SetIsMC(Bool_t b) { fIsMC = b; }
44     void SetLumiSec(UInt_t i) { fLumiSec = i; }
45     void SetOrbitNumber(Int_t o) { fOrbitNumber = o; }
46 loizides 1.18 void SetIsPhysDec(Bool_t b) { fIsPhysDec = b; }
47 loizides 1.16 void SetRunEntry(Int_t i) { fRunEntry = i; }
48     void SetRunNum(UInt_t i) { fRunNum = i; }
49     void SetSkimmed(UChar_t s) { fSkimmed = s; }
50     void SetStoreNumber(Int_t s) { fStoreNumber = s; }
51     void SetTimeStamp(ULong64_t t) { fTimeStamp = t; }
52     void SetWeight(Double_t w) { fWeight = w; }
53    
54 loizides 1.14 Bool_t operator!=(const EventHeader &other) const;
55     Bool_t operator==(const EventHeader &other) const;
56    
57 loizides 1.1 protected:
58 loizides 1.16
59     ULong64_t fTimeStamp; //time stamp of event (h32 -> sec, l32 -> musec)
60     Int_t fBunchCrossing; //bunch crossing
61     Int_t fOrbitNumber; //orbit number
62     Int_t fStoreNumber; //store number
63 loizides 1.6 UInt_t fRunNum; //run number
64     UInt_t fEvtNum; //event number
65     UInt_t fLumiSec; //luminosity block number
66     Int_t fRunEntry; //entry for run block
67 loizides 1.14 Double32_t fWeight; //event weight
68 loizides 1.16 UChar_t fExpType; //experiment type (as assigned in EventAuxiliary)
69 loizides 1.13 UChar_t fSkimmed; //level of skimming (0 == non-skimmed)
70 loizides 1.18 Bool_t fIsMC; //==true if MC and not real data
71     Bool_t fIsPhysDec; //==true if physics declared
72 loizides 1.9
73 loizides 1.18 ClassDef(EventHeader, 3) // Event header class
74 loizides 1.1 };
75     }
76 loizides 1.14
77     //--------------------------------------------------------------------------------------------------
78     inline Bool_t mithep::EventHeader::operator!=(const mithep::EventHeader &other) const
79     {
80     // Unequal operator.
81    
82     if (fEvtNum != other.EvtNum())
83     return kTRUE;
84     if (fLumiSec != other.LumiSec())
85     return kTRUE;
86     if (fRunNum != other.RunNum())
87     return kTRUE;
88     if(fIsMC != other.IsMC())
89     return kTRUE;
90    
91     return kFALSE;
92     }
93    
94     //--------------------------------------------------------------------------------------------------
95     inline Bool_t mithep::EventHeader::operator==(const mithep::EventHeader &other) const
96     {
97     // Equal operator.
98    
99     if (fEvtNum != other.EvtNum())
100     return kFALSE;
101     if (fLumiSec != other.LumiSec())
102     return kFALSE;
103     if (fRunNum != other.RunNum())
104     return kFALSE;
105     if(fIsMC != other.IsMC())
106     return kFALSE;
107    
108     return kTRUE;
109     }
110 loizides 1.1 #endif