Low-Energy Muon (LEM) Experiment  0.5.1
sc_ana_module.c File Reference
#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>
Include dependency graph for sc_ana_module.c:

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
 

Macro Definition Documentation

#define N_SC_HIST   8

Definition at line 81 of file sc_ana_module.c.

Referenced by sc_bor(), sc_eor(), and sc_init().

#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().

Function Documentation

float get_magnetic_field ( float  current)

Calculate magnetic field from zero flux current

return: B-field of either WEW or Bpar magnet

Parameters
currentrunning 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_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)
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  )

Variable Documentation

TObjArray* gHistoFolderStack
TFolder* gManaHistosFolder
TH1F* hSC_Hist[N_SC_HIST]
static

Definition at line 83 of file sc_ana_module.c.

Referenced by sc_eor().

MEAN_BANK mean

Definition at line 52 of file sc_ana_module.c.

Referenced by analyzer_init(), sc_ana(), and update_run_header().

INT offset
static
ANA_MODULE sc_ana_module
Initial value:
= {
"SCAnaModule",
"T. Prokscha, A. Suter",
sizeof(sc_ana_param),
(const char **)sc_ana_param_str,
}
INT sc_init(void)
Definition: sc_ana_module.c:92
INT sc_exit()
INT sc_bor(INT run_number)
INT sc_eor(INT run_number)
INT sc_ana(EVENT_HEADER *, void *)
SCANAMODULE_PARAM sc_ana_param
Definition: sc_ana_module.c:53

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

Definition at line 79 of file sc_ana_module.c.

Referenced by sc_ana(), sc_bor(), sc_eor(), sc_exit(), and sc_init().

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().