StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StChargedPionBaseEv.h
1 #ifndef STAR_StChargedPionBaseEv
2 #define STAR_StChargedPionBaseEv
3 
4 // $Id: StChargedPionBaseEv.h,v 1.1 2008/07/17 17:06:30 kocolosk Exp $
5 
6 /*****************************************************************************
7  * @class StChargedPionBaseEv
8  * @author Adam Kocoloski
9  *
10  * ABC defining common interface for data and Monte Carlo events
11  *****************************************************************************/
12 
13 #include <map>
14 using std::map;
15 
16 #include <string>
17 using std::string;
18 
19 #include "TObject.h"
20 class TClonesArray;
21 
23 class StChargedPionTrack;
24 class StChargedPionJet;
25 
26 class StChargedPionBaseEv : public TObject
27 {
28 public:
29  virtual unsigned int runId() const = 0;
30  virtual unsigned int eventId() const = 0;
31  virtual unsigned int bbcTimeBin() const = 0;
32 
33  virtual const string& muDstName() const = 0;
34 
35  virtual bool isSimuTrigger(unsigned int trigId) const = 0;
36 
37  virtual int highTowerAdc(short towerId) const = 0;
38  virtual int triggerPatchAdc(short patchId) const = 0;
39  virtual int jetPatchAdc(short patchId) const = 0;
40 
41  virtual unsigned int nVertices() const = 0;
42  virtual TClonesArray* vertices() = 0;
43  virtual const TClonesArray* vertices() const = 0;
44 
45  virtual unsigned int nTracks() const = 0;
46  virtual TClonesArray* tracks() = 0;
47  virtual const TClonesArray* tracks() const = 0;
48 
49  virtual unsigned int nJets() const = 0;
50  virtual TClonesArray* jets() = 0;
51  virtual const TClonesArray* jets() const = 0;
52 
53  virtual StChargedPionVertex* vertex(int i) = 0;
54  virtual const StChargedPionVertex* vertex(int i) const = 0;
55 
56  virtual StChargedPionTrack* track(int i) = 0;
57  virtual const StChargedPionTrack* track(int i) const = 0;
58 
59  virtual StChargedPionJet* jet(int i) = 0;
60  virtual const StChargedPionJet* jet(int i) const = 0;
61 
62  // setters
63  virtual void setRunId(unsigned int) = 0;
64  virtual void setEventId(unsigned int) = 0;
65  virtual void setBbcTimeBin(unsigned short) = 0;
66  virtual void setMuDstName(const char*) = 0;
67  virtual void addSimuTrigger(unsigned int) = 0;
68  virtual void addHighTower(short towerId, int ADC) = 0;
69  virtual void addTriggerPatch(short patchId, int ADC) = 0;
70  virtual void addJetPatch(short patchId, int ADC) = 0;
71  virtual void addVertex(const StChargedPionVertex*) = 0;
72  virtual void addTrack(const StChargedPionTrack*) = 0;
73  virtual void addJet(const StChargedPionJet*) = 0;
74 
75  virtual void setL2Result(const void *address, bool emulated=false) = 0;
76 
77  // and one static function
78  static unsigned int triggerBit(unsigned int trigId);
79 
80 protected:
81  static map<unsigned int, unsigned int> mTriggerLookup;
82 
83 private:
84  ClassDef(StChargedPionBaseEv, 1)
85 };
86 
87 #endif
88 
89 /*****************************************************************************
90  * $Log: StChargedPionBaseEv.h,v $
91  * Revision 1.1 2008/07/17 17:06:30 kocolosk
92  * big-bang integration StChargedPionMcEvent framework
93  *
94  *****************************************************************************/