Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
garana::MillRecoTree Class Reference

#include <MillRecoTree.h>

Inheritance diagram for garana::MillRecoTree:
garana::Mill garana::FlatRecoTree garana::RecoTree garana::TreeReader

Public Member Functions

 MillRecoTree ()
 
 MillRecoTree (TTree *treeIn, TTree *treeOut)
 
void MillTrees () override
 main method More...
 
- Public Member Functions inherited from garana::Mill
virtual ~Mill ()
 
bool IsVerified () const
 
std::string CharStarToString (const char *cstr)
 
- Public Member Functions inherited from garana::FlatRecoTree
 FlatRecoTree ()
 
 FlatRecoTree (TTree *tree)
 
 FlatRecoTree (TTree *tree, char opt)
 
const size_t NTrack () const override
 number of tracks in this event More...
 
const size_t NVertex () const override
 number of vertices in this event More...
 
const size_t NVee () const override
 number of vees in this event More...
 
const size_t NCalCluster () const override
 number of ECal clusters in this event More...
 
const TLorentzVector * TrackVertex (const size_t &itrack) const override
 4-position of track's assumed start point More...
 
const TLorentzVector * TrackEnd (const size_t &itrack) const override
 4-position of track's assumed end point More...
 
const size_t NTrackHit (const size_t &itrack) const override
 number of reconstructed hits used in track fit More...
 
const TVector3 * TrackMomBeg (const size_t &itrack) const override
 momentum 3-vector as track's assumed start point More...
 
const TVector3 * TrackMomEnd (const size_t &itrack) const override
 momentum 3-vector as track's assumed end point More...
 
const float TrackVtxDirectionX (const size_t &itrack) const override
 x-direction cosine at track vertex More...
 
const float TrackVtxDirectionY (const size_t &itrack) const override
 y-direction cosine at track vertex More...
 
const float TrackVtxDirectionZ (const size_t &itrack) const override
 z-direction cosine at track vertex More...
 
const float TrackEndDirectionX (const size_t &itrack) const override
 x-direction cosine at track end More...
 
const float TrackEndDirectionY (const size_t &itrack) const override
 y-direction cosine at track end More...
 
const float TrackEndDirectionZ (const size_t &itrack) const override
 z-direction cosine at track end More...
 
const float TrackLenFwd (const size_t &itrack) const override
 track length from forward fit More...
 
const float TrackLenBkd (const size_t &itrack) const override
 track length from backward fit More...
 
const float TrackIonizFwd (const size_t &itrack) const override
 track average ionization rate from forward fit More...
 
const float TrackIonizBkd (const size_t &itrack) const override
 track average ionization rate from backward fit More...
 
const int TrackChiSqrFwd (const size_t &itrack) const override
 chi-squared of track fit in forward direction More...
 
const int TrackChiSqrBkd (const size_t &itrack) const override
 chi-squared of track fit in backward direction More...
 
const int TrackChgFwd (const size_t &itrack) const override
 charge sign of track if current hypothesis correct More...
 
const int TrackChgBkd (const size_t &itrack) const override
 charge sign of track if current hypothesis wrong More...
 
void TrackParBeg (const size_t &itrack, float pars[5]) const override
 track fit parameters at the track's assumed start More...
 
void TrackParEnd (const size_t &itrack, float pars[5]) const override
 track fit parameters at the track's assumed end More...
 
void TrackCovarBeg (const size_t &itrack, float pars[15]) const override
 track fit covariance matrix (assume symmetry) at track's assumed start More...
 
void TrackCovarEnd (const size_t &itrack, float pars[15]) const override
 track fit covariance matrix (assume symmetry) at track's assumed end More...
 
const TLorentzVector * TrackTruePosBeg (const size_t &itrack) const override
 true 4-position at track vertex [cm,ns] More...
 
const TLorentzVector * TrackTruePosEnd (const size_t &itrack) const override
 true 4-position at track end [cm,ns] More...
 
const TLorentzVector * TrackTrueMomBeg (const size_t &itrack) const override
 true 4-momentum at track vertex [GeV/c,GeV] More...
 
const TLorentzVector * TrackTrueMomEnd (const size_t &itrack) const override
 true 4-momentum at track end [GeV/c,GeV] More...
 
const float TrackTrueEnergy (const size_t &icluster) const override
 total associated true energy deposited with ith cluster More...
 
const size_t TrackNTrueTrack (const size_t &icluster) const override
 number of MCParticles associated with ith cluster More...
 
const int TrackTrkIdMaxDeposit (const size_t &icluster) const override
 trackID of the MCParticle depositing the most energy in ith cluster More...
 
const float TrackMaxDeposit (const size_t &icluster) const override
 maximum true deposited energy from a single MCParticle More...
 
const pair< int, float > * TrackTrueDeposit (const size_t &itrack, size_t &itrue) const override
 
const vector< pair< int, float > > * TrackTrueDeposits (const size_t &itrack) const override
 
const TLorentzVector * GetVertex (const size_t &ivertex) const override
 ================ vertex ========================== More...
 
void VertexCovariance (const size_t &ivertex, float covar[][3]) const override
 given a vertex index, fill given position covariance matrix More...
 
const TLorentzVector * VeeVertex (const size_t &ivee) const override
 =============== Vee ======================= More...
 
void VeeCovariance (const size_t &ivee, float covar[][3]) const override
 given a vee index, fill given position covariance matrix More...
 
const vector< TLorentzVector > * VeeMomentumPerHypothesis (const size_t &ivee) const override
 4-momentum for vee if it matches {Kshort, Lambda1, Lambda2} More...
 
const float VeeChiSquared (const size_t &ivee) const override
 
const TLorentzVector * CalClustPosition (const size_t &icluster) const override
 ================ ECal cluster ====================== More...
 
const float CalClustEnergy (const size_t &icluster) const override
 reconstructed ECal cluster energy More...
 
const float CalClustEnergyError (const size_t &icluster) const override
 
const float CalClustTrueEnergy (const size_t &icluster) const override
 total associated true energy deposited with ith cluster More...
 
const size_t CalClustNTrueTrack (const size_t &icluster) const override
 number of MCParticles associated with ith cluster More...
 
const int CalClustTrkIdMaxDeposit (const size_t &icluster) const override
 trackID of the MCParticle depositing the most energy in ith cluster More...
 
const float CalClustMaxDeposit (const size_t &icluster) const override
 maximum true deposited energy from a single MCParticle More...
 
const std::pair< int, float > * CalClustTrueDeposit (const size_t &icluster, const size_t &itrack) const override
 
const float CalClustTimeDifference (const size_t &icluster) const override
 
const float * CalClustShape (const size_t &icluster) const override
 
const float CalClustTheta (const size_t &icluster) const override
 
const float CalClustPhi (const size_t &icluster) const override
 
const vector< TVector3 > * CalClustEigenVecs (const size_t &icluster) const override
 
- Public Member Functions inherited from garana::RecoTree
virtual ~RecoTree ()
 
const float TrackMaxDepositFrac (const size_t &itrack) const
 largest fraction of total energy contributed by single MCParticle More...
 
const float CalClustMaxDepositFrac (const size_t &icluster) const
 largest fraction of total energy contributed by single MCParticle More...
 
void GetTrackG4PIndices (const size_t &itrk, vector< UInt_t > &ig4ps) const
 given a track index, fill a given vector with matched G4 particle indices More...
 
void GetVertexTrackIndices (const size_t &ivtx, vector< UInt_t > &itracks) const
 given a vertex index, fill a given vector with matched track indices More...
 
void GetVeeTrackIndices (const size_t &ivee, vector< UInt_t > &itracks) const
 given a vee index, fill a given vector with matched G4 particle indices More...
 
void GetCalClusterTrackIndices (const size_t &iclust, vector< UInt_t > &itracks) const
 given a calocluster index, fill a given vector with matched track indices More...
 
void GetCalClusterG4Indices (const size_t &iclust, vector< UInt_t > &ig4ps) const
 given a calocluster index, fill a given vector with matched G4Particle indices More...
 
- Public Member Functions inherited from garana::TreeReader
virtual ~TreeReader ()
 
void SetupRead (TTree *tree)
 
TTree * GetInputTree ()
 
size_t NEntries () const
 
virtual void GetEntry (const UInt_t &ientry)
 
Int_t Event () const
 
const TObjArray * GetBranchList () const
 
void Fill ()
 
void Write ()
 
