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

Chain Class Reference

#include <Chain.h>

List of all members.

Public Member Functions

 Chain ()
 ~Chain ()
int good_slope ()
void Recalc ()
void updateMuonFrac (double it, double iz, double ie)
void updateNumPeaks (double it, double iz, double ie)
void updateEMLike (double it, double iz, double ie)
void add_to_back (double it, double iz, double ie, int my_cluster_id)
void insert (double it, double iz, double ie, int my_cluster_id)
void Reverse ()
void ClearHits ()
void PrintChain ()
double interpolate (double z)

Static Public Member Functions

void ResetCounter ()
double interpolate (double z0, double t0, double z1, double t1, double z2, double t2, double z)

Public Attributes

std::vector< double > t
std::vector< double > z
std::vector< double > e
std::vector< int > cluster_id
std::vector< int > children
double start_t
double end_t
double start_z
double end_z
int particletype
double sum_e
int available
double weighted_t
int entries
double avg_slope
double avg_offset
double last_slope
double front_slope
double back_slope
double front_offset
double back_offset
int parentChain
int myId
int level
double muonfrac
double interior_muonfrac
double emlike
int num_peaks
int strict_decreasing
int strict_increasing
double muon_threshold_max
double muon_threshold_min
int muon_min_hits
double a
double b

Static Public Attributes

int lastid = 0

Private Attributes

double sum_z
double sum_t
double sum_z_z
double sum_z_t
int muonlike
double lastpeake
int lastpeakprob


Constructor & Destructor Documentation

Chain::Chain  ) 
 

Definition at line 13 of file Chain.cxx.

00014 {
00015 
00016         start_t=0.0;
00017         end_t=0.0;
00018         start_z=0.0;
00019         end_z=0.0;
00020         particletype=0;
00021         sum_e=0.0;
00022         weighted_t=0.0;
00023         entries=0;
00024         avg_slope=0.0;
00025         avg_offset=0.0;
00026         last_slope=0.0;
00027         front_slope=0.0;
00028         back_slope=0.0;
00029         front_offset=0.0;
00030         back_offset=0.0;
00031         parentChain=-1;
00032         myId=-1;
00033         level=0;
00034         muonfrac=0.0;
00035         interior_muonfrac=0.0;
00036         emlike=0.0;
00037         num_peaks=0;
00038         strict_decreasing=1;
00039         strict_increasing=1;
00040         lastpeake=0.0;
00041         lastpeakprob=0;
00042         sum_z=0.0;
00043         sum_t=0.0;
00044         sum_z_z=0.0;
00045         sum_z_t=0.0;
00046         muonlike=0;
00047         a=0.0;
00048         b=0.0;
00049 
00050 
00051 
00052 
00053         t.clear();
00054         z.clear();
00055         e.clear();
00056         cluster_id.clear();
00057         children.clear();
00058 
00059         myId=lastid++;
00060         
00061         
00062         muon_threshold_max=2;
00063         muon_threshold_min=0.5;
00064         muon_min_hits=2; 
00065         
00066         available=1;
00067         
00068 }

Chain::~Chain  ) 
 

Definition at line 70 of file Chain.cxx.

References children, cluster_id, e, t, and z.

00071 {
00072         t.clear();
00073         z.clear();
00074         e.clear();
00075         cluster_id.clear();
00076         children.clear();
00077 }


Member Function Documentation

void Chain::add_to_back double  it,
double  iz,
double  ie,
int  my_cluster_id
 

Definition at line 558 of file Chain.cxx.

References a, avg_offset, avg_slope, b, back_offset, back_slope, cluster_id, e, end_t, end_z, entries, front_offset, front_slope, last_slope, start_t, start_z, sum_e, sum_t, sum_z, sum_z_t, sum_z_z, t, updateEMLike(), updateMuonFrac(), updateNumPeaks(), weighted_t, and z.

Referenced by ChainHelper::AttachAt(), Finder::FindMuons(), ChainHelper::insert(), ChainHelper::process_plane(), Reverse(), ChainHelper::split(), and ChainHelper::SplitAt().

