12#include <framework/datastore/StoreArray.h>
13#include <framework/core/Module.h>
14#include <mdst/dataobjects/MCParticle.h>
15#include <trg/ecl/dataobjects/TRGECLWaveform.h>
49 virtual void event()
override;
52 virtual void endRun()
override;
This module simulates ECL Luminosity Online Monitor logic, i.e.
bool m_isBhabhaPatternBE
Quality signal for Backward endcap.
double m_FESum_MaxAmp
Maximum running sum amplitude in an event for Forward endcap.
int m_BESum_MaxId
Id of a sector with maximum amplitude in Backward endcap.
int m_BhNum
Number of Bha-bha signals in an event.
TH2D * m_h2BEAmp
Store sectors amplitudes for Backward endcap over all events.
TH2D * m_h2FEAmp
Store sectors amplitudes for Forward endcap over all events.
TH2D * m_h2SumCoin
Store number of coincedencies in running sums for i:j sectors (Forward:Backward) over all events.
double m_FE_Waveform_100ns[16][64]
Waveforms with 100ns sampling for Forward Endcap sectors.
double m_mcph[2]
Monte Carlo phi of the final state particles in main frame.
int m_NSamples
m_NSamples=631, number of samples for 10ns sampling.
int m_evtNum
Event number.
TFile * m_testfile
File to save output.
void calculate_discr_output()
Transforms waveforms into discriminators output.
double m_BESum_MaxAmp
Maximum running sum amplitude in an event for Backward endcap.
bool calculate_BE_quality(int iSample)
Return Quality (topology) flag at sample point, iSample, for Backward Endcap.
int m_CoincidenceCounterMatrix[16][16]
Stores number of concidences between waveforms exceeding threshold in i:j sectors (Forward:Backward).
int m_FESum_MaxId
Id of a sector with maximum amplitude in Forward endcap.
virtual void initialize() override
Initialize variables.
double m_thresholdBE
Threshold [GeV] on signal for Backward Endcap .
TH1D * m_h1BEHits
Store number of events when Backward sector i has signal exceeding Bha-Bha threshold over all events.
virtual void event() override
event per event.
void get_MCparticles()
Get MC particles parameters.
double m_thresholdFE
Threshold [GeV] on signal for Forward Endcap .
double m_BE_Waveform_10ns[16][631]
Waveforms with 10ns sampling for Backward Endcap sectors.
StoreArray< TRGECLWaveform > m_TrgEclWaveforms
Trigger waveforms.
bool m_FESum_Discr[16][631]
Discriminators values for running sums of Forward Endcap.
int m_SumCoincidenceMatrix[16][16]
Stores current coincidence duration [in samples] between running sums discriminators in i:j sectors (...
virtual void endRun() override
end run.
virtual ~ECLLOMModule()
Destructor.
virtual void terminate() override
terminate.
void get_waveforms()
Get ECL waveforms comdined into sectors.
double m_discrTime
Discriminator's signal duration in ns.
double m_FESum_Amplitude[16]
Calculated amplitudes in running sums of Forward Endcap.
bool m_FEQual_Discr[16][631]
Discriminators values for Quality signal of Forward Endcap.
int m_CoincidenceMatrix[16][16]
Stores current coincidence duration [in samples] between waveforms exceeding threshold in i:j sectors...
void clear_lom_data()
Clear internal data.
double m_com_th[2]
Monte Carlo thetha of the final state particles in CMS frame.
TH1D * m_h1FEHits
Store number of events when Forward sector i has signal exceeding Bha-Bha threshold over all events.
bool m_BEQual_Discr[16][631]
Discriminators values for Quality signal of Backward Endcap.
double m_BE_Waveform_100ns[16][64]
Waveforms with 100ns sampling for Backward Endcap sectors.
double m_mcth[2]
Monte Carlo thetha of the final state particles in main frame.
virtual void beginRun() override
begin run.
double m_FE_Pedal[16]
Calculated pedestal values for Forward Endcap.
TTree * m_testtree
Tree to store output.
double m_BESum_Amplitude[16]
Calculated amplitudes in running sums of Backward Endcap.
bool m_isBhabhaPatternFE
Quality signal for Forward endcap.
bool calculate_FE_quality(int iSample)
Return Quality (topology) flag at sample point, iSample, for Forward Endcap.
double m_FESum_Waveform_10ns[16][631]
Running sum's waveforms with 10ns sampling for Forward Endcap sectors.
ECLLOMModule()
Constructor.
bool m_BESum_Discr[16][631]
Discriminators values for running sums of Backward Endcap.
bool m_isBhabha
Bha-bha signal for an event.
double m_BESum_Waveform_10ns[16][631]
Running sum's waveforms with 10ns sampling for Backward Endcap sectors.
TH2D * m_h2Coin
Store number of coincedencies for i:j sectors (Forward:Backward) over all events.
double m_mcen[2]
Monte Carlo energy of the final state particles in main frame.
double m_FE_Amplitude[16]
Calculated amplitudes in sectors of Forward Endcap.
void calculate_coincidence(int iSample)
Calculates Coincidence Matrix at sample point, iSample.
int m_SumCoincidenceCounterMatrix[16][16]
Stores number of concidences between running sums discriminators in i:j sectors (Forward:Backward).
double m_BE_Amplitude[16]
Calculated amplitudes in sectors of Backward Endcap.
double m_com_en[2]
Monte Carlo energy of the final state particles in CMS frame.
double m_FE_Waveform_10ns[16][631]
Waveforms with 10ns sampling for Forward Endcap sectors.
double m_BE_Pedal[16]
Calculated pedestal values for Backward Endcap.
bool m_includeInnerFE
Flag to include Inner part of the Forward Endcap.
bool m_saveSignal
Flag to save signal wavefroms into file.
StoreArray< MCParticle > m_MCParticles
MC particles.
void calculate_amplitudes()
Calculates amplitude [GeV] in an event for each sector.
double m_thresholdBkg
Threshold [GeV] on signal when sector considered as lighted.
std::string m_testFileName
Name of file to save output.
double m_com_ph[2]
Monte Carlo phi of the final state particles in CMS frame.
Accessor to arrays stored in the data store.
Abstract base class for different kinds of events.