void CheckOpt (char opt)
 
bool BlockWrite () const
 

Private Types

enum  RecoBranch {
  kEvent, kTracks, kVees, kVertices,
  kCalClusters, kVertTrackEnds, kVeeTrackEnds
}
 

Private Member Functions

bool VerifyBranches () override
 
void FillTrack ()
 
void FillVertex ()
 
void FillVee ()
 
void FillCaloCluster ()
 

Private Attributes

StructuredRecoTreefRecoIn = nullptr
 points to input structured recoTree we are flattening More...
 
std::map< std::string, RecoBranchnameToRecoBranch
 
std::map< RecoBranch, boolbranchToDrawOpt
 

Additional Inherited Members

- Protected Member Functions inherited from garana::FlatRecoTree
bool SetBranchAddresses () override
 
void SetVecs ()
 
void ClearVecs ()
 
- Protected Attributes inherited from garana::Mill
bool fIsVerified = false
 
TTree * fTreeOut = nullptr
 
TFile * fOutfile = nullptr
 
- Protected Attributes inherited from garana::FlatRecoTree
vector< float > * fTrkLenFwd = nullptr
 length of the track in cm from forwards fit More...
 
vector< float > * fTrkLenBac = nullptr
 length of the track in cm from backwards fit More...
 
vector< float > * fTrkMomBeg = nullptr
 momentum of the track at the vertex in GeV/c More...
 
vector< float > * fTrkMomEnd = nullptr
 momentum of the track at the end in GeV/c More...
 
vector< float > * fTrkVtxX = nullptr
 track vertex position 4-vector cm,ns More...
 
vector< float > * fTrkVtxY = nullptr
 
vector< float > * fTrkVtxZ = nullptr
 
vector< float > * fTrkVtxT = nullptr
 
vector< float > * fTrkEndX = nullptr
 track end position 4-vector cm,ns More...
 
vector< float > * fTrkEndY = nullptr
 
vector< float > * fTrkEndZ = nullptr
 
vector< float > * fTrkEndT = nullptr
 
vector< float > * fTrkVtxDirX = nullptr
 track vertex direction More...
 
vector< float > * fTrkVtxDirY = nullptr
 
vector< float > * fTrkVtxDirZ = nullptr
 
vector< float > * fTrkEndDirX = nullptr
 track end direction More...
 
vector< float > * fTrkEndDirY = nullptr
 
vector< float > * fTrkEndDirZ = nullptr
 
vector< float > * fTrkChiFwd = nullptr
 chisquared forward fit More...
 
vector< float > * fTrkChiBac = nullptr
 chisquared backward fit More...
 
vector< size_t > * fTrkNHits = nullptr
 number of hits More...
 
vector< float > * fTrackXBeg = nullptr
 Track x-coord at beginning of track [cm]. More...
 
vector< float > * fTrackYBeg = nullptr
 Track y-coord (par[0]) at beginning of track [cm]. More...
 
vector< float > * fTrackZBeg = nullptr
 Track z-coord (par[1]) at beginning of track [cm]. More...
 
vector< float > * fTrackCurvBeg = nullptr
 Track curvature (par[2]) at beginning of track [cm^-1]. More...
 
vector< float > * fTrackPhiBeg = nullptr
 Track phi (par[3]) at beginning of track [rad]. More...
 
vector< float > * fTrackLambBeg = nullptr
 Track lambda (par[4]) at beginning of track [rad]. More...
 
vector< float > * fTrackXEnd = nullptr
 Track x-coord at end of track [cm]. More...
 
vector< float > * fTrackYEnd = nullptr
 Track y-coord (par[0]) at end of track [cm]. More...
 
vector< float > * fTrackZEnd = nullptr
 Track z-coord (par[1]) at end of track [cm]. More...
 
vector< float > * fTrackCurvEnd = nullptr
 Track curvature (par[2]) at end of track [cm^-1]. More...
 
vector< float > * fTrackPhiEnd = nullptr
 Track phi (par[3]) at end of track [rad]. More...
 
vector< float > * fTrackLambEnd = nullptr
 Track lambda (par[4]) at end of track [rad]. More...
 
vector< float > * fTrkCovMat1Beg = nullptr
 covariance matrix at beginning of track – assuming symmetry More...
 
vector< float > * fTrkCovMat2Beg = nullptr
 
vector< float > * fTrkCovMat3Beg = nullptr
 
vector< float > * fTrkCovMat4Beg = nullptr
 
vector< float > * fTrkCovMat5Beg = nullptr
 
vector< float > * fTrkCovMat6Beg = nullptr
 
vector< float > * fTrkCovMat7Beg = nullptr
 
vector< float > * fTrkCovMat8Beg = nullptr
 
vector< float > * fTrkCovMat9Beg = nullptr
 
vector< float > * fTrkCovMat10Beg = nullptr
 
vector< float > * fTrkCovMat11Beg = nullptr
 
vector< float > * fTrkCovMat12Beg = nullptr
 
vector< float > * fTrkCovMat13Beg = nullptr
 
vector< float > * fTrkCovMat14Beg = nullptr
 
vector< float > * fTrkCovMat15Beg = nullptr
 
vector< float > * fTrkCovMat1End = nullptr
 covariance matrix at end of track – assuming symmetry More...
 
vector< float > * fTrkCovMat2End = nullptr
 
vector< float > * fTrkCovMat3End = nullptr
 
vector< float > * fTrkCovMat4End = nullptr
 
vector< float > * fTrkCovMat5End = nullptr
 
vector< float > * fTrkCovMat6End = nullptr
 
vector< float > * fTrkCovMat7End = nullptr
 
vector< float > * fTrkCovMat8End = nullptr
 
vector< float > * fTrkCovMat9End = nullptr
 
vector< float > * fTrkCovMat10End = nullptr
 
vector< float > * fTrkCovMat11End = nullptr
 
vector< float > * fTrkCovMat12End = nullptr
 
vector< float > * fTrkCovMat13End = nullptr
 
vector< float > * fTrkCovMat14End = nullptr
 
vector< float > * fTrkCovMat15End = nullptr
 
vector< float > * fTrkIonizFwd = nullptr
 
vector< float > * fTrkIonizBac = nullptr
 
vector< int > * fTrkChgFwd = nullptr
 
vector< int > * fTrkChgBac = nullptr
 
vector< float > * fVeeVtxX = nullptr
 x-position of vertex [cm] More...
 
vector< float > * fVeeVtxY = nullptr
 y-position of vertex [cm] More...
 
vector< float > * fVeeVtxZ = nullptr
 z-position of vertex [cm] More...
 
vector< float > * fVeeVtxT = nullptr
 time of vertex [ns] More...
 
vector< float > * fVeeVtxCovar11 = nullptr
 uncertainties in vertex position [cm] More...
 
vector< float > * fVeeVtxCovar12 = nullptr
 
vector< float > * fVeeVtxCovar13 = nullptr
 
vector< float > * fVeeVtxCovar21 = nullptr
 
vector< float > * fVeeVtxCovar22 = nullptr
 
vector< float > * fVeeVtxCovar23 = nullptr
 
vector< float > * fVeeVtxCovar31 = nullptr
 
vector< float > * fVeeVtxCovar32 = nullptr
 
vector< float > * fVeeVtxCovar33 = nullptr
 
vector< float > * fVeePxKshort = nullptr
 four-momentum of vee, for Kshort hypothesis [GeV] More...
 
vector< float > * fVeePyKshort = nullptr
 
vector< float > * fVeePzKshort = nullptr
 
vector< float > * fVeeEKshort = nullptr
 
vector< float > * fVeePxLamb1 = nullptr
 four-momentum of vee, for Kshort hypothesis [GeV] More...
 
vector< float > * fVeePyLamb1 = nullptr
 
vector< float > * fVeePzLamb1 = nullptr
 
vector< float > * fVeeELamb1 = nullptr
 
vector< float > * fVeePxLamb2 = nullptr
 four-momentum of vee, for Kshort hypothesis [GeV] More...
 
vector< float > * fVeePyLamb2 = nullptr
 
vector< float > * fVeePzLamb2 = nullptr
 
vector< float > * fVeeELamb2 = nullptr
 
vector< float > * fVeeChisqr = nullptr
 chi-squared More...
 
vector< float > * fVtxX = nullptr
 x-position of vertex [cm] More...
 
vector< float > * fVtxY = nullptr
 y-position of vertex [cm] More...
 