00559 {
00560 
00561         double lastt = 0.0;
00562         double lastz = 0.0;
00563         double laste = 0.0;
00564 
00565         if(t.size()>0)
00566         {
00567                 lastt=t.back();
00568                 lastz=z.back();
00569                 laste=e.back();
00570         }else{
00571                 start_t=it;
00572                 start_z=iz;
00573         }
00574         
00575         weighted_t*=sum_e;
00576         weighted_t +=it*ie;
00577         
00578         sum_e+=ie;
00579         
00580         weighted_t /=sum_e;
00581         
00582         entries++;
00583 
00584         t.push_back(it);
00585         z.push_back(iz);
00586         e.push_back(ie);
00587         cluster_id.push_back(my_cluster_id);
00588         
00589         //printf("added %f %f %f %d\n",it,iz,ie,my_cluster_id);
00590                 
00591         sum_z+=iz;
00592         sum_t+=it;
00593         sum_z_z+=iz*iz;
00594         sum_z_t+=iz*it;
00595         
00596         end_t=it;
00597         end_z=iz;
00598         
00599         
00600         double n=(double)entries;
00601         if(n>1 && fabs(n*sum_z_z-(sum_z)*(sum_z))>1e-10 )
00602         {
00603                 a=(sum_t*sum_z_z-sum_z*sum_z_t)/(n*sum_z_z-(sum_z)*(sum_z));
00604                 b=(n*sum_z_t-sum_z*sum_t)/(n*sum_z_z-(sum_z)*(sum_z));  
00605         }
00606         
00607         avg_slope = b;
00608         avg_offset = a;
00609         
00610         if(entries>1 && lastz-iz)last_slope =(lastt-it)/(lastz-iz);
00611         
00612         
00613         if(entries>1 && entries<=4)
00614         {
00615                 front_slope=b;
00616                 front_offset=a;
00617                 back_slope=b;
00618                 back_offset=a;
00619         }
00620         if(entries>4)
00621         {
00622                 int n=4;
00623                 double sum_z_t=0;
00624                 double sum_z=0;
00625                 double sum_t=0;
00626                 double sum_z_z=0;
00627                 
00628                 for(unsigned int i=e.size()-1;i>e.size()-5;i--)
00629                 {
00630                         sum_z+=z[i];
00631                         sum_t+=t[i];
00632                         sum_z_t+=z[i]*t[i];
00633                         sum_z_z+=z[i]*z[i];
00634                 }
00635                 
00636                 if(fabs(n*sum_z_z-(sum_z)*(sum_z))>1e-10)
00637                 {       
00638                         back_slope=(n*sum_z_t-sum_z*sum_t)/(n*sum_z_z-(sum_z)*(sum_z));
00639                         back_offset=(sum_t*sum_z_z-sum_z*sum_z_t)/(n*sum_z_z-(sum_z)*(sum_z));
00640                 }
00641         }
00642         
00643         
00644         updateMuonFrac(it, iz, ie);
00645         updateNumPeaks(it, iz, ie);
00646         updateEMLike(it, iz, ie);
00647 
00648 }

void Chain::ClearHits  ) 
 

Definition at line 269 of file Chain.cxx.

References a, avg_offset, avg_slope, b, back_slope, cluster_id, e, emlike, end_t, end_z, entries, front_slope, interior_muonfrac, last_slope, lastpeake, lastpeakprob, muonfrac, muonlike, num_peaks, start_t, start_z, strict_decreasing, strict_increasing, sum_e, sum_t, sum_z, sum_z_t, sum_z_z, t, weighted_t, and z.

Referenced by ChainHelper::AttachAt(), PrimaryShowerFinder::ClearFrontVertex(), LongMuonFinder::ClearFrontVertex(), Recalc(), Reverse(), and ChainHelper::SplitAt().

00270 {
00271         start_t=0.0;
00272         end_t=0.0;
00273         start_z=0.0;
00274         end_z=0.0;
00275         sum_e=0.0;
00276         weighted_t=0.0; 
00277         entries=0;
00278         avg_slope=0.0;
00279         avg_offset=0.0;
00280         last_slope=0.0;
00281         front_slope=0.0;
00282         back_slope=0.0;
00283         muonfrac=0.0;
00284         interior_muonfrac=0.0;
00285         emlike=0.0;
00286         num_peaks=0;
00287         strict_decreasing=1;
00288         strict_increasing=1;
00289         lastpeake=0.0;
00290         lastpeakprob=0;
00291         sum_z=0.0;
00292         sum_t=0.0;
00293         sum_z_z=0.0;
00294         sum_z_t=0.0;
00295         muonlike=0;
00296         a=0.0;
00297     b=0.0;
00298 
00299 
00300         z.clear();
00301         e.clear();
00302         t.clear();
00303         cluster_id.clear();
00304 
00305 }

int Chain::good_slope  ) 
 

Definition at line 376 of file Chain.cxx.

References t.

00377 {
00378         //tell us if we have enough points to believe the slope value
00379         
00380         int good=0;
00381         
00382         if(t.size()>1)good=1;
00383         
00384         return good;
00385 }

void Chain::insert double  it,
double  iz,
double  ie,
int  my_cluster_id
 

Definition at line 389 of file Chain.cxx.

References a, avg_offset, avg_slope, b, back_offset, back_slope, cluster_id, e, end_t, end_z, entries, front_offset, front_slope, last_slope, start_t, start_z, sum_e, sum_t, sum_z, sum_z_t, sum_z_z, t, updateEMLike(), updateMuonFrac(), updateNumPeaks(), weighted_t, and z.

Referenced by PrimaryShowerFinder::ClearFrontVertex(), LongMuonFinder::ClearFrontVertex(), PrimaryShowerFinder::ExpandShowerChain(), PrimaryShowerFinder::ExtractMuon(), LongMuonFinder::FindMuonChain(), ChainHelper::FindPaths(), PrimaryShowerFinder::FindPrimaryShower(), PrimaryShowerFinder::FindShowerChain(), PrimaryShowerFinder::MakeChains(), PrimaryShowerFinder::MakeShowerChain(), LongMuonFinder::MergeChainClusters(), and Recalc().

