66 #include <calobase/RawCluster.h>
67 #include <calobase/RawClusterContainer.h>
68 #include <calobase/RawClusterUtility.h>
78 #include <boost/format.hpp>
80 #include "TLorentzVector.h"
86 std::cout <<
"Pi0MassAnalysis::Pi0MassAnalysis(const std::string &name) Calling ctor" << std::endl;
93 std::cout <<
"Pi0MassAnalysis::~Pi0MassAnalysis() Calling dtor" << std::endl;
99 std::cout <<
"Pi0MassAnalysis::Init(PHCompositeNode *topNode) Initializing" << std::endl;
105 _tree =
new TTree(
"ttree",
"");
107 _tree->Branch(
"nclus", &
nclus,
"nclus/I");
108 _tree->Branch(
"cluster_energy",
cluster_energy,
"cluster_energy[nclus]/F");
109 _tree->Branch(
"cluster_eta",
cluster_eta,
"cluster_eta[nclus]/F");
110 _tree->Branch(
"cluster_phi",
cluster_phi,
"cluster_phi[nclus]/F");
111 _tree->Branch(
"cluster_prob",
cluster_prob,
"cluster_prob[nclus]/F");
112 _tree->Branch(
"cluster_chi2",
cluster_chi2,
"cluster_chi2[nclus]/F");
114 _tree->Branch(
"npi0", &
npi0,
"npi0/I");
115 _tree->Branch(
"pi0cand_pt",
pi0cand_pt,
"pi0cand_pt[npi0]/F");
116 _tree->Branch(
"pi0cand_eta",
pi0cand_eta,
"pi0cand_eta[npi0]/F");
117 _tree->Branch(
"pi0cand_phi",
pi0cand_phi,
"pi0cand_phi[npi0]/F");
118 _tree->Branch(
"pi0cand_mass",
pi0cand_mass,
"pi0cand_mass[npi0]/F");
120 pi0MassHist =
new TH1F(
"pi0mass",
";m_{#gamma#gamma} [GeV];Entries", 50, 0.0, 0.3);
122 for (
int i = 0;
i < 24;
i++)
125 std::string histName = (formatting % (-1.2 +
i * 0.1) % (-1.1 +
i * 0.1)).
str();
126 pi0MassHistEtaDep[
i] =
new TH1F(histName.c_str(),
";m_{#gamma#gamma} [GeV];Entries", 50, 0.0, 0.3);
135 std::cout <<
"Pi0MassAnalysis::InitRun(PHCompositeNode *topNode) Initializing for Run XXX" << std::endl;
148 GlobalVertexMap *vertexmap = findNode::getClass<GlobalVertexMap>(topNode,
"GlobalVertexMap");
151 if (!vertexmap->
empty())
160 CLHEP::Hep3Vector
vertex(vx, vy, vz);
162 RawClusterContainer *clusterEM = findNode::getClass<RawClusterContainer>(topNode,
"CLUSTER_CEMC");
202 if (v1.DeltaR(v2) > 0.8)
216 int eta_index = floor((res.Eta() + 1.2) * 10);
218 if (eta_index >= 0 && eta_index < 24)
230 std::cout <<
counter <<
" events are processed" << std::endl;
244 std::cout <<
"Pi0MassAnalysis::EndRun(const int runnumber) Ending Run for Run " << runnumber << std::endl;
251 std::cout <<
"Pi0MassAnalysis::End(PHCompositeNode *topNode) This is the End..." << std::endl;
262 std::cout <<
"Pi0MassAnalysis::Reset(PHCompositeNode *topNode) being Reset" << std::endl;
269 std::cout <<
"Pi0MassAnalysis::Print(const std::string &what) const Printing info for " << what << std::endl;