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

static void ResetCounter ()
static 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

static 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

Detailed Description

Definition at line 7 of file Chain.h.


Constructor & Destructor Documentation

Chain::Chain (  ) 

Definition at line 12 of file Chain.cxx.

References MuELoss::a, and MuELoss::e.

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

Chain::~Chain (  ) 

Definition at line 69 of file Chain.cxx.

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

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


Member Function Documentation

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

Definition at line 551 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, n, 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().

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

void Chain::ClearHits (  ) 

Definition at line 268 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(), LongMuonFinder::ClearFrontVertex(), PrimaryShowerFinder::ClearFrontVertex(), Recalc(), Reverse(), and ChainHelper::SplitAt().

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

int Chain::good_slope (  ) 

Definition at line 369 of file Chain.cxx.

References t.

00370 {
00371         //tell us if we have enough points to believe the slope value
00372         
00373         int good=0;
00374         
00375         if(t.size()>1)good=1;
00376         
00377         return good;
00378 }

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

Definition at line 382 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, n, 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 LongMuonFinder::ClearFrontVertex(), PrimaryShowerFinder::ClearFrontVertex(), PrimaryShowerFinder::ExpandShowerChain(), PrimaryShowerFinder::ExtractMuon(), LongMuonFinder::FindMuonChain(), PrimaryShowerFinder::FindPrimaryShower(), PrimaryShowerFinder::FindShowerChain(), PrimaryShowerFinder::MakeChains(), PrimaryShowerFinder::MakeShowerChain(), LongMuonFinder::MergeChainClusters(), and Recalc().

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

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

Definition at line 191 of file Chain.cxx.

00192 {
00193         double int_t=0;
00194   
00195     //for quadratic     
00196         double L0 = (z-z1)*(z-z2)/( (z0-z1)*(z0-z2));
00197         double L1 = (z-z0)*(z-z2)/( (z1-z0)*(z1-z2));   
00198         double L2 = (z-z0)*(z-z1)/( (z2-z0)*(z2-z1));
00199 
00200         int_t = t0*L0 + t1*L1 + t2*L2;
00201 
00202 //      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);
00203 
00204         return int_t;
00205 }

double Chain::interpolate ( double  z  ) 

Definition at line 85 of file Chain.cxx.

References e, end_z, start_z, t, and z.

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

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

void Chain::PrintChain (  ) 

Definition at line 307 of file Chain.cxx.

References avg_slope, back_slope, cluster_id, e, emlike, end_t, end_z, entries, front_slope, MsgService::Instance(), interior_muonfrac, Msg::kDebug, 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().

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

void Chain::Recalc (  ) 

Definition at line 217 of file Chain.cxx.

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

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

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

void Chain::ResetCounter (  )  [static]

Definition at line 78 of file Chain.cxx.

References lastid.

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

00079 {
00080         lastid=0;
00081 }

void Chain::Reverse (  ) 

Definition at line 237 of file Chain.cxx.

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

Referenced by Finder::FindVertex().

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

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

Definition at line 362 of file Chain.cxx.

References emlike, and num_peaks.

Referenced by add_to_back(), and insert().

00363 {
00364         //for now its emlike if it has 1 peak.... make it better later...
00365         emlike = num_peaks==1;
00366 }

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

Definition at line 326 of file Chain.cxx.

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

Referenced by add_to_back(), and insert().

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

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

Definition at line 344 of file Chain.cxx.

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

Referenced by add_to_back(), and insert().

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


Member Data Documentation

double Chain::a

Definition at line 83 of file Chain.h.

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

Definition at line 48 of file Chain.h.

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

Definition at line 47 of file Chain.h.

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

double Chain::b

Definition at line 84 of file Chain.h.

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

Definition at line 54 of file Chain.h.

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

Definition at line 52 of file Chain.h.

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

std::vector<int> Chain::children
std::vector<int> Chain::cluster_id
std::vector<double> Chain::e
double Chain::emlike

Definition at line 66 of file Chain.h.

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

double Chain::end_t
double Chain::end_z

Definition at line 65 of file Chain.h.

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

Definition at line 49 of file Chain.h.

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

int Chain::lastid = 0 [static]

Definition at line 26 of file Chain.h.

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().

Definition at line 74 of file Chain.h.

Referenced by updateMuonFrac().

Definition at line 72 of file Chain.h.

Referenced by updateMuonFrac().

Definition at line 73 of file Chain.h.

Referenced by updateMuonFrac().

int Chain::muonlike [private]

Definition at line 96 of file Chain.h.

Referenced by ClearHits(), and updateMuonFrac().

Definition at line 67 of file Chain.h.

Referenced by ClearHits(), PrintChain(), updateEMLike(), and updateNumPeaks().

Definition at line 68 of file Chain.h.

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

Definition at line 69 of file Chain.h.

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

double Chain::sum_e
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 34 of file Chain.h.

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

std::vector<double> Chain::z

The documentation for this class was generated from the following files:

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1