StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
VertexData.cxx
1 #include <cmath>
2 #include "math_constants.h"
3 
4 #include <St_base/StMessMgr.h>
5 #include <TString.h>
6 
7 #include "StGenericVertexMaker/StiPPVertex/VertexData.h"
8 //==========================================================
9 //==========================================================
10 VertexData::VertexData(int vertexId) {
11  id=vertexId;
12  isTriggered = false;
13  mIdTruth=0;
14  r=TVector3(999,999,999);
15  gPtSum=0;
16  nUsedTrack=Lmax=nBtof=nBtofV=0;
17  nAnyMatch=nCtb=nBemc=nEemc=nTpc=0;
18  nAnyVeto=nCtbV=nBemcV=nEemcV=nTpcV=0;
19 }
20 
21 
22 VertexData::VertexData(const TVector3& position) :
23  id(0),
24  isTriggered(false),
25  mIdTruth(0),
26  r(position), er(),
27  nUsedTrack(0), Lmax(0), gPtSum(0),
28  nBtof(0), nCtb(0), nBemc(0), nEemc(0), nTpc(0), nAnyMatch(0),
29  nBtofV(0), nCtbV(0), nBemcV(0), nEemcV(0), nTpcV(0), nAnyVeto(0)
30 {
31 }
32 
33 //==========================================================
34 //==========================================================
35 void VertexData::print(ostream& os) const { // does not work ??
36  os << " Vertex ID="<<id<< " isTriggered: " << isTriggered << " nUsedTrack="<<nUsedTrack<<" gPtSum="<< gPtSum<<" Lmax="<< Lmax << " idTruth: " << mIdTruth
37  << " match: any="<<nAnyMatch<<"-"<<nAnyVeto<<" CTB="<<nCtb<<"-"<<nCtbV<<" BEMC="<<nBemc<<"-"<<nBemcV<<" EEMC="<<nEemc<<"-"<<nEemcV<<" TPC="<<nTpc<<"-"<<nTpcV << "\n"
38  << Form(" xyz: (%5.3f, %5.3f, %5.3f) +/- (%5.3f, %5.3f, %5.3f)\n", r.x(), r.y(), r.z(), er.x(), er.y(), er.z() );
39 }
bool isTriggered
Indicates whether the vertex potentially belongs to triggered event.
Definition: VertexData.h:12