vector< float > * fVtxZ = nullptr
 z-position of vertex [cm] More...
 
vector< float > * fVtxT = nullptr
 time of vertex [ns] More...
 
vector< float > * fVtxCovar11 = nullptr
 uncertainties in vertex position [cm] More...
 
vector< float > * fVtxCovar12 = nullptr
 
vector< float > * fVtxCovar13 = nullptr
 
vector< float > * fVtxCovar21 = nullptr
 
vector< float > * fVtxCovar22 = nullptr
 
vector< float > * fVtxCovar23 = nullptr
 
vector< float > * fVtxCovar31 = nullptr
 
vector< float > * fVtxCovar32 = nullptr
 
vector< float > * fVtxCovar33 = nullptr
 
vector< float > * fCalClustX = nullptr
 x-position of the cluster [cm] More...
 
vector< float > * fCalClustY = nullptr
 y-position of the cluster [cm] More...
 
vector< float > * fCalClustZ = nullptr
 z-position of the cluster [cm] More...
 
vector< float > * fCalClustT = nullptr
 time of the cluster [ns] More...
 
vector< float > * fCalClustEnergy = nullptr
 energy of the ECal cluster [GeV] More...
 
vector< float > * fCalClustEnergyError = nullptr
 uncertainty of the cluster energy [GeV] More...
 
vector< float > * fCalClustTdiff = nullptr
 time difference between the first and last layer of the cluster [ns] More...
 
vector< float > * fCalClustEllip = nullptr
 cluster shape parameter ellipsoid More...
 
vector< float > * fCalClustR1 = nullptr
 cluster shape parameter r1 More...
 
vector< float > * fCalClustR2 = nullptr
 cluster shape parameter r2 More...
 
vector< float > * fCalClustR3 = nullptr
 cluster shape parameter r3 More...
 
vector< float > * fCalClustVol = nullptr
 cluster shape parameter volume More...
 
vector< float > * fCalClustWidth = nullptr
 cluster shape parameter width More...
 
vector< float > * fCalClustTheta = nullptr
 intrasic direction of the cluster theta More...
 
vector< float > * fCalClustPhi = nullptr
 intrasic direction of the cluster phi More...
 
vector< float > * fCalClustEigen1X = nullptr
 Eigenvectors of the cluster in ascending order (principal axis with smallest inertial mass) normalised to 1. More...
 
vector< float > * fCalClustEigen1Y = nullptr
 
vector< float > * fCalClustEigen1Z = nullptr
 
vector< float > * fCalClustEigen2X = nullptr
 Eigenvectors of the cluster in ascending order (principal axis with smallest inertial mass) normalised to 1. More...
 
vector< float > * fCalClustEigen2Y = nullptr
 
vector< float > * fCalClustEigen2Z = nullptr
 
vector< float > * fCalClustEigen3X = nullptr
 Eigenvectors of the cluster in ascending order (principal axis with smallest inertial mass) normalised to 1. More...
 
vector< float > * fCalClustEigen3Y = nullptr
 
vector< float > * fCalClustEigen3Z = nullptr
 
vector< vector< UInt_t > > * fTrackG4PIndices = nullptr
 
vector< vector< UInt_t > > * fVertTrackIndices = nullptr
 
vector< vector< UInt_t > > * fVeeTrackIndices = nullptr
 
vector< vector< UInt_t > > * fCalTrackIndices = nullptr
 
vector< vector< Int_t > > * fVertTrackEnds = nullptr
 
vector< vector< Int_t > > * fVeeTrackEnds = nullptr
 
TBranch * b_TrkLenFwd = nullptr
 
TBranch * b_TrkLenBac = nullptr
 
TBranch * b_TrkMomBeg = nullptr
 
TBranch * b_TrkMomEnd = nullptr
 
TBranch * b_TrkVtxX = nullptr
 
TBranch * b_TrkVtxY = nullptr
 
TBranch * b_TrkVtxZ = nullptr
 
TBranch * b_TrkVtxT = nullptr
 
TBranch * b_TrkEndX = nullptr
 
TBranch * b_TrkEndY = nullptr
 
TBranch * b_TrkEndZ = nullptr
 
TBranch * b_TrkEndT = nullptr
 
TBranch * b_TrkVtxDirX = nullptr
 
TBranch * b_TrkVtxDirY = nullptr
 
TBranch * b_TrkVtxDirZ = nullptr
 
TBranch * b_TrkEndDirX = nullptr
 
TBranch * b_TrkEndDirY = nullptr
 
TBranch * b_TrkEndDirZ = nullptr
 
TBranch * b_TrkChiFwd = nullptr
 
TBranch * b_TrkChiBac = nullptr
 
TBranch * b_TrkNHits = nullptr
 
TBranch * b_TrackXBeg = nullptr
 
TBranch * b_TrackYBeg = nullptr
 
TBranch * b_TrackZBeg = nullptr
 
TBranch * b_TrackCurvBeg = nullptr
 
TBranch * b_TrackPhiBeg = nullptr
 
TBranch * b_TrackLambBeg = nullptr
 
TBranch * b_TrackParEnd = nullptr
 
TBranch * b_TrackXEnd = nullptr
 
TBranch * b_TrackYEnd = nullptr
 
TBranch * b_TrackZEnd = nullptr
 
TBranch * b_TrackCurvEnd = nullptr
 
TBranch * b_TrackPhiEnd = nullptr
 
TBranch * b_TrackLambEnd = nullptr
 
TBranch * b_TrkCovMat1Beg = nullptr
 
TBranch * b_TrkCovMat2Beg = nullptr
 
TBranch * b_TrkCovMat3Beg = nullptr
 
TBranch * b_TrkCovMat4Beg = nullptr
 
TBranch * b_TrkCovMat5Beg = nullptr
 
TBranch * b_TrkCovMat6Beg = nullptr
 
TBranch * b_TrkCovMat7Beg = nullptr
 
TBranch * b_TrkCovMat8Beg = nullptr
 
TBranch * b_TrkCovMat9Beg = nullptr
 
TBranch * b_TrkCovMat10Beg = nullptr
 
TBranch * b_TrkCovMat11Beg = nullptr
 
TBranch * b_TrkCovMat12Beg = nullptr
 
TBranch * b_TrkCovMat13Beg = nullptr
 
TBranch * b_TrkCovMat14Beg = nullptr
 
TBranch * b_TrkCovMat15Beg = nullptr
 
TBranch * b_TrkCovMat1End = nullptr
 
TBranch * b_TrkCovMat2End = nullptr
 
TBranch * b_TrkCovMat3End = nullptr
 
TBranch * b_TrkCovMat4End = nullptr
 
TBranch * b_TrkCovMat5End = nullptr
 
TBranch * b_TrkCovMat6End = nullptr
 
TBranch * b_TrkCovMat7End = nullptr
 
TBranch * b_TrkCovMat8End = nullptr
 
TBranch * b_TrkCovMat9End = nullptr
 
TBranch * b_TrkCovMat10End = nullptr
 
TBranch * b_TrkCovMat11End = nullptr
 
TBranch * b_TrkCovMat12End = nullptr
 
TBranch * b_TrkCovMat13End = nullptr
 
TBranch * b_TrkCovMat14End = nullptr
 
TBranch * b_TrkCovMat15End = nullptr
 
TBranch * b_VeeVtxX = nullptr
 
TBranch * b_VeeVtxY = nullptr
 
TBranch * b_VeeVtxZ = nullptr
 
TBranch * b_VeeVtxT = nullptr
 
TBranch * b_VeeVtxCovar11 = nullptr
 
TBranch * b_VeeVtxCovar12 = nullptr
 
TBranch * b_VeeVtxCovar13 = nullptr
 
TBranch * b_VeeVtxCovar21 = nullptr
 
TBranch * b_VeeVtxCovar22 = nullptr
 
TBranch * b_VeeVtxCovar23 = nullptr
 
TBranch * b_VeeVtxCovar31 = nullptr
 
TBranch * b_VeeVtxCovar32 = nullptr
 
TBranch * b_VeeVtxCovar33 = nullptr
 
TBranch * b_VeePxKshort = nullptr
 
TBranch * b_VeePyKshort = nullptr
 
TBranch * b_VeePzKshort = nullptr
 
TBranch * b_VeeEKshort = nullptr
 
TBranch * b_VeePxLamb1 = nullptr
 
TBranch * b_VeePyLamb1 = nullptr
 
