Low-Energy Muon (LEM) Experiment
0.5.1
|
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <time.h>
#include <string.h>
#include <math.h>
#include <vector>
#include "midas.h"
#include "experim.h"
#include "nemu_experim.h"
#include <TFolder.h>
#include <TH1F.h>
#include <TH2F.h>
#include <TTree.h>
Go to the source code of this file.
Macros | |
#define | SC_MOD_CF 0 |
#define | SC_MOD_XTC 1 |
#define | SC_MOD_HV 2 |
#define | SC_SAMPLE_CF 3 |
#define | SC_PRESSURE_SC_GJ 4 |
#define | SC_SAMPLE_HV 5 |
#define | SC_SAMPLE_ZERO_FLUX 6 |
#define | N_SC_HIST 8 |
Functions | |
SCANAMODULE_PARAM_STR (sc_ana_param_str) | |
float | get_magnetic_field (float current) |
INT | sc_init (void) |
INT | sc_exit () |
INT | sc_ana (EVENT_HEADER *, void *) |
INT | sc_bor (INT run_number) |
INT | sc_eor (INT run_number) |
Variables | |
INFO | info |
global info structure, in/out-init routines need the same structure More... | |
RUNINFO | runinfo |
/Runinfo ODB key, defined in from midas.h More... | |
TRIGGER_SETTINGS | trigger_settings |
/Equipment/Trigger/Settings More... | |
MEAN_BANK | mean |
SCANAMODULE_PARAM | sc_ana_param |
ANA_MODULE | sc_ana_module |
vector< vector< double > > | sc_histo_vec |
static TH1F * | hSC_Hist [N_SC_HIST] |
TFolder * | gManaHistosFolder |
TObjArray * | gHistoFolderStack |
static INT | offset |
#define N_SC_HIST 8 |
Definition at line 81 of file sc_ana_module.c.
#define SC_MOD_CF 0 |
Definition at line 40 of file sc_ana_module.c.
Referenced by sc_ana().
#define SC_MOD_HV 2 |
Definition at line 42 of file sc_ana_module.c.
Referenced by sc_ana().
#define SC_MOD_XTC 1 |
Definition at line 41 of file sc_ana_module.c.
Referenced by sc_ana().
#define SC_PRESSURE_SC_GJ 4 |
Definition at line 44 of file sc_ana_module.c.
Referenced by sc_ana().
#define SC_SAMPLE_CF 3 |
Definition at line 43 of file sc_ana_module.c.
Referenced by sc_ana().
#define SC_SAMPLE_HV 5 |
Definition at line 45 of file sc_ana_module.c.
Referenced by sc_ana().
#define SC_SAMPLE_ZERO_FLUX 6 |
Definition at line 46 of file sc_ana_module.c.
Referenced by sc_ana().
float get_magnetic_field | ( | float | current | ) |
Calculate magnetic field from zero flux current
return: B-field of either WEW or Bpar magnet
current | running through the magnet |
Definition at line 987 of file analyzer.c.
References INFO::bpar, INFO::helmholtz, info, INFO::lem_setup_parameter, INFO::magnet_parameter, and INFO::wew.
Referenced by sc_ana(), and update_info().
INT sc_ana | ( | EVENT_HEADER * | pheader, |
void * | pevent | ||
) |
Function sc_ana:
Fill selected slow control parameter in histograms, every 30s.
Calculate mean values and errors of mean values for selected slow control parameter. Write mean and errors to /Equipment/SlowControl/Variables/MEAN.
Definition at line 237 of file sc_ana_module.c.
References get_magnetic_field(), hDB, hKey, mean, SCANAMODULE_PARAM::mod_cf1_channel, SCANAMODULE_PARAM::mod_hv_channel, SCANAMODULE_PARAM::mod_xtc_channel, MEAN_BANK::moderator_hv, MEAN_BANK::sample_b, SCANAMODULE_PARAM::sample_cf_ctrl_channel, MEAN_BANK::sample_hv, SCANAMODULE_PARAM::sample_hv_channel, SCANAMODULE_PARAM::sample_sc_gj_channel, MEAN_BANK::sample_t, SCANAMODULE_PARAM::sample_zeroflux_channel, sc_ana_param, sc_histo_vec, SC_MOD_CF, SC_MOD_HV, SC_MOD_XTC, SC_PRESSURE_SC_GJ, SC_SAMPLE_CF, SC_SAMPLE_HV, SC_SAMPLE_ZERO_FLUX, MEAN_BANK::var_moderator_hv, MEAN_BANK::var_sample_b, MEAN_BANK::var_sample_hv, and MEAN_BANK::var_sample_t.
INT sc_bor | ( | INT | run_number | ) |
Definition at line 112 of file sc_ana_module.c.
References hDB, hKey, N_SC_HIST, and sc_histo_vec.
INT sc_eor | ( | INT | run_number | ) |
Function sc_eor:
Definition at line 153 of file sc_ana_module.c.
References gHistoFolderStack, gManaHistosFolder, hDB, SCANAMODULE_PARAM::histotitles, hKey, hSC_Hist, N_SC_HIST, runinfo, runname, sc_ana_param, sc_histo_vec, and SCANAMODULE_PARAM::titles.
INT sc_exit | ( | ) |
Definition at line 102 of file sc_ana_module.c.
References sc_histo_vec.
INT sc_init | ( | void | ) |
Definition at line 92 of file sc_ana_module.c.
References N_SC_HIST, and sc_histo_vec.
SCANAMODULE_PARAM_STR | ( | sc_ana_param_str | ) |
TObjArray* gHistoFolderStack |
TFolder* gManaHistosFolder |
|
static |
Definition at line 83 of file sc_ana_module.c.
Referenced by sc_eor().
INFO info |
global info structure, in/out-init routines need the same structure
global info structure, in/out-init routines need the same structure
Definition at line 206 of file vme_fe.c.
Referenced by ana_end_of_run(), analyzer_init(), bh_flow_in(), bh_flow_out(), bh_in_init(), bh_out_init(), bruker_in(), bruker_in_init(), bruker_out(), bruker_out_init(), danfysik_in(), danfysik_in_init(), danfysik_out(), danfysik_out_init(), energy_loss(), frontend_init(), get_magnetic_field(), get_t0(), get_t0L3RA(), hv_fug(), hv_fug_init(), hv_nhq_20xm_mscb(), hv_nhq_20xm_mscb_init(), hvr400(), hvr400_init(), lem_epics(), lemplug(), lemplug_init(), lemvac_in(), lemvac_out(), ls340_cryo_name_changed(), ls340_in(), ls340_in_init(), ls340_out(), ls340_out_init(), mirror(), mirror_init(), open_odb_records(), ps64_in(), ps64_out(), psi_epics_init(), read_slowcontrol_event(), scs400_in(), scs400_in_init(), scs400_out(), scs400_out_init(), scs900_in(), scs900_in_init(), scs900_out(), scs900_out_init(), sep61vac(), set_spin_rot_angle(), SM_in(), sm_in_init(), SM_out(), sm_out_init(), twickenham(), twickenham_init(), update_info(), update_run_header(), update_t0shift(), w6100_in(), w6100_in_init(), w6100_out(), w6100_out_init(), xtc(), and xtc_init().
MEAN_BANK mean |
Definition at line 52 of file sc_ana_module.c.
Referenced by analyzer_init(), sc_ana(), and update_run_header().
|
static |
Definition at line 89 of file sc_ana_module.c.
Referenced by frontend_loop(), hv_nhq_20xm_mscb_set_ramping(), and hv_nhq_20xm_mscb_update_odb().
RUNINFO runinfo |
/Runinfo ODB key, defined in from midas.h
Not defined in experim.h:
/Runinfo ODB key, defined in from midas.h
Definition at line 193 of file vme_fe.c.
Referenced by ana_begin_of_run(), ana_end_of_run(), ana_pause_run(), ana_resume_run(), analyzer_init(), analyzer_loop(), decay_bor(), decay_init(), disp_scaler(), frontend_init(), frontend_loop(), get_sum_filename(), mcp1_init(), pileup_init(), sc_eor(), scaler_sum(), tof_bor(), tof_init(), update_run_header(), and write_histogram_file().
ANA_MODULE sc_ana_module |
Definition at line 64 of file sc_ana_module.c.
SCANAMODULE_PARAM sc_ana_param |
Definition at line 53 of file sc_ana_module.c.
Referenced by get_t0(), sc_ana(), sc_eor(), set_spin_rot_angle(), and update_info().
vector< vector<double> > sc_histo_vec |
TRIGGER_SETTINGS trigger_settings |
/Equipment/Trigger/Settings
The following structures are defined in experim.h that is created by entering 'make' in ODBedit.
ODB record values can be easily accessed by db_open_record which creates a hot-link to the structure; structure_name.keyvalue
Definition at line 188 of file vme_fe.c.
Referenced by analyzer_init(), begin_of_run(), end_of_run(), evaluate_fast_muon_event(), evaluate_slow_muon_event(), frontend_init(), frontend_loop(), init_v1190(), and OnOff_mode().