74 #include <g4jets/JetMap.h>
75 #include <g4jets/Jetv1.h>
79 #include <calobase/RawTower.h>
80 #include <calobase/RawTowerContainer.h>
81 #include <calobase/RawTowerGeom.h>
82 #include <calobase/RawTowerGeomContainer.h>
83 #include <calobase/TowerInfoContainer.h>
84 #include <calobase/TowerInfo.h>
94 , m_outputFileName(outputfilename)
96 std::cout <<
"UEvsEtaCentrality::UEvsEtaCentrality(const std::string &name) Calling ctor" << std::endl;
102 std::cout <<
"UEvsEtaCentrality::~UEvsEtaCentrality() Calling dtor" << std::endl;
108 std::cout <<
"UEvsEtaCentrality::Init(PHCompositeNode *topNode) Initializing" << std::endl;
111 std::cout <<
"MyJetAnalysis::Init - Outoput to " <<
m_outputFileName << std::endl;
115 hv2_cent =
new TH2F(
"hv2_cent",
"",10,0,100,50,0,0.5);
116 hPsi2_cent =
new TH2F(
"hPsi2_cent",
"",10,0,100,50,-1.57,1.57);
135 std::cout <<
"UEvsEtaCentrality::InitRun(PHCompositeNode *topNode) Initializing for Run XXX" << std::endl;
144 CentralityInfo* cent_node = findNode::getClass<CentralityInfo>(topNode,
"CentralityInfo");
148 <<
"MyJetAnalysis::process_event - Error can not find centrality node "
156 TowerInfoContainer *towersEM3 = findNode::getClass<TowerInfoContainer>(topNode,
"TOWERINFO_CALIB_CEMC_RETOWER");
157 TowerInfoContainer *towersIH3 = findNode::getClass<TowerInfoContainer>(topNode,
"TOWERINFO_CALIB_HCALIN");
158 TowerInfoContainer *towersOH3 = findNode::getClass<TowerInfoContainer>(topNode,
"TOWERINFO_CALIB_HCALOUT");
159 RawTowerGeomContainer *tower_geom = findNode::getClass<RawTowerGeomContainer>(topNode,
"TOWERGEOM_HCALIN");
160 RawTowerGeomContainer *tower_geomOH = findNode::getClass<RawTowerGeomContainer>(topNode,
"TOWERGEOM_HCALOUT");
161 if(!towersEM3 || !towersIH3 || !towersOH3){
163 <<
"MyJetAnalysis::process_event - Error can not find raw tower node "
168 if(!tower_geom || !tower_geomOH){
170 <<
"MyJetAnalysis::process_event - Error can not find raw tower geometry "
176 TowerBackground *background = findNode::getClass<TowerBackground>(topNode,
"TowerInfoBackground_Sub2");
178 std::cout<<
"Can't get background. Exiting"<<std::endl;
182 float background_v2 = 0;
183 float background_Psi2 = 0;
184 float m_centrality = 0;
186 m_centrality = cent_node->
get_centile(CentralityInfo::PROP::epd_NS);
187 background_v2 = background->
get_v2();
188 background_Psi2 = background->
get_Psi2();
190 hv2_cent->Fill(m_centrality, background_v2);
191 hPsi2_cent->Fill(m_centrality, background_Psi2);
198 float UEi = background->
get_UE(1).at(i);
199 float UEo = background->
get_UE(2).at(i);
200 float UEe = background->
get_UE(0).at(i);
202 double eta = tower_geom->get_etacenter(i);
204 if (m_centrality > 0 && m_centrality <= 20){
209 if (m_centrality > 20 && m_centrality <= 50){
215 if (m_centrality > 50 && m_centrality <= 100){
243 std::cout <<
"UEvsEtaCentrality::EndRun(const int runnumber) Ending Run for Run " << runnumber << std::endl;
250 std::cout <<
"MyJetAnalysis::End - Output to " <<
m_outputFileName << std::endl;
264 std::cout <<
"UEvsEtaCentrality::End(PHCompositeNode *topNode) This is the End..." << std::endl;
271 std::cout <<
"UEvsEtaCentrality::Reset(PHCompositeNode *topNode) being Reset" << std::endl;
278 std::cout <<
"UEvsEtaCentrality::Print(const std::string &what) const Printing info for " << what << std::endl;