00390 {
00391 
00392         double lastt = 0.0;
00393         double lastz = 0.0;
00394         double laste = 0.0;
00395 
00396         if(t.size()>0)
00397         {
00398                 lastt=t.back();
00399                 lastz=z.back();
00400                 laste=e.back();
00401         }
00402         
00403         int insert_idx=-1;
00404         for(unsigned int i=0;i<t.size();i++)
00405         {
00406                 if(iz<z[i])
00407                 {
00408                         insert_idx=i;
00409                         break;
00410                 }
00411         }
00412         
00413         if(t.size()==0)
00414         {
00415                 start_t=it;
00416                 start_z=iz;
00417                 end_t=it;
00418                 end_z=iz;       
00419         }       
00420 /*      
00421         if(insert_idx==0)
00422         {
00423                 start_t=it;
00424                 start_z=iz;
00425         }
00426         
00427         if(insert_idx==t.size()-1)
00428         {
00429                 end_t=it;
00430                 end_z=iz;
00431         }
00432 */
00433 
00434         if(start_z>iz)
00435         {
00436                 start_z=iz;
00437                 start_t=it;
00438         }
00439         
00440         if(end_z<iz)
00441         {
00442                 end_z=iz;
00443                 end_t=it;
00444         }
00445         
00446         weighted_t*=sum_e;
00447         weighted_t +=it*ie;
00448         
00449         sum_e+=ie;
00450         
00451         weighted_t /=sum_e;
00452         
00453         entries++;
00454         if(insert_idx>-1)
00455         {
00456                 std::vector<double>::iterator itr_f=t.begin();
00457                 itr_f+=insert_idx;
00458                 t.insert(itr_f,it);
00459                 itr_f=z.begin();
00460                 itr_f+=insert_idx;
00461                 z.insert(itr_f,iz);
00462                 itr_f=e.begin();
00463                 itr_f+=insert_idx;
00464                 e.insert(itr_f,ie);
00465                 std::vector<int>::iterator itr_i=cluster_id.begin();
00466                 itr_i+=insert_idx;
00467                 cluster_id.insert(itr_i,my_cluster_id);
00468         }else{
00469                 t.push_back(it);
00470                 z.push_back(iz);
00471                 e.push_back(ie);
00472                 cluster_id.push_back(my_cluster_id);
00473         }
00474         //printf("added %f %f %f %d\n",it,iz,ie,my_cluster_id);
00475                 
00476         sum_z+=iz;
00477         sum_t+=it;
00478         sum_z_z+=iz*iz;
00479         sum_z_t+=iz*it;
00480         
00481                 
00482         double n=(double)entries;
00483         if(n>1 && (n*sum_z_z-(sum_z)*(sum_z))!=0) 
00484         {
00485                 a=(sum_t*sum_z_z-sum_z*sum_z_t)/(n*sum_z_z-(sum_z)*(sum_z));
00486                 b=(n*sum_z_t-sum_z*sum_t)/(n*sum_z_z-(sum_z)*(sum_z));  
00487         }
00488         
00489         avg_slope = b;
00490         avg_offset = a;
00491         
00492         if(entries>1 && lastz-iz)last_slope =(lastt-it)/(lastz-iz);
00493         
00494         
00495         if(entries>1 && entries<=4)
00496         {
00497                 front_slope=b;
00498                 front_offset=a;
00499                 back_slope=b;
00500                 back_offset=a;
00501         }
00502         if(entries>4)
00503         {
00504                 //back slope
00505                 int n=4;
00506                 double sum_z_t=0;
00507                 double sum_z=0;
00508                 double sum_t=0;
00509                 double sum_z_z=0;
00510                 
00511                 for(unsigned int i=e.size()-1;i>e.size()-5;i--)
00512                 {
00513                         sum_z+=z[i];
00514                         sum_t+=t[i];
00515                         sum_z_t+=z[i]*t[i];
00516                         sum_z_z+=z[i]*z[i];
00517                 }
00518                 
00519         
00520                 if(fabs(n*sum_z_z-(sum_z)*(sum_z))>1e-10)
00521                 {       
00522                         back_slope=(n*sum_z_t-sum_z*sum_t)/(n*sum_z_z-(sum_z)*(sum_z));
00523                         back_offset=(sum_t*sum_z_z-sum_z*sum_z_t)/(n*sum_z_z-(sum_z)*(sum_z));
00524                 }
00525                 
00526                 //front slope
00527                 n=4;
00528                 if(entries>12)n=entries/3;
00529                 if(n>10)n=10;
00530                 sum_z_t=0;
00531                 sum_z=0;
00532                 sum_t=0;
00533                 sum_z_z=0;
00534                 
00535                 for(int i=0;i<n;i++)
00536                 {
00537                         sum_z+=z[i];
00538                         sum_t+=t[i];
00539                         sum_z_t+=z[i]*t[i];
00540                         sum_z_z+=z[i]*z[i];
00541                 }
00542                 
00543                 if(fabs(n*sum_z_z-(sum_z)*(sum_z))>1e-10)
00544                 {       
00545                         front_slope=(n*sum_z_t-sum_z*sum_t)/(n*sum_z_z-(sum_z)*(sum_z));
00546                         front_offset=(sum_t*sum_z_z-sum_z*sum_z_t)/(n*sum_z_z-(sum_z)*(sum_z));         
00547                 }
00548         }
00549         
00550                 
00551         updateMuonFrac(it, iz, ie);
00552         updateNumPeaks(it, iz, ie);
00553         updateEMLike(it, iz, ie);
00554 
00555 }