TBranch * b_VeePzLamb1 = nullptr
 
TBranch * b_VeeELamb1 = nullptr
 
TBranch * b_VeePxLamb2 = nullptr
 
TBranch * b_VeePyLamb2 = nullptr
 
TBranch * b_VeePzLamb2 = nullptr
 
TBranch * b_VeeELamb2 = nullptr
 
TBranch * b_VeeChisqr = nullptr
 
TBranch * b_VtxX = nullptr
 
TBranch * b_VtxY = nullptr
 
TBranch * b_VtxZ = nullptr
 
TBranch * b_VtxT = nullptr
 
TBranch * b_VtxCovar11 = nullptr
 
TBranch * b_VtxCovar12 = nullptr
 
TBranch * b_VtxCovar13 = nullptr
 
TBranch * b_VtxCovar21 = nullptr
 
TBranch * b_VtxCovar22 = nullptr
 
TBranch * b_VtxCovar23 = nullptr
 
TBranch * b_VtxCovar31 = nullptr
 
TBranch * b_VtxCovar32 = nullptr
 
TBranch * b_VtxCovar33 = nullptr
 
TBranch * b_CalClustX = nullptr
 
TBranch * b_CalClustY = nullptr
 
TBranch * b_CalClustZ = nullptr
 
TBranch * b_CalClustT = nullptr
 
TBranch * b_CalClustEnergy = nullptr
 
TBranch * b_CalClustEnergyError = nullptr
 
TBranch * b_CalClustTdiff = nullptr
 
TBranch * b_CalClustEllip = nullptr
 
TBranch * b_CalClustR1 = nullptr
 
TBranch * b_CalClustR2 = nullptr
 
TBranch * b_CalClustR3 = nullptr
 
TBranch * b_CalClustVol = nullptr
 
TBranch * b_CalClustWidth = nullptr
 
TBranch * b_CalClustTheta = nullptr
 
TBranch * b_CalClustPhi = nullptr
 
TBranch * b_CalClustEigen1X = nullptr
 
TBranch * b_CalClustEigen1Y = nullptr
 
TBranch * b_CalClustEigen1Z = nullptr
 
TBranch * b_CalClustEigen2X = nullptr
 
TBranch * b_CalClustEigen2Y = nullptr
 
TBranch * b_CalClustEigen2Z = nullptr
 
TBranch * b_CalClustEigen3X = nullptr
 
TBranch * b_CalClustEigen3Y = nullptr
 
TBranch * b_CalClustEigen3Z = nullptr
 
TBranch * b_TrackG4PIndices = nullptr
 
TBranch * b_VertTrackIndices = nullptr
 
TBranch * b_VeeTrackIndices = nullptr
 
TBranch * b_CalTrackIndices = nullptr
 
TBranch * b_VertTrackEnds = nullptr
 
TBranch * b_VeeTrackEnds = nullptr
 
TBranch * b_TrkIonizFwd = nullptr
 
TBranch * b_TrkIonizBac = nullptr
 
TBranch * b_TrkChgFwd = nullptr
 
TBranch * b_TrkChgBac = nullptr
 
- Protected Attributes inherited from garana::RecoTree
vector< vector< UInt_t > > * fTrackG4PIndices = nullptr
 
vector< vector< UInt_t > > * fVertTrackIndices = nullptr
 
vector< vector< UInt_t > > * fVeeTrackIndices = nullptr
 
vector< vector< UInt_t > > * fCalClusterTrackIndices = nullptr
 
vector< vector< UInt_t > > * fCalClusterG4Indices = nullptr
 
TBranch * b_TrackG4PIndices = nullptr
 
TBranch * b_VertTrackIndices = nullptr
 
TBranch * b_VeeTrackIndices = nullptr
 
TBranch * b_CalClusterTrackIndices = nullptr
 
TBranch * b_CalClusterG4Indices = nullptr
 
- Protected Attributes inherited from garana::TreeReader
const std::string treename
 
char fOpt = 'r'
 
TTree * fTreeIn = nullptr
 pointer to the analyzed TTree or TChain More...
 
UInt_t fCurrentEntry = UINT_MAX
 
TBranch * b_Event = nullptr
 
Int_t fEvent = -1
 event number for tree entry More...
 

Detailed Description

Definition at line 16 of file MillRecoTree.h.

Member Enumeration Documentation

enum garana::MillRecoTree::RecoBranch
private
Enumerator
kEvent 
kTracks 
kVees 
kVertices 
kCalClusters 
kVertTrackEnds 
kVeeTrackEnds 

Definition at line 37 of file MillRecoTree.h.

Constructor & Destructor Documentation

garana::MillRecoTree::MillRecoTree ( )
inline

Definition at line 20 of file MillRecoTree.h.

20 {};
MillRecoTree::MillRecoTree ( TTree *  treeIn,
TTree *  treeOut 
)

Definition at line 20 of file MillRecoTree.cxx.

21 {
22  fRecoIn = new StructuredRecoTree(treeIn);
23  fTreeIn = treeOut;
24  fOpt='w';
25  this->VerifyBranches();
26  this->SetVecs();
27  this->SetBranchAddresses();
28  this->MillTrees();
29 
30 }//constructor()
void MillTrees() override
main method
StructuredRecoTree * fRecoIn
points to input structured recoTree we are flattening
Definition: MillRecoTree.h:33
TTree * fTreeIn
pointer to the analyzed TTree or TChain
Definition: TreeReader.h:51
bool SetBranchAddresses() override
bool VerifyBranches() override

Member Function Documentation

void MillRecoTree::FillCaloCluster ( )
private

Definition at line 292 of file MillRecoTree.cxx.

