#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 * | 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 fCosX(0), 00042 fCosY(0), 00043 fCosZ(0), 00044 fYX(0), 00045 fXZ(0), 00046 fYZ(0), 00047 fDiffX(0), 00048 fDiffY(0), 00049 fDiffZ(0), 00050 fDiffR2d(0), 00051 fDiffR3d(0), 00052 fProjRad(0), 00053 fProjAng(0), 00054 fDiffR2dForYX(0), 00055 fDiffR2dForXZ(0), 00056 fDiffR2dForYZ(0), 00057 fProjRadVsRad(0) 00058 { 00059 }
|
|
|
Definition at line 62 of file PlotVtx.cxx. 00063 {
00064 }
|
|
||||||||||||||||
|
Definition at line 90 of file PlotVtx.cxx. References fDiffR2d, fDiffR2dForXZ, fDiffR2dForYX, fDiffR2dForYZ, fDiffR3d, fDiffX, fDiffY, fDiffZ, Fill(), fPlot, fProjAng, fProjRad, fProjRadVsRad, Anp::Vertex::X(), Anp::Vertex::Y(), and Anp::Vertex::Z(). 00091 {
00092 if(!fPlot || !fDir) return false;
00093
00094 const double diffX = lhs.X() - rhs.X();
00095 const double diffY = lhs.Y() - rhs.Y();
00096 const double diffZ = lhs.Z() - rhs.Z();
00097 const double diffR2d = std::sqrt(diffX*diffX + diffY*diffY);
00098 const double diffR3d = std::sqrt(diffX*diffX + diffY*diffY + diffZ*diffZ);
00099
00100 fDiffX -> Fill(diffX, weight);
00101 fDiffY -> Fill(diffY, weight);
00102 fDiffZ -> Fill(diffZ, weight);
00103
00104 fDiffR2d -> Fill(diffR2d, weight);
00105 fDiffR3d -> Fill(diffR3d, weight);
00106
00107 //
00108 // Compute 2d (xy) vector between lhs vertex and fiducial center
00109 //
00110 const double coordX = lhs.X() - fCenterX;
00111 const double coordY = lhs.Y() - fCenterY;
00112 const double coordR = std::sqrt(coordX*coordX + coordY*coordY);
00113
00114 if(coordR > 0.0)
00115 {
00116 fProjRad -> Fill((+coordX*diffX + coordY*diffY)/coordR, weight);
00117 fProjAng -> Fill((-coordY*diffX + coordX*diffY)/coordR, weight);
00118
00119 if(fProjRadVsRad) fProjRadVsRad -> Fill(coordR, (+coordX*diffX + coordY*diffY)/coordR, weight);
00120 }
00121 else
00122 {
00123 fProjRad -> Fill(0.0, weight);
00124 fProjAng -> Fill(0.0, weight);
00125 }
00126
00127 if(fDiffR2dForYX) fDiffR2dForYX -> Fill(lhs.X(), lhs.Y(), diffR2d);
00128 if(fDiffR2dForXZ) fDiffR2dForXZ -> Fill(lhs.Z(), lhs.X(), diffR2d);
00129 if(fDiffR2dForYZ) fDiffR2dForYZ -> Fill(lhs.Z(), lhs.Y(), diffR2d);
00130
00131 return true;
00132 }
|
|
||||||||||||
|
Definition at line 67 of file PlotVtx.cxx. References Anp::Vertex::CosX(), Anp::Vertex::CosY(), Anp::Vertex::CosZ(), fCosX, fCosY, fCosZ, fPlot, 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(). 00068 {
00069 if(!fPlot || !fDir) return false;
00070
00071 fX -> Fill(vertex.X(), weight);
00072 fY -> Fill(vertex.Y(), weight);
00073 fU -> Fill(vertex.U(), weight);
00074 fV -> Fill(vertex.V(), weight);
00075 fZ -> Fill(vertex.Z(), weight);
00076
00077 fCosX -> Fill(vertex.CosX(), weight);
00078 fCosY -> Fill(vertex.CosY(), weight);
00079 fCosZ -> Fill(vertex.CosZ(), weight);
00080
00081 if(fYX) fYX -> Fill(vertex.X(), vertex.Y(), weight);
00082 if(fXZ) fXZ -> Fill(vertex.Z(), vertex.X(), weight);
00083 if(fYZ) fYZ -> Fill(vertex.Z(), vertex.Y(), weight);
00084
00085 return true;
00086 }
|
|
||||||||||||
|
Definition at line 197 of file PlotVtx.cxx. References fDir, and Anp::SetDir(). 00198 {
00199 TH1 *h = HistMan::Instance().CreateTH1(key, "vertex");
00200 if(h)
00201 {
00202 Anp::SetDir(h, fDir, name);
00203 }
00204 else
00205 {
00206 ++fNMiss;
00207 }
00208
00209 return h;
00210 }
|
|
||||||||||||
|
Definition at line 213 of file PlotVtx.cxx. References fDir, and Anp::SetDir(). 00214 {
00215 TH2 *h = HistMan::Instance().CreateTH2(key, "vertex");
00216 if(h)
00217 {
00218 Anp::SetDir(h, fDir, name);
00219 }
00220 else
00221 {
00222 ++fNMiss;
00223 }
00224
00225 return h;
00226 }
|
|
||||||||||||
|
Definition at line 135 of file PlotVtx.cxx. References fCosX, fCosY, fCosZ, fDiffR2d, fDiffR2dForXZ, fDiffR2dForYX, fDiffR2dForYZ, fDiffR3d, fDiffX, fDiffY, fDiffZ, fDir, fNMiss, fPlot, fProjAng, fProjRad, fProjRadVsRad, fU, fV, fX, fXZ, fY, fYX, fYZ, fZ, and option. 00136 {
00137 if(!dir) return false;
00138
00139 fDir = dir;
00140 fPlot = false;
00141
00142 fX = HistVtx::GetTH1("x");
00143 fY = HistVtx::GetTH1("y");
00144 fZ = HistVtx::GetTH1("z");
00145 fU = HistVtx::GetTH1("u");
00146 fV = HistVtx::GetTH1("v");
00147 fCosX = HistVtx::GetTH1("cosx");
00148 fCosY = HistVtx::GetTH1("cosy");
00149 fCosZ = HistVtx::GetTH1("cosz");
00150
00151 if(option.find("plot_2d") != string::npos)
00152 {
00153 fYX = HistVtx::GetTH2("yx");
00154 fXZ = HistVtx::GetTH2("xz");
00155 fYZ = HistVtx::GetTH2("yz");
00156 }
00157
00158 if(option.find("plot_diff") != string::npos)
00159 {
00160 fDiffX = HistVtx::GetTH1("diff_x");
00161 fDiffY = HistVtx::GetTH1("diff_y");
00162 fDiffZ = HistVtx::GetTH1("diff_z");
00163 fDiffR2d = HistVtx::GetTH1("diff_r2d");
00164 fDiffR3d = HistVtx::GetTH1("diff_r3d");
00165 fProjRad = HistVtx::GetTH1("proj_rad");
00166 fProjAng = HistVtx::GetTH1("proj_ang");
00167
00168 if(option.find("plot_2d") != string::npos)
00169 {
00170 fDiffR2dForYX = HistVtx::GetTH2("diff_r2d_yx");
00171 fDiffR2dForXZ = HistVtx::GetTH2("diff_r2d_xz");
00172 fDiffR2dForYZ = HistVtx::GetTH2("diff_r2d_yz");
00173 fProjRadVsRad = HistVtx::GetTH2("proj_rad_vs_rad");
00174 }
00175 }
00176
00177 if(fNMiss == 0)
00178 {
00179 fPlot = true;
00180 }
00181 else
00182 {
00183 cerr << "HistVtx::Make - missed " << fNMiss << " histograms" << endl;
00184 }
00185
00186 return fPlot;
00187 }
|
|
||||||||||||
|
Definition at line 190 of file PlotVtx.cxx. References fCenterX, and fCenterY.
|
|
|
Definition at line 50 of file PlotVtx.h. Referenced by SetCenter(). |
|
|
Definition at line 51 of file PlotVtx.h. Referenced by SetCenter(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 48 of file PlotVtx.h. Referenced by Make(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.3.9.1