double Chain::interpolate double  z0,
double  t0,
double  z1,
double  t1,
double  z2,
double  t2,
double  z
[static]
 

Definition at line 192 of file Chain.cxx.

00193 {
00194         double int_t=0;
00195   
00196     //for quadratic     
00197         double L0 = (z-z1)*(z-z2)/( (z0-z1)*(z0-z2));
00198         double L1 = (z-z0)*(z-z2)/( (z1-z0)*(z1-z2));   
00199         double L2 = (z-z0)*(z-z1)/( (z2-z0)*(z2-z1));
00200 
00201         int_t = t0*L0 + t1*L1 + t2*L2;
00202 
00203 //      printf("quad inter L0 %f L1 %f L2 %f   z0 %f z1 %f z2 %f  t0 %f t1 %f t2 %f\n",L0,L1,L2,z0,z1,z2,t0,t1,t2);
00204 
00205         return int_t;
00206 }

double Chain::interpolate double  z  ) 
 

Definition at line 86 of file Chain.cxx.

References z.

Referenced by LongMuonFinder::FindMuonChain(), Finder::FindVertex(), and ChainHelper::process_plane().

00087 {
00088         double int_t=0;
00089         if(z.size()<1)return 0;
00090 /*
00091         printf("nentries %d\n",z.size());
00092         for(unsigned int i=0;i<z.size();i++)
00093         {
00094                 printf("zt %f %f\n",z[i],t[i]);
00095         
00096         }
00097 */      
00098         
00099         //hack to remove entries with the same z position.... we should really be merging clusters.....
00100         
00101         std::vector<double>z;
00102         std::vector<double>t;
00103         std::vector<double>e;
00104 
00105 
00106 /*
00107         printf("raw nentries %d\n",this->z.size());
00108         for(unsigned int i=0;i<this->z.size();i++)
00109         {
00110                 printf("zt %f %f\n",this->z[i],this->t[i]);
00111         
00112         }       */
00113         
00114         
00115         z.push_back(this->z[0]);
00116         t.push_back(this->t[0]*this->e[0]);
00117         e.push_back(this->e[0]);
00118         int cnt=0;
00119         for(unsigned int i=1;i<this->z.size();i++)
00120         {
00121                 if(fabs(this->z[i]-this->z[i-1])>0.001)
00122                 {
00123                         cnt++;          
00124                         z.push_back(this->z[i]);
00125                         t.push_back(this->t[i]*this->e[i]);
00126                         e.push_back(this->e[i]);        
00127                 }else{
00128                         t[cnt]+=this->t[i]*this->e[i];
00129                         e[cnt]+=this->e[i];
00130                 }       
00131         }       
00132         
00133         for(unsigned int i=0;i<z.size();i++)
00134         {       
00135                 t[i]/=e[i];
00136         }
00137 
00138 /*      
00139         printf("clean nentries %d\n",z.size());
00140         for(unsigned int i=0;i<z.size();i++)
00141         {
00142                 printf("zt %f %f\n",z[i],t[i]);
00143         
00144         }       */
00145 
00146         
00147 
00148         if(z.size()>2)
00149         {       
00150         
00151                 if(test_z>=end_z)
00152                 {
00153                         int i=z.size()-1;
00154                         if(i>1)
00155                                 int_t = interpolate(z[i],t[i],z[i-1],t[i-1],z[i-2],t[i-2],test_z);
00156                 }else if(test_z<=start_z)
00157                 {
00158                         if(z.size()>2)
00159                                 int_t = interpolate(z[0],t[0],z[1],t[1],z[2],t[2],test_z);
00160                 }else{
00161                         int i=z.size()-1;
00162                         if(i>1)
00163                                 int_t = interpolate(z[i],t[i],z[i-1],t[i-1],z[i-2],t[i-2],test_z);
00164                         if(z.size()>2)
00165                                 int_t += interpolate(z[0],t[0],z[1],t[1],z[2],t[2],test_z);
00166                                 
00167                         int_t /=2;      
00168                 }
00169 
00170         }else if(z.size()>1)
00171         {
00172                 int end = z.size()-1;
00173                 double dz = z[end]-z[end-1];
00174                 double dt = t[end]-t[end-1];
00175                 if(dz!=0)
00176                 {
00177                         double slope = dt/dz;
00178                         int_t = (test_z-z[end-1])*slope+t[end-1];
00179                 }
00180         }else if(z.size()==1)
00181         {
00182                 int_t = t[0];
00183         }
00184 
00185 
00186         
00187 
00188         return int_t;
00189 }

void Chain::PrintChain  ) 
 

Definition at line 308 of file Chain.cxx.

References avg_slope, back_slope, cluster_id, e, emlike, end_t, end_z, entries, front_slope, MsgService::Instance(), interior_muonfrac, MsgService::IsActive(), last_slope, muonfrac, myId, num_peaks, start_t, start_z, strict_decreasing, strict_increasing, sum_e, t, and z.

Referenced by ChainHelper::AttachAt(), LongMuonFinder::FindLongMuon(), and PrimaryShowerFinder::FindPrimaryShower().

