#include <PlotVtx.h>
Inheritance diagram for Anp::HistVtx:
Public Member Functions | |
HistVtx () | |
virtual | ~HistVtx () |
bool | Fill (const Vertex &vertex, double weight) |
bool | Fill (const Vertex &lhs, const Vertex &rhs, double weight) |
bool | Make (TDirectory *dir, const std::string &option) |
void | SetCenter (double x, double y) |
Private Member Functions | |
TH1 * | GetTH1 (const std::string &key, const std::string &name="") |
TH2 * | GetTH2 (const std::string &key, const std::string &name="") |
Private Attributes | |
bool | fPlot |
int | fNMiss |
double | fCenterX |
double | fCenterY |
TDirectory * | fDir |
TH1 * | fX |
TH1 * | fY |
TH1 * | fU |
TH1 * | fV |
TH1 * | fZ |
TH1 * | fR2 |
TH1 * | fCosX |
TH1 * | fCosY |
TH1 * | fCosZ |
TH2 * | fYX |
TH2 * | fXZ |
TH2 * | fYZ |
TH1 * | fDiffX |
TH1 * | fDiffY |
TH1 * | fDiffZ |
TH1 * | fDiffR2d |
TH1 * | fDiffR3d |
TH1 * | fProjRad |
TH1 * | fProjAng |
TH2 * | fDiffR2dForYX |
TH2 * | fDiffR2dForXZ |
TH2 * | fDiffR2dForYZ |
TH2 * | fProjRadVsRad |
|
Definition at line 30 of file PlotVtx.cxx.
00031 :fPlot(false), 00032 fNMiss(0), 00033 fCenterX(1.4828), 00034 fCenterY(0.2384), 00035 fDir(0), 00036 fX(0), 00037 fY(0), 00038 fU(0), 00039 fV(0), 00040 fZ(0), 00041 fR2(0), 00042 fCosX(0), 00043 fCosY(0), 00044 fCosZ(0), 00045 fYX(0), 00046 fXZ(0), 00047 fYZ(0), 00048 fDiffX(0), 00049 fDiffY(0), 00050 fDiffZ(0), 00051 fDiffR2d(0), 00052 fDiffR3d(0), 00053 fProjRad(0), 00054 fProjAng(0), 00055 fDiffR2dForYX(0), 00056 fDiffR2dForXZ(0), 00057 fDiffR2dForYZ(0), 00058 fProjRadVsRad(0) 00059 { 00060 } |
|
Definition at line 63 of file PlotVtx.cxx.
00064 { 00065 } |
|
Definition at line 93 of file PlotVtx.cxx. References fCenterX, fCenterY, fDiffR2d, fDiffR2dForXZ, fDiffR2dForYX, fDiffR2dForYZ, fDiffR3d, fDiffX, fDiffY, fDiffZ, fDir, Fill(), fPlot, fProjAng, fProjRad, fProjRadVsRad, Anp::Vertex::X(), Anp::Vertex::Y(), and Anp::Vertex::Z().
00094 { 00095 if(!fPlot || !fDir) return false; 00096 00097 const double diffX = lhs.X() - rhs.X(); 00098 const double diffY = lhs.Y() - rhs.Y(); 00099 const double diffZ = lhs.Z() - rhs.Z(); 00100 const double diffR2d = std::sqrt(diffX*diffX + diffY*diffY); 00101 const double diffR3d = std::sqrt(diffX*diffX + diffY*diffY + diffZ*diffZ); 00102 00103 fDiffX -> Fill(diffX, weight); 00104 fDiffY -> Fill(diffY, weight); 00105 fDiffZ -> Fill(diffZ, weight); 00106 00107 fDiffR2d -> Fill(diffR2d, weight); 00108 fDiffR3d -> Fill(diffR3d, weight); 00109 00110 // 00111 // Compute 2d (xy) vector between lhs vertex and fiducial center 00112 // 00113 const double coordX = lhs.X() - fCenterX; 00114 const double coordY = lhs.Y() - fCenterY; 00115 const double coordR = std::sqrt(coordX*coordX + coordY*coordY); 00116 00117 if(coordR > 0.0) 00118 { 00119 fProjRad -> Fill((+coordX*diffX + coordY*diffY)/coordR, weight); 00120 fProjAng -> Fill((-coordY*diffX + coordX*diffY)/coordR, weight); 00121 00122 if(fProjRadVsRad) fProjRadVsRad -> Fill(coordR, (+coordX*diffX + coordY*diffY)/coordR, weight); 00123 } 00124 else 00125 { 00126 fProjRad -> Fill(0.0, weight); 00127 fProjAng -> Fill(0.0, weight); 00128 } 00129 00130 if(fDiffR2dForYX) fDiffR2dForYX -> Fill(lhs.X(), lhs.Y(), diffR2d); 00131 if(fDiffR2dForXZ) fDiffR2dForXZ -> Fill(lhs.Z(), lhs.X(), diffR2d); 00132 if(fDiffR2dForYZ) fDiffR2dForYZ -> Fill(lhs.Z(), lhs.Y(), diffR2d); 00133 00134 return true; 00135 } |
|
Definition at line 68 of file PlotVtx.cxx. References Anp::Vertex::CosX(), Anp::Vertex::CosY(), Anp::Vertex::CosZ(), fCosX, fCosY, fCosZ, fDir, fPlot, fR2, fU, fV, fX, fXZ, fY, fYX, fYZ, fZ, Anp::Vertex::U(), Anp::Vertex::V(), Anp::Vertex::X(), Anp::Vertex::Y(), and Anp::Vertex::Z(). Referenced by Fill().
00069 { 00070 if(!fPlot || !fDir) return false; 00071 00072 fX -> Fill(vertex.X(), weight); 00073 fY -> Fill(vertex.Y(), weight); 00074 fU -> Fill(vertex.U(), weight); 00075 fV -> Fill(vertex.V(), weight); 00076 fZ -> Fill(vertex.Z(), weight); 00077 00078 fR2 -> Fill(vertex.X()*vertex.X() + vertex.Y()*vertex.Y(), weight); 00079 00080 fCosX -> Fill(vertex.CosX(), weight); 00081 fCosY -> Fill(vertex.CosY(), weight); 00082 fCosZ -> Fill(vertex.CosZ(), weight); 00083 00084 if(fYX) fYX -> Fill(vertex.X(), vertex.Y(), weight); 00085 if(fXZ) fXZ -> Fill(vertex.Z(), vertex.X(), weight); 00086 if(fYZ) fYZ -> Fill(vertex.Z(), vertex.Y(), weight); 00087 00088 return true; 00089 } |
|
Definition at line 201 of file PlotVtx.cxx. References fDir, fNMiss, and Anp::SetDir().
00202 { 00203 TH1 *h = HistMan::Instance().CreateTH1(key, "vertex"); 00204 if(h) 00205 { 00206 Anp::SetDir(h, fDir, name); 00207 } 00208 else 00209 { 00210 ++fNMiss; 00211 } 00212 00213 return h; 00214 } |
|
Definition at line 217 of file PlotVtx.cxx. References fDir, fNMiss, and Anp::SetDir().
00218 { 00219 TH2 *h = HistMan::Instance().CreateTH2(key, "vertex"); 00220 if(h) 00221 { 00222 Anp::SetDir(h, fDir, name); 00223 } 00224 else 00225 { 00226 ++fNMiss; 00227 } 00228 00229 return h; 00230 } |
|
Definition at line 138 of file PlotVtx.cxx. References fCosX, fCosY, fCosZ, fDiffR2d, fDiffR2dForXZ, fDiffR2dForYX, fDiffR2dForYZ, fDiffR3d, fDiffX, fDiffY, fDiffZ, fDir, fNMiss, fPlot, fProjAng, fProjRad, fProjRadVsRad, fR2, fU, fV, fX, fXZ, fY, fYX, fYZ, fZ, and option.
00139 { 00140 if(!dir) return false; 00141 00142 fDir = dir; 00143 fPlot = false; 00144 00145 fX = HistVtx::GetTH1("x"); 00146 fY = HistVtx::GetTH1("y"); 00147 fZ = HistVtx::GetTH1("z"); 00148 fU = HistVtx::GetTH1("u"); 00149 fV = HistVtx::GetTH1("v"); 00150 fR2 = HistVtx::GetTH1("r2"); 00151 fCosX = HistVtx::GetTH1("cosx"); 00152 fCosY = HistVtx::GetTH1("cosy"); 00153 fCosZ = HistVtx::GetTH1("cosz"); 00154 00155 if(option.find("plot_2d") != string::npos) 00156 { 00157 fYX = HistVtx::GetTH2("yx"); 00158 fXZ = HistVtx::GetTH2("xz"); 00159 fYZ = HistVtx::GetTH2("yz"); 00160 } 00161 00162 if(option.find("plot_diff") != string::npos) 00163 { 00164 fDiffX = HistVtx::GetTH1("diff_x"); 00165 fDiffY = HistVtx::GetTH1("diff_y"); 00166 fDiffZ = HistVtx::GetTH1("diff_z"); 00167 fDiffR2d = HistVtx::GetTH1("diff_r2d"); 00168 fDiffR3d = HistVtx::GetTH1("diff_r3d"); 00169 fProjRad = HistVtx::GetTH1("proj_rad"); 00170 fProjAng = HistVtx::GetTH1("proj_ang"); 00171 00172 if(option.find("plot_2d") != string::npos) 00173 { 00174 fDiffR2dForYX = HistVtx::GetTH2("diff_r2d_yx"); 00175 fDiffR2dForXZ = HistVtx::GetTH2("diff_r2d_xz"); 00176 fDiffR2dForYZ = HistVtx::GetTH2("diff_r2d_yz"); 00177 fProjRadVsRad = HistVtx::GetTH2("proj_rad_vs_rad"); 00178 } 00179 } 00180 00181 if(fNMiss == 0) 00182 { 00183 fPlot = true; 00184 } 00185 else 00186 { 00187 cerr << "HistVtx::Make - missed " << fNMiss << " histograms" << endl; 00188 } 00189 00190 return fPlot; 00191 } |
|
Definition at line 194 of file PlotVtx.cxx. References fCenterX, and fCenterY.
|
|
Definition at line 50 of file PlotVtx.h. Referenced by Fill(), and SetCenter(). |
|
Definition at line 51 of file PlotVtx.h. Referenced by Fill(), and SetCenter(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|