Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mvtxOM.cc File Reference
#include "mvtxOM.h"
#include <TCanvas.h>
#include <TF1.h>
#include <TGaxis.h>
#include <TGraphAsymmErrors.h>
#include <TH1.h>
#include <TH2.h>
#include <TLatex.h>
#include <TLine.h>
#include <TStyle.h>
#include <fstream>
#include <iostream>
#include <map>
+ Include dependency graph for mvtxOM.cc:

Go to the source code of this file.

Macros

#define IDMVTXV1_MAXRUID   4
 
#define IDMVTXV1_MAXRUCHN   28
 

Functions

ofstream write_outHitLocations (outHitLocations.c_str())
 
unsigned short decode_row (int hit)
 
unsigned short decode_col (int hit)
 
void set_verbose (int v)
 
void set_refresh (int r)
 
int pinit ()
 
int process_event (Event *e)
 
int process_histos (float thresh)
 
int mask_pixels (float thresh)
 
int analysis ()
 
int OM ()
 
int print_canvas ()
 
int print_status ()
 
void reset_histos ()
 
void get_alignment ()
 

Variables

int init_done = 0
 
const int NSTAVE = 4
 
const bool chip_expected [4] = {true, true, true, true}
 
string stave_name [4] = {"E103", "C105", "C104", "A105"}
 
vector< TLine * > chip_edges
 
vector< TLine * > dead_chip_forward
 
vector< TLine * > dead_chip_backward
 
string outHitLocations = "/home/maps/meeg/felix/daq/felix_rcdaq/online_monitoring/hitLocations/locations.txt"
 
map< pair< int, int >, pair
< int, int > > 
chipmap
 
int mvtx_evnts
 
int mvtx_verbose = 0
 
int mvtx_refresh = -1
 
int max_npixels = 512*1024
 
int mvtx_run = 0
 
const bool flip_yaxis = false
 
TH1F * hnevnt
 
TH1F * hchip
 
TH1F * hwarn
 
TH1F * herr
 
TH1F * hnhit_chip [NSTAVE]
 
TH2F * h2d_chip [NSTAVE]
 
TH1F * hdiffrow_chip [NSTAVE]
 
TH1F * hdiffcol_chip [NSTAVE]
 
TCanvas * com
 
TPad * phitrate
 
TPad * pnhit
 
TPad * p2d [NSTAVE]
 
TPad * pmean
 
TPad * pdiffcol
 
TPad * pdiffrow
 
TH1F * haxis_chip
 
TH1F * haxis_nhit
 
TH1F * haxis_2d
 
TH1F * haxis_diff
 
TLatex * lnevents
 
TLatex * ldiffcol [NSTAVE]
 
TLatex * ldiffrow [NSTAVE]
 
TLatex * lnhitmean [NSTAVE]
 
TGaxis * reversedaxis
 
TH1F * hhitrate_chip
 
TH1F * hwarnrate_chip
 
TH1F * herrrate_chip
 
TH1F * hnhit_chip_norm [NSTAVE]
 
TH2F * h2d_chip_norm [NSTAVE]
 
TGraphAsymmErrors * gmpos_chip [NSTAVE]
 
TH1F * hdiffrow_chip_norm [NSTAVE]
 
TH1F * hdiffcol_chip_norm [NSTAVE]
 
TH1F * hhittime_chip [NSTAVE]
 
TF1 * fg
 
int chipColor [] = {kBlue, kRed, kGreen+2, kMagenta+2}
 
int chipMarker [] = {kFullCircle, kFullSquare, kFullDiamond, kFullCross}
 
TCanvas * cBeamCenter = nullptr
 
const bool show_beam_fit = true
 

Macro Definition Documentation

#define IDMVTXV1_MAXRUCHN   28

Definition at line 21 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 21 of file mvtxOM.cc

Referenced by process_event().

#define IDMVTXV1_MAXRUID   4

Definition at line 20 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 20 of file mvtxOM.cc

Referenced by process_event().

Function Documentation

int analysis ( )

Definition at line 620 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 620 of file mvtxOM.cc