00309 {
00310 
00311         if(!MsgService::Instance()->IsActive("Chain",Msg::kDebug))return;
00312 
00313         printf("Chain %d \n",myId);
00314         printf("%d entries    start_t %f start_z %f  end_t %f end_z %f\n",entries,start_t,start_z,end_t,end_z);
00315         printf("sume %f   avg_slope %f lastslope %f  frontslope %f backslope %f\n",sum_e,avg_slope,last_slope,front_slope,back_slope);
00316         printf("muonfrac %f, intmf %f, emlike %f, peaks %d, sdec %d, sinc %d\n",muonfrac, interior_muonfrac, emlike, num_peaks,strict_decreasing, strict_increasing);
00317         
00318         printf(" hits (t,z,e) : ");
00319         for(unsigned int i=0;i<t.size();i++)
00320                 printf(" (%f, %f, %f - %d)", t[i],z[i],e[i],cluster_id[i]);
00321         printf("\n");
00322 
00323 
00324 }

void Chain::Recalc  ) 
 

Definition at line 218 of file Chain.cxx.

References ClearHits(), cluster_id, and insert().

Referenced by LongMuonFinder::FindLongMuon(), Finder::FindMuons(), and PrimaryShowerFinder::FindPrimaryShower().

00219 {
00220 
00221                 std::vector<double>mt=t;
00222                 std::vector<double>mz=z;
00223                 std::vector<double>me=e;
00224                 std::vector<int>mc=cluster_id;
00225                 
00226                 ClearHits();
00227                 
00228                 for(unsigned int i=0;i<mt.size();i++)
00229                         if(me[i]>0)insert(mt[i],mz[i],me[i],cluster_id[i]);
00230 
00231 
00232 
00233 }

void Chain::ResetCounter  )  [static]
 

Definition at line 79 of file Chain.cxx.

References lastid.

Referenced by ChainHelper::ChainHelper(), and ChainHelper::Reset().

00080 {
00081         lastid=0;
00082 }

void Chain::Reverse  ) 
 

Definition at line 238 of file Chain.cxx.

References add_to_back(), ClearHits(), cluster_id, e, t, and z.

Referenced by Finder::FindVertex().

00239 {
00240 
00241         //printf("reversing\n");
00242 
00243                 std::vector<double>mt;
00244                 for(unsigned int i=0;i<t.size();i++)mt.push_back(t[i]);
00245                 std::vector<double>mz;
00246                 for(unsigned int i=0;i<z.size();i++)mz.push_back(z[i]);
00247                 std::vector<double>me;
00248                 for(unsigned int i=0;i<e.size();i++)me.push_back(e[i]);
00249                 
00250                 std::vector<int>mc;
00251                 for(unsigned int i=0;i<cluster_id.size();i++)mc.push_back(cluster_id[i]);
00252                 
00253                 //printf("sv\n");
00254                 
00255                 ClearHits();
00256                 
00257                 //printf("cleared hits\n");
00258                 
00259                 for(int i=mt.size()-1;i>-1;i--)
00260                         add_to_back(mt[i],mz[i],me[i],cluster_id[i]);
00261 
00262 
00263                 //printf("done\n");
00264 
00265 }

void Chain::updateEMLike double  it,
double  iz,
double  ie
 

Definition at line 369 of file Chain.cxx.

References emlike, and num_peaks.

Referenced by add_to_back(), and insert().

00370 {
00371         //for now its emlike if it has 1 peak.... make it better later...
00372         emlike = num_peaks==1;
00373 }

void Chain::updateMuonFrac double  it,
double  iz,
double  ie
 

Definition at line 327 of file Chain.cxx.

References e, entries, interior_muonfrac, muon_min_hits, muon_threshold_max, muonfrac, and muonlike.

Referenced by add_to_back(), and insert().

00328 {
00329         if(ie < muon_threshold_max && ie > muon_threshold_min)
00330         {
00331         
00332                 if(entries>2)
00333                 {
00334                         int cntfirst=0;
00335                         if ( e[0] <  muon_threshold_max && e[0] > muon_threshold_min ) cntfirst=1;
00336                         interior_muonfrac = (double)(muonlike - cntfirst) / (double)(entries-2);
00337                 }
00338                 
00339                 muonlike++;
00340                 if (muon_min_hits <= entries ) muonfrac = (double)muonlike / (double)entries;
00341         }
00342 
00343 }

void Chain::updateNumPeaks double  it,
double  iz,
double  ie
 

Definition at line 345 of file Chain.cxx.

References entries, lastpeake, lastpeakprob, num_peaks, strict_decreasing, and strict_increasing.

Referenced by add_to_back(), and insert().

00346 {
00347         if(entries>1)
00348         if(ie < lastpeake && lastpeakprob)
00349         {
00350                 num_peaks++;
00351                 lastpeakprob = 0;
00352         }else if(ie > lastpeake)
00353         {
00354                 lastpeakprob = 1;
00355         }
00356 
00357 
00358         if(entries>1)
00359         {
00360                 if(ie <= lastpeake) strict_increasing=0;
00361                 if(ie >= lastpeake) strict_decreasing=0;
00362         }
00363         
00364 
00365         lastpeake = ie;
00366         
00367 }


Member Data Documentation

double Chain::a
 

Definition at line 83 of file Chain.h.

Referenced by add_to_back(), ClearHits(), insert(), and Finder::RemoveNonVertexPointingChains().

int Chain::available
 

Definition at line 32 of file Chain.h.

