hpstr
The Heavy Photon Search Toolkit for Reconstruction (hpstr) provides an interface to physics data from the HPS experiment saved in the LCIO format and converts it into an ROOT based format.
Loading...
Searching...
No Matches
AnaHelpers.h
Go to the documentation of this file.
1
6
7#include <iostream>
8
9#include "TMatrix.h"
10#include "TVector3.h"
11#include "TRotation.h"
12#include "TMatrixDSym.h"
13#include "TMatrixTSym.h"
14
15// HPSTR
16#include "Track.h"
17#include "TrackerHit.h"
18#include "RawSvtHit.h"
19#include "Particle.h"
20#include "Vertex.h"
21#include "CalCluster.h"
22#include "CalHit.h"
28
29 public :
30
31 AnaHelpers();
32
39 TVector3 rotateToSvtFrame(TVector3 v);
40
47 TVector3 rotationToSvtFrame(const TVector3& v);
48
55 TMatrixDSym rotateToSvtFrame(TMatrixDSym cov) {
56 return cov.Similarity(*rotSvt_sym);
57 }
58
65 TMatrixDSym rotateToHpsFrame(TMatrixDSym cov) {
66 return cov.SimilarityT(*rotSvt_sym);
67 }
68
76 void InnermostLayerCheck(Track* trk, bool& foundL1, bool& foundL2);
77
78 std::vector<int> GetTrackHitLayers(Track* trk);
79
89 bool GetParticlesFromVtx(Vertex* vtx, Particle*& ele, Particle*& pos);
90
102 bool MatchToGBLTracks(int ele_id, int pos_id, Track* & ele_trk, Track* & pos_trk, std::vector<Track*>& trks);
103
104
105 bool GetParticlesFromVtxAndParticleList(std::vector<Particle*>& parts, Vertex* vtx, Particle*& ele, Particle*& pos);
106 bool IsECalFiducial(CalCluster* clu);
108 Particle* GetParticleFromCluster(std::vector<Particle*>& parts,CalCluster* cluster);
109 static std::string getFileName(std::string filePath, bool withExtension);
110 Track* GetTrackFromParticle(std::vector<Track*>& trks,Particle* part);
111
112
113 private:
114
115 const double SVT_ANGLE = -30.5e-3;
116 TRotation rotSvt;
117 TMatrixDSym* rotSvt_sym;
118 bool debug_{false};
119};
120
121
Class that encapsulate calorimeter hit information.
Class used to encapsulate information about a particle.
Class used to encapsulate raw svt hit information.
Class used to encapsulate track information.
Class used to encapsulate tracker hit information.
Class used to encapsulate Vertex information.
TRotation rotSvt
description
Definition AnaHelpers.h:116
void InnermostLayerCheck(Track *trk, bool &foundL1, bool &foundL2)
Checks if a track has a 3d hit on innermost layer and second innermost layer.
TMatrixDSym rotateToHpsFrame(TMatrixDSym cov)
brief description
Definition AnaHelpers.h:65
TMatrixDSym * rotSvt_sym
description
Definition AnaHelpers.h:117
std::vector< int > GetTrackHitLayers(Track *trk)
TVector3 rotationToSvtFrame(const TVector3 &v)
Rotate a vector from HPS to SVT Frame via TRotation.
Particle * GetParticleFromCluster(std::vector< Particle * > &parts, CalCluster *cluster)
bool MatchToGBLTracks(int ele_id, int pos_id, Track *&ele_trk, Track *&pos_trk, std::vector< Track * > &trks)
brief description
bool IsECalFiducial(CalCluster *clu)
const double SVT_ANGLE
Angle between SVT system and HPS coordinates.
Definition AnaHelpers.h:115
TVector3 rotateToSvtFrame(TVector3 v)
Rotate a vector from HPS to SVT Frame (i.e. for position/momentum rotation).
bool GetParticlesFromVtxAndParticleList(std::vector< Particle * > &parts, Vertex *vtx, Particle *&ele, Particle *&pos)
TMatrixDSym rotateToSvtFrame(TMatrixDSym cov)
Rotate a matrix from HPS to SVT Frame (i.e. for covariance matrix rotation).
Definition AnaHelpers.h:55
double GetClusterCoplanarity(CalCluster *cl1, CalCluster *cl2)
static std::string getFileName(std::string filePath, bool withExtension)
Definition AnaHelpers.cxx:5
bool GetParticlesFromVtx(Vertex *vtx, Particle *&ele, Particle *&pos)
Get the Particles From Vtx object.
Track * GetTrackFromParticle(std::vector< Track * > &trks, Particle *part)
bool debug_
description
Definition AnaHelpers.h:118
Definition Track.h:32