#include <HoughTransNCPi0.h>
Public Member Functions | |
| ~HoughTransNCPi0 () | |
| HoughTransNCPi0 () | |
| HoughTransNCPi0 (Int_t numSamps, Float_t lowGrad, Float_t highGrad) | |
| HoughTransNCPi0 (Int_t numSamps, Float_t lowGrad, Float_t highGrad, Float_t lowIcept, Float_t highIcept) | |
| void | SetVtxz (Float_t vertz) |
| Float_t | GetVtxz () |
| void | FillHough (NtpSRStrip *stp) |
| void | FillHough (Float_t zPos, Float_t tPos) |
| void | FillHoughweight (Float_t zPos, Float_t tPos, Float_t energy) |
| void | DrawHough () |
| Int_t | EntriesHough () |
| void | ResetHough () |
| void | DeleteHough () |
| Int_t | GetPeakHeight () |
| Int_t | GetPeakGradBin () |
| Int_t | GetPeakIceptBin () |
| Float_t | GetPeakGradVal () |
| Float_t | GetPeakIceptVal () |
| Float_t | GetCos () |
| Float_t | GetGradientweight () |
| Float_t | GetTransverseVtxCoord () |
| Float_t | GetIntercept () |
| Float_t | GetRms (Float_t frac) |
Public Attributes | |
| TH2F * | houghSpace |
| Float_t | vtxz |
|
|
Definition at line 31 of file HoughTransNCPi0.cxx. References houghSpace. 00031 {
00032 // Mark, you need to delete histograms created with new!!!
00033 delete houghSpace; houghSpace=0;
00034
00035 }
|
|
|
Definition at line 24 of file HoughTransNCPi0.cxx. References houghSpace, and vtxz. 00024 :houghSpace("houghSpace","houghSpace",80,-2.0,2.0,80,-4.0,4.0),vtxz(0) 00025 { 00026 houghSpace = new TH2F("houghSpace","houghSpace",80,-2.0,2.0,80,-4.0,4.0); 00027 houghSpace->SetDirectory(0); 00028 vtxz = 0.0; 00029 }
|
|
||||||||||||||||
|
Definition at line 37 of file HoughTransNCPi0.cxx. References houghSpace, and vtxz. 00037 :
00038 {
00039
00040 houghSpace = new TH2F("houghSpace","houghSpace",numSamps,lowGrad,highGrad,numSamps,-4.0,4.0);
00041 houghSpace->SetDirectory(0);
00042 vtxz = 0.0;
00043 }
|
|
||||||||||||||||||||||||
|
Definition at line 45 of file HoughTransNCPi0.cxx. References houghSpace, and vtxz. 00045 :
00046 {
00047 houghSpace = new TH2F("houghSpace","houghSpace",numSamps,lowGrad,highGrad,numSamps,lowIcept,highIcept);
00048 houghSpace->SetDirectory(0);
00049 vtxz = 0.0;
00050 }
|
|
|
Definition at line 108 of file HoughTransNCPi0.cxx. 00109 {
00110 delete houghSpace;
00111 }
|
|
|
Definition at line 90 of file HoughTransNCPi0.cxx. References houghSpace. 00091 {
00092 //TFile f("hough.root",new");
00093 houghSpace->Draw("LEGO2");
00094 // houghSpace->Write();
00095 }
|
|
|
Definition at line 97 of file HoughTransNCPi0.cxx. References houghSpace. 00098 {
00099 Int_t counts = static_cast<Int_t>(houghSpace->Integral());
00100 return counts;
00101 }
|
|
||||||||||||
|
Definition at line 67 of file HoughTransNCPi0.cxx. References houghSpace. 00068 {
00069 if(zPos<(vtxz)) return;
00070 for(Int_t i=1;i<=houghSpace->GetNbinsX();++i){
00071 Float_t cos=(houghSpace->GetXaxis())->GetBinCenter(i);
00072 Float_t icept=tPos-sqrt(pow((1/cos),2)-1)*(zPos-vtxz);
00073 if(icept>4.0 || icept<-4.0) continue; //max MINOS transverse dimensions
00074 houghSpace->Fill(cos,icept);
00075 // cout << "Filling Hough Space with grad " << gradient << " and icept " << icept << endl;
00076 }
00077 }
|
|
|
Definition at line 62 of file HoughTransNCPi0.cxx. References NtpSRStrip::tpos, and NtpSRStrip::z.
|
|
||||||||||||||||
|
Definition at line 78 of file HoughTransNCPi0.cxx. References houghSpace. 00079 {
00080 if(zPos<vtxz) return;
00081 for(Int_t i=1;i<houghSpace->GetNbinsX();++i){
00082 Float_t gradient=(houghSpace->GetXaxis())->GetBinCenter(i);
00083 Float_t icept=tPos-gradient*(zPos-vtxz);
00084 Float_t weight= energy;
00085 if(icept>4.0 || icept<-4.0) continue; //max MINOS transverse dimensions
00086 houghSpace->Fill(gradient,icept,weight);
00087 // cout << "Filling Hough Space with grad " << gradient << " and icept " << icept << endl;
00088 }
00089 }
|
|
|
Definition at line 155 of file HoughTransNCPi0.cxx. References houghSpace. Referenced by GetIntercept(), and GetRms(). 00156 {
00157 Int_t binx, biny;
00158 Float_t x = 0.;
00159 Float_t y = 0;
00160 Float_t peak = 0.;
00161
00162 peak = houghSpace->GetBinContent(houghSpace->GetMaximumBin());
00163
00164 for (biny=houghSpace->GetYaxis()->GetFirst();biny<=houghSpace->GetYaxis()->GetLast();++biny) {
00165 for (binx=houghSpace->GetXaxis()->GetFirst();binx<=houghSpace->GetXaxis()->GetLast();++binx) {
00166 if (houghSpace->GetBinContent(binx,biny) == peak) {
00167 x = houghSpace->GetXaxis()->GetBinCenter(binx);
00168 y = houghSpace->GetYaxis()->GetBinCenter(biny);
00169 // continue;
00170 }
00171 }
00172 }
00173
00174
00175 return x;
00176 }
|
|
|
Definition at line 177 of file HoughTransNCPi0.cxx. References houghSpace. 00178 {
00179 Int_t binx, biny;
00180 Float_t x =0.;
00181 Float_t y=0.;
00182 Float_t peak = 0.;
00183
00184 peak = houghSpace->GetBinContent(houghSpace->GetMaximumBin());
00185
00186 for (biny=houghSpace->GetYaxis()->GetFirst();biny<=houghSpace->GetYaxis()->GetLast();++biny) {
00187 for (binx=houghSpace->GetXaxis()->GetFirst();binx<=houghSpace->GetXaxis()->GetLast();++binx) {
00188 if (houghSpace->GetBinContent(binx,biny) == peak) {
00189 x = houghSpace->GetXaxis()->GetBinCenter(binx);
00190 y = houghSpace->GetYaxis()->GetBinCenter(biny);
00191 // continue;
00192 }
00193 }
00194 }
00195
00196
00197 return x;
00198 }
|
|
|
Definition at line 223 of file HoughTransNCPi0.cxx. References GetCos(), GetTransverseVtxCoord(), and GetVtxz(). Referenced by GetRms(). 00224 {
00225
00226 Float_t intercept = GetTransverseVtxCoord() - sqrt(pow((1/GetCos()),2)-1)*GetVtxz();
00227
00228 return intercept;
00229 }
|
|
|
Definition at line 119 of file HoughTransNCPi0.cxx. References houghSpace. 00120 {
00121 Int_t x=0;
00122 Int_t y=0;
00123 Int_t z=0;
00124 houghSpace->GetMaximumBin(x,y,z);
00125 return x;
00126 }
|
|
|
Definition at line 137 of file HoughTransNCPi0.cxx. References houghSpace. 00138 {
00139 Int_t x=0;
00140 Int_t y=0;
00141 Int_t z=0;
00142 houghSpace->GetMaximumBin(x,y,z);
00143 return (houghSpace->GetXaxis())->GetBinCenter(x);
00144 }
|
|
|
Definition at line 113 of file HoughTransNCPi0.cxx. References houghSpace. Referenced by GetRms(). 00114 {
00115 Int_t binmax = static_cast<Int_t>(houghSpace->GetBinContent(houghSpace->GetMaximumBin()));
00116 return binmax;
00117 }
|
|
|
Definition at line 128 of file HoughTransNCPi0.cxx. References houghSpace. 00129 {
00130 Int_t x=0;
00131 Int_t y=0;
00132 Int_t z=0;
00133 houghSpace->GetMaximumBin(x,y,z);
00134 return y;
00135 }
|
|
|
Definition at line 146 of file HoughTransNCPi0.cxx. References houghSpace. 00147 {
00148 Int_t x=0;
00149 Int_t y=0;
00150 Int_t z=0;
00151 houghSpace->GetMaximumBin(x,y,z);
00152 return (houghSpace->GetYaxis())->GetBinCenter(y);
00153 }
|
|
|
Definition at line 231 of file HoughTransNCPi0.cxx. References count, GetCos(), GetIntercept(), GetPeakHeight(), and houghSpace. 00232 {
00233 Int_t bincount = 0;
00234 Int_t mRmsInput[6400];
00235 Int_t cRmsInput[6400];
00236 Float_t peakheight = GetPeakHeight();
00237 Float_t cos = GetCos();
00238 Float_t interc = GetIntercept();
00239 Float_t mpeak = 0;
00240 Float_t cpeak = 0;
00241 Float_t contents = 0;
00242
00243 for(Int_t mBin=1;mBin<houghSpace->GetNbinsX();++mBin){
00244 for(Int_t cBin=1;cBin<houghSpace->GetNbinsY();++cBin){
00245 if(houghSpace->GetBinContent(mBin,cBin)>=frac*peakheight){
00246 mpeak = (houghSpace->GetXaxis())->GetBinCenter(mBin);
00247 contents = houghSpace->GetBinContent(mBin,cBin);
00248 cpeak = (houghSpace->GetYaxis())->GetBinCenter(cBin);
00249 //cout<< "mpeak " << mpeak << endl;
00250 //cout<< "contents = " << contents << endl;
00251 //cout<< "cpeak " << cpeak << endl;
00252 //cout << "m_av " << grad << endl;
00253 //cout << "c_av " << interc << endl;
00254
00255 mRmsInput[bincount]=static_cast<Int_t>(mpeak);
00256 cRmsInput[bincount]=static_cast<Int_t>(cpeak);
00257 bincount++;
00258 }
00259 }
00260 }
00261 if(bincount==0) return 0;
00262 Float_t squaresum = 0;
00263 for (Int_t count=1;count<bincount;++count) {
00264 squaresum+=(pow((mRmsInput[count]-cos),2)+pow((cRmsInput[count]-interc),2));
00265
00266 }
00267 Float_t Rms = sqrt(squaresum/bincount);
00268 return Rms;
00269 }
|
|
|
Definition at line 200 of file HoughTransNCPi0.cxx. References houghSpace. Referenced by GetIntercept(). 00201 {
00202 Int_t binx, biny;
00203 Float_t x =0.;
00204 Float_t y =0.;
00205 Float_t peak = 0.;
00206
00207 peak = houghSpace->GetBinContent(houghSpace->GetMaximumBin());
00208
00209 for (biny=houghSpace->GetYaxis()->GetFirst();biny<=houghSpace->GetYaxis()->GetLast();++biny) {
00210 for (binx=houghSpace->GetXaxis()->GetFirst();binx<=houghSpace->GetXaxis()->GetLast();++binx) {
00211 if (houghSpace->GetBinContent(binx,biny) == peak) {
00212 x = houghSpace->GetXaxis()->GetBinCenter(binx);
00213 y = houghSpace->GetYaxis()->GetBinCenter(biny);
00214 // continue;
00215 }
00216 }
00217 }
00218
00219
00220 return y;
00221 }
|
|
|
Definition at line 57 of file HoughTransNCPi0.cxx. Referenced by GetIntercept(). 00058 {
00059 return vtxz;
00060 }
|
|
|
Definition at line 103 of file HoughTransNCPi0.cxx. References houghSpace. 00104 {
00105 houghSpace->Reset();
00106 }
|
|
|
Definition at line 52 of file HoughTransNCPi0.cxx. References vtxz. 00053 {
00054 vtxz=vertz;
00055 }
|
|
|
Definition at line 67 of file HoughTransNCPi0.h. Referenced by DrawHough(), EntriesHough(), FillHough(), FillHoughweight(), GetCos(), GetGradientweight(), GetPeakGradBin(), GetPeakGradVal(), GetPeakHeight(), GetPeakIceptBin(), GetPeakIceptVal(), GetRms(), GetTransverseVtxCoord(), HoughTransNCPi0(), ResetHough(), and ~HoughTransNCPi0(). |
|
|
Definition at line 68 of file HoughTransNCPi0.h. Referenced by HoughTransNCPi0(), and SetVtxz(). |
1.3.9.1