Class Reference for E1039 Core & Analysis Software
AnaSortMixVertex Class Reference

Base class of all analysis modules. More...

#include </dev/shm/kenichi/update-github-e1039-doc/e1039-analysis/TrackMixingNMSU/src/AnaSortMixVertex.h>

+ Collaboration diagram for AnaSortMixVertex:

Public Member Functions

virtual ~AnaSortMixVertex ()
 
virtual void Init (const int run_id)
 Function to initialize all variables for the 1st analysis step. More...
 
virtual void End ()
 
virtual void Analyze (const int run_id, const std::vector< std::string > list_in)
 
 AnaSortMixVertex (const std::string name="ana_mixvertex")
 
virtual void SortTree (TTree *tree_to_sort)
 
virtual void MixTracks (TTree *sorted_tree)
 Mixing tracks from sorted_tree. More...
 
virtual void DoVertex (TTree *inputtree, const int run_id, bool mix)
 
bool Target_Like (SRecTrack *trk_pos, SRecTrack *trk_neg)
 
bool Dump_Like (SRecTrack *trk_pos, SRecTrack *trk_neg)
 
bool UpStream_Like (SRecTrack *trk_pos, SRecTrack *trk_neg)
 
virtual void EmbedMCSignal (char *file_mixed, char *file_mcsignal)
 MC preperation for embedding. More...
 
void SetTargetPos (const int target_pos)
 
std::string Name () const
 Get the name of analysis module. More...
 
void SetOutputDir (const std::string dir_out)
 Set the output directory. More...
 
void SetOutputDir (const int dir_out)
 Set the output directory using the given integer (usually run ID). More...
 
std::string GetOutputDir () const
 Get the output directory. More...
 
void SetDataset (const std::string ds)
 Set the dataset to be analyzed. More...
 
std::string GetDataset () const
 Get the dataset to be analyzed. More...
 
void SetRunID (const int run_id)
 Set the run ID to be analyzed. More...
 
int GetRunID () const
 Get the run ID to be analyzed. More...
 
void UseRawEvent (const bool value)
 Turn on/off the use of SRawEvent. More...
 
void UseRecEvent (const bool value)
 
void SetNumEventsAnalyzed (const unsigned int n_evt)
 Set the max number of events to be analyzed per run. More...
 
void Verbosity (const int verb)
 Set the verbosity. More...
 
int Verbosity () const
 
std::ofstream & OFS ()
 Get the ofstream object for output. Usable in Init(), AnalyzeEvent() and End() of each analysis module. More...
 
TFile * OFile ()
 Get the TFile object for output. Usable in Init(), AnalyzeEvent() and End() of each analysis module. More...
 

Protected Member Functions

SRawEventGetRawEvent ()
 Get a pointer to SRawEvent. Usable in AnalyzeEvent(). More...
 
SRecEventGetRecEvent ()
 Get a pointer to SRecEvent. Usable in AnalyzeEvent(). More...
 

Protected Attributes

TTree * ana_tree
 
TTree * sorted_tree
 
TTree * mixed_tree
 
TTree * save_sorted
 
TTree * save_mix
 
int runID
 
int m_target_pos
 
int spill_ID
 
int plus_spill_ID
 
int minus_spill_ID
 
int event_ID
 
int plus_event_ID
 
int minus_event_ID
 
float rfp00c
 RF+00 corrected for the pedestal. More...
 
float pot_p00
 
float liveP
 proton number corrsponding to RF+00 (pedestal corrected) More...
 
int DimMult
 
int occuD0
 
int occuD1
 
int occuD2
 
int occuD3p
 
int occuD3m
 
int TrkMult
 
int PosTrkMult
 
int NegTrkMult
 
int TargetPos
 
int fpga1
 
int fpga2
 
int fpga3
 
int fpga4
 
int fpga5
 
std::vector< SRecTrackpos_tracks
 
std::vector< SRecTrackneg_tracks
 
std::vector< SRecTrackpos_tracks_mix
 
std::vector< SRecTrackneg_tracks_mix
 
SRecEventrecEvent
 
SRecEventrecEvent_target_like
 
SRecEventrecEvent_dump_like
 
SRecEventrecEvent_upstream_like
 
SQGenFit::GFFieldgfield_v2
 
int plus_fpga1
 
int plus_occuD1
 
int plus_occuD2
 
int plus_occuD3p
 
int plus_occuD3m
 
int plus_TargetPos
 
float plus_rfp00c
 
float plus_pot_p00
 
float plus_liveP
 
int minus_fpga1
 
int minus_occuD1
 
int minus_occuD2
 
int minus_occuD3p
 
int minus_occuD3m
 
int minus_TargetPos
 
float minus_rfp00c
 
float minus_pot_p00
 
float minus_liveP
 

Detailed Description

Base class of all analysis modules.

Definition at line 42 of file AnaSortMixVertex.h.

Constructor & Destructor Documentation

◆ ~AnaSortMixVertex()

AnaSortMixVertex::~AnaSortMixVertex ( )
virtual

Definition at line 43 of file AnaSortMixVertex.cc.

◆ AnaSortMixVertex()

AnaSortMixVertex::AnaSortMixVertex ( const std::string  name = "ana_mixvertex")

Definition at line 26 of file AnaSortMixVertex.cc.

Member Function Documentation

◆ Analyze()

void AnaSortMixVertex::Analyze ( const int  run_id,
const std::vector< std::string >  list_in 
)
virtual

◆ DoVertex()

void AnaSortMixVertex::DoVertex ( TTree *  input_tree,
const int  run_id,
bool  mix_flag 
)
virtual

◆ Dump_Like()

bool AnaSortMixVertex::Dump_Like ( SRecTrack trk_pos,
SRecTrack trk_neg 
)

◆ EmbedMCSignal()

void AnaSortMixVertex::EmbedMCSignal ( char *  file_mixed,
char *  file_mcsignal 
)
virtual

MC preperation for embedding.

Creating TTree with mixed with mc signal embedded

Reading MC signal tree to be embedded

Get +ve tracks

Get -ve tracks

embed the mc events===

Definition at line 823 of file AnaSortMixVertex.cc.

References neg_tracks, and pos_tracks.

◆ End()

void AnaSortMixVertex::End ( )
virtual

Definition at line 267 of file AnaSortMixVertex.cc.

◆ GetDataset()

std::string AnaSortMixVertex::GetDataset ( ) const
inline

Get the dataset to be analyzed.

Definition at line 93 of file AnaSortMixVertex.h.

◆ GetOutputDir()

std::string AnaSortMixVertex::GetOutputDir ( ) const
inline

Get the output directory.

Definition at line 91 of file AnaSortMixVertex.h.

◆ GetRawEvent()

SRawEvent* AnaSortMixVertex::GetRawEvent ( )
inlineprotected

Get a pointer to SRawEvent. Usable in AnalyzeEvent().

Definition at line 109 of file AnaSortMixVertex.h.

◆ GetRecEvent()

SRecEvent* AnaSortMixVertex::GetRecEvent ( )
inlineprotected

Get a pointer to SRecEvent. Usable in AnalyzeEvent().

Definition at line 110 of file AnaSortMixVertex.h.

◆ GetRunID()

int AnaSortMixVertex::GetRunID ( ) const
inline

Get the run ID to be analyzed.

Definition at line 95 of file AnaSortMixVertex.h.

◆ Init()

void AnaSortMixVertex::Init ( const int  run_id)
virtual

Function to initialize all variables for the 1st analysis step.

Init() of each analysis module should call this function and then initialize its own variables.

Definition at line 53 of file AnaSortMixVertex.cc.

References recoConsts::instance(), PHFlag::set_BoolFlag(), recoConsts::set_CharFlag(), PHFlag::set_DoubleFlag(), and PHFlag::set_IntFlag().

+ Here is the call graph for this function:

◆ MixTracks()

void AnaSortMixVertex::MixTracks ( TTree *  sorted_tree)
virtual

Mixing tracks from sorted_tree.

======= Get +ve tracks from ith event

====== Get -ve tracks from (i+1)th event

Definition at line 327 of file AnaSortMixVertex.cc.

References minus_event_ID, minus_fpga1, minus_liveP, minus_occuD1, minus_occuD2, minus_occuD3m, minus_occuD3p, minus_pot_p00, minus_rfp00c, minus_spill_ID, minus_TargetPos, mixed_tree, neg_tracks_mix, plus_event_ID, plus_fpga1, plus_liveP, plus_occuD1, plus_occuD2, plus_occuD3m, plus_occuD3p, plus_pot_p00, plus_rfp00c, plus_spill_ID, plus_TargetPos, and pos_tracks_mix.

Referenced by Analyze().

+ Here is the caller graph for this function:

◆ Name()

std::string AnaSortMixVertex::Name ( ) const
inline

Get the name of analysis module.

Definition at line 85 of file AnaSortMixVertex.h.

◆ OFile()

TFile* AnaSortMixVertex::OFile ( )
inline

Get the TFile object for output. Usable in Init(), AnalyzeEvent() and End() of each analysis module.

