/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/DQA/DQADtagAlg/DQADtagAlg-00-00-13/DQADtagAlg/util/MyUtil.h File Reference

#include "GaudiKernel/NTuple.h"
#include "CLHEP/Vector/LorentzVector.h"
#include "EmcRecEventModel/RecEmcShower.h"

Go to the source code of this file.

Functions

void fill (NTuple::Array< double > &nt_p4, const HepLorentzVector &p4)
void fill (NTuple::Matrix< double > &nt_p4, const HepLorentzVector &p4, int i)
HepLorentzVector getP4 (RecEmcShower *gtrk)


Function Documentation

void fill ( NTuple::Matrix< double > &  nt_p4,
const HepLorentzVector &  p4,
int  i 
)

Definition at line 10 of file MyUtil.cxx.

00010                                                                           {
00011    nt_p4[i][0] = p4.x();
00012    nt_p4[i][1] = p4.y();
00013    nt_p4[i][2] = p4.z();
00014    nt_p4[i][3] = p4.e();
00015 }

void fill ( NTuple::Array< double > &  nt_p4,
const HepLorentzVector &  p4 
)

Definition at line 3 of file MyUtil.cxx.

Referenced by MdcHitMapGuts::clear(), DQADtag::execute(), dchain::CombinatoricList< CandidateClass >::fill(), and TrkRecoTrk::setRep().

00003                                                                   {
00004    nt_p4[0] = p4.x();
00005    nt_p4[1] = p4.y();
00006    nt_p4[2] = p4.z();
00007    nt_p4[3] = p4.e();
00008 }

HepLorentzVector getP4 ( RecEmcShower gtrk  ) 

Definition at line 16 of file MyUtil.cxx.

References cos(), DstEmcShower::energy(), DstEmcShower::phi(), sin(), and DstEmcShower::theta().

Referenced by Pi0::make_pi0_list(), high_momentum::operator()(), and Pi0::Pi0ListToTDS().

00016                                            {
00017    double eraw = gtrk->energy();
00018    double phi  = gtrk->phi();
00019    double the  = gtrk->theta();
00020 
00021    double pxy  = eraw * sin(the);
00022 
00023    HepLorentzVector ptrk( pxy  * cos(phi),
00024                           pxy  * sin(phi),
00025                           eraw * cos(the),
00026                           eraw );
00027 
00028    return ptrk;
00029 }


Generated on Tue Nov 29 23:14:58 2016 for BOSS_7.0.2 by  doxygen 1.4.7