Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 3D TMS_Track class #57

Merged
merged 3 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ MKDIR_P := mkdir -p
# Library directory where we build to
LIB_DIR=../lib

TMS_OBJ = TMS_Bar.o TMS_Hit.o TMS_TrueHit.o TMS_Event.o TMS_TrueParticle.o TMS_EventViewer.o TMS_Reco.o TMS_Kalman.o TMS_TreeWriter.o TMS_ReadoutTreeWriter.o TMS_Manager.o TMS_Readout_Manager.o BField_Handler.o
TMS_OBJ = TMS_Bar.o TMS_Hit.o TMS_TrueHit.o TMS_Event.o TMS_Track.o TMS_TrueParticle.o TMS_EventViewer.o TMS_Reco.o TMS_Kalman.o TMS_TreeWriter.o TMS_ReadoutTreeWriter.o TMS_Manager.o TMS_Readout_Manager.o BField_Handler.o

# Our lovely collection of libs
LIB_OBJ = $(EDEP_LIBS) $(ROOT_LIBS)
Expand Down
6 changes: 6 additions & 0 deletions src/TMS_Track.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include "TMS_Track.h"

void TMS_Track::Print()
{
0x90; // TODO: add a function here
};
31 changes: 29 additions & 2 deletions src/TMS_Track.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
// General track class containing
#include "TMS_Hit.h"

#ifndef _TMS_TRACK_H_SEEN_
#define _TMS_TRACK_H_SEEN_

// General 3D-Track class
class TMS_Track {

public:
TMS_Track() //std::vector<TMS_Hit>& OneTrack, std::vector<TMS_Hit>& OtherTrack)
{
// TODO: Take first and last hits and do the maffs
0;
};
void Print();

double Start[3]; // Start point in x,y,z
double End[3]; // End point in x,y,z
double Direction[3]; // Unit vector in track direction
double Length;
double EnergyDeposit;
double EnergyRange;
double Time; // TODO: Fill this in a sensible way

double GetEnergyDeposit(){return EnergyDeposit;};
double GetEnergyRange(){return EnergyRange;};

std::vector<TMS_Hit*> Hits;
};


}
#endif