BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
DQAPi0Info.h
Go to the documentation of this file.
1#ifndef CLASS_DQAPi0INFO_H
2# define CLASS_DQAPI0INFO_H
3
4# include "EvtRecEvent/EvtRecTrack.h"
5
6# include "CLHEP/Vector/LorentzVector.h"
7
8# include <iostream>
9
10using namespace std;
12public:
13 DQAPi0Info();
15
16 void setchild( int n, EvtRecTrack* shower ) {
17 if ( n == 0 ) m_shower0 = shower;
18 else if ( n == 1 ) m_shower1 = shower;
19 }
20 void setchilds( EvtRecTrack* shower0, EvtRecTrack* shower1 ) {
21 m_shower0 = shower0;
22 m_shower1 = shower1;
23 }
25 if ( n == 0 ) return m_shower0;
26 else if ( n == 1 ) return m_shower1;
27 }
28 double m() { return m_mpi0; }
29 HepLorentzVector p4() { return m_p4; }
30 void setEnergyThreshold( double energyThreshold_b, double energyThreshold_e ) {
31 m_energyThreshold_b = energyThreshold_b;
32 m_energyThreshold_e = energyThreshold_e;
33 }
34 void setCosTheta( double costheta_b, double costheta_e1, double costheta_e2 ) {
35 m_costheta_b = costheta_b;
36 m_costheta_e1 = costheta_e1;
37 m_costheta_e2 = costheta_e2;
38 }
39 bool calculate() {
40 if ( m_shower0 == 0 || m_shower1 == 0 ) return false;
41 RecEmcShower* photon1 = m_shower0->emcShower();
42 RecEmcShower* photon2 = m_shower1->emcShower();
43 double eraw1 = photon1->energy();
44 double phiemc1 = photon1->phi();
45 double theta1 = photon1->theta();
46 double eraw2 = photon2->energy();
47 double phiemc2 = photon2->phi();
48 double theta2 = photon2->theta();
49 double costheta1 = fabs( cos( theta1 ) );
50 double costheta2 = fabs( cos( theta2 ) );
51 if ( !( ( costheta1 < m_costheta_b && eraw1 > m_energyThreshold_b ) ||
52 ( costheta1 > m_costheta_e1 && costheta1 < m_costheta_e2 &&
53 eraw1 > m_energyThreshold_e ) ) )
54 return false;
55 if ( !( ( costheta2 < m_costheta_b && eraw2 > m_energyThreshold_b ) ||
56 ( costheta2 > m_costheta_e1 && costheta2 < m_costheta_e2 &&
57 eraw2 > m_energyThreshold_e ) ) )
58 return false;
59
60 HepLorentzVector pemc1;
61 pemc1.setPx( eraw1 * sin( theta1 ) * cos( phiemc1 ) );
62 pemc1.setPy( eraw1 * sin( theta1 ) * sin( phiemc1 ) );
63 pemc1.setPz( eraw1 * cos( theta1 ) );
64 pemc1.setE( eraw1 );
65
66 HepLorentzVector pemc2;
67 pemc2.setPx( eraw2 * sin( theta2 ) * cos( phiemc2 ) );
68 pemc2.setPy( eraw2 * sin( theta2 ) * sin( phiemc2 ) );
69 pemc2.setPz( eraw2 * cos( theta2 ) );
70 pemc2.setE( eraw2 );
71
72 HepLorentzVector ppi0 = pemc1 + pemc2;
73 m_p4 = ppi0;
74 m_mpi0 = ppi0.m();
75 return true;
76 }
77
78private:
79 EvtRecTrack* m_shower0;
80 EvtRecTrack* m_shower1;
81 HepLorentzVector m_p4;
82 double m_mpi0;
83 double m_energyThreshold_b;
84 double m_energyThreshold_e;
85 double m_costheta_b;
86 double m_costheta_e1;
87 double m_costheta_e2;
88};
89#endif
const Int_t n
void setEnergyThreshold(double energyThreshold_b, double energyThreshold_e)
Definition DQAPi0Info.h:30
void setchilds(EvtRecTrack *shower0, EvtRecTrack *shower1)
Definition DQAPi0Info.h:20
void setCosTheta(double costheta_b, double costheta_e1, double costheta_e2)
Definition DQAPi0Info.h:34
HepLorentzVector p4()
Definition DQAPi0Info.h:29
bool calculate()
Definition DQAPi0Info.h:39
void setchild(int n, EvtRecTrack *shower)
Definition DQAPi0Info.h:16
double m()
Definition DQAPi0Info.h:28
EvtRecTrack * getchild(int n)
Definition DQAPi0Info.h:24