Definition at line 105 of file AnaSortMixVertex.h.

◆ OFS()

std::ofstream& AnaSortMixVertex::OFS ( )
inline

Get the ofstream object for output. Usable in Init(), AnalyzeEvent() and End() of each analysis module.

Definition at line 103 of file AnaSortMixVertex.h.

◆ SetDataset()

void AnaSortMixVertex::SetDataset ( const std::string  ds)
inline

Set the dataset to be analyzed.

Definition at line 92 of file AnaSortMixVertex.h.

◆ SetNumEventsAnalyzed()

void AnaSortMixVertex::SetNumEventsAnalyzed ( const unsigned int  n_evt)
inline

Set the max number of events to be analyzed per run.

Definition at line 99 of file AnaSortMixVertex.h.

◆ SetOutputDir() [1/2]

void AnaSortMixVertex::SetOutputDir ( const int  dir_out)
inline

Set the output directory using the given integer (usually run ID).

Definition at line 89 of file AnaSortMixVertex.h.

◆ SetOutputDir() [2/2]

void AnaSortMixVertex::SetOutputDir ( const std::string  dir_out)
inline

Set the output directory.

Definition at line 87 of file AnaSortMixVertex.h.

◆ SetRunID()

void AnaSortMixVertex::SetRunID ( const int  run_id)
inline

Set the run ID to be analyzed.

Definition at line 94 of file AnaSortMixVertex.h.

◆ SetTargetPos()

void AnaSortMixVertex::SetTargetPos ( const int  target_pos)
inline

Definition at line 82 of file AnaSortMixVertex.h.

References m_target_pos.

◆ SortTree()

void AnaSortMixVertex::SortTree ( TTree *  tree_to_sort)
virtual

Sort the ana_tree

Definition at line 281 of file AnaSortMixVertex.cc.

References sorted_tree.

Referenced by Analyze().

+ Here is the caller graph for this function:

◆ Target_Like()

bool AnaSortMixVertex::Target_Like ( SRecTrack trk_pos,
SRecTrack trk_neg 
)

◆ UpStream_Like()

bool AnaSortMixVertex::UpStream_Like ( SRecTrack trk_pos,
SRecTrack trk_neg 
)

◆ UseRawEvent()

void AnaSortMixVertex::UseRawEvent ( const bool  value)
inline

Turn on/off the use of SRawEvent.

Definition at line 96 of file AnaSortMixVertex.h.

◆ UseRecEvent()

void AnaSortMixVertex::UseRecEvent ( const bool  value)
inline

Turn on/off the use of SRecEvent.

Definition at line 97 of file AnaSortMixVertex.h.

◆ Verbosity() [1/2]

int AnaSortMixVertex::Verbosity ( ) const
inline

Get the verbosity.

Definition at line 101 of file AnaSortMixVertex.h.

◆ Verbosity() [2/2]

void AnaSortMixVertex::Verbosity ( const int  verb)
inline

Set the verbosity.

Definition at line 100 of file AnaSortMixVertex.h.

Member Data Documentation

◆ ana_tree

TTree* AnaSortMixVertex::ana_tree
protected

Definition at line 112 of file AnaSortMixVertex.h.

Referenced by Analyze().

◆ DimMult

int AnaSortMixVertex::DimMult
protected

Definition at line 128 of file AnaSortMixVertex.h.

◆ event_ID

int AnaSortMixVertex::event_ID
protected

Definition at line 121 of file AnaSortMixVertex.h.

Referenced by Analyze(), and DoVertex().

◆ fpga1

int AnaSortMixVertex::fpga1
protected

Definition at line 132 of file AnaSortMixVertex.h.

Referenced by Analyze(), and DoVertex().

◆ fpga2

int AnaSortMixVertex::fpga2
protected

Definition at line 132 of file AnaSortMixVertex.h.

Referenced by Analyze().

◆ fpga3

int AnaSortMixVertex::fpga3
protected

Definition at line 132 of file AnaSortMixVertex.h.

Referenced by Analyze().

◆ fpga4

int AnaSortMixVertex::fpga4
protected

Definition at line 132 of file AnaSortMixVertex.h.

Referenced by Analyze().

◆ fpga5

int AnaSortMixVertex::fpga5
protected

Definition at line 132 of file AnaSortMixVertex.h.

◆ gfield_v2

SQGenFit::GFField* AnaSortMixVertex::gfield_v2
protected

Definition at line 140 of file AnaSortMixVertex.h.

Referenced by DoVertex().

◆ liveP

float AnaSortMixVertex::liveP
protected

proton number corrsponding to RF+00 (pedestal corrected)

