1 #ifndef _ANA_SortMixVertex__H_
2 #define _ANA_SortMixVertex__H_
4 #include <ktracker/SRawEvent.h>
5 #include <ktracker/SRecEvent.h>
9 #include <ktracker/GFField.h>
10 #include <ktracker/GFTrack.h>
46 std::string m_dir_out;
52 unsigned int m_n_evt_max;
68 virtual void Init(
const int run_id);
70 virtual void Analyze(
const int run_id,
const std::vector<std::string> list_in);
74 virtual void SortTree(TTree* tree_to_sort);
76 virtual void DoVertex(TTree* inputtree,
const int run_id,
bool mix);
81 virtual void EmbedMCSignal(
char *file_mixed,
char* file_mcsignal);
85 std::string
Name()
const {
return m_name; }
87 void SetOutputDir(
const std::string dir_out) { m_dir_out = dir_out; }
89 void SetOutputDir(
const int dir_out) { m_dir_out = std::to_string(dir_out); }
94 void SetRunID(
const int run_id) { m_run_id = run_id; }
103 std::ofstream&
OFS() {
return m_ofs; }
105 TFile*
OFile() {
return m_file_out; }
Base class of all analysis modules.
float liveP
proton number corrsponding to RF+00 (pedestal corrected)
void SetNumEventsAnalyzed(const unsigned int n_evt)
Set the max number of events to be analyzed per run.
std::string GetOutputDir() const
Get the output directory.
std::vector< SRecTrack > pos_tracks_mix
void SetOutputDir(const std::string dir_out)
Set the output directory.
std::ofstream & OFS()
Get the ofstream object for output. Usable in Init(), AnalyzeEvent() and End() of each analysis modul...
AnaSortMixVertex(const std::string name="ana_mixvertex")
void Verbosity(const int verb)
Set the verbosity.
SRecEvent * GetRecEvent()
Get a pointer to SRecEvent. Usable in AnalyzeEvent().
void UseRawEvent(const bool value)
Turn on/off the use of SRawEvent.
std::string Name() const
Get the name of analysis module.
void SetDataset(const std::string ds)
Set the dataset to be analyzed.
void UseRecEvent(const bool value)
virtual void Init(const int run_id)
Function to initialize all variables for the 1st analysis step.
bool Dump_Like(SRecTrack *trk_pos, SRecTrack *trk_neg)
virtual void DoVertex(TTree *inputtree, const int run_id, bool mix)
std::vector< SRecTrack > neg_tracks_mix
SQGenFit::GFField * gfield_v2
SRawEvent * GetRawEvent()
Get a pointer to SRawEvent. Usable in AnalyzeEvent().
SRecEvent * recEvent_upstream_like
virtual void MixTracks(TTree *sorted_tree)
Mixing tracks from sorted_tree.
void SetRunID(const int run_id)
Set the run ID to be analyzed.
bool Target_Like(SRecTrack *trk_pos, SRecTrack *trk_neg)
bool UpStream_Like(SRecTrack *trk_pos, SRecTrack *trk_neg)
std::vector< SRecTrack > pos_tracks
void SetOutputDir(const int dir_out)
Set the output directory using the given integer (usually run ID).
virtual ~AnaSortMixVertex()
SRecEvent * recEvent_dump_like
int GetRunID() const
Get the run ID to be analyzed.
virtual void Analyze(const int run_id, const std::vector< std::string > list_in)
float rfp00c
RF+00 corrected for the pedestal.
SRecEvent * recEvent_target_like
void SetTargetPos(const int target_pos)
std::string GetDataset() const
Get the dataset to be analyzed.
std::vector< SRecTrack > neg_tracks
virtual void SortTree(TTree *tree_to_sort)
TFile * OFile()
Get the TFile object for output. Usable in Init(), AnalyzeEvent() and End() of each analysis module.
virtual void EmbedMCSignal(char *file_mixed, char *file_mcsignal)
MC preperation for embedding.
An SQ interface class to hold one event header.
An SQ interface class to hold a list of SQHit objects.