BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
MyUtil.cxx
Go to the documentation of this file.
1#include "DQADtagAlg/util/MyUtil.h"
2
3void fill(NTuple::Array<double>& nt_p4, const HepLorentzVector& p4) {
4 nt_p4[0] = p4.x();
5 nt_p4[1] = p4.y();
6 nt_p4[2] = p4.z();
7 nt_p4[3] = p4.e();
8}
9
10void fill(NTuple::Matrix<double>& nt_p4, const HepLorentzVector& p4, int i) {
11 nt_p4[i][0] = p4.x();
12 nt_p4[i][1] = p4.y();
13 nt_p4[i][2] = p4.z();
14 nt_p4[i][3] = p4.e();
15}
16HepLorentzVector getP4(RecEmcShower* gtrk) {
17 double eraw = gtrk->energy();
18 double phi = gtrk->phi();
19 double the = gtrk->theta();
20
21 double pxy = eraw * sin(the);
22
23 HepLorentzVector ptrk( pxy * cos(phi),
24 pxy * sin(phi),
25 eraw * cos(the),
26 eraw );
27
28 return ptrk;
29}
double sin(const BesAngle a)
double cos(const BesAngle a)
HepLorentzVector getP4(RecEmcShower *gtrk)
Definition: MyUtil.cxx:16
void fill(NTuple::Array< double > &nt_p4, const HepLorentzVector &p4)
Definition: MyUtil.cxx:3