Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
TriggerHistograms Struct Reference

#include <JRunHistograms.hh>

Public Member Functions

 TriggerHistograms ()
 
void initialize (std::set< int > &du_ids, JFrameIndexRange &frame_index_range, int modules_per_string)
 
void init_h_Trigger_bit_event ()
 
void init_h_Trigger_bit_hit ()
 
void init_h_Snapshot_hits ()
 
void init_h_Triggered_hits ()
 
void init_h_Snapshot_hits_per_module (int modules_per_string, std::set< int > &du_ids)
 
void init_h_Triggered_hits_per_module (int modules_per_string, std::set< int > &du_ids)
 
void init_h_Trigger_map (int modules_per_string, int n_frames, int first_frame, int last_frame)
 
void init_m_trigger_rates (int first_frame, int last_frame, int seconds_per_bin=30)
 
void init_m_Snapshot_hits_per_pmt (int modules_per_string)
 
void init_m_Trigger_map (int modules_per_string, int n_frames, int first_frame, int last_frame)
 
void init_h_pmt_distribution_triggered_hits ()
 
void init_h_tot_distribution_triggered_hits ()
 
void init_h_pmt_distribution_snapshot_hits ()
 
void init_h_tot_distribution_snapshot_hits ()
 
void init_h_n_triggered_hits_distribution (int n_pmts)
 

Public Attributes

TH1D * h_Trigger_bit_event
 
TH1D * h_Trigger_bit_hit
 
TH1D * h_Snapshot_hits
 
TH1D * h_Triggered_hits
 
TH2D * h_Snapshot_hits_per_module
 
TH2D * h_Triggered_hits_per_module
 
TH2D * h_Trigger_map
 
JManager< string, TH1D > * m_trigger_rates
 
JManager< string, TH2D > * m_Snapshot_hits_per_pmt
 
JManager< string, TH2D > * m_Trigger_map
 
TH1D * h_pmt_distribution_triggered_hits
 
TH1D * h_tot_distribution_triggered_hits
 
TH1D * h_pmt_distribution_snapshot_hits
 
TH1D * h_tot_distribution_snapshot_hits
 
TH1D * h_n_triggered_hits_distribution
 

Detailed Description

Definition at line 980 of file JRunHistograms.hh.

Constructor & Destructor Documentation

TriggerHistograms::TriggerHistograms ( )
inline

Definition at line 1019 of file JRunHistograms.hh.

1019  {
1020 
1021  h_Trigger_bit_event = NULL ;
1022 
1023  h_Trigger_bit_hit = NULL ;
1024 
1025  h_Snapshot_hits = NULL ;
1026 
1027  h_Triggered_hits = NULL ;
1028 
1030 
1032 
1033  h_Trigger_map = NULL ;
1034 
1035  m_trigger_rates = NULL ;
1036 
1037  m_Snapshot_hits_per_pmt = NULL ;
1038 
1039  m_Trigger_map = NULL ;
1040 
1042 
1044 
1046 
1048 
1050 
1051  }
TH1D * h_pmt_distribution_snapshot_hits
TH1D * h_n_triggered_hits_distribution
TH2D * h_Snapshot_hits_per_module
TH1D * h_pmt_distribution_triggered_hits
TH2D * h_Triggered_hits_per_module
JManager< string, TH1D > * m_trigger_rates
TH1D * h_tot_distribution_snapshot_hits
TH1D * h_tot_distribution_triggered_hits
JManager< string, TH2D > * m_Trigger_map
JManager< string, TH2D > * m_Snapshot_hits_per_pmt

Member Function Documentation

void TriggerHistograms::initialize ( std::set< int > &  du_ids,
JFrameIndexRange frame_index_range,
int  modules_per_string 
)
inline

Definition at line 1059 of file JRunHistograms.hh.

1059  {
1060 
1061  int first_frame = frame_index_range.first ;
1062 
1063  int last_frame = frame_index_range.second ;
1064 
1065  int n_frames = last_frame - first_frame + 1 ;
1066 
1067  int n_pmts = du_ids.size() * modules_per_string * NUMBER_OF_PMTS ;
1068 
1070 
1072 
1074 
1076 
1077  init_h_Snapshot_hits_per_module (modules_per_string , du_ids) ;
1078 
1079  init_h_Triggered_hits_per_module (modules_per_string , du_ids) ;
1080 
1081  init_m_trigger_rates(first_frame , last_frame) ;
1082 
1083  init_m_Snapshot_hits_per_pmt (modules_per_string) ;
1084 
1085  init_m_Trigger_map (modules_per_string , n_frames , first_frame , last_frame) ;
1086 
1087  init_h_Trigger_map (modules_per_string , n_frames , first_frame , last_frame) ;
1088 
1090 
1092 
1094 
1096 
1098 
1099  }
void init_h_Trigger_map(int modules_per_string, int n_frames, int first_frame, int last_frame)
void init_h_n_triggered_hits_distribution(int n_pmts)
void init_h_Triggered_hits_per_module(int modules_per_string, std::set< int > &du_ids)
void init_h_Snapshot_hits_per_module(int modules_per_string, std::set< int > &du_ids)
JValue_t second
Definition: JPair.hh:129
void init_h_pmt_distribution_snapshot_hits()
void init_h_tot_distribution_triggered_hits()
JKey_t first
Definition: JPair.hh:128
void init_m_trigger_rates(int first_frame, int last_frame, int seconds_per_bin=30)
void init_m_Snapshot_hits_per_pmt(int modules_per_string)
void init_h_tot_distribution_snapshot_hits()
void init_h_pmt_distribution_triggered_hits()
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
Definition: JDAQ.hh:26
void init_m_Trigger_map(int modules_per_string, int n_frames, int first_frame, int last_frame)
void TriggerHistograms::init_h_Trigger_bit_event ( )
inline

Definition at line 1104 of file JRunHistograms.hh.

1104  {
1105 
1106  string name = MAKE_STRING ("h_Trigger_bit_event") ;
1107 
1108  string title = MAKE_STRING ("Number of events as a function of trigger bit in event ; Trigger Bit ; Counts ") ;
1109 
1110  h_Trigger_bit_event = new TH1D (name.c_str() , title.c_str() , NUMBER_OF_TRIGGER_BITS , -0.5, NUMBER_OF_TRIGGER_BITS - 0.5 ) ;
1111 
1112  for (int i = 0 ; i < (int) NUMBER_OF_TRIGGER_BITS ; i++){
1113 
1114  if (getTriggerName(i)){
1115 
1116  h_Trigger_bit_event -> GetXaxis() -> SetBinLabel(i+1 , getTriggerName(i) ) ;
1117 
1118  } else {
1119 
1120  h_Trigger_bit_event -> GetXaxis() -> SetBinLabel(i+1 , "" ) ;
1121 
1122  }
1123 
1124  }
1125 
1126  h_Trigger_bit_event -> GetXaxis() -> LabelsOption("v") ;
1127 
1128  }
static const unsigned int NUMBER_OF_TRIGGER_BITS
Number of trigger bits.
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:602
const char * getTriggerName(JTriggerbit_t bit)
Get trigger name.
void TriggerHistograms::init_h_Trigger_bit_hit ( )
inline

Definition at line 1133 of file JRunHistograms.hh.

