Public Member Functions | Protected Attributes | List of all members
flat::FlatKalman Class Reference

Flat encoding of SRKalman. More...

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-11-28/FlatMaker/FlatKalman.h"

Public Member Functions

 FlatKalman (const std::string &prefix, TTree *tr, const IBranchPolicy *policy)
 
 ~FlatKalman ()
 
void Fill (const caf::SRKalman &sr)
 

Protected Attributes

size_t ntracks
 
size_t ntracks2d
 
unsigned int idxremid
 
unsigned int idxmuonid
 
unsigned int idxlongest
 
TTree * tracks_tree
 
FlatKalmanTrack tracks
 
long tracks_idx
 
int tracks_length
 
TTree * tracks2d_tree
 
FlatTrack tracks2d
 
long tracks2d_idx
 
int tracks2d_length
 

Detailed Description

Flat encoding of SRKalman.

Definition at line 22 of file FlatKalman.h.

Constructor & Destructor Documentation

flat::FlatKalman::FlatKalman ( const std::string prefix,
TTree *  tr,
const IBranchPolicy policy 
)

Definition at line 3619 of file FlatRecord.cxx.

References compare_h5_caf::branch, idxlongest, idxmuonid, idxremid, ntracks, ntracks2d, tracks2d_idx, tracks2d_length, tracks2d_tree, tracks_idx, tracks_length, and tracks_tree.

3620  : tracks_tree(make_tree(prefix+"tracks", "tracks", tr)),
3621  tracks((prefix+"tracks."), tracks_tree, policy),
3622  tracks_idx(0), tracks_length(0),
3623  tracks2d_tree(make_tree(prefix+"tracks2d", "tracks2d", tr)),
3624  tracks2d((prefix+"tracks2d."), tracks2d_tree, policy),
3626 {
3627  branch(tr, prefix+"ntracks", &ntracks, policy);
3628  branch(tr, prefix+"ntracks2d", &ntracks2d, policy);
3629  branch(tr, prefix+"idxremid", &idxremid, policy);
3630  branch(tr, prefix+"idxmuonid", &idxmuonid, policy);
3631  branch(tr, prefix+"idxlongest", &idxlongest, policy);
3632  if(tracks_tree->GetNbranches() > 0){
3633  branch(tr, prefix+"tracks_idx", &tracks_idx, 0);
3634  branch(tr, prefix+"tracks_length", &tracks_length, 0);
3635  }
3636  if(tracks2d_tree->GetNbranches() > 0){
3637  branch(tr, prefix+"tracks2d_idx", &tracks2d_idx, 0);
3638  branch(tr, prefix+"tracks2d_length", &tracks2d_length, 0);
3639  }
3640 }
FlatKalmanTrack tracks
Definition: FlatKalman.h:38
TTree * tracks_tree
Definition: FlatKalman.h:37
TTree * tracks2d_tree
Definition: FlatKalman.h:42
unsigned int idxmuonid
Definition: FlatKalman.h:34
FlatTrack tracks2d
Definition: FlatKalman.h:43
size_t ntracks2d
Definition: FlatKalman.h:32
unsigned int idxremid
Definition: FlatKalman.h:33
const XML_Char * prefix
Definition: expat.h:380
unsigned int idxlongest
Definition: FlatKalman.h:35
flat::FlatKalman::~FlatKalman ( )

Definition at line 3642 of file FlatRecord.cxx.

References tracks2d_tree, and tracks_tree.

3643 {
3644  if(tracks_tree->GetNbranches() > 0) tracks_tree->Write();
3645  delete tracks_tree;
3646  if(tracks2d_tree->GetNbranches() > 0) tracks2d_tree->Write();
3647  delete tracks2d_tree;
3648 }
TTree * tracks_tree
Definition: FlatKalman.h:37
TTree * tracks2d_tree
Definition: FlatKalman.h:42

Member Function Documentation

void flat::FlatKalman::Fill ( const caf::SRKalman sr)

Definition at line 3650 of file FlatRecord.cxx.

References flat::FlatKalmanTrack::Fill(), flat::FlatTrack::Fill(), caf::SRKalman::idxlongest, idxlongest, caf::SRKalman::idxmuonid, idxmuonid, caf::SRKalman::idxremid, idxremid, caf::SRKalman::ntracks, ntracks, caf::SRKalman::ntracks2d, ntracks2d, caf::SRKalman::tracks, tracks, caf::SRKalman::tracks2d, tracks2d, tracks2d_idx, tracks2d_length, tracks2d_tree, tracks_idx, tracks_length, tracks_tree, and submit_syst::x.