292  {
293 
294  for(size_t iclust=0; iclust<fRecoIn->NCalCluster(); iclust++){
295  fCalClustX->push_back(fRecoIn->CalClustPosition(iclust)->X());
296  fCalClustY->push_back(fRecoIn->CalClustPosition(iclust)->Y());
297  fCalClustZ->push_back(fRecoIn->CalClustPosition(iclust)->Z());
298  fCalClustT->push_back(fRecoIn->CalClustPosition(iclust)->T());
299  fCalClustEnergy->push_back(fRecoIn->CalClustEnergy(iclust));
300  fCalClustEnergyError->push_back(fRecoIn->CalClustEnergyError(iclust));
301  fCalClustTdiff->push_back(fRecoIn->CalClustTimeDifference(iclust));
302  fCalClustEllip->push_back(fRecoIn->CalClustShape(iclust)[0]);
303  fCalClustR1->push_back(fRecoIn->CalClustShape(iclust)[1]);
304  fCalClustR2->push_back(fRecoIn->CalClustShape(iclust)[2]);
305  fCalClustR3->push_back(fRecoIn->CalClustShape(iclust)[3]);
306  fCalClustVol->push_back(fRecoIn->CalClustShape(iclust)[4]);
307  fCalClustWidth->push_back(fRecoIn->CalClustShape(iclust)[5]);
308  fCalClustTheta->push_back(fRecoIn->CalClustTheta(iclust));
309  fCalClustPhi->push_back(fRecoIn->CalClustPhi(iclust));
310  fCalClustEigen1X->push_back(fRecoIn->CalClustEigenVecs(iclust)->at(0).X());
311  fCalClustEigen1Y->push_back(fRecoIn->CalClustEigenVecs(iclust)->at(0).Y());
312  fCalClustEigen1Z->push_back(fRecoIn->CalClustEigenVecs(iclust)->at(0).Z());
313  fCalClustEigen2X->push_back(fRecoIn->CalClustEigenVecs(iclust)->at(1).X());
314  fCalClustEigen2Y->push_back(fRecoIn->CalClustEigenVecs(iclust)->at(1).Y());
315  fCalClustEigen2Z->push_back(fRecoIn->CalClustEigenVecs(iclust)->at(1).Z());
316  fCalClustEigen3X->push_back(fRecoIn->CalClustEigenVecs(iclust)->at(2).X());
317  fCalClustEigen3Y->push_back(fRecoIn->CalClustEigenVecs(iclust)->at(2).Y());
318  fCalClustEigen3Z->push_back(fRecoIn->CalClustEigenVecs(iclust)->at(2).Z());
319  }
320 }
vector< float > * fCalClustEigen1X
Eigenvectors of the cluster in ascending order (principal axis with smallest inertial mass) normalise...
Definition: FlatRecoTree.h:236
vector< float > * fCalClustZ
z-position of the cluster [cm]
Definition: FlatRecoTree.h:223
vector< float > * fCalClustEigen3X
Eigenvectors of the cluster in ascending order (principal axis with smallest inertial mass) normalise...
Definition: FlatRecoTree.h:242
vector< float > * fCalClustEigen2X
Eigenvectors of the cluster in ascending order (principal axis with smallest inertial mass) normalise...
Definition: FlatRecoTree.h:239
vector< float > * fCalClustR3
cluster shape parameter r3
Definition: FlatRecoTree.h:231
const float CalClustTheta(const size_t &icluster) const override
vector< float > * fCalClustEigen3Y
Definition: FlatRecoTree.h:243
vector< float > * fCalClustX
x-position of the cluster [cm]
Definition: FlatRecoTree.h:221
StructuredRecoTree * fRecoIn
points to input structured recoTree we are flattening
Definition: MillRecoTree.h:33
vector< float > * fCalClustEllip
cluster shape parameter ellipsoid
Definition: FlatRecoTree.h:228
vector< float > * fCalClustEigen1Z
Definition: FlatRecoTree.h:238
vector< float > * fCalClustTheta
intrasic direction of the cluster theta
Definition: FlatRecoTree.h:234
vector< float > * fCalClustEigen2Y
Definition: FlatRecoTree.h:240
const float * CalClustShape(const size_t &icluster) const override
const TLorentzVector * CalClustPosition(const size_t &icluster) const override
vector< float > * fCalClustTdiff
time difference between the first and last layer of the cluster [ns]
Definition: FlatRecoTree.h:227
const size_t NCalCluster() const override
number of ECal clusters in this event
vector< float > * fCalClustEigen3Z
Definition: FlatRecoTree.h:244
const vector< TVector3 > * CalClustEigenVecs(const size_t &icluster) const override
vector< float > * fCalClustWidth
cluster shape parameter width
Definition: FlatRecoTree.h:233
vector< float > * fCalClustR2
cluster shape parameter r2
Definition: FlatRecoTree.h:230
const float CalClustEnergy(const size_t &icluster) const override
reconstructed ECal cluster energy
vector< float > * fCalClustPhi
intrasic direction of the cluster phi
Definition: FlatRecoTree.h:235
vector< float > * fCalClustEigen2Z
Definition: FlatRecoTree.h:241
const float CalClustTimeDifference(const size_t &icluster) const override
vector< float > * fCalClustEnergy
energy of the ECal cluster [GeV]
Definition: FlatRecoTree.h:225
const float CalClustEnergyError(const size_t &icluster) const override
vector< float > * fCalClustT
time of the cluster [ns]
Definition: FlatRecoTree.h:224
vector< float > * fCalClustEnergyError
uncertainty of the cluster energy [GeV]
Definition: FlatRecoTree.h:226
const float CalClustPhi(const size_t &icluster) const override
vector< float > * fCalClustEigen1Y
Definition: FlatRecoTree.h:237
vector< float > * fCalClustVol
cluster shape parameter volume
Definition: FlatRecoTree.h:232
vector< float > * fCalClustY
y-position of the cluster [cm]
Definition: FlatRecoTree.h:222
vector< float > * fCalClustR1
cluster shape parameter r1
Definition: FlatRecoTree.h:229
void MillRecoTree::FillTrack ( )
private

Definition at line 139 of file MillRecoTree.cxx.

