Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

clusterss::ClustVars Class Reference

#include <ClusterSSHelpers.h>

List of all members.

Public Member Functions

 ClustVars ()
 ~ClustVars ()
void AddNewWindow (WindowSS &win, double CELLWID)
void RemoveWindow (WindowSS &win)
void Print ()

Public Attributes

Double_t shwmid
Double_t shwwid
Double_t phmax
Double_t phmax2
Double_t phwid
Double_t maxwid
Double_t maxph
Double_t maxph2
Double_t clusterph
Double_t slopen
Double_t eslopen
Double_t slopetn
Double_t slopebn
Double_t eslopetn
Double_t eslopebn
Double_t chi2tn
Double_t chi2bn
bool trustslopen


Constructor & Destructor Documentation

ClustVars::ClustVars  ) 
 

Definition at line 62 of file ClusterSSHelpers.cxx.

00062                     :
00063   shwmid(0.),
00064   shwwid(0.),
00065   phmax(0.),
00066   phmax2(0.),
00067   phwid(0.),
00068   maxwid(0.),
00069   maxph(0.),
00070   maxph2(0.),
00071   clusterph(0.),
00072   slopen(0.),
00073   eslopen(0.),
00074   slopetn(0.),
00075   slopebn(0.),
00076   eslopetn(0.),
00077   eslopebn(0.),
00078   chi2tn(0.),
00079   chi2bn(0.),
00080   trustslopen(false)
00081 {}

ClustVars::~ClustVars  ) 
 

Definition at line 83 of file ClusterSSHelpers.cxx.

00084 {}


Member Function Documentation

void ClustVars::AddNewWindow WindowSS win,
double  CELLWID
 

Definition at line 86 of file ClusterSSHelpers.cxx.

References clusterph, clusterss::WindowSS::lower, clusterss::WindowSS::lower_tpos, maxph, maxph2, maxwid, clusterss::WindowSS::ph, phmax, phmax2, phwid, shwmid, shwwid, clusterss::WindowSS::upper, and clusterss::WindowSS::upper_tpos.

Referenced by clusterss::MakeClusterSS::ClusterWindows(), and clusterss::MakeClusterSS::StupidHoughNoWork().

00087 {
00088   if(win.upper==-1&&win.lower==-1){
00089     return;
00090   }
00091 
00092   if(shwwid<win.upper_tpos-win.lower_tpos+CELLWID){
00093     //shwwid should be widest possible window
00094     shwwid = win.upper_tpos-win.lower_tpos+CELLWID;
00095   }
00096   
00097   double winmiddle = (win.upper_tpos+win.lower_tpos)/2.;
00098 
00099   //running average of event centroid
00100   double newshwmid = (shwmid*clusterph+winmiddle*win.ph)/(clusterph+win.ph);
00101   shwmid = newshwmid;
00102 
00103   //running phweighted window width
00104   //I think this is wrong, but its what the code is doing
00105   //I think phwid needs to be squared before adding in the new window
00106   //and we need to add the shwmid back into phwid
00107   phwid = sqrt((phwid*clusterph+winmiddle*winmiddle*win.ph)/(clusterph+win.ph)-shwmid);
00108 
00109   if(win.ph>maxph){
00110     phmax2 = phmax;
00111     maxph2 = maxph;
00112     phmax = winmiddle;
00113     maxph = win.ph;
00114   }
00115   clusterph+=win.ph;
00116   if(maxwid<shwwid) maxwid = shwwid;
00117   if(maxwid<2.*CELLWID) maxwid = 2*CELLWID;
00118 
00119 }

void ClustVars::Print  ) 
 

Definition at line 144 of file ClusterSSHelpers.cxx.

References clusterph, maxph, maxph2, maxwid, phmax, phmax2, phwid, shwmid, and shwwid.

Referenced by clusterss::MakeClusterSS::ClusterWindows().

00145 {
00146 
00147   cout<<" shwmid "<<shwmid<<" shwwid "<<shwwid<<" phmax "<<phmax<<" phmax2 "<<phmax2<<endl;
00148   cout<<" phwid "<<phwid<<" maxwid "<<maxwid<<" maxph "<<maxph<<" maxph2 "<<maxph2<<" clusterph "<<clusterph<<endl;
00149 
00150 }

void ClustVars::RemoveWindow WindowSS win  ) 
 

Definition at line 121 of file ClusterSSHelpers.cxx.

References clusterph, clusterss::WindowSS::lower_tpos, maxph, clusterss::WindowSS::ph, phmax, phwid, shwmid, and clusterss::WindowSS::upper_tpos.

Referenced by clusterss::MakeClusterSS::CheckCurrSoln().