References cBeamCenter, dead_chip_backward, dead_chip_forward, fg, gmpos_chip, h, h2d_chip, h2d_chip_norm, hchip, hdiffcol_chip, hdiffcol_chip_norm, hdiffrow_chip, hdiffrow_chip_norm, herr, herrrate_chip, hhitrate_chip, hnevnt, hnhit_chip, hnhit_chip_norm, hwarn, hwarnrate_chip, add_histos_bX::ib, Acts::UnitConstants::m, perf_headwind::name, nevents(), NSTAVE, ProjectionY, physmon_simulation::s, show_beam_fit, and stave_name.

Referenced by Fun4All_Analysis(), OM(), and print_status().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

unsigned short decode_col ( int  hit)

Definition at line 139 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 139 of file mvtxOM.cc

Referenced by process_event().

+ Here is the caller graph for this function:

unsigned short decode_row ( int  hit)

Definition at line 134 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 134 of file mvtxOM.cc

Referenced by process_event().

+ Here is the caller graph for this function:

void get_alignment ( )

Definition at line 1225 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 1225 of file mvtxOM.cc

References INTTVtxZ::fname, fout, gmpos_chip, mvtx_run, and NSTAVE.

Referenced by mvtxBeamTestRunScan().

+ Here is the caller graph for this function:

int mask_pixels ( float  thresh)

Definition at line 563 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 563 of file mvtxOM.cc

References col, flip_yaxis, h2d_chip, i, NSTAVE, printf(), and sum().

+ Here is the call graph for this function:

int OM ( )

Definition at line 881 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 881 of file mvtxOM.cc

References analysis(), chip_edges, chipColor, com, dead_chip_backward, dead_chip_forward, Acts::UnitConstants::e, flip_yaxis, h2d_chip_norm, haxis_chip, haxis_diff, haxis_nhit, hdiffcol_chip_norm, hdiffrow_chip_norm, herrrate_chip, hhitrate_chip, hnevnt, hnhit_chip_norm, hwarnrate_chip, i, j, ldiffcol, ldiffrow, lnevents, lnhitmean, Modified(), mvtx_run, perf_headwind::name, NSTAVE, p2d, pdiffcol, pdiffrow, phitrate, reversedaxis, and stave_name.

Referenced by ActsAlignmentStates::fillAlignmentStateMap(), HelicalFitter::getGlobalDerivativesXY(), mvtxBeamTestRunScan(), open_file(), process_event(), and run_om().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int pinit ( )

Definition at line 161 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 161 of file mvtxOM.cc

References chipColor, chipMarker, fg, flip_yaxis, gmpos_chip, h1a, h1a_D, h1b, h1b_D, h1c, h1c_D, h1d, h1d_D, h2a, h2a_D, h2b, h2b_D, h2c, h2c_D, h2d, h2d_chip, h2d_D, h3a, h3a_D, h3b, h3b_D, h3c, h3c_D, h3d, h3d_D, h4a, h4a_D, h4b, h4b_D, h4c, h4c_D, h4d, h4d_D, haxis_2d, haxis_chip, haxis_diff, haxis_nhit, hchip, hdiffcol_chip, hdiffrow_chip, herr, hhittime_chip, hnevnt, hnhit_chip, hwarn, i, init_done, groot::instance(), mvtx_evnts, perf_headwind::name, NSTAVE, scope0, scope1, scope2, and scope3.

+ Here is the call graph for this function:

int print_canvas ( )

Definition at line 1143 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 1143 of file mvtxOM.cc

References cBeamCenter, com, mvtx_run, and show_beam_fit.

Referenced by mvtxBeamTestRunScan().

+ Here is the caller graph for this function:

int print_status ( )

Definition at line 1155 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 1155 of file mvtxOM.cc

References analysis(), gmpos_chip, hchip, hdiffcol_chip_norm, hdiffrow_chip_norm, herr, herrrate_chip, hhitrate_chip, hnevnt, hnhit_chip, hnhit_chip_norm, hwarn, hwarnrate_chip, i, and NSTAVE.

+ Here is the call graph for this function:

int process_histos ( float  thresh)

Definition at line 524 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 524 of file mvtxOM.cc

References col, flip_yaxis, h2d_chip, i, NSTAVE, and sum().

+ Here is the call graph for this function:

void reset_histos ( )

Definition at line 1208 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 1208 of file mvtxOM.cc

References h2d_chip, hchip, hdiffcol_chip, hdiffrow_chip, herr, hnevnt, hnhit_chip, hwarn, i, and NSTAVE.

