1 #ifndef ST_FWD_TREE_MAKER_H
2 #define ST_FWD_TREE_MAKER_H
4 #include "TClonesArray.h"
6 #include "GenFit/Track.h"
7 #include "StFwdTrackMaker/include/Tracker/FwdHit.h"
8 #include "StMuDSTMaker/COMMON/StMuFwdTrack.h"
11 #include "StChain/StMaker.h"
14 #include "TLorentzVector.h"
16 #include "StThreeVectorD.hh"
27 template<
class BranchType>
33 void createBranch( TTree *tree,
const char* name,
int buffSize = 256000,
int splitLevel = 99){
34 _tca =
new TClonesArray( BranchType::Class_Name() );
35 tree->Branch( name, &this->_tca, buffSize, splitLevel );
38 void add( BranchType &branch ){
39 if (
nullptr == this->_tca )
return;
40 BranchType *new_branch =
new ((*this->_tca)[this->_n]) BranchType( );
45 void add( BranchType *branch ){
46 if (
nullptr == this->_tca ||
nullptr == branch)
return;
47 BranchType *new_branch =
new ((*this->_tca)[this->_n]) BranchType( );
48 *new_branch = *branch;
54 if(
nullptr != this->_tca )
58 UInt_t N()
const {
return _n; }
59 BranchType *at( UInt_t i ){
60 if (
nullptr == _tca )
62 return (BranchType*)_tca->At( i );
66 TClonesArray * _tca =
nullptr;
80 void set(
int r,
int e,
int t, TVector3 &p ){
91 TVector3 pv(-999, -999, -999);
96 int run, event, tofmult;
120 mXYZ.SetXYZ(0, 0, 0);
136 mXYZ.SetXYZ(0, 0, 0);
192 void Clear(
const Option_t *opts =
"");
194 void FillFttClusters();
195 void FillFstPoints();
196 void FillFcsStEvent();
197 void FillFcsStMuDst();
202 TFile *mTreeFile =
nullptr;
203 TTree *mTree =
nullptr;
FwdTreeHeader header
Primary event vertex.
TClonesArrayWriter< StMuMcTrack > mcTracks
MC tracks.
Store Cluster with STAR XYZ position.
TClonesArray writer Helper class for writing TClonesArrays to TTree of custom class type...
This class is a container for the data that will be written to the output tree.
Store Hit with STAR XYZ position.