BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EmcDigi.cxx
Go to the documentation of this file.
1#include "EmcRawEvent/EmcDigi.h"
2#include "EmcWaveform/EmcWaveform.h"
3#include "RawEvent/RawDataUtil.h"
4
5EmcDigi::EmcDigi( const Identifier& id, const unsigned int timeChannel,
6 const unsigned int chargeChannel )
7 : RawData( id, timeChannel, chargeChannel ), m_measure( 0 ) {}
8
9EmcDigi::EmcDigi( const Identifier& id, const unsigned int timeChannel,
10 const unsigned int chargeChannel, const unsigned int measure )
11 : RawData( id, timeChannel, chargeChannel ), m_measure( measure ) {}
12
13EmcDigi::EmcDigi( const unsigned int id ) : RawData( id ), m_measure( 0 ) {}
14
15// mixing two digi with EmcWaveform
17 if ( m_id != digi.identify() ) // do nothing
18 return *this;
19
20 double e1 = RawDataUtil::EmcCharge( m_measure, m_chargeChannel );
22 double e2 = RawDataUtil::EmcCharge( digi.getMeasure(), digi.getChargeChannel() );
23 double t2 = RawDataUtil::EmcTime( digi.getTimeChannel() );
24
25 EmcWaveform wave1, wave2;
26 wave1.makeWaveform( e1, t1 );
27 wave2.makeWaveform( e2, t2 );
28
29 // mixing
30 wave1 += wave2;
31
32 double energy;
33 int time;
34 energy = wave1.max( time );
35
39
40 return *this;
41}
Double_t time
Double_t e1
Double_t e2
************Class m_ypar INTEGER m_KeyWgt INTEGER m_KeyIHVP INTEGER m_KeyGPS INTEGER m_IsBeamPolarized INTEGER m_EvtGenInterface DOUBLE PRECISION m_Emin DOUBLE PRECISION m_sphot DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_q2 DOUBLE PRECISION m_PolBeam2 DOUBLE PRECISION m_xErrPb *COMMON c_KK2f $ !CMS energy average $ !Spin Polarization vector first beam $ !Spin Polarization vector second beam $ !Beam energy spread[GeV] $ !minimum hadronization energy[GeV] $ !input READ never touch them !$ !debug facility $ !maximum weight $ !inverse alfaQED $ !minimum real photon energy
Definition KK2f.h:50
EmcDigi & operator+=(const EmcDigi &)
Definition EmcDigi.cxx:16
EmcDigi(const Identifier &id, const unsigned int timeChannel, const unsigned int chargeChannel)
Definition EmcDigi.cxx:5
double max(int &binOfMax) const
void makeWaveform(double energy, double time)
static double EmcTime(int timeChannel)
static int EmcChargeChannel(double charge)
static int EmcChargeMeasure(double charge)
static double EmcCharge(int measure, int chargeChannel)
RawData(const Identifier &id, const unsigned int timeChannel=0, const unsigned int chargeChannel=0)
Definition RawData.cxx:4
virtual Identifier identify() const
Definition RawData.cxx:15
unsigned int getChargeChannel() const
Definition RawData.cxx:35
unsigned int getTimeChannel() const
Definition RawData.cxx:32