Referenced by process_event().

+ Here is the caller graph for this function:

void set_refresh ( int  r)

Definition at line 154 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 154 of file mvtxOM.cc

References mvtx_refresh, and physmon_track_finding_ttbar::r.

Referenced by run_om().

+ Here is the caller graph for this function:

void set_verbose ( int  v)

Definition at line 147 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 147 of file mvtxOM.cc

References mvtx_verbose, and testSigmaEff::v.

ofstream write_outHitLocations ( outHitLocations.  c_str())

Referenced by process_event().

+ Here is the caller graph for this function:

Variable Documentation

TCanvas* cBeamCenter = nullptr

Definition at line 131 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 131 of file mvtxOM.cc

Referenced by analysis(), and print_canvas().

vector<TLine*> chip_edges

Definition at line 31 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 31 of file mvtxOM.cc

Referenced by OM().

const bool chip_expected[4] = {true, true, true, true}

Definition at line 28 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 28 of file mvtxOM.cc

int chipColor[] = {kBlue, kRed, kGreen+2, kMagenta+2}

Definition at line 127 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 127 of file mvtxOM.cc

Referenced by AnaMvtxTestBeam2019::Init(), OM(), and pinit().

map<pair<int,int>,pair<int,int> > chipmap

Definition at line 36 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 36 of file mvtxOM.cc

Referenced by process_event().

int chipMarker[] = {kFullCircle, kFullSquare, kFullDiamond, kFullCross}

Definition at line 128 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 128 of file mvtxOM.cc

Referenced by pinit().

TCanvas* com

Definition at line 93 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 93 of file mvtxOM.cc

Referenced by PHCosmicsTrkFitter::commissioning(), PHActsTrkFitter::commissioning(), OM(), and print_canvas().

vector<TLine*> dead_chip_backward

Definition at line 31 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 31 of file mvtxOM.cc

Referenced by analysis(), and OM().

vector<TLine*> dead_chip_forward

Definition at line 31 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 31 of file mvtxOM.cc

Referenced by analysis(), and OM().

TF1* fg

Definition at line 124 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 124 of file mvtxOM.cc

const bool flip_yaxis = false

Definition at line 80 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 80 of file mvtxOM.cc

Referenced by mask_pixels(), OM(), pinit(), process_event(), and process_histos().

TGraphAsymmErrors* gmpos_chip[NSTAVE]

Definition at line 116 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 116 of file mvtxOM.cc

Referenced by analysis(), get_alignment(), pinit(), and print_status().

TH2F* h2d_chip[NSTAVE]

Definition at line 88 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 88 of file mvtxOM.cc

Referenced by analysis(), mask_pixels(), pinit(), process_event(), process_histos(), and reset_histos().

TH2F* h2d_chip_norm[NSTAVE]

Definition at line 115 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 115 of file mvtxOM.cc

Referenced by analysis(), and OM().

TH1F* haxis_2d

Definition at line 102 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 102 of file mvtxOM.cc

Referenced by pinit().

TH1F* haxis_chip

Definition at line 100 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 100 of file mvtxOM.cc

Referenced by OM(), and pinit().

TH1F* haxis_diff

Definition at line 103 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 103 of file mvtxOM.cc

Referenced by OM(), and pinit().

TH1F* haxis_nhit

Definition at line 101 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 101 of file mvtxOM.cc

Referenced by OM(), and pinit().

TH1F* hchip

Definition at line 84 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 84 of file mvtxOM.cc

Referenced by analysis(), make_plot(), pinit(), print_status(), process_event(), and reset_histos().

TH1F* hdiffcol_chip[NSTAVE]

Definition at line 90 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 90 of file mvtxOM.cc

Referenced by analysis(), pinit(), process_event(), and reset_histos().

TH1F* hdiffcol_chip_norm[NSTAVE]

Definition at line 118 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 118 of file mvtxOM.cc

Referenced by analysis(), OM(), and print_status().

TH1F* hdiffrow_chip[NSTAVE]

Definition at line 89 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 89 of file mvtxOM.cc

Referenced by analysis(), pinit(), process_event(), and reset_histos().

TH1F* hdiffrow_chip_norm[NSTAVE]

Definition at line 117 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 117 of file mvtxOM.cc