Definition at line 126 of file AnaSortMixVertex.h.

Referenced by Analyze(), and DoVertex().

◆ m_target_pos

int AnaSortMixVertex::m_target_pos
protected

Definition at line 119 of file AnaSortMixVertex.h.

Referenced by Analyze(), and SetTargetPos().

◆ minus_event_ID

int AnaSortMixVertex::minus_event_ID
protected

Definition at line 121 of file AnaSortMixVertex.h.

Referenced by DoVertex(), and MixTracks().

◆ minus_fpga1

int AnaSortMixVertex::minus_fpga1
protected

Definition at line 145 of file AnaSortMixVertex.h.

Referenced by DoVertex(), and MixTracks().

◆ minus_liveP

float AnaSortMixVertex::minus_liveP
protected

Definition at line 146 of file AnaSortMixVertex.h.

Referenced by DoVertex(), and MixTracks().

◆ minus_occuD1

int AnaSortMixVertex::minus_occuD1
protected

Definition at line 145 of file AnaSortMixVertex.h.

Referenced by DoVertex(), and MixTracks().

◆ minus_occuD2

int AnaSortMixVertex::minus_occuD2
protected

Definition at line 145 of file AnaSortMixVertex.h.

Referenced by DoVertex(), and MixTracks().

◆ minus_occuD3m

int AnaSortMixVertex::minus_occuD3m
protected

Definition at line 145 of file AnaSortMixVertex.h.

Referenced by DoVertex(), and MixTracks().

◆ minus_occuD3p

int AnaSortMixVertex::minus_occuD3p
protected

Definition at line 145 of file AnaSortMixVertex.h.

Referenced by DoVertex(), and MixTracks().

◆ minus_pot_p00

float AnaSortMixVertex::minus_pot_p00
protected

Definition at line 146 of file AnaSortMixVertex.h.

Referenced by DoVertex(), and MixTracks().

◆ minus_rfp00c

float AnaSortMixVertex::minus_rfp00c
protected

Definition at line 146 of file AnaSortMixVertex.h.

Referenced by DoVertex(), and MixTracks().

◆ minus_spill_ID

int AnaSortMixVertex::minus_spill_ID
protected

Definition at line 120 of file AnaSortMixVertex.h.

Referenced by DoVertex(), and MixTracks().

◆ minus_TargetPos

int AnaSortMixVertex::minus_TargetPos
protected

Definition at line 145 of file AnaSortMixVertex.h.

Referenced by DoVertex(), and MixTracks().

◆ mixed_tree

TTree* AnaSortMixVertex::mixed_tree
protected

Definition at line 114 of file AnaSortMixVertex.h.

Referenced by Analyze(), and MixTracks().

◆ neg_tracks

std::vector<SRecTrack> AnaSortMixVertex::neg_tracks
protected

Definition at line 134 of file AnaSortMixVertex.h.

Referenced by Analyze(), and EmbedMCSignal().

◆ neg_tracks_mix

std::vector<SRecTrack> AnaSortMixVertex::neg_tracks_mix
protected

Definition at line 135 of file AnaSortMixVertex.h.

Referenced by MixTracks().

◆ NegTrkMult

int AnaSortMixVertex::NegTrkMult
protected

Definition at line 130 of file AnaSortMixVertex.h.

◆ occuD0

int AnaSortMixVertex::occuD0
protected

Definition at line 129 of file AnaSortMixVertex.h.

◆ occuD1

int AnaSortMixVertex::occuD1
protected

Definition at line 129 of file AnaSortMixVertex.h.

Referenced by Analyze(), and DoVertex().

◆ occuD2

int AnaSortMixVertex::occuD2
protected

Definition at line 129 of file AnaSortMixVertex.h.

Referenced by Analyze(), and DoVertex().

◆ occuD3m

int AnaSortMixVertex::occuD3m
protected

Definition at line 129 of file AnaSortMixVertex.h.

Referenced by Analyze(), and DoVertex().

◆ occuD3p

int AnaSortMixVertex::occuD3p
protected

Definition at line 129 of file AnaSortMixVertex.h.

Referenced by Analyze(), and DoVertex().

◆ plus_event_ID

int AnaSortMixVertex::plus_event_ID
protected

Definition at line 121 of file AnaSortMixVertex.h.

Referenced by DoVertex(), and MixTracks().

◆ plus_fpga1

int AnaSortMixVertex::plus_fpga1
protected

Definition at line 142 of file AnaSortMixVertex.h.

Referenced by DoVertex(), and MixTracks().

◆ plus_liveP

float AnaSortMixVertex::plus_liveP
protected