1133  {
1134 
1135  string name = MAKE_STRING ("h_Trigger_bit_hit") ;
1136 
1137  string title = MAKE_STRING ("Number of hits per event as a function of trigger bit in hit ; Trigger Bit ; #Events ") ;
1138 
1139  h_Trigger_bit_hit = new TH1D (name.c_str() , title.c_str() , NUMBER_OF_TRIGGER_BITS, -0.5, NUMBER_OF_TRIGGER_BITS - 0.5 ) ;
1140 
1141  for (int i = 0 ; i < (int) NUMBER_OF_TRIGGER_BITS ; i++){
1142 
1143  if (getTriggerName(i)){
1144 
1145  h_Trigger_bit_hit -> GetXaxis() -> SetBinLabel(i+1 , getTriggerName(i) ) ;
1146 
1147  } else {
1148 
1149  h_Trigger_bit_hit -> GetXaxis() -> SetBinLabel(i+1 , "" ) ;
1150 
1151  }
1152 
1153  }
1154 
1155  h_Trigger_bit_hit -> GetXaxis() -> LabelsOption("v") ;
1156 
1157  }
static const unsigned int NUMBER_OF_TRIGGER_BITS
Number of trigger bits.
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:602
const char * getTriggerName(JTriggerbit_t bit)
Get trigger name.
void TriggerHistograms::init_h_Snapshot_hits ( )
inline

Definition at line 1162 of file JRunHistograms.hh.

1162  {
1163 
1164  string name = MAKE_STRING ("h_Snapshot_hits") ;
1165 
1166  string title = MAKE_STRING (" Snapshot hits ; Number of hits ; Counts/#Events ") ;
1167 
1168  h_Snapshot_hits = new TH1D (name.c_str() , title.c_str() , 50, 0, 4 ) ;
1169 
1171 
1172  }
void BinLogX(T *h)
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:602
void TriggerHistograms::init_h_Triggered_hits ( )
inline

Definition at line 1177 of file JRunHistograms.hh.

1177  {
1178 
1179  string name = MAKE_STRING ("h_Triggered_hits") ;
1180 
1181  string title = MAKE_STRING (" Triggered hits ; Number of hits ; Counts/#Events ") ;
1182 
1183  h_Triggered_hits = new TH1D (name.c_str() , title.c_str() , 50 , 0, 4 ) ;
1184 
1186 
1187  }
void BinLogX(T *h)
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:602
void TriggerHistograms::init_h_Snapshot_hits_per_module ( int  modules_per_string,
std::set< int > &  du_ids 
)
inline

Definition at line 1194 of file JRunHistograms.hh.

1194  {
1195 
1196  string name = MAKE_STRING ("h_Snapshot_hits_per_module") ;
1197 
1198  string title = MAKE_STRING (" ; String ; Floor ; Number of snapshot hits ") ;
1199 
1200  h_Snapshot_hits_per_module = new TH2D (name.c_str() , title.c_str() ,
1201  *du_ids.rbegin() , 0.5 , *du_ids.rbegin() + 0.5 ,
1202  modules_per_string , 0.5 , modules_per_string + 0.5 ) ;
1203 
1204  }
TH2D * h_Snapshot_hits_per_module
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:602
void TriggerHistograms::init_h_Triggered_hits_per_module ( int  modules_per_string,
std::set< int > &  du_ids 
)
inline

Definition at line 1211 of file JRunHistograms.hh.

1211  {
1212 
1213  string name = MAKE_STRING ("h_Triggered_hits_per_module") ;
1214 
1215  string title = MAKE_STRING (" ; String ; Floor ; Number of triggered hits ") ;
1216 
1217  h_Triggered_hits_per_module = new TH2D (name.c_str() , title.c_str() ,
1218  *du_ids.rbegin() , 0.5 , *du_ids.rbegin() + 0.5 ,
1219  modules_per_string , 0.5 , modules_per_string + 0.5 ) ;
1220 
1221  }
TH2D * h_Triggered_hits_per_module
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:602
void TriggerHistograms::init_h_Trigger_map ( int  modules_per_string,
int  n_frames,
int  first_frame,
int  last_frame 
)
inline

Definition at line 1230 of file JRunHistograms.hh.

1230  {
1231 
1232  string name = MAKE_STRING ("h_Trigger_map") ;
1233 
1234  string title = MAKE_STRING (" ; Frame index ; DOM ; Number of triggered hits ") ;
1235 
1236  h_Trigger_map = new TH2D (name.c_str() , title.c_str() , n_frames , -0.5 , last_frame - first_frame + 0.5 ,
1237  modules_per_string , 0.5 , modules_per_string + 0.5 ) ;
1238 
1239  }
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:602
void TriggerHistograms::init_m_trigger_rates ( int  first_frame,
int  last_frame,
int  seconds_per_bin = 30 
)
inline

Definition at line 1248 of file JRunHistograms.hh.

1248  {
1249 
1250  int frames_per_bin = seconds_per_bin / getFrameTime() / 1e-9 ;
1251 
1252  int n_bins = (last_frame - first_frame) / frames_per_bin ;
1253 
1254  string title = MAKE_STRING (" ; Frame Index ; rate [Hz] ") ;
1255 
1256  m_trigger_rates = new JManager <string , TH1D> (new TH1D("h_rate_%" , title.c_str() , n_bins , -0.5 , last_frame - first_frame + 0.5)) ;
1257 
1258  }
JManager< string, TH1D > * m_trigger_rates
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:602
double getFrameTime()
Get frame time duration.
Definition: JDAQClock.hh:162
void TriggerHistograms::init_m_Snapshot_hits_per_pmt ( int  modules_per_string)
inline

Definition at line 1265 of file JRunHistograms.hh.

1265  {
1266 
1267  string name = MAKE_STRING ("%/h_Snapshot_hits_per_pmt") ;
1268 
1269  string title = MAKE_STRING (" ; PMT ; Floor ; Number of snapshot hits ") ;
1270 
1271  m_Snapshot_hits_per_pmt = new JManager < string , TH2D > ( new TH2D (name.c_str() , title.c_str() , NUMBER_OF_PMTS , -0.5 , NUMBER_OF_PMTS - 0.5 ,
1272  modules_per_string , 0.5 , modules_per_string + 0.5 ) ) ;
1273 
1274  }
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:602
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
Definition: JDAQ.hh:26
JManager< string, TH2D > * m_Snapshot_hits_per_pmt
void TriggerHistograms::init_m_Trigger_map ( int  modules_per_string,
int  n_frames,
int  first_frame,
int  last_frame 
)
inline

Definition at line 1283 of file JRunHistograms.hh.

1283  {
1284 
1285  string name = MAKE_STRING ("%/h_Trigger_map") ;
1286 
1287  string title = MAKE_STRING (" ; Frame index ; DOM ; Mean number of triggered hits per event") ;
1288 
1289  m_Trigger_map = new JManager < string , TH2D > ( new TH2D (name.c_str() , title.c_str() , int(n_frames/600) , -0.5 , last_frame - first_frame + 0.5 ,
1290  modules_per_string , 0.5 , modules_per_string + 0.5)) ;
1291 
1292  }
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:602
JManager< string, TH2D > * m_Trigger_map
void TriggerHistograms::init_h_pmt_distribution_triggered_hits ( )
inline

Definition at line 1299 of file JRunHistograms.hh.

1299  {
1300 
1301  string name = MAKE_STRING ("h_pmt_distribution_triggered_hits") ;
1302 
1303  string title = MAKE_STRING (" ; PMT number ; Counts [a.u.]") ;
1304 
1305  h_pmt_distribution_triggered_hits = new TH1D (name.c_str() , title.c_str() , NUMBER_OF_PMTS , -0.5 , NUMBER_OF_PMTS - 0.5) ;
1306 
1307  }
TH1D * h_pmt_distribution_triggered_hits
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:602
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
Definition: JDAQ.hh:26
void TriggerHistograms::init_h_tot_distribution_triggered_hits ( )
inline

Definition at line 1312 of file JRunHistograms.hh.

1312  {
1313 
1314  string name = MAKE_STRING ("h_tot_distribution_triggered_hits") ;
1315 
1316  string title = MAKE_STRING (" ; ToT [ns] ; Counts [a.u.]") ;
1317 
1318  h_tot_distribution_triggered_hits = new TH1D (name.c_str() , title.c_str() , 255 , 0.5 , 255.5 ) ;
1319 
1320  }
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:602
TH1D * h_tot_distribution_triggered_hits
void TriggerHistograms::init_h_pmt_distribution_snapshot_hits ( )
inline

Definition at line 1325 of file JRunHistograms.hh.

1325  {
1326 
1327  string name = MAKE_STRING ("h_pmt_distribution_snapshot_hits") ;
1328 
1329  string title = MAKE_STRING (" ; PMT number ; Counts [a.u.]") ;
1330 
1331  h_pmt_distribution_snapshot_hits = new TH1D (name.c_str() , title.c_str() , NUMBER_OF_PMTS , -0.5 , NUMBER_OF_PMTS - 0.5) ;
1332 
1333  }
TH1D * h_pmt_distribution_snapshot_hits
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:602
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
Definition: JDAQ.hh:26
void TriggerHistograms::init_h_tot_distribution_snapshot_hits ( )
inline

Definition at line 1338 of file JRunHistograms.hh.

1338  {
1339 
1340  string name = MAKE_STRING ("h_tot_distribution_snapshot_hits") ;
1341 
1342  string title = MAKE_STRING (" ; ToT [ns] ; Counts [a.u.]") ;
1343 
1344  h_tot_distribution_snapshot_hits = new TH1D (name.c_str() , title.c_str() , 255 , 0.5 , 255.5 ) ;
1345 
1346  }
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:602
TH1D * h_tot_distribution_snapshot_hits
void TriggerHistograms::init_h_n_triggered_hits_distribution ( int  n_pmts)
inline

Definition at line 1353 of file JRunHistograms.hh.

1353  {
1354 
1355  string name = MAKE_STRING ("h_n_triggered_hits_distribution") ;
1356 
1357  string title = MAKE_STRING (" ; Number of hits ; Counts") ;
1358 
1359  h_n_triggered_hits_distribution = new TH1D (name.c_str() , title.c_str() , n_pmts , 0.5 , n_pmts + 0.5 ) ;
1360 
1361  }
TH1D * h_n_triggered_hits_distribution
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:602

Member Data Documentation

TH1D* TriggerHistograms::h_Trigger_bit_event

Definition at line 982 of file JRunHistograms.hh.

TH1D* TriggerHistograms::h_Trigger_bit_hit

Definition at line 984 of file JRunHistograms.hh.

TH1D* TriggerHistograms::h_Snapshot_hits

Definition at line 986 of file JRunHistograms.hh.

TH1D* TriggerHistograms::h_Triggered_hits

Definition at line 988 of file JRunHistograms.hh.

TH2D* TriggerHistograms::h_Snapshot_hits_per_module

Definition at line 990 of file JRunHistograms.hh.

TH2D* TriggerHistograms::h_Triggered_hits_per_module

Definition at line 992 of file JRunHistograms.hh.

TH2D* TriggerHistograms::h_Trigger_map

Definition at line 994 of file JRunHistograms.hh.

JManager< string , TH1D >* TriggerHistograms::m_trigger_rates

Definition at line 998 of file JRunHistograms.hh.

JManager< string , TH2D >* TriggerHistograms::m_Snapshot_hits_per_pmt

Definition at line 1002 of file JRunHistograms.hh.

JManager< string , TH2D >* TriggerHistograms::m_Trigger_map

Definition at line 1004 of file JRunHistograms.hh.

TH1D* TriggerHistograms::h_pmt_distribution_triggered_hits

Definition at line 1006 of file JRunHistograms.hh.

TH1D* TriggerHistograms::h_tot_distribution_triggered_hits

Definition at line 1008 of file JRunHistograms.hh.

TH1D* TriggerHistograms::h_pmt_distribution_snapshot_hits

Definition at line 1010 of file JRunHistograms.hh.

TH1D* TriggerHistograms::h_tot_distribution_snapshot_hits

Definition at line 1012 of file JRunHistograms.hh.

TH1D* TriggerHistograms::h_n_triggered_hits_distribution

Definition at line 1014 of file JRunHistograms.hh.


The documentation for this struct was generated from the following file: