BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EmcRecTofMatch Class Reference

#include <EmcRecTofMatch.h>

Public Member Functions

 EmcRecTofMatch ()
 ~EmcRecTofMatch ()
void Match (RecEmcShowerMap &aShowerMap, RecEmcTofHitMap &tofHitMap)
RecEmcEnergy ECorrection (const RecEmcEnergy eIn)
 EmcRecTofMatch ()
 ~EmcRecTofMatch ()
void Match (RecEmcShowerMap &aShowerMap, RecEmcTofHitMap &tofHitMap)
RecEmcEnergy ECorrection (const RecEmcEnergy eIn)
 EmcRecTofMatch ()
 ~EmcRecTofMatch ()
void Match (RecEmcShowerMap &aShowerMap, RecEmcTofHitMap &tofHitMap)
RecEmcEnergy ECorrection (const RecEmcEnergy eIn)

Detailed Description

Constructor & Destructor Documentation

◆ EmcRecTofMatch() [1/3]

EmcRecTofMatch::EmcRecTofMatch ( )

Definition at line 9 of file EmcRecTofMatch.cxx.

9{}

◆ ~EmcRecTofMatch() [1/3]

EmcRecTofMatch::~EmcRecTofMatch ( )

Definition at line 11 of file EmcRecTofMatch.cxx.

11{}

◆ EmcRecTofMatch() [2/3]

EmcRecTofMatch::EmcRecTofMatch ( )

◆ ~EmcRecTofMatch() [2/3]

EmcRecTofMatch::~EmcRecTofMatch ( )

◆ EmcRecTofMatch() [3/3]

EmcRecTofMatch::EmcRecTofMatch ( )

◆ ~EmcRecTofMatch() [3/3]

EmcRecTofMatch::~EmcRecTofMatch ( )

Member Function Documentation

◆ ECorrection() [1/3]

RecEmcEnergy EmcRecTofMatch::ECorrection ( const RecEmcEnergy eIn)

Definition at line 95 of file EmcRecTofMatch.cxx.

95 {
96 EmcRecParameter& Para = EmcRecParameter::GetInstance();
97
98 RecEmcEnergy eOut = 0;
99 double par[4];
100 for ( int i = 0; i < 4; i++ ) { par[i] = Para.ECorr( i ); }
101
102 eOut = eIn / ( par[0] + par[1] * eIn + par[2] * eIn * eIn + par[3] * eIn * eIn * eIn );
103 return eOut;
104}
double ECorr(int n) const
static EmcRecParameter & GetInstance()

Referenced by Match().

◆ ECorrection() [2/3]

RecEmcEnergy EmcRecTofMatch::ECorrection ( const RecEmcEnergy eIn)

◆ ECorrection() [3/3]

RecEmcEnergy EmcRecTofMatch::ECorrection ( const RecEmcEnergy eIn)

◆ Match() [1/3]

void EmcRecTofMatch::Match ( RecEmcShowerMap & aShowerMap,
RecEmcTofHitMap & tofHitMap )

Definition at line 13 of file EmcRecTofMatch.cxx.

13 {
14 RecEmcShowerMap::iterator iShowerMap;
15 for ( iShowerMap = aShowerMap.begin(); iShowerMap != aShowerMap.end(); iShowerMap++ )
16 {
17
18 // calculate matching window
19 double eShower = iShowerMap->second.e5x5();
20 double matWindow = 0;
21 if ( eShower > 0 ) { matWindow = 0.01277 + 0.004268 / sqrt( eShower ); }
22
23 double phi = iShowerMap->second.phi();
24 phi = phi < 0 ? phi + CLHEP::twopi : phi;
25
26 int nphi1 = (int)( phi * 88. / CLHEP::twopi ); // tof layer1 number
27 int nphi2 = (int)( phi * 88. / CLHEP::twopi + 0.5 ); // tof layer2 number
28 nphi2 += 88;
29
30 // find max energy in both layer of tof
31 int nphi1max = nphi1;
32 double emax = tofHitMap[nphi1].Energy();
33 if ( tofHitMap[nphi1 - 1].Energy() > emax )
34 {
35 emax = tofHitMap[nphi1 - 1].Energy();
36 nphi1max = nphi1 - 1;
37 }
38 if ( tofHitMap[nphi1 + 1].Energy() > emax )
39 {
40 emax = tofHitMap[nphi1 + 1].Energy();
41 nphi1max = nphi1 + 1;
42 }
43 nphi1 = nphi1max;
44
45 int nphi2max = nphi2;
46 emax = tofHitMap[nphi2].Energy();
47 if ( tofHitMap[nphi2 - 1].Energy() > emax )
48 {
49 emax = tofHitMap[nphi2 - 1].Energy();
50 nphi2max = nphi2 - 1;
51 }
52 if ( tofHitMap[nphi2 + 1].Energy() > emax )
53 {
54 emax = tofHitMap[nphi2 + 1].Energy();
55 nphi2max = nphi2 + 1;
56 }
57 nphi2 = nphi2max;
58
59 double etof2x1 = 0;
60 double etof2x3 = 0;
61 int nphi[6] = { nphi1 - 1, nphi1, nphi1 + 1, nphi2 - 1, nphi2, nphi2 + 1 };
62
63 for ( int i = 0; i < 6; i++ )
64 {
65
66 if ( tofHitMap[nphi[i]].Energy() <= 0 ) continue;
67
68 HepPoint3D pos = tofHitMap[nphi[i]].Position();
69 /*if(i<1) {
70 //tof layer1 center
71 pos = HepPoint3D(0,838.5,tofHitMap[nphi[i]].ZPosition());
72 } else {
73 //tof layer2 center
74 pos = HepPoint3D(0,895.5,tofHitMap[nphi[i]].ZPosition());
75 }*/
76
77 // matching window
78 if ( fabs( pos.theta() - iShowerMap->second.theta() ) < 3 * matWindow )
79 {
80 etof2x3 += tofHitMap[nphi[i]].Energy();
81 if ( i == 1 || i == 4 ) { etof2x1 += tofHitMap[nphi[i]].Energy(); }
82 }
83
84 tofHitMap[nphi[i]].Energy( 0 );
85 }
86
87 double ecorr = iShowerMap->second.e5x5() + etof2x3 / GeV;
88
89 iShowerMap->second.ETof2x3( etof2x3 / GeV );
90 iShowerMap->second.ETof2x1( etof2x1 / GeV );
91 iShowerMap->second.setEnergy( ECorrection( ecorr ) );
92 }
93}
HepGeom::Point3D< double > HepPoint3D
RecEmcEnergy ECorrection(const RecEmcEnergy eIn)

◆ Match() [2/3]

void EmcRecTofMatch::Match ( RecEmcShowerMap & aShowerMap,
RecEmcTofHitMap & tofHitMap )

◆ Match() [3/3]

void EmcRecTofMatch::Match ( RecEmcShowerMap & aShowerMap,
RecEmcTofHitMap & tofHitMap )

The documentation for this class was generated from the following files: