Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DVertex_factory_THROWN.cc
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: DVertex_factory_THROWN.cc
4 // Created: Tue Apr 6 17:01:54 EDT 2010
5 // Creator: pmatt (on Darwin Amelia.local 9.8.0 i386)
6 //
7 
8 
9 #include <iostream>
10 #include <iomanip>
11 using namespace std;
12 
13 #include <TROOT.h>
14 #include <TMath.h>
15 #include "DVertex_factory_THROWN.h"
16 using namespace jana;
17 
18 //------------------
19 // init
20 //------------------
22 {
23  return NOERROR;
24 }
25 
26 //------------------
27 // brun
28 //------------------
29 jerror_t DVertex_factory_THROWN::brun(jana::JEventLoop *loop, int32_t runnumber)
30 {
31  return NOERROR;
32 }
33 
34 //------------------
35 // evnt
36 //------------------
37 jerror_t DVertex_factory_THROWN::evnt(JEventLoop *loop, uint64_t eventnumber)
38 {
39  vector<const DMCThrown*> locThrownTracks;
40  loop->Get(locThrownTracks);
41 
42  if(locThrownTracks.size() == 0)
43  return RESOURCE_UNAVAILABLE;
44 
45  DVertex* locVertex = new DVertex;
46  locVertex->dKinFitNDF = 0;
47  locVertex->dKinFitChiSq = 0.0;
48  locVertex->dSpacetimeVertex.SetVect(locThrownTracks[0]->position());
49  locVertex->dSpacetimeVertex.SetT(locThrownTracks[0]->time());
50 
51  _data.push_back(locVertex);
52 
53  return NOERROR;
54 }
55 
56 //------------------
57 // erun
58 //------------------
60 {
61  return NOERROR;
62 }
63 
64 //------------------
65 // fini
66 //------------------
68 {
69  return NOERROR;
70 }
71 
unsigned int dKinFitNDF
Definition: DVertex.h:31
jerror_t brun(jana::JEventLoop *locEventLoop, int32_t runnumber)
Called everytime a new run number is detected.
jerror_t erun(void)
Called everytime run number changes, provided brun has been called.
jerror_t fini(void)
Called after last event of last event source has been processed.
DLorentzVector dSpacetimeVertex
Definition: DVertex.h:28
double dKinFitChiSq
Definition: DVertex.h:32
jerror_t init(void)
Called once at program start.
jerror_t evnt(jana::JEventLoop *locEventLoop, uint64_t eventnumber)
Called every event.