30 #include <calobase/RawTower.h>
31 #include <calobase/RawTowerContainer.h>
32 #include <calobase/RawTowerGeom.h>
33 #include <calobase/RawTowerGeomContainer.h>
34 #include <calobase/TowerInfoContainer.h>
35 #include <calobase/TowerInfo.h>
43 m_outputFileName(outputFile),
74 std::cout <<
"HCalJetPhiShift::HCalJetPhiShift(const std::string &name) Calling ctor" << std::endl;
80 std::cout <<
"HCalJetPhiShift::~HCalJetPhiShift() Calling dtor" << std::endl;
86 std::cout <<
"HCalJetPhiShift::Init(PHCompositeNode *topNode) Initializing" << std::endl;
88 std::cout <<
"HCalJetPhiShift::Init - Output to " <<
m_outputFileName << std::endl;
91 m_T =
new TTree(
"T",
"HCalJetPhiShift Tree");
127 std::cout <<
"HCalJetPhiShift::InitRun(PHCompositeNode *topNode) Initializing for Run XXX" << std::endl;
175 std::cout <<
"HCalJetPhiShift::EndRun(const int runnumber) Ending Run for Run " << runnumber << std::endl;
182 std::cout <<
"HCalJetPhiShift::End - Output to " <<
m_outputFileName << std::endl;
186 std::cout <<
"HCalJetPhiShift::End(PHCompositeNode *topNode) This is the End..." << std::endl;
193 std::cout <<
"HCalJetPhiShift::Reset(PHCompositeNode *topNode) being Reset" << std::endl;
200 std::cout <<
"HCalJetPhiShift::Print(const std::string &what) const Printing info for " << what << std::endl;
212 std::cout <<
PHWHERE <<
" ERROR: Can't find G4TruthInfo" << std::endl;
218 iter != range.second;
223 if (primary->
get_e() < 0.)
233 m_pt = std::sqrt(gpx * gpx + gpy * gpy);
239 m_phi = std::atan2(gpy, gpx);
248 TowerInfoContainer *towersIH3 = findNode::getClass<TowerInfoContainer>(topNode,
"TOWERINFO_CALIB_HCALIN");
249 TowerInfoContainer *towersOH3 = findNode::getClass<TowerInfoContainer>(topNode,
"TOWERINFO_CALIB_HCALOUT");
251 TowerInfoContainer *towersEM3 = findNode::getClass<TowerInfoContainer>(topNode,
"TOWERINFO_RAW_CEMC");
252 RawTowerGeomContainer *tower_geomIH = findNode::getClass<RawTowerGeomContainer>(topNode,
"TOWERGEOM_HCALIN");
253 RawTowerGeomContainer *tower_geomOH = findNode::getClass<RawTowerGeomContainer>(topNode,
"TOWERGEOM_HCALOUT");
254 RawTowerGeomContainer *tower_geomEM = findNode::getClass<RawTowerGeomContainer>(topNode,
"TOWERGEOM_CEMC");
255 if(!towersIH3 || !towersOH3 || !towersEM3){
257 <<
"HCalJetPhiShift::process_event - Error cannot find raw tower node "
263 if(!tower_geomIH || !tower_geomOH || !tower_geomEM){
265 <<
"HCalJetPhiShift::process_event - Error cannot find raw tower geometry "
273 const int n_channels_IH = (int) towersIH3->
size();
276 for (
int i_chan=0; i_chan<n_channels_IH; ++i_chan) {
281 unsigned int calokey = towersIH3->
encode_key(i_chan);
286 float tower_phi = tower_geomIH->get_tower_geometry(key)->get_phi();
287 float tower_eta = tower_geomIH->get_tower_geometry(key)->get_eta();
297 tower_out = towersOH3->get_tower_at_channel(i_chan);
301 unsigned int calokey = towersOH3->encode_key(i_chan);
302 int ieta = towersOH3->getTowerEtaBin(calokey);
303 int iphi = towersOH3->getTowerPhiBin(calokey);
306 float tower_phi = tower_geomOH->get_tower_geometry(key)->get_phi();
307 float tower_eta = tower_geomOH->get_tower_geometry(key)->get_eta();
318 const int n_channels_EM = (int) towersEM3->size();
319 for (
int i_chan=0; i_chan<n_channels_EM; ++i_chan) {
322 TowerInfo *tower_emc = towersEM3->get_tower_at_channel(i_chan);
326 unsigned int calokey = towersEM3->encode_key(i_chan);
327 int ieta = towersEM3->getTowerEtaBin(calokey);
328 int iphi = towersEM3->getTowerPhiBin(calokey);
331 RawTowerGeom *tower_geom = tower_geomEM->get_tower_geometry(key);
332 float tower_phi = tower_geom->
get_phi();
333 float tower_eta = tower_geom->
get_eta();