StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StjTowerEnergyToFourVec.cxx
1 // $Id: StjTowerEnergyToFourVec.cxx,v 1.1 2008/11/27 07:35:32 tai Exp $
2 // Copyright (C) 2008 Tai Sakuma <sakuma@bnl.gov>
3 #include "StjTowerEnergyToFourVec.h"
4 
5 #include "StjTowerEnergyList.h"
6 #include "StjFourVecList.h"
7 
9 
10 StjFourVec StjTowerEnergyToFourVec::operator()(const StjTowerEnergy& towerEnergy)
11 {
12  StjFourVec ret;
13  ret.runNumber = towerEnergy.runNumber;
14  ret.eventId = towerEnergy.eventId;
15  ret.type = 2;
16  ret.detectorId = towerEnergy.detectorId;
17  ret.trackId = 0;
18  ret.towerId = towerEnergy.towerId;
19  ret.mcparticleId = 0;
20  ret.vertexZ = towerEnergy.vertexZ;
21 
22  TLorentzVector p4(_towerenergy2tlorentzvector(towerEnergy));
23  ret.pt = p4.Pt();
24  ret.eta = p4.Eta();
25  ret.phi = p4.Phi();
26  ret.m = p4.M();
27  return ret;
28 }