54 lines
868 B
C++
54 lines
868 B
C++
|
//
|
||
|
// TrackFinder.hpp
|
||
|
// TrackReconstruction
|
||
|
//
|
||
|
// Created by Baranyai David on 2018. 06. 07..
|
||
|
//
|
||
|
|
||
|
#ifndef TrackFinder_hpp
|
||
|
#define TrackFinder_hpp
|
||
|
|
||
|
#include <stdio.h>
|
||
|
#include <fstream>
|
||
|
#include <vector>
|
||
|
#include <string>
|
||
|
#include <sstream>
|
||
|
|
||
|
struct Hit
|
||
|
{
|
||
|
unsigned int ch_id;
|
||
|
unsigned int fine_ts;
|
||
|
unsigned int coarse_ts;
|
||
|
unsigned long ts;
|
||
|
unsigned int width;
|
||
|
unsigned int which_chamber;
|
||
|
std::string direction;
|
||
|
};
|
||
|
|
||
|
class TrackFinder
|
||
|
{
|
||
|
public:
|
||
|
TrackFinder();
|
||
|
~TrackFinder();
|
||
|
bool FindTrack();
|
||
|
void GetTrack(std::vector<Hit>&);
|
||
|
|
||
|
private:
|
||
|
void SortFile();
|
||
|
|
||
|
std::ifstream file;
|
||
|
std::string line;
|
||
|
|
||
|
int interval = 2000;
|
||
|
unsigned int iterator = 0;
|
||
|
|
||
|
bool istrackavailable = false;
|
||
|
|
||
|
Hit h;
|
||
|
|
||
|
std::vector<Hit> hits;
|
||
|
std::vector<Hit> track;
|
||
|
};
|
||
|
|
||
|
#endif /* TrackFinder_hpp */
|