00122 {
00123 
00124   double winmiddle = (win.upper_tpos+win.lower_tpos)/2.;
00125 
00126   shwmid = (shwmid*clusterph-winmiddle*win.ph)/(clusterph-win.ph);
00127         
00128   //running phweighted window width
00129   //TV: 7-31-09 this can't be right...
00130   //don't I have to square the old width before I can try to subtract off this hit?
00131   //I think this is wrong, but its what the code is doing
00132   //I think phwid needs to be squared before subtracting in the new window
00133   //and we need to add the shwmid back into phwid
00134   phwid = sqrt((phwid*clusterph-winmiddle*winmiddle*win.ph)/(clusterph-win.ph)-shwmid); 
00135   if(win.ph==maxph) {
00136     //this will be wrong if we remove more than 1 window
00137     //and I can't fix it since we only keep the max2
00138     phmax = phmax2;
00139     maxph = maxph2;     
00140   }
00141   clusterph-=win.ph;
00142 }


Member Data Documentation

Double_t clusterss::ClustVars::chi2bn
 

Definition at line 96 of file ClusterSSHelpers.h.

Referenced by clusterss::MakeClusterSS::StupidHoughNoWork().

Double_t clusterss::ClustVars::chi2tn
 

Definition at line 95 of file ClusterSSHelpers.h.

Referenced by clusterss::MakeClusterSS::StupidHoughNoWork().

Double_t clusterss::ClustVars::clusterph
 

Definition at line 88 of file ClusterSSHelpers.h.

Referenced by AddNewWindow(), Print(), and RemoveWindow().

Double_t clusterss::ClustVars::eslopebn
 

Definition at line 94 of file ClusterSSHelpers.h.

Referenced by clusterss::MakeClusterSS::StupidHoughNoWork().

Double_t clusterss::ClustVars::eslopen
 

Definition at line 90 of file ClusterSSHelpers.h.

Referenced by clusterss::MakeClusterSS::CheckCurrSoln(), clusterss::MakeClusterSS::ClusterWindows(), and clusterss::MakeClusterSS::StupidHoughNoWork().

Double_t clusterss::ClustVars::eslopetn
 

Definition at line 93 of file ClusterSSHelpers.h.

Referenced by clusterss::MakeClusterSS::StupidHoughNoWork().

Double_t clusterss::ClustVars::maxph
 

Definition at line 86 of file ClusterSSHelpers.h.

Referenced by AddNewWindow(), Print(), and RemoveWindow().

Double_t clusterss::ClustVars::maxph2
 

Definition at line 87 of file ClusterSSHelpers.h.

Referenced by AddNewWindow(), and Print().

Double_t clusterss::ClustVars::maxwid
 

Definition at line 85 of file ClusterSSHelpers.h.

Referenced by AddNewWindow(), clusterss::MakeClusterSS::CheckCurrSoln(), clusterss::MakeClusterSS::ClusterWindows(), and Print().

Double_t clusterss::ClustVars::phmax
 

Definition at line 82 of file ClusterSSHelpers.h.

Referenced by AddNewWindow(), Print(), and RemoveWindow().

Double_t clusterss::ClustVars::phmax2
 

Definition at line 83 of file ClusterSSHelpers.h.

Referenced by AddNewWindow(), and Print().

Double_t clusterss::ClustVars::phwid
 

Definition at line 84 of file ClusterSSHelpers.h.

Referenced by AddNewWindow(), Print(), and RemoveWindow().

Double_t clusterss::ClustVars::shwmid
 

Definition at line 80 of file ClusterSSHelpers.h.

Referenced by AddNewWindow(), clusterss::MakeClusterSS::CheckCurrSoln(), clusterss::MakeClusterSS::ClusterWindows(), Print(), RemoveWindow(), and clusterss::MakeClusterSS::StupidHoughNoWork().

Double_t clusterss::ClustVars::shwwid
 

Definition at line 81 of file ClusterSSHelpers.h.

Referenced by AddNewWindow(), clusterss::MakeClusterSS::ClusterWindows(), Print(), and clusterss::MakeClusterSS::StupidHoughNoWork().

Double_t clusterss::ClustVars::slopebn
 

Definition at line 92 of file ClusterSSHelpers.h.

Referenced by clusterss::MakeClusterSS::StupidHoughNoWork().

Double_t clusterss::ClustVars::slopen
 

Definition at line 89 of file ClusterSSHelpers.h.

Referenced by clusterss::MakeClusterSS::CheckCurrSoln(), clusterss::MakeClusterSS::ClusterWindows(), and clusterss::MakeClusterSS::StupidHoughNoWork().

Double_t clusterss::ClustVars::slopetn
 

Definition at line 91 of file ClusterSSHelpers.h.

Referenced by clusterss::MakeClusterSS::StupidHoughNoWork().

bool clusterss::ClustVars::trustslopen
 

Definition at line 97 of file ClusterSSHelpers.h.

Referenced by clusterss::MakeClusterSS::CheckCurrSoln(), clusterss::MakeClusterSS::ClusterWindows(), and clusterss::MakeClusterSS::StupidHoughNoWork().


The documentation for this class was generated from the following files:
Generated on Sun Nov 22 04:45:30 2009 for NOvA Offline by  doxygen 1.3.9.1