Referenced by analysis(), OM(), and print_status().

TH1F* herr

Definition at line 86 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 86 of file mvtxOM.cc

Referenced by analysis(), pinit(), print_status(), and reset_histos().

TH1F* herrrate_chip

Definition at line 113 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 113 of file mvtxOM.cc

Referenced by analysis(), OM(), and print_status().

TH1F* hhitrate_chip

Definition at line 111 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 111 of file mvtxOM.cc

Referenced by analysis(), get_hitrate(), OM(), and print_status().

TH1F* hhittime_chip[NSTAVE]

Definition at line 119 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 119 of file mvtxOM.cc

Referenced by pinit(), and process_event().

TH1F* hnevnt

Definition at line 83 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 83 of file mvtxOM.cc

Referenced by analysis(), OM(), pinit(), print_status(), process_event(), and reset_histos().

TH1F* hnhit_chip[NSTAVE]

Definition at line 87 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 87 of file mvtxOM.cc

Referenced by analysis(), pinit(), print_status(), and reset_histos().

TH1F* hnhit_chip_norm[NSTAVE]

Definition at line 114 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 114 of file mvtxOM.cc

Referenced by analysis(), OM(), and print_status().

TH1F* hwarn

Definition at line 85 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 85 of file mvtxOM.cc

Referenced by analysis(), pinit(), print_status(), and reset_histos().

TH1F* hwarnrate_chip

Definition at line 112 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 112 of file mvtxOM.cc

Referenced by analysis(), OM(), and print_status().

int init_done = 0

Definition at line 23 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 23 of file mvtxOM.cc

TLatex* ldiffcol[NSTAVE]

Definition at line 105 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 105 of file mvtxOM.cc

Referenced by OM().

TLatex* ldiffrow[NSTAVE]

Definition at line 106 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 106 of file mvtxOM.cc

Referenced by OM().

TLatex* lnevents

Definition at line 104 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 104 of file mvtxOM.cc

Referenced by OM().

TLatex* lnhitmean[NSTAVE]

Definition at line 107 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 107 of file mvtxOM.cc

Referenced by OM().

int max_npixels = 512*1024

Definition at line 78 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 78 of file mvtxOM.cc

Referenced by process_event().

int mvtx_evnts

Definition at line 75 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 75 of file mvtxOM.cc

Referenced by pinit(), and process_event().

int mvtx_refresh = -1

Definition at line 77 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 77 of file mvtxOM.cc

Referenced by set_refresh().

int mvtx_run = 0

Definition at line 79 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 79 of file mvtxOM.cc

Referenced by get_alignment(), OM(), print_canvas(), and process_event().

int mvtx_verbose = 0

Definition at line 76 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 76 of file mvtxOM.cc

Referenced by process_event(), and set_verbose().

const int NSTAVE = 4

Definition at line 27 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 27 of file mvtxOM.cc

Referenced by analysis(), get_alignment(), mask_pixels(), OM(), pinit(), print_status(), process_event(), process_histos(), and reset_histos().

string outHitLocations = "/home/maps/meeg/felix/daq/felix_rcdaq/online_monitoring/hitLocations/locations.txt"

Definition at line 33 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 33 of file mvtxOM.cc

TPad* p2d[NSTAVE]

Definition at line 96 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 96 of file mvtxOM.cc

Referenced by OM().

TPad* pdiffcol

Definition at line 98 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 98 of file mvtxOM.cc

Referenced by OM().

TPad* pdiffrow

Definition at line 99 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 99 of file mvtxOM.cc

Referenced by OM().

TPad* phitrate

Definition at line 94 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 94 of file mvtxOM.cc

Referenced by OM().

TPad* pmean

Definition at line 97 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 97 of file mvtxOM.cc

TPad* pnhit

Definition at line 95 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 95 of file mvtxOM.cc

TGaxis* reversedaxis

Definition at line 108 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 108 of file mvtxOM.cc

Referenced by OM().

const bool show_beam_fit = true

Definition at line 132 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 132 of file mvtxOM.cc

Referenced by analysis(), and print_canvas().

string stave_name[4] = {"E103", "C105", "C104", "A105"}

Definition at line 29 of file mvtxOM.cc.

View newest version in sPHENIX GitHub at line 29 of file mvtxOM.cc

Referenced by analysis(), and OM().