CGEM BOSS 6.6.5.h
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 "GaudiKernel/ObjectVector.h"
5//#include "GaudiKernel/AlgFactory.h"
6//#include "GaudiKernel/Algorithm.h"
7//#include "GaudiKernel/NTuple.h"
8//#include "GaudiKernel/IDataProviderSvc.h"
9
11//#include "EvtRecEvent/EvtRecDTag.h"
12
13#include "CLHEP/Vector/LorentzVector.h"
14
15#include <iostream>
16
17using namespace std;
19public:
22
23void setchild(int n, EvtRecTrack* shower)
24{
25 if (n==0)
26 m_shower0 = shower;
27 else if (n==1)
28 m_shower1 = shower;
29}
30void setchilds(EvtRecTrack* shower0, EvtRecTrack* shower1)
31{
32 m_shower0 = shower0;
33 m_shower1 = shower1;
34}
36{
37 if (n==0)
38 return m_shower0;
39 else if (n==1)
40 return m_shower1;
41}
42double m()
43{
44 return m_mpi0;
45}
46HepLorentzVector p4()
47{
48 return m_p4;
49}
50void setEnergyThreshold(double energyThreshold_b, double energyThreshold_e)
51{
52 m_energyThreshold_b = energyThreshold_b;
53 m_energyThreshold_e = energyThreshold_e;
54}
55void setCosTheta(double costheta_b, double costheta_e1, double costheta_e2)
56{
57 m_costheta_b = costheta_b;
58 m_costheta_e1 = costheta_e1;
59 m_costheta_e2 = costheta_e2;
60}
62{
63 if (m_shower0 == 0 || m_shower1 == 0 ) return false;
64 RecEmcShower* photon1= m_shower0->emcShower();
65 RecEmcShower* photon2= m_shower1->emcShower();
66 double eraw1 = photon1->energy();
67 double phiemc1 = photon1->phi();
68 double theta1 = photon1->theta();
69 double eraw2 = photon2->energy();
70 double phiemc2 = photon2->phi();
71 double theta2 = photon2->theta();
72 double costheta1 = fabs(cos(theta1));
73 double costheta2 = fabs(cos(theta2));
74 if (!((costheta1 < m_costheta_b && eraw1 > m_energyThreshold_b ) ||
75 (costheta1 > m_costheta_e1 && costheta1 < m_costheta_e2 && eraw1 > m_energyThreshold_e )))
76 return false;
77 if (!((costheta2 < m_costheta_b && eraw2 > m_energyThreshold_b ) ||
78 (costheta2 > m_costheta_e1 && costheta2 < m_costheta_e2 && eraw2 > m_energyThreshold_e )))
79 return false;
80
81 HepLorentzVector pemc1;
82 pemc1.setPx(eraw1*sin(theta1)*cos(phiemc1));
83 pemc1.setPy(eraw1*sin(theta1)*sin(phiemc1));
84 pemc1.setPz(eraw1*cos(theta1));
85 pemc1.setE(eraw1);
86
87 HepLorentzVector pemc2;
88 pemc2.setPx(eraw2*sin(theta2)*cos(phiemc2));
89 pemc2.setPy(eraw2*sin(theta2)*sin(phiemc2));
90 pemc2.setPz(eraw2*cos(theta2));
91 pemc2.setE(eraw2);
92
93 HepLorentzVector ppi0=pemc1+pemc2;
94 m_p4 = ppi0;
95 m_mpi0 = ppi0.m();
96 return true;
97}
98private:
99EvtRecTrack* m_shower0;
100EvtRecTrack* m_shower1;
101HepLorentzVector m_p4;
102double m_mpi0;
103double m_energyThreshold_b;
104double m_energyThreshold_e;
105double m_costheta_b;
106double m_costheta_e1;
107double m_costheta_e2;
108};
109#endif
double sin(const BesAngle a)
Definition BesAngle.h:210
double cos(const BesAngle a)
Definition BesAngle.h:213
const Int_t n
@ theta2
Definition TrkKalDeriv.h:24
@ theta1
Definition TrkKalDeriv.h:24
void setEnergyThreshold(double energyThreshold_b, double energyThreshold_e)
Definition DQAPi0Info.h:50
void setchilds(EvtRecTrack *shower0, EvtRecTrack *shower1)
Definition DQAPi0Info.h:30
void setCosTheta(double costheta_b, double costheta_e1, double costheta_e2)
Definition DQAPi0Info.h:55
HepLorentzVector p4()
Definition DQAPi0Info.h:46
bool calculate()
Definition DQAPi0Info.h:61
void setchild(int n, EvtRecTrack *shower)
Definition DQAPi0Info.h:23
double m()
Definition DQAPi0Info.h:42
EvtRecTrack * getchild(int n)
Definition DQAPi0Info.h:35
double theta() const
double phi() const
double energy() const
RecEmcShower * emcShower()
Definition EvtRecTrack.h:70