139  {
140  for(size_t itrk=0; itrk<fRecoIn->NTrack(); itrk++){
141 
142  fTrkLenFwd ->push_back(fRecoIn->TrackLenFwd(itrk));
143  fTrkLenBac ->push_back(fRecoIn->TrackLenBkd(itrk));
144  fTrkMomBeg ->push_back(fRecoIn->TrackMomBeg(itrk)->Mag());
145  fTrkMomEnd ->push_back(fRecoIn->TrackMomEnd(itrk)->Mag());
146 
147  fTrkVtxX ->push_back(fRecoIn->TrackVertex(itrk)->X());
148  fTrkVtxY ->push_back(fRecoIn->TrackVertex(itrk)->Y());
149  fTrkVtxZ ->push_back(fRecoIn->TrackVertex(itrk)->Z());
150  fTrkVtxT ->push_back(fRecoIn->TrackVertex(itrk)->T());
151  fTrkEndX ->push_back(fRecoIn->TrackEnd(itrk)->X());
152  fTrkEndY ->push_back(fRecoIn->TrackEnd(itrk)->Y());
153  fTrkEndZ ->push_back(fRecoIn->TrackEnd(itrk)->Z());
154  fTrkEndT ->push_back(fRecoIn->TrackEnd(itrk)->T());
155 
156  fTrkVtxDirX ->push_back(fRecoIn->TrackVtxDirectionX(itrk));
157  fTrkVtxDirY ->push_back(fRecoIn->TrackVtxDirectionY(itrk));
158  fTrkVtxDirZ ->push_back(fRecoIn->TrackVtxDirectionZ(itrk));
159  fTrkEndDirX ->push_back(fRecoIn->TrackEndDirectionX(itrk));
160  fTrkEndDirY ->push_back(fRecoIn->TrackEndDirectionY(itrk));
161  fTrkEndDirZ ->push_back(fRecoIn->TrackEndDirectionZ(itrk));
162 
163  fTrkChiFwd ->push_back(fRecoIn->TrackChiSqrFwd(itrk) );
164  fTrkChiBac ->push_back(fRecoIn->TrackChiSqrBkd(itrk));
165  fTrkNHits ->push_back(fRecoIn->NTrackHit(itrk));
166 
167  float trackpars[5], trackcovar[15];
168  fRecoIn->TrackParBeg(itrk,trackpars);
169 
170  fTrackXBeg ->push_back(fRecoIn->TrackVertex(itrk)->X());
171  fTrackYBeg ->push_back(trackpars[0]);
172  fTrackZBeg ->push_back(trackpars[1]);
173  fTrackCurvBeg->push_back(trackpars[2]);
174  fTrackPhiBeg ->push_back(trackpars[3]);
175  fTrackLambBeg->push_back(trackpars[4]);
176 
177  fRecoIn->TrackParEnd(itrk,trackpars);
178  fTrackXEnd ->push_back(fRecoIn->TrackEnd(itrk)->X());
179  fTrackYEnd ->push_back(trackpars[0]);
180  fTrackZEnd ->push_back(trackpars[1]);
181  fTrackCurvEnd ->push_back(trackpars[2]);
182  fTrackPhiEnd ->push_back(trackpars[3]);
183  fTrackLambEnd ->push_back(trackpars[4]);
184 
185  fRecoIn->TrackCovarBeg(itrk,trackcovar);
186  fTrkCovMat1Beg ->push_back(trackcovar[0]);
187  fTrkCovMat2Beg ->push_back(trackcovar[1]);
188  fTrkCovMat3Beg ->push_back(trackcovar[2]);
189  fTrkCovMat4Beg ->push_back(trackcovar[3]);
190  fTrkCovMat5Beg ->push_back(trackcovar[4]);
191  fTrkCovMat6Beg ->push_back(trackcovar[5]);
192  fTrkCovMat7Beg ->push_back(trackcovar[6]);
193  fTrkCovMat8Beg ->push_back(trackcovar[7]);
194  fTrkCovMat9Beg ->push_back(trackcovar[8]);
195  fTrkCovMat10Beg->push_back(trackcovar[9]);
196  fTrkCovMat11Beg->push_back(trackcovar[10]);
197  fTrkCovMat12Beg->push_back(trackcovar[11]);
198  fTrkCovMat13Beg->push_back(trackcovar[12]);
199  fTrkCovMat14Beg->push_back(trackcovar[13]);
200  fTrkCovMat15Beg->push_back(trackcovar[14]);
201 
202  fRecoIn->TrackCovarEnd(itrk,trackcovar);
203  fTrkCovMat1End ->push_back(trackcovar[0]);
204  fTrkCovMat2End ->push_back(trackcovar[1]);
205  fTrkCovMat3End ->push_back(trackcovar[2]);
206  fTrkCovMat4End ->push_back(trackcovar[3]);
207  fTrkCovMat5End ->push_back(trackcovar[4]);
208  fTrkCovMat6End ->push_back(trackcovar[5]);
209  fTrkCovMat7End ->push_back(trackcovar[6]);
210  fTrkCovMat8End ->push_back(trackcovar[7]);
211  fTrkCovMat9End ->push_back(trackcovar[8]);
212  fTrkCovMat10End->push_back(trackcovar[9]);
213  fTrkCovMat11End->push_back(trackcovar[10]);
214  fTrkCovMat12End->push_back(trackcovar[11]);
215  fTrkCovMat13End->push_back(trackcovar[12]);
216  fTrkCovMat14End->push_back(trackcovar[13]);
217  fTrkCovMat15End->push_back(trackcovar[14]);
218 
219  fTrkIonizFwd->push_back(fRecoIn->TrackIonizFwd(itrk));
220  fTrkIonizBac->push_back(fRecoIn->TrackIonizBkd(itrk));
221  fTrkChgFwd->push_back(fRecoIn->TrackChgFwd(itrk));
222  fTrkChgBac->push_back(fRecoIn->TrackChgBkd(itrk));
223 
224  //FixMe fill associations
225  //fRecoIn->GetTrackG4PIndices(itrk,fTrackG4PIndices);
226 
227  }//for track entries
228 }
const float TrackIonizBkd(const size_t &itrack) const override
track average ionization rate from backward fit
vector< float > * fTrkVtxDirZ
Definition: FlatRecoTree.h:119
const float TrackVtxDirectionZ(const size_t &itrack) const override
z-direction cosine at track vertex
vector< float > * fTrkLenBac
length of the track in cm from backwards fit
Definition: FlatRecoTree.h:105
vector< float > * fTrkCovMat8Beg
Definition: FlatRecoTree.h:146
vector< float > * fTrkIonizBac
Definition: FlatRecoTree.h:171
vector< float > * fTrkCovMat7End
Definition: FlatRecoTree.h:160
vector< float > * fTrkVtxDirY
Definition: FlatRecoTree.h:118
vector< float > * fTrackPhiBeg
Track phi (par[3]) at beginning of track [rad].
Definition: FlatRecoTree.h:131
const float TrackEndDirectionZ(const size_t &itrack) const override
z-direction cosine at track end
vector< size_t > * fTrkNHits
number of hits
Definition: FlatRecoTree.h:125
vector< float > * fTrkCovMat10Beg
Definition: FlatRecoTree.h:148
vector< float > * fTrkCovMat1Beg
covariance matrix at beginning of track – assuming symmetry
Definition: FlatRecoTree.h:139
vector< float > * fTrkVtxZ
Definition: FlatRecoTree.h:110
vector< float > * fTrkChiFwd
chisquared forward fit
Definition: FlatRecoTree.h:123
vector< float > * fTrkCovMat3Beg
Definition: FlatRecoTree.h:141
vector< float > * fTrackYEnd
Track y-coord (par[0]) at end of track [cm].
Definition: FlatRecoTree.h:134
vector< float > * fTrkVtxY
Definition: FlatRecoTree.h:109
vector< float > * fTrkVtxX
track vertex position 4-vector cm,ns
Definition: FlatRecoTree.h:108
vector< int > * fTrkChgBac
Definition: FlatRecoTree.h:173
const float TrackVtxDirectionX(const size_t &itrack) const override
x-direction cosine at track vertex
vector< float > * fTrkCovMat14End
Definition: FlatRecoTree.h:167
vector< float > * fTrackXBeg
Track x-coord at beginning of track [cm].
Definition: FlatRecoTree.h:127
const float TrackLenFwd(const size_t &itrack) const override
track length from forward fit
vector< float > * fTrkVtxT
Definition: FlatRecoTree.h:111
vector< float > * fTrkCovMat10End
Definition: FlatRecoTree.h:163
vector< float > * fTrkCovMat4Beg
Definition: FlatRecoTree.h:142
StructuredRecoTree * fRecoIn
points to input structured recoTree we are flattening
Definition: MillRecoTree.h:33
vector< float > * fTrkEndY
Definition: FlatRecoTree.h:113
vector< float > * fTrkEndDirX
track end direction
Definition: FlatRecoTree.h:120
vector< float > * fTrkCovMat7Beg
Definition: FlatRecoTree.h:145
vector< float > * fTrkCovMat4End
Definition: FlatRecoTree.h:157
vector< float > * fTrkCovMat9End
Definition: FlatRecoTree.h:162
vector< float > * fTrkChiBac
chisquared backward fit
Definition: FlatRecoTree.h:124
vector< float > * fTrkCovMat15Beg
Definition: FlatRecoTree.h:153
vector< float > * fTrkCovMat12End
Definition: FlatRecoTree.h:165
vector< float > * fTrkVtxDirX
track vertex direction
Definition: FlatRecoTree.h:117
vector< float > * fTrkMomEnd
momentum of the track at the end in GeV/c
Definition: FlatRecoTree.h:107
vector< float > * fTrkCovMat11Beg
Definition: FlatRecoTree.h:149
vector< float > * fTrkCovMat9Beg
Definition: FlatRecoTree.h:147
const size_t NTrackHit(const size_t &itrack) const override
number of reconstructed hits used in track fit
vector< float > * fTrackPhiEnd
Track phi (par[3]) at end of track [rad].
Definition: FlatRecoTree.h:137
vector< float > * fTrkCovMat13End
Definition: FlatRecoTree.h:166
vector< float > * fTrkLenFwd
length of the track in cm from forwards fit
Definition: FlatRecoTree.h:104
vector< float > * fTrkCovMat5End
Definition: FlatRecoTree.h:158
const float TrackVtxDirectionY(const size_t &itrack) const override
y-direction cosine at track vertex
vector< float > * fTrkCovMat8End
Definition: FlatRecoTree.h:161
void TrackCovarBeg(const size_t &itrack, float pars[15]) const override
track fit covariance matrix (assume symmetry) at track&#39;s assumed start
vector< float > * fTrkEndX
track end position 4-vector cm,ns
Definition: FlatRecoTree.h:112
const int TrackChiSqrBkd(const size_t &itrack) const override
chi-squared of track fit in backward direction
vector< float > * fTrackZEnd
Track z-coord (par[1]) at end of track [cm].
Definition: FlatRecoTree.h:135
const TVector3 * TrackMomEnd(const size_t &itrack) const override
momentum 3-vector as track&#39;s assumed end point
vector< float > * fTrkCovMat5Beg
Definition: FlatRecoTree.h:143
vector< float > * fTrkEndDirZ
Definition: FlatRecoTree.h:122
vector< float > * fTrackXEnd
Track x-coord at end of track [cm].
Definition: FlatRecoTree.h:133
const size_t NTrack() const override
number of tracks in this event
vector< float > * fTrackCurvEnd
Track curvature (par[2]) at end of track [cm^-1].
Definition: FlatRecoTree.h:136
void TrackParBeg(const size_t &itrack, float pars[5]) const override
track fit parameters at the track&#39;s assumed start
vector< float > * fTrackYBeg
Track y-coord (par[0]) at beginning of track [cm].
Definition: FlatRecoTree.h:128
vector< float > * fTrkCovMat3End
Definition: FlatRecoTree.h:156
vector< float > * fTrkCovMat6Beg
Definition: FlatRecoTree.h:144
void TrackParEnd(const size_t &itrack, float pars[5]) const override
track fit parameters at the track&#39;s assumed end
const TLorentzVector * TrackEnd(const size_t &itrack) const override
4-position of track&#39;s assumed end point
vector< float > * fTrkIonizFwd
Definition: FlatRecoTree.h:170
vector< float > * fTrkEndZ
Definition: FlatRecoTree.h:114
vector< float > * fTrkEndDirY
Definition: FlatRecoTree.h:121
void TrackCovarEnd(const size_t &itrack, float pars[15]) const override
track fit covariance matrix (assume symmetry) at track&#39;s assumed end
vector< float > * fTrkCovMat15End
Definition: FlatRecoTree.h:168
vector< int > * fTrkChgFwd
Definition: FlatRecoTree.h:172
vector< float > * fTrkCovMat13Beg
Definition: FlatRecoTree.h:151
vector< float > * fTrkCovMat2Beg
Definition: FlatRecoTree.h:140
vector< float > * fTrackLambEnd
Track lambda (par[4]) at end of track [rad].
Definition: FlatRecoTree.h:138
vector< float > * fTrkCovMat12Beg
Definition: FlatRecoTree.h:150
vector< float > * fTrkCovMat1End
covariance matrix at end of track – assuming symmetry
Definition: FlatRecoTree.h:154
vector< float > * fTrackCurvBeg
Track curvature (par[2]) at beginning of track [cm^-1].
Definition: FlatRecoTree.h:130
vector< float > * fTrkCovMat14Beg
Definition: FlatRecoTree.h:152
vector< float > * fTrkCovMat2End
Definition: FlatRecoTree.h:155
const TVector3 * TrackMomBeg(const size_t &itrack) const override
momentum 3-vector as track&#39;s assumed start point
vector< float > * fTrkMomBeg
momentum of the track at the vertex in GeV/c
Definition: FlatRecoTree.h:106
const TLorentzVector * TrackVertex(const size_t &itrack) const override
4-position of track&#39;s assumed start point
const int TrackChgBkd(const size_t &itrack) const override
charge sign of track if current hypothesis wrong
vector< float > * fTrackZBeg
Track z-coord (par[1]) at beginning of track [cm].
Definition: FlatRecoTree.h:129
const float TrackEndDirectionY(const size_t &itrack) const override
y-direction cosine at track end
vector< float > * fTrkCovMat11End
Definition: FlatRecoTree.h:164
vector< float > * fTrackLambBeg
Track lambda (par[4]) at beginning of track [rad].
Definition: FlatRecoTree.h:132
const float TrackLenBkd(const size_t &itrack) const override
track length from backward fit
vector< float > * fTrkCovMat6End
Definition: FlatRecoTree.h:159
const float TrackEndDirectionX(const size_t &itrack) const override
x-direction cosine at track end
const int TrackChiSqrFwd(const size_t &itrack) const override
chi-squared of track fit in forward direction
vector< float > * fTrkEndT
Definition: FlatRecoTree.h:115
const float TrackIonizFwd(const size_t &itrack) const override
track average ionization rate from forward fit
const int TrackChgFwd(const size_t &itrack) const override
charge sign of track if current hypothesis correct
void MillRecoTree::FillVee ( )
private

