3 #include "StjMCKinWriter.h"
7 #include <TDirectory.h>
15 _tree =
new TTree(_treeName.c_str(), _treeTitle.c_str());
16 _tree->Branch(
"runNumber" , &_runNumber ,
"runNumber/I" );
17 _tree->Branch(
"eventId" , &_eventId ,
"eventId/I" );
18 _tree->Branch(
"s" , &_s ,
"s/D" );
19 _tree->Branch(
"t" , &_t ,
"t/D" );
20 _tree->Branch(
"u" , &_u ,
"u/D" );
21 _tree->Branch(
"pid" , &_pid ,
"pid/I" );
22 _tree->Branch(
"pt" , &_pt ,
"pt/D" );
23 _tree->Branch(
"costh" , &_costh ,
"costh/D" );
24 _tree->Branch(
"x1" , &_x1 ,
"x1/D" );
25 _tree->Branch(
"x2" , &_x2 ,
"x2/D" );
26 _tree->Branch(
"vertexZ" , &_vertexZ ,
"vertexZ/D" );
29 void StjMCKinWriter::Make()
31 _runNumber = _mckin->runNumber();
33 _eventId = _mckin->eventId();
35 _vertexZ = _mckin->vertexZ();
45 _costh = _mckin->costh();
56 void StjMCKinWriter::Finish()
58 _tree->BuildIndex(
"runNumber",
"eventId");