Referenced by flat::FlatTrackBranch::Fill().

3651 {
3652  ntracks = sr.ntracks;
3653  ntracks2d = sr.ntracks2d;
3654  idxremid = sr.idxremid;
3655  idxmuonid = sr.idxmuonid;
3656  idxlongest = sr.idxlongest;
3657 
3658  tracks_idx += tracks_length; // increment taken by previous record
3659  tracks_length = sr.tracks.size();
3660  for(const auto& x: sr.tracks){
3661  tracks.Fill(x);
3662  tracks_tree->Fill();
3663  }
3664 
3665  tracks2d_idx += tracks2d_length; // increment taken by previous record
3666  tracks2d_length = sr.tracks2d.size();
3667  for(const auto& x: sr.tracks2d){
3668  tracks2d.Fill(x);
3669  tracks2d_tree->Fill();
3670  }
3671 }
FlatKalmanTrack tracks
Definition: FlatKalman.h:38
unsigned int idxmuonid
Index number of the highest scoring muonid track.
Definition: SRKalman.h:33
TTree * tracks_tree
Definition: FlatKalman.h:37
TTree * tracks2d_tree
Definition: FlatKalman.h:42
size_t ntracks
Definition: SRKalman.h:23
unsigned int idxremid
index number of the best ReMId track
Definition: SRKalman.h:32
size_t ntracks2d
Definition: SRKalman.h:24
unsigned int idxmuonid
Definition: FlatKalman.h:34
FlatTrack tracks2d
Definition: FlatKalman.h:43
void Fill(const caf::SRTrack &sr)
unsigned int idxlongest
Definition: SRKalman.h:34
size_t ntracks2d
Definition: FlatKalman.h:32
unsigned int idxremid
Definition: FlatKalman.h:33
unsigned int idxlongest
Definition: FlatKalman.h:35
std::vector< SRTrack > tracks2d
2D Tracks produced by KalmanTrack
Definition: SRKalman.h:19
void Fill(const caf::SRKalmanTrack &sr)
std::vector< SRKalmanTrack > tracks
3D Tracks produced by KalmanTrack
Definition: SRKalman.h:16

Member Data Documentation

unsigned int flat::FlatKalman::idxlongest
protected

Definition at line 35 of file FlatKalman.h.

Referenced by Fill(), and FlatKalman().

unsigned int flat::FlatKalman::idxmuonid
protected

Definition at line 34 of file FlatKalman.h.

Referenced by Fill(), and FlatKalman().

unsigned int flat::FlatKalman::idxremid
protected

Definition at line 33 of file FlatKalman.h.

Referenced by Fill(), and FlatKalman().

size_t flat::FlatKalman::ntracks
protected

Definition at line 31 of file FlatKalman.h.

Referenced by Fill(), and FlatKalman().

size_t flat::FlatKalman::ntracks2d
protected

Definition at line 32 of file FlatKalman.h.

Referenced by Fill(), and FlatKalman().

FlatKalmanTrack flat::FlatKalman::tracks
protected

Definition at line 38 of file FlatKalman.h.

Referenced by Fill().

FlatTrack flat::FlatKalman::tracks2d
protected

Definition at line 43 of file FlatKalman.h.

Referenced by Fill().

long flat::FlatKalman::tracks2d_idx
protected

Definition at line 44 of file FlatKalman.h.

Referenced by Fill(), and FlatKalman().

int flat::FlatKalman::tracks2d_length
protected

Definition at line 45 of file FlatKalman.h.

Referenced by Fill(), and FlatKalman().

TTree* flat::FlatKalman::tracks2d_tree
protected

Definition at line 42 of file FlatKalman.h.

Referenced by Fill(), FlatKalman(), and ~FlatKalman().

long flat::FlatKalman::tracks_idx
protected

Definition at line 39 of file FlatKalman.h.

Referenced by Fill(), and FlatKalman().

int flat::FlatKalman::tracks_length
protected

Definition at line 40 of file FlatKalman.h.

Referenced by Fill(), and FlatKalman().

TTree* flat::FlatKalman::tracks_tree
protected

Definition at line 37 of file FlatKalman.h.

Referenced by Fill(), FlatKalman(), and ~FlatKalman().


The documentation for this class was generated from the following files: