Belle II Software development
|
This class contains data for ECLSimHit's and provides several relevant conversion functions for better event display. More...
#include <EclData.h>
Public Types | |
enum | EclSubsystem { ALL , BARR , FORW , BACKW } |
Subsystems of ECL: ALL all subsystems BARR barrel only FORW forward endcap only BACKW backward endcap only. More... | |
Public Member Functions | |
EclData () | |
Default constructor. | |
EclData (const EclData &data) | |
Copy constructor. | |
EclData & | operator= (const EclData &other) |
Assignment operator: utilizes copy constructor. | |
TTree * | getTree () |
Returns data contained in EclDisplay. | |
int * | getEventCounts () |
Returns array of event counts per crystal[getCrystalsCount()]. | |
int * | getEventCountsPerCrystal () |
Alias for GetEventCounts() | |
int | getEventCountsMax () |
float * | getEnergySums () |
Get array of total energy for each channel in the specified time and event range. | |
float * | getEnergySumPerCrystal () |
Alias for GetEnergySums() | |
float | getEnergySumsMax () |
float | getEnergyTotal () |
bool | isCrystalInSubsystem (int crystal, EclSubsystem subsys) |
int | getTimeRangeMin () |
Return min time in time range. | |
int | getTimeRangeMax () |
Return max time in time range. | |
void | setTimeRange (int time_min, int time_max, bool do_update=true) |
Display only events in the specified time range. | |
int | getEventRangeMin () |
Return min event number to display. | |
int | getEventRangeMax () |
Return max event number to display. | |
void | setEventRange (int ev_min, int ev_max, bool do_update=true) |
Sets event range to (ev_min, ev_max) | |
void | setEnergyThreshold (int en_min, int en_max, bool do_update=true) |
Sets energy range to (en_min, en_max). | |
int | getTimeMin () |
int | getTimeMax () |
int | getLastEventId () |
int | getChannel (int phi_id, int theta_id) |
Converts (phi_id, theta_id) pair to ECL CellId. | |
int | getPhiId (int ch) |
ECL CellId -> phi_id. | |
int | getThetaId (int ch) |
ECL CellId -> theta_id. | |
void | excludeChannel (int ch, bool do_update=false) |
Excludes specific channel from the count of events and energy. | |
void | includeChannel (int ch, bool do_update=false) |
Includes specific channel in the count of events and energy. | |
void | loadRootFile (const char *path) |
Load root file containing ECLCalDigit data from the specified path. | |
void | update (bool reset_event_ranges=false) |
Update time_min, time_max, event_counts and energy_sums. | |
int | addEvent (ECLCalDigit *event, int evtn) |
Add ECLDigit event to inner TTree (m_tree). | |
void | fillEnergyHistogram (TH1F *hist, int energy_min, int energy_max, EclSubsystem subsys) |
Fill energy per channel histogram for the specified EclSubsystem (Barrel, forward endcap, backward endcap, all of them). | |
void | fillEnergySumHistogram (TH1F *hist, int energy_min, int energy_max, EclSubsystem subsys) |
Fill energy per event histogram for the specified EclSubsystem (Barrel, forward endcap, backward endcap, all of them). | |
void | fillTimeHistogram (TH1F *hist, int time_min, int time_max, EclSubsystem subsys) |
Fill time histogram for the specified EclSubsystem (Barrel, forward endcap, backward endcap, all of them). | |
Static Public Member Functions | |
static int | getCrystalCount () |
Get number of crystals in ECL. | |
Private Member Functions | |
void | cloneFrom (const EclData &other) |
Clone attributes from other EclData. | |
void | initVariables () |
Initialization of arrays. | |
void | initEventRanges () |
Set initial values for time and event range. | |
Private Attributes | |
TTree * | m_tree |
Tree with loaded events. | |
int | m_branch_ch |
Tree channel field. | |
double | m_branch_energy |
Tree energy branch. | |
double | m_branch_time |
Tree time branch. | |
int | m_branch_evtn |
Tree event number branch. | |
int * | m_event_counts |
Number of events for each crystal. | |
int | m_event_count_max |
Max value in event_counts array. | |
float * | m_energy_sums |
Sum of energies of every event captured by crystal (MeV). | |
float | m_energy_sums_max |
Max value in m_energy_sums array. | |
float | m_energy_total |
Total energy for last displayed range of events. | |
int | m_last_event_id |
Id of the event with max recorded event number (evtn). | |
int | m_time_max |
Maximum possible time. | |
int | m_time_range_min |
Time range (min) for display. | |
int | m_time_range_max |
Time range (max) for display. | |
int | m_ev_range_min |
Events from ev_range_min will be counted in energy_sums and event_counts. | |
int | m_ev_range_max |
Events up to ev_range_max will be counted in energy_sums and event_counts. | |
int | m_en_range_min |
Lower boundary of energy threshold. | |
int | m_en_range_max |
Upper boundary of energy threshold. | |
std::set< int > | m_excluded_ch |
Channels which are filtered out from the count of events and energy. | |
std::vector< int > | m_event_entry |
This vector holds the position of each entry which starts an event. | |
Static Private Attributes | |
static const int | ring_start_id [70] |
First crystal id in the beginning of i-th ECL ring. | |
This class contains data for ECLSimHit's and provides several relevant conversion functions for better event display.
enum EclSubsystem |
EclData | ( | ) |
Default constructor.
Definition at line 41 of file EclData.cc.
Copy constructor.
Resets m_excluded_ch upon copy.
Definition at line 53 of file EclData.cc.
~EclData | ( | ) |
Definition at line 72 of file EclData.cc.
int addEvent | ( | ECLCalDigit * | event, |
int | evtn | ||
) |
Add ECLDigit event to inner TTree (m_tree).
event | ECLDigit event |
evtn | Number of event. |
Definition at line 428 of file EclData.cc.
|
private |
Clone attributes from other EclData.
Definition at line 79 of file EclData.cc.
void excludeChannel | ( | int | ch, |
bool | do_update = false |
||
) |
Excludes specific channel from the count of events and energy.
Definition at line 298 of file EclData.cc.
void fillEnergyHistogram | ( | TH1F * | hist, |
int | energy_min, | ||
int | energy_max, | ||
EclSubsystem | subsys | ||
) |
Fill energy per channel histogram for the specified EclSubsystem (Barrel, forward endcap, backward endcap, all of them).
Definition at line 453 of file EclData.cc.
void fillEnergySumHistogram | ( | TH1F * | hist, |
int | energy_min, | ||
int | energy_max, | ||
EclData::EclSubsystem | subsys | ||
) |
Fill energy per event histogram for the specified EclSubsystem (Barrel, forward endcap, backward endcap, all of them).
Definition at line 477 of file EclData.cc.
void fillTimeHistogram | ( | TH1F * | hist, |
int | time_min, | ||
int | time_max, | ||
EclData::EclSubsystem | subsys | ||
) |
Fill time histogram for the specified EclSubsystem (Barrel, forward endcap, backward endcap, all of them).
Definition at line 517 of file EclData.cc.
int getChannel | ( | int | phi_id, |
int | theta_id | ||
) |
Converts (phi_id, theta_id) pair to ECL CellId.
Definition at line 273 of file EclData.cc.
|
static |
Get number of crystals in ECL.
Definition at line 148 of file EclData.cc.
float * getEnergySumPerCrystal | ( | ) |
Alias for GetEnergySums()
Definition at line 178 of file EclData.cc.
float * getEnergySums | ( | ) |
Get array of total energy for each channel in the specified time and event range.
Definition at line 173 of file EclData.cc.
float getEnergySumsMax | ( | ) |
Definition at line 183 of file EclData.cc.
float getEnergyTotal | ( | ) |
Definition at line 188 of file EclData.cc.
int * getEventCounts | ( | ) |
Returns array of event counts per crystal[getCrystalsCount()].
Definition at line 158 of file EclData.cc.
int getEventCountsMax | ( | ) |
Definition at line 168 of file EclData.cc.
int * getEventCountsPerCrystal | ( | ) |
Alias for GetEventCounts()
Definition at line 163 of file EclData.cc.
int getEventRangeMax | ( | ) |
Return max event number to display.
Definition at line 233 of file EclData.cc.
int getEventRangeMin | ( | ) |
Return min event number to display.
Definition at line 229 of file EclData.cc.
int getLastEventId | ( | ) |
Definition at line 268 of file EclData.cc.
int getPhiId | ( | int | ch | ) |
ECL CellId -> phi_id.
Definition at line 278 of file EclData.cc.
int getThetaId | ( | int | ch | ) |
ECL CellId -> theta_id.
Definition at line 288 of file EclData.cc.
int getTimeMax | ( | ) |
Definition at line 263 of file EclData.cc.
int getTimeMin | ( | ) |
Definition at line 259 of file EclData.cc.
int getTimeRangeMax | ( | ) |
Return max time in time range.
Definition at line 213 of file EclData.cc.
int getTimeRangeMin | ( | ) |
Return min time in time range.
Definition at line 209 of file EclData.cc.
TTree * getTree | ( | ) |
Returns data contained in EclDisplay.
Definition at line 153 of file EclData.cc.
void includeChannel | ( | int | ch, |
bool | do_update = false |
||
) |
Includes specific channel in the count of events and energy.
Definition at line 305 of file EclData.cc.
|
private |
Set initial values for time and event range.
Definition at line 136 of file EclData.cc.
|
private |
Initialization of arrays.
Definition at line 117 of file EclData.cc.
bool isCrystalInSubsystem | ( | int | crystal, |
EclData::EclSubsystem | subsys | ||
) |
crystal | crystal number |
subsys | ID of the ECL subsystem. |
Definition at line 193 of file EclData.cc.
void loadRootFile | ( | const char * | path | ) |
Load root file containing ECLCalDigit data from the specified path.
Definition at line 312 of file EclData.cc.
Assignment operator: utilizes copy constructor.
Definition at line 61 of file EclData.cc.
void setEnergyThreshold | ( | int | en_min, |
int | en_max, | ||
bool | do_update = true |
||
) |
Sets energy range to (en_min, en_max).
en_min | minimal energy |
en_max | maximal energy |
do_update | Immediately update sums of energy and event count for each channel. |
Definition at line 248 of file EclData.cc.
void setEventRange | ( | int | ev_min, |
int | ev_max, | ||
bool | do_update = true |
||
) |
Sets event range to (ev_min, ev_max)
ev_min | minimal event number |
ev_max | maximal event number |
do_update | Immediately update sums of energy and event count for each channel. |
Definition at line 237 of file EclData.cc.
void setTimeRange | ( | int | time_min, |
int | time_max, | ||
bool | do_update = true |
||
) |
Display only events in the specified time range.
This method currently can't be called from the GUI.
Definition at line 218 of file EclData.cc.
void update | ( | bool | reset_event_ranges = false | ) |
Update time_min, time_max, event_counts and energy_sums.
Definition at line 368 of file EclData.cc.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticprivate |
First crystal id in the beginning of i-th ECL ring.
Taken from basf2/ecl/data/ecl_channels_map (two last columns)