StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEEmcMixEvent.cxx
1 #include "StEEmcMixEvent.h"
2 ClassImp(StEEmcMixEvent);
3 
4 // ----------------------------------------------------------------------------
5 StEEmcMixEvent::StEEmcMixEvent()
6 {
7 
8  mRealPairs = new TClonesArray("StEEmcPair",500);
9  mMixedPairs = new TClonesArray("StEEmcPair",500);
10  mPoints = new TClonesArray("StEEmcPoint",500);
11  mTowers = new TClonesArray("StEEmcTower",720);
12 
13  mClustersU = new TClonesArray("StEEmcSmdCluster",20);
14  mClustersV = new TClonesArray("StEEmcSmdCluster",20);
15 
16  Clear();
17 }
18 
19 // ----------------------------------------------------------------------------
20 void StEEmcMixEvent::setEvent( StMuEvent *event )
21 {
22 
23  mEventId = event->eventId();
24  mEventNumber = event->eventNumber();
25  mRunId = event->runId();
26  mRunNumber = event->runNumber();
27  mEventInfo = event->eventInfo();
28  mRunInfo = event->runInfo();
29  mMuTriggerIdCollection = event->triggerIdCollection();
30  mL0trigger = event->l0Trigger();
31  mMagneticField = event->magneticField();
32 
33 }
34 
35 
36 // ----------------------------------------------------------------------------
37 void StEEmcMixEvent::Clear(Option_t *o)
38 {
39  mRealPairs->Delete();
40  mMixedPairs->Delete();
41  mPoints->Delete();
42  mClustersU->Delete();
43  mClustersV->Delete();
44 
45  nReal=0;
46  nMixed=0;
47  nPoints=0;
48  nClustersU=0;
49  nClustersV=0;
50 
51  mEtotal=0.;
52  mEpoints=0.;
53 }
54 
55 // ----------------------------------------------------------------------------
56 void StEEmcMixEvent::addPoint( StEEmcPoint p ) {
57  TClonesArray &points=*mPoints;
58  new(points[nPoints++]) StEEmcPoint(p);
59  mEpoints+=p.energy();
60 }
61 void StEEmcMixEvent::addPair ( StEEmcPair p ) {
62  TClonesArray &pairs=*mRealPairs;
63  new(pairs[nReal++]) StEEmcPair(p);
64 }
65 void StEEmcMixEvent::addMixed( StEEmcPair p ) {
66  TClonesArray &mixed=*mMixedPairs;
67  new(mixed[nMixed++]) StEEmcPair(p);
68 }
69 void StEEmcMixEvent::addTower( StEEmcTower t ) {
70  TClonesArray &towers=*mTowers;
71  new(towers[nTowers++]) StEEmcTower(t);
72 }
73 
74 void StEEmcMixEvent::addCluster( StEEmcSmdCluster c )
75 {
76  if ( c.plane()==0 )
77  {
78  TClonesArray &clusters=*mClustersU;
79  new (clusters[nClustersU++]) StEEmcSmdCluster(c);
80  }
81  else
82  {
83  TClonesArray &clusters=*mClustersV;
84  new (clusters[nClustersV++]) StEEmcSmdCluster(c);
85  }
86 
87 }
Float_t mEtotal
Total energy in eemc.
Base class for representing EEMC points.
Definition: StEEmcPoint.h:24
void energy(Float_t e, Int_t layer=0)
Set the energy of this point.
Definition: StEEmcPoint.h:34
Int_t nTowers
Hit towers from A2E maker.
Int_t nReal
From EEMC point-maker.
copied from muDst
Base class for representing tower, preshower and postshower elements.
Definition: StEEmcTower.h:11
A base class for representing clusters of EEMC smd strips.
Int_t mEventId
Items to be copied from StMuEvent.
A class to represent pairs of points.
Definition: StEEmcPair.h:9