Definition at line 143 of file AnaSortMixVertex.h.

Referenced by DoVertex(), and MixTracks().

◆ plus_occuD1

int AnaSortMixVertex::plus_occuD1
protected

Definition at line 142 of file AnaSortMixVertex.h.

Referenced by DoVertex(), and MixTracks().

◆ plus_occuD2

int AnaSortMixVertex::plus_occuD2
protected

Definition at line 142 of file AnaSortMixVertex.h.

Referenced by DoVertex(), and MixTracks().

◆ plus_occuD3m

int AnaSortMixVertex::plus_occuD3m
protected

Definition at line 142 of file AnaSortMixVertex.h.

Referenced by DoVertex(), and MixTracks().

◆ plus_occuD3p

int AnaSortMixVertex::plus_occuD3p
protected

Definition at line 142 of file AnaSortMixVertex.h.

Referenced by DoVertex(), and MixTracks().

◆ plus_pot_p00

float AnaSortMixVertex::plus_pot_p00
protected

Definition at line 143 of file AnaSortMixVertex.h.

Referenced by DoVertex(), and MixTracks().

◆ plus_rfp00c

float AnaSortMixVertex::plus_rfp00c
protected

Definition at line 143 of file AnaSortMixVertex.h.

Referenced by DoVertex(), and MixTracks().

◆ plus_spill_ID

int AnaSortMixVertex::plus_spill_ID
protected

Definition at line 120 of file AnaSortMixVertex.h.

Referenced by DoVertex(), and MixTracks().

◆ plus_TargetPos

int AnaSortMixVertex::plus_TargetPos
protected

Definition at line 142 of file AnaSortMixVertex.h.

Referenced by DoVertex(), and MixTracks().

◆ pos_tracks

std::vector<SRecTrack> AnaSortMixVertex::pos_tracks
protected

Definition at line 134 of file AnaSortMixVertex.h.

Referenced by Analyze(), and EmbedMCSignal().

◆ pos_tracks_mix

std::vector<SRecTrack> AnaSortMixVertex::pos_tracks_mix
protected

Definition at line 135 of file AnaSortMixVertex.h.

Referenced by MixTracks().

◆ PosTrkMult

int AnaSortMixVertex::PosTrkMult
protected

Definition at line 130 of file AnaSortMixVertex.h.

◆ pot_p00

float AnaSortMixVertex::pot_p00
protected

Definition at line 125 of file AnaSortMixVertex.h.

Referenced by Analyze(), and DoVertex().

◆ recEvent

SRecEvent* AnaSortMixVertex::recEvent
protected

Definition at line 136 of file AnaSortMixVertex.h.

Referenced by DoVertex().

◆ recEvent_dump_like

SRecEvent* AnaSortMixVertex::recEvent_dump_like
protected

Definition at line 138 of file AnaSortMixVertex.h.

◆ recEvent_target_like

SRecEvent* AnaSortMixVertex::recEvent_target_like
protected

Definition at line 137 of file AnaSortMixVertex.h.

◆ recEvent_upstream_like

SRecEvent* AnaSortMixVertex::recEvent_upstream_like
protected

Definition at line 139 of file AnaSortMixVertex.h.

◆ rfp00c

float AnaSortMixVertex::rfp00c
protected

RF+00 corrected for the pedestal.

Definition at line 124 of file AnaSortMixVertex.h.

Referenced by Analyze(), and DoVertex().

◆ runID

int AnaSortMixVertex::runID
protected

Definition at line 119 of file AnaSortMixVertex.h.

Referenced by Analyze().

◆ save_mix

TTree* AnaSortMixVertex::save_mix
protected

Definition at line 116 of file AnaSortMixVertex.h.

Referenced by DoVertex().

◆ save_sorted

TTree* AnaSortMixVertex::save_sorted
protected

Definition at line 115 of file AnaSortMixVertex.h.

Referenced by DoVertex().

◆ sorted_tree

TTree* AnaSortMixVertex::sorted_tree
protected

Definition at line 113 of file AnaSortMixVertex.h.

Referenced by Analyze(), and SortTree().

◆ spill_ID

int AnaSortMixVertex::spill_ID
protected

Definition at line 120 of file AnaSortMixVertex.h.

Referenced by Analyze(), and DoVertex().

◆ TargetPos

int AnaSortMixVertex::TargetPos
protected

Definition at line 131 of file AnaSortMixVertex.h.

Referenced by Analyze(), and DoVertex().

◆ TrkMult

int AnaSortMixVertex::TrkMult
protected

Definition at line 130 of file AnaSortMixVertex.h.


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