Referenced by LongMuonFinder::FindLongMuon(), PrimaryShowerFinder::FindPrimaryShower(), and Finder::Make3DParticle().

double Chain::avg_offset
 

Definition at line 48 of file Chain.h.

Referenced by add_to_back(), ClearHits(), insert(), and ChainHelper::print_finished().

double Chain::avg_slope
 

Definition at line 47 of file Chain.h.

Referenced by add_to_back(), ClearHits(), insert(), ChainHelper::print_finished(), and PrintChain().

double Chain::b
 

Definition at line 84 of file Chain.h.

Referenced by add_to_back(), ClearHits(), and insert().

double Chain::back_offset
 

Definition at line 54 of file Chain.h.

Referenced by add_to_back(), insert(), Finder::MergeChains(), and ChainHelper::print_finished().

double Chain::back_slope
 

Definition at line 52 of file Chain.h.

Referenced by add_to_back(), ClearHits(), insert(), Finder::MergeChains(), ChainHelper::print_finished(), and PrintChain().

std::vector<int> Chain::children
 

Definition at line 19 of file Chain.h.

Referenced by ChainHelper::AdjustLevel(), ChainHelper::AttachAsChild(), ChainHelper::AttachAt(), ChainHelper::DeleteChain(), PrimaryShowerFinder::ExtractMuon(), ChainHelper::FindMaxPath(), ChainHelper::FindPaths(), Finder::FindVertex(), ChainHelper::GetAllChildren(), ChainHelper::print_finished(), ChainHelper::split(), ChainHelper::SplitAt(), and ~Chain().

std::vector<int> Chain::cluster_id
 

Definition at line 17 of file Chain.h.

Referenced by add_to_back(), ChainHelper::AttachAt(), ChainHelper::ChangeHitId(), LongMuonFinder::CheckChainQuality(), PrimaryShowerFinder::ClearFrontVertex(), LongMuonFinder::ClearFrontVertex(), ClearHits(), PrimaryShowerFinder::ExtractMuon(), LongMuonFinder::FindLongMuon(), Finder::FindNeutrons(), PrimaryShowerFinder::FindPrimaryShower(), insert(), Finder::Make3DParticle(), PrimaryShowerFinder::MakeParticle3D(), LongMuonFinder::MakeParticle3D(), LongMuonFinder::MergeChainClusters(), ChainHelper::print_finished(), PrintChain(), Recalc(), Finder::RecordLostHits(), LongMuonFinder::RemoveNonMuonEnergy(), Reverse(), Finder::SetStatus(), ChainHelper::split(), ChainHelper::SplitAt(), Finder::Weave(), and ~Chain().

std::vector<double> Chain::e
 

Definition at line 16 of file Chain.h.

Referenced by add_to_back(), ChainHelper::AttachAt(), PrimaryShowerFinder::CheckChainQuality(), LongMuonFinder::CheckChainQuality(), PrimaryShowerFinder::ClearFrontVertex(), LongMuonFinder::ClearFrontVertex(), ClearHits(), PrimaryShowerFinder::ExtractMuon(), LongMuonFinder::FindLongMuon(), ChainHelper::FindMaxPath(), Finder::FindMuons(), PrimaryShowerFinder::FindPrimaryShower(), Finder::FindVertex(), insert(), PrimaryShowerFinder::MakeParticle3D(), LongMuonFinder::MakeParticle3D(), LongMuonFinder::MergeChainClusters(), ChainHelper::print_finished(), PrintChain(), LongMuonFinder::RemoveNonMuonEnergy(), Reverse(), Finder::ShareHit(), ChainHelper::split(), ChainHelper::SplitAt(), updateMuonFrac(), and ~Chain().

double Chain::emlike
 

Definition at line 66 of file Chain.h.

Referenced by ClearHits(), ChainHelper::print_finished(), PrintChain(), and updateEMLike().

double Chain::end_t
 

Definition at line 22 of file Chain.h.

Referenced by add_to_back(), ClearHits(), HoughView::DrawChains(), HitView::DrawChains(), ChainView::DrawChains(), PrimaryShowerFinder::ExpandShowerChain(), ChainHelper::FindMaxPath(), ChainHelper::FindPaths(), insert(), PrimaryShowerFinder::MakeChains(), Finder::MergeChains(), ChainHelper::print_finished(), PrintChain(), Finder::RemoveNonVertexPointingChains(), and ChainHelper::split().

double Chain::end_z
 

Definition at line 24 of file Chain.h.

Referenced by add_to_back(), ChainHelper::AttachAt(), PrimaryShowerFinder::CheckChainOverlap(), LongMuonFinder::CheckChainOverlap(), ClearHits(), HoughView::DrawChains(), HitView::DrawChains(), ChainView::DrawChains(), PrimaryShowerFinder::ExpandShowerChain(), LongMuonFinder::FindLongMuon(), ChainHelper::FindMaxPath(), ChainHelper::FindPaths(), PrimaryShowerFinder::FindPrimaryShower(), Finder::FindVertex(), insert(), PrimaryShowerFinder::MakeChains(), Finder::MergeChains(), ChainHelper::print_finished(), PrintChain(), Finder::RemoveNonVertexPointingChains(), ChainHelper::split(), and ChainHelper::SplitAt().

int Chain::entries
 

Definition at line 36 of file Chain.h.

