StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMuL3EventSummary.cxx
1 /***************************************************************************
2  *
3  * $Id: StMuL3EventSummary.cxx,v 1.2 2002/03/14 04:12:55 laue Exp $
4  * Author: Frank Laue, BNL, laue@bnl.gov
5  *
6  ***************************************************************************/
7 /***************************************************************************
8  *
9  * $Log: StMuL3EventSummary.cxx,v $
10  * Revision 1.2 2002/03/14 04:12:55 laue
11  * bug fix: StMuL3EventSummary.cxx
12  * update: StMuDst.h StMuDst.cxx
13  *
14  * Revision 1.1 2002/03/08 17:04:18 laue
15  * initial revision
16  *
17  *
18  **************************************************************************/
19 
20 #include "TClonesArray.h"
21 
22 #include "StEvent/StEvent.h"
23 #include "StEvent/StL3Trigger.h"
24 #include "StEvent/StL3EventSummary.h"
25 #include "StEvent/StL3AlgorithmInfo.h"
26 #include "StEvent/StPrimaryVertex.h"
27 
28 #include "StMuEvent.h"
29 #include "StMuL3EventSummary.h"
30 #include "StMuException.hh"
31 #include "StMuDebug.h"
32 
33 ClassImp(StMuL3EventSummary)
34 
35 StMuL3EventSummary::StMuL3EventSummary() : mNumberOfProcessedEvents(0), mNumberReconstructedEvents(0),
36  mNumberOfTracks(0), mNumberOfAlgorithms(0), mFlags(0), mL0TriggerWord(0), mUnbiasedPreScale(0) {
37  DEBUGMESSAGE("");
38  clear();
39 }
40 
41 
42 
43 void StMuL3EventSummary::fill(const StEvent* ev) {
44  DEBUGMESSAGE("");
45  clear();
46  if ( !(ev->l3Trigger() && ev->l3Trigger()->l3EventSummary()) ) return;
47  const StL3EventSummary* l3 = ev->l3Trigger()->l3EventSummary();
48  mNumberOfProcessedEvents = l3->numberOfProcessedEvents();
49  mNumberReconstructedEvents = l3->numberOfReconstructedEvents();
50  mNumberOfTracks = l3->numberOfTracks();
51  mNumberOfAlgorithms = l3->numberOfAlgorithms();
52  mFlags |= ( l3->zVertexTrigger()*__VERTEX__ );
53  mFlags |= ( l3->unbiasedTrigger()*__UNBIASED__ );
54  mL0TriggerWord = l3->l0TriggerWord();
55  mUnbiasedPreScale = l3->unbiasedTriggerPreScale();
56  if (ev->l3Trigger()->primaryVertex())
57  mPrimaryVertex = ev->l3Trigger()->primaryVertex()->position();
58 }
59 
60 StMuL3EventSummary::~StMuL3EventSummary(){
61  DEBUGMESSAGE("");
62 }
63 
64 void StMuL3EventSummary::clear(){
65  DEBUGMESSAGE("");
66  mNumberOfProcessedEvents = 0;
67  mNumberReconstructedEvents = 0;
68  mNumberOfTracks = 0;
69  mNumberOfAlgorithms = 0;
70  mFlags = 0;
71  mL0TriggerWord = 0;
72  mUnbiasedPreScale = 0;
73  mPrimaryVertex = StThreeVectorF(0.,0.,0.);
74 }
75 
82 
83 /***************************************************************************
84  *
85  * $Log: StMuL3EventSummary.cxx,v $
86  * Revision 1.2 2002/03/14 04:12:55 laue
87  * bug fix: StMuL3EventSummary.cxx
88  * update: StMuDst.h StMuDst.cxx
89  *
90  * Revision 1.1 2002/03/08 17:04:18 laue
91  * initial revision
92  *
93  *
94  **************************************************************************/