Definition at line 252 of file MillRecoTree.cxx.

252  {
253 
254  for(size_t ivee=0; ivee<fRecoIn->NVee(); ivee++){
255 
256  fVeeVtxX->push_back(fRecoIn->VeeVertex(ivee)->X());
257  fVeeVtxY->push_back(fRecoIn->VeeVertex(ivee)->Y());
258  fVeeVtxZ->push_back(fRecoIn->VeeVertex(ivee)->Z());
259  fVeeVtxT->push_back(fRecoIn->VeeVertex(ivee)->T());
260  fVeeChisqr->push_back(fRecoIn->VeeChiSquared(ivee));
261 
262  float covar[3][3];
263  fRecoIn->VeeCovariance(ivee,covar);
264  fVeeVtxCovar11->push_back(covar[0][0]);
265  fVeeVtxCovar12->push_back(covar[0][1]);
266  fVeeVtxCovar13->push_back(covar[0][2]);
267  fVeeVtxCovar21->push_back(covar[1][0]);
268  fVeeVtxCovar22->push_back(covar[1][1]);
269  fVeeVtxCovar23->push_back(covar[1][2]);
270  fVeeVtxCovar31->push_back(covar[2][0]);
271  fVeeVtxCovar32->push_back(covar[2][1]);
272  fVeeVtxCovar33->push_back(covar[2][2]);
273 
274  fVeePxKshort->push_back(fRecoIn->VeeMomentumPerHypothesis(ivee)->at(0).Px());
275  fVeePyKshort->push_back(fRecoIn->VeeMomentumPerHypothesis(ivee)->at(0).Py());
276  fVeePzKshort->push_back(fRecoIn->VeeMomentumPerHypothesis(ivee)->at(0).Pz());
277  fVeeEKshort ->push_back(fRecoIn->VeeMomentumPerHypothesis(ivee)->at(0).E());
278 
279  fVeePxLamb1 ->push_back(fRecoIn->VeeMomentumPerHypothesis(ivee)->at(1).Px());
280  fVeePyLamb1 ->push_back(fRecoIn->VeeMomentumPerHypothesis(ivee)->at(1).Py());
281  fVeePzLamb1 ->push_back(fRecoIn->VeeMomentumPerHypothesis(ivee)->at(1).Pz());
282  fVeeELamb1 ->push_back(fRecoIn->VeeMomentumPerHypothesis(ivee)->at(1).E());
283 
284  fVeePxLamb2 ->push_back(fRecoIn->VeeMomentumPerHypothesis(ivee)->at(2).Px());
285  fVeePyLamb2 ->push_back(fRecoIn->VeeMomentumPerHypothesis(ivee)->at(2).Py());
286  fVeePzLamb2 ->push_back(fRecoIn->VeeMomentumPerHypothesis(ivee)->at(2).Pz());
287  fVeeELamb2 ->push_back(fRecoIn->VeeMomentumPerHypothesis(ivee)->at(2).E());
288 
289  }
290 }
vector< float > * fVeeVtxZ
z-position of vertex [cm]
Definition: FlatRecoTree.h:179
vector< float > * fVeeEKshort
Definition: FlatRecoTree.h:194
vector< float > * fVeePzLamb1
Definition: FlatRecoTree.h:197
StructuredRecoTree * fRecoIn
points to input structured recoTree we are flattening
Definition: MillRecoTree.h:33
vector< float > * fVeeVtxY
y-position of vertex [cm]
Definition: FlatRecoTree.h:178
vector< float > * fVeeELamb1
Definition: FlatRecoTree.h:198
vector< float > * fVeePxLamb1
four-momentum of vee, for Kshort hypothesis [GeV]
Definition: FlatRecoTree.h:195
vector< float > * fVeeVtxCovar31
Definition: FlatRecoTree.h:187
vector< float > * fVeeELamb2
Definition: FlatRecoTree.h:202
const vector< TLorentzVector > * VeeMomentumPerHypothesis(const size_t &ivee) const override
4-momentum for vee if it matches {Kshort, Lambda1, Lambda2}
vector< float > * fVeeVtxCovar13
Definition: FlatRecoTree.h:183
vector< float > * fVeeVtxCovar11
uncertainties in vertex position [cm]
Definition: FlatRecoTree.h:181
const TLorentzVector * VeeVertex(const size_t &ivee) const override
=============== Vee =======================
vector< float > * fVeePzKshort
Definition: FlatRecoTree.h:193
vector< float > * fVeePxLamb2
four-momentum of vee, for Kshort hypothesis [GeV]
Definition: FlatRecoTree.h:199
vector< float > * fVeeVtxCovar22
Definition: FlatRecoTree.h:185
vector< float > * fVeePzLamb2
Definition: FlatRecoTree.h:201
vector< float > * fVeeVtxX
x-position of vertex [cm]
Definition: FlatRecoTree.h:177
vector< float > * fVeeVtxCovar32
Definition: FlatRecoTree.h:188
vector< float > * fVeeVtxCovar33
Definition: FlatRecoTree.h:189
const float VeeChiSquared(const size_t &ivee) const override
const size_t NVee() const override
number of vees in this event
vector< float > * fVeePxKshort
four-momentum of vee, for Kshort hypothesis [GeV]
Definition: FlatRecoTree.h:191
void VeeCovariance(const size_t &ivee, float covar[][3]) const override
given a vee index, fill given position covariance matrix
vector< float > * fVeeVtxCovar21
Definition: FlatRecoTree.h:184
vector< float > * fVeeVtxCovar23
Definition: FlatRecoTree.h:186
vector< float > * fVeeVtxCovar12
Definition: FlatRecoTree.h:182
vector< float > * fVeePyKshort
Definition: FlatRecoTree.h:192
vector< float > * fVeeChisqr
chi-squared
Definition: FlatRecoTree.h:203
vector< float > * fVeePyLamb1
Definition: FlatRecoTree.h:196
vector< float > * fVeeVtxT
time of vertex [ns]
Definition: FlatRecoTree.h:180
vector< float > * fVeePyLamb2
Definition: FlatRecoTree.h:200
void MillRecoTree::FillVertex ( )
private

Definition at line 230 of file MillRecoTree.cxx.