Referenced by add_to_back(), ChainHelper::AttachAt(), PrimaryShowerFinder::CheckChainQuality(), LongMuonFinder::CheckChainQuality(), PrimaryShowerFinder::ClearFrontVertex(), LongMuonFinder::ClearFrontVertex(), ClearHits(), PrimaryShowerFinder::ExtractMuon(), LongMuonFinder::FindLongMuon(), LongMuonFinder::FindMuonChain(), Finder::FindMuons(), ChainHelper::FindPaths(), PrimaryShowerFinder::FindPrimaryShower(), Finder::FindVertex(), insert(), Finder::Make3DParticle(), PrimaryShowerFinder::MakeChains(), PrimaryShowerFinder::MakeParticle3D(), LongMuonFinder::MakeParticle3D(), ChainHelper::print_finished(), PrintChain(), ChainHelper::process_plane(), Finder::RemoveNonVertexPointingChains(), ChainHelper::SplitAt(), updateMuonFrac(), and updateNumPeaks().

double Chain::front_offset
 

Definition at line 53 of file Chain.h.

Referenced by add_to_back(), LongMuonFinder::FindMuonChain(), insert(), Finder::MergeChains(), ChainHelper::print_finished(), and Finder::RemoveNonVertexPointingChains().

double Chain::front_slope
 

Definition at line 51 of file Chain.h.

Referenced by add_to_back(), ClearHits(), LongMuonFinder::FindMuonChain(), insert(), Finder::MergeChains(), ChainHelper::print_finished(), PrintChain(), and Finder::RemoveNonVertexPointingChains().

double Chain::interior_muonfrac
 

Definition at line 65 of file Chain.h.

Referenced by ClearHits(), PrintChain(), and updateMuonFrac().

double Chain::last_slope
 

Definition at line 49 of file Chain.h.

Referenced by add_to_back(), ClearHits(), insert(), ChainHelper::print_finished(), and PrintChain().

int Chain::lastid = 0 [static]
 

Definition at line 11 of file Chain.cxx.

Referenced by ResetCounter().

double Chain::lastpeake [private]
 

Definition at line 98 of file Chain.h.

Referenced by ClearHits(), and updateNumPeaks().

int Chain::lastpeakprob [private]
 

Definition at line 99 of file Chain.h.

Referenced by ClearHits(), and updateNumPeaks().

int Chain::level
 

Definition at line 62 of file Chain.h.

Referenced by ChainHelper::AdjustLevel(), ChainHelper::AttachAsChild(), ChainHelper::AttachAt(), PrimaryShowerFinder::ExtractMuon(), Finder::FindVertex(), ChainHelper::print_finished(), ChainHelper::split(), and ChainHelper::SplitAt().

int Chain::muon_min_hits
 

Definition at line 74 of file Chain.h.

Referenced by updateMuonFrac().

double Chain::muon_threshold_max
 

Definition at line 72 of file Chain.h.

Referenced by updateMuonFrac().

double Chain::muon_threshold_min
 

Definition at line 73 of file Chain.h.

double Chain::muonfrac
 

Definition at line 64 of file Chain.h.

Referenced by PrimaryShowerFinder::CheckChainQuality(), ClearHits(), ChainHelper::FindPaths(), ChainHelper::print_finished(), PrintChain(), and updateMuonFrac().

int Chain::muonlike [private]
 

Definition at line 96 of file Chain.h.

Referenced by ClearHits(), ChainHelper::FindPaths(), and updateMuonFrac().

int Chain::myId
 

Definition at line 61 of file Chain.h.

Referenced by ChainHelper::AddFinishedChain(), ChainHelper::AdjustLevel(), ChainHelper::AttachAsChild(), ChainHelper::AttachAt(), HoughView::DrawChains(), HitView::DrawChains(), ChainView::DrawChains(), ChainHelper::FindMaxPath(), ChainHelper::FindPaths(), PrimaryShowerFinder::FindPrimaryShower(), Finder::FindVertex(), ChainHelper::GetAllChildren(), Finder::Make3DParticle(), PrimaryShowerFinder::MakeParticle3D(), LongMuonFinder::MakeParticle3D(), ChainHelper::matchChains(), Finder::MergeChains(), ChainHelper::NewChain(), LTId::operator()(), ChainHelper::print_finished(), PrintChain(), ChainHelper::process_plane(), Finder::RemoveNonVertexPointingChains(), ChainHelper::split(), and ChainHelper::SplitAt().

int Chain::num_peaks
 

Definition at line 67 of file Chain.h.

Referenced by ClearHits(), ChainHelper::print_finished(), PrintChain(), updateEMLike(), and updateNumPeaks().

int Chain::parentChain
 

Definition at line 60 of file Chain.h.

Referenced by ChainHelper::AttachAsChild(), ChainHelper::AttachAt(), ChainHelper::DeleteChain(), HoughView::DrawChains(), HitView::DrawChains(), ChainView::DrawChains(), PrimaryShowerFinder::ExtractMuon(), Finder::FindVertex(), Finder::Make3DParticle(), PrimaryShowerFinder::MakeParticle3D(), LongMuonFinder::MakeParticle3D(), ChainHelper::matchChains(), ChainHelper::print_finished(), ChainHelper::split(), and ChainHelper::SplitAt().

int Chain::particletype
 

Definition at line 28 of file Chain.h.

Referenced by Finder::FindMuons(), Finder::Make3DParticle(), PrimaryShowerFinder::MakeParticle3D(), and LongMuonFinder::MakeParticle3D().

double Chain::start_t
 

Definition at line 21 of file Chain.h.

Referenced by add_to_back(), ClearHits(), PrimaryShowerFinder::ExpandShowerChain(), ChainHelper::FindMaxPath(), LongMuonFinder::FindMuonChain(), ChainHelper::FindPaths(), Finder::FindVertex(), insert(), PrimaryShowerFinder::MakeChains(), Finder::MergeChains(), ChainHelper::print_finished(), PrintChain(), Finder::RemoveNonVertexPointingChains(), and ChainHelper::split().

double Chain::start_z
 

Definition at line 23 of file Chain.h.

Referenced by add_to_back(), ChainHelper::AttachAt(), PrimaryShowerFinder::CheckChainOverlap(), LongMuonFinder::CheckChainOverlap(), PrimaryShowerFinder::ClearFrontVertex(), LongMuonFinder::ClearFrontVertex(), ClearHits(), PrimaryShowerFinder::ExpandShowerChain(), LongMuonFinder::FindLongMuon(), ChainHelper::FindMaxPath(), LongMuonFinder::FindMuonChain(), ChainHelper::FindPaths(), PrimaryShowerFinder::FindPrimaryShower(), Finder::FindVertex(), insert(), PrimaryShowerFinder::MakeChains(), Finder::MergeChains(), ChainHelper::print_finished(), PrintChain(), Finder::RemoveNonVertexPointingChains(), ChainHelper::split(), and ChainHelper::SplitAt().

int Chain::strict_decreasing
 

Definition at line 68 of file Chain.h.

Referenced by ClearHits(), ChainHelper::print_finished(), PrintChain(), and updateNumPeaks().

int Chain::strict_increasing
 

Definition at line 69 of file Chain.h.

Referenced by ClearHits(), ChainHelper::print_finished(), PrintChain(), and updateNumPeaks().

double Chain::sum_e
 

Definition at line 30 of file Chain.h.

Referenced by add_to_back(), ClearHits(), ChainHelper::FindMaxPath(), ChainHelper::FindPaths(), insert(), ChainHelper::print_finished(), and PrintChain().

double Chain::sum_t [private]
 

Definition at line 92 of file Chain.h.

Referenced by add_to_back(), ClearHits(), and insert().

double Chain::sum_z [private]
 

Definition at line 91 of file Chain.h.

Referenced by add_to_back(), ClearHits(), and insert().

double Chain::sum_z_t [private]
 

Definition at line 94 of file Chain.h.

Referenced by add_to_back(), ClearHits(), and insert().

double Chain::sum_z_z [private]
 

Definition at line 93 of file Chain.h.

Referenced by add_to_back(), ClearHits(), and insert().

std::vector<double> Chain::t
 

Definition at line 14 of file Chain.h.

Referenced by add_to_back(), ChainHelper::AttachAt(), PrimaryShowerFinder::ClearFrontVertex(), LongMuonFinder::ClearFrontVertex(), ClearHits(), LongMuonFinder::CountInPartiallyInstrumentedRegion(), HoughView::DrawChains(), HitView::DrawChains(), ChainView::DrawChains(), PrimaryShowerFinder::ExtractMuon(), LongMuonFinder::FindMuonChain(), Finder::FindMuons(), PrimaryShowerFinder::FindPrimaryShower(), Finder::FindVertex(), good_slope(), insert(), Finder::Make3DParticle(), PrimaryShowerFinder::MakeParticle3D(), LongMuonFinder::MakeParticle3D(), ChainHelper::print_finished(), PrintChain(), Reverse(), ChainHelper::split(), ChainHelper::SplitAt(), PrimaryShowerFinder::SplitHoughLine(), and ~Chain().

double Chain::weighted_t
 

Definition at line 34 of file Chain.h.

Referenced by add_to_back(), ClearHits(), and insert().

std::vector<double> Chain::z
 

Definition at line 15 of file Chain.h.

Referenced by add_to_back(), ChainHelper::AttachAt(), PrimaryShowerFinder::CheckChainQuality(), LongMuonFinder::CheckChainQuality(), PrimaryShowerFinder::ClearFrontVertex(), LongMuonFinder::ClearFrontVertex(), ClearHits(), LongMuonFinder::CountInPartiallyInstrumentedRegion(), HoughView::DrawChains(), HitView::DrawChains(), ChainView::DrawChains(), PrimaryShowerFinder::ExtractMuon(), Finder::FindMuons(), PrimaryShowerFinder::FindPrimaryShower(), Finder::FindVertex(), insert(), interpolate(), Finder::Make3DParticle(), PrimaryShowerFinder::MakeParticle3D(), LongMuonFinder::MakeParticle3D(), LongMuonFinder::MergeChainClusters(), ChainHelper::print_finished(), PrintChain(), Reverse(), ChainHelper::split(), ChainHelper::SplitAt(), PrimaryShowerFinder::SplitHoughLine(), and ~Chain().


The documentation for this class was generated from the following files:
Generated on Mon Feb 15 11:08:59 2010 for loon by  doxygen 1.3.9.1