230  {
231 
232  for(size_t ivtx=0; ivtx<fRecoIn->NVertex(); ivtx++) {
233  fVtxX->push_back(fRecoIn->GetVertex(ivtx)->X());
234  fVtxY->push_back(fRecoIn->GetVertex(ivtx)->Y());
235  fVtxZ->push_back(fRecoIn->GetVertex(ivtx)->Z());
236  fVtxT->push_back(fRecoIn->GetVertex(ivtx)->T());
237 
238  float covar[3][3];
239  fRecoIn->VertexCovariance(ivtx,covar);
240  fVtxCovar11->push_back(covar[0][0]);
241  fVtxCovar12->push_back(covar[0][1]);
242  fVtxCovar13->push_back(covar[0][2]);
243  fVtxCovar21->push_back(covar[1][0]);
244  fVtxCovar22->push_back(covar[1][1]);
245  fVtxCovar23->push_back(covar[1][2]);
246  fVtxCovar31->push_back(covar[2][0]);
247  fVtxCovar32->push_back(covar[2][1]);
248  fVtxCovar33->push_back(covar[2][2]);
249  }
250 }
vector< float > * fVtxY
y-position of vertex [cm]
Definition: FlatRecoTree.h:207
vector< float > * fVtxZ
z-position of vertex [cm]
Definition: FlatRecoTree.h:208
vector< float > * fVtxCovar31
Definition: FlatRecoTree.h:216
vector< float > * fVtxX
x-position of vertex [cm]
Definition: FlatRecoTree.h:206
StructuredRecoTree * fRecoIn
points to input structured recoTree we are flattening
Definition: MillRecoTree.h:33
vector< float > * fVtxCovar21
Definition: FlatRecoTree.h:213
const size_t NVertex() const override
number of vertices in this event
vector< float > * fVtxT
time of vertex [ns]
Definition: FlatRecoTree.h:209
vector< float > * fVtxCovar13
Definition: FlatRecoTree.h:212
void VertexCovariance(const size_t &ivertex, float covar[][3]) const override
given a vertex index, fill given position covariance matrix
vector< float > * fVtxCovar32
Definition: FlatRecoTree.h:217
vector< float > * fVtxCovar23
Definition: FlatRecoTree.h:215
const TLorentzVector * GetVertex(const size_t &ivertex) const override
vertex 4-position for vertex with index ivertex
vector< float > * fVtxCovar12
Definition: FlatRecoTree.h:211
vector< float > * fVtxCovar22
Definition: FlatRecoTree.h:214
vector< float > * fVtxCovar11
uncertainties in vertex position [cm]
Definition: FlatRecoTree.h:210
vector< float > * fVtxCovar33
Definition: FlatRecoTree.h:218
void MillRecoTree::MillTrees ( )
overridevirtual

main method

Implements garana::Mill.

Definition at line 33 of file MillRecoTree.cxx.

33  {
34 
35  if(!IsVerified()){
36  std::cerr << "WARNING(MillRecoTree::MillTrees): "
37  << "trying to mill trees that have not been verified"
38  << std::endl;
39  return;
40  }
41 
42  std::cout << "MillRecoTree: loop over " << fRecoIn->NEntries() << " gen entries" << std::endl;
43 
44  //loop over input genTree events (entries)
45  for(size_t ientry=0; ientry<fRecoIn->NEntries(); ientry++){
46 
47  ClearVecs(); //clear previous entry's data (if any)
48  fRecoIn->GetEntry(ientry);
49 
51  fEvent = fRecoIn->Event();
52  }
53 
54  if(branchToDrawOpt[kTracks]) {
55  FillTrack();
56  }
57 
59  FillVertex();
60  }
61 
62  if(branchToDrawOpt[kVees]) {
63  FillVee();
64  }
65 
68  }
69 
70  fTreeIn->Fill(); //actually our fTreeOut, but it's called fTreeIn in FlatRecoTree.h, fill once per event
71  }//for genTree entries
72 
73  fTreeIn->Write();
74 
75 }//Mill()
StructuredRecoTree * fRecoIn
points to input structured recoTree we are flattening
Definition: MillRecoTree.h:33
TTree * fTreeIn
pointer to the analyzed TTree or TChain
Definition: TreeReader.h:51
std::map< RecoBranch, bool > branchToDrawOpt
Definition: MillRecoTree.h:57
bool IsVerified() const
Definition: Mill.h:28
Int_t Event() const
Definition: TreeReader.cxx:30
virtual void GetEntry(const UInt_t &ientry)
Definition: TreeReader.cxx:39
Int_t fEvent
event number for tree entry
Definition: TreeReader.h:55
size_t NEntries() const
Definition: TreeReader.cxx:35
QTextStream & endl(QTextStream &s)
bool MillRecoTree::VerifyBranches ( )
overrideprivatevirtual

Implements garana::Mill.

Definition at line 77 of file MillRecoTree.cxx.

77  {
78 
79  // get list of branches and check it matches what we expect
80  const TObjArray* branches = fRecoIn->GetBranchList();
81  std::cout << "got ObjArray of branches from fTreeIn" << std::endl;
82  try {
83  if(!branches || branches->GetEntries()==0 )
84  throw branches;
85  }
86  catch(TObjArray* branches){
87  std::cerr << "ERROR(MillRecoTree::VerifyBranches): no branches found in passed input tree"
88  << std::endl;
89  return false;
90  }
91 
92  if(branches->GetEntriesFast() != (Int_t)nameToRecoBranch.size())
93  std::cout << "WARNING(MillRecoTree::VerifyBranches): Mismatch in number of branches (expected "
94  << nameToRecoBranch.size() << " but found " << branches->GetEntriesFast()
95  << ")" << std::endl;
96  else
97  std::cout << "found genTree with " << branches->GetEntriesFast() << " branches" << std::endl;
98 
99  // loop over branches
100  TIter next(branches);
101  TBranch* branch = nullptr;
102  while( (branch=(TBranch*)next())) {
103 
104  // check if branch is expected
105  if(nameToRecoBranch.find(CharStarToString(branch->GetFullName()))!=nameToRecoBranch.end()) {
106 
107  std::cout << " chopping branch '" << branch->GetFullName() << "'" << std::endl;
108 
109  if(nameToRecoBranch[CharStarToString(branch->GetFullName())] == kEvent)
110  branchToDrawOpt[kEvent] = true;
111 
112  if(nameToRecoBranch[CharStarToString(branch->GetFullName())] == kTracks)
113  branchToDrawOpt[kTracks] = true;
114 
115  if(nameToRecoBranch[CharStarToString(branch->GetFullName())] == kVertices)
116  branchToDrawOpt[kVertices] = true;
117 
118  if(nameToRecoBranch[CharStarToString(branch->GetFullName())] == kVees)
119  branchToDrawOpt[kVees] = true;
120 
121  if(nameToRecoBranch[CharStarToString(branch->GetFullName())] == kCalClusters)
123 
124  }//endif known branch
125 
126  else{
127  std::cout << "WARNING(MillRecoTree): ignoring unknown branch '"
128  << branch->GetFullName() << "'" << std::endl;
129  }//else
130 
131  }//for branches
132 
133  fIsVerified = true;
134  return true;
135 
136 }//VerifyBranches()
StructuredRecoTree * fRecoIn
points to input structured recoTree we are flattening
Definition: MillRecoTree.h:33
std::map< std::string, RecoBranch > nameToRecoBranch
Definition: MillRecoTree.h:47
std::string CharStarToString(const char *cstr)
Definition: Mill.cxx:12
std::map< RecoBranch, bool > branchToDrawOpt
Definition: MillRecoTree.h:57
bool fIsVerified
Definition: Mill.h:33
const TObjArray * GetBranchList() const
Definition: TreeReader.cxx:47
QTextStream & endl(QTextStream &s)

Member Data Documentation

std::map<RecoBranch,bool> garana::MillRecoTree::branchToDrawOpt
private
Initial value:
= {
{kEvent , false},
{kTracks , false},
{kVees , false},
{kVertices , false},
{kCalClusters , false},
{kVertTrackEnds, false},
{kVeeTrackEnds , false}
}

Definition at line 57 of file MillRecoTree.h.

StructuredRecoTree* garana::MillRecoTree::fRecoIn = nullptr
private

points to input structured recoTree we are flattening

Definition at line 33 of file MillRecoTree.h.

std::map<std::string,RecoBranch> garana::MillRecoTree::nameToRecoBranch
private
Initial value:
= {
{"Event", kEvent, },
{"Tracks", kTracks },
{"Vees", kVees },
{"Vertices", kVertices },
{"CalClusters", kCalClusters },
{"VertTrackEnds", kVertTrackEnds},
{"VeeTrackEnds ", kVeeTrackEnds }
}

Definition at line 47 of file MillRecoTree.h.


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