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

cluster::HitCluster Class Reference

#include <HitCluster.h>

List of all members.

Public Member Functions

 HitCluster ()
 ~HitCluster ()
std::vector< PlaneClusterMakeClusters (std::vector< const CellHit * > &cellhit)
bool Fit3HitClust (PlaneCluster clust, std::vector< PlaneCluster > &newclust)
bool FitClust (PlaneCluster clust, std::vector< PlaneCluster > &newclust)
bool SortClust (std::vector< PlaneCluster > &newclust)
void MakeHit (PlaneCluster &clust, CellHit &hit)


Constructor & Destructor Documentation

cluster::HitCluster::HitCluster  )  [inline]
 

Definition at line 17 of file HitCluster.h.

00017 {};

cluster::HitCluster::~HitCluster  )  [inline]
 

Definition at line 18 of file HitCluster.h.

00018 {};


Member Function Documentation

bool HitCluster::Fit3HitClust PlaneCluster  clust,
std::vector< PlaneCluster > &  newclust
 

Definition at line 130 of file HitCluster.cxx.

References recobase::PlaneCluster::fCellHit, and recobase::PlaneCluster::fStatus.

Referenced by FitClust().

00131 {
00132  // First, check if there is a gap. If yes, split the cluster there
00133   if (clust.fCellHit[1]->Cell()-clust.fCellHit[0]->Cell()>1) {
00134     clust.fStatus |= 0x0001;
00135     PlaneCluster cl1;
00136     PlaneCluster cl2;
00137     cl1.fCellHit.push_back(clust.fCellHit[0]);
00138     cl2.fCellHit.push_back(clust.fCellHit[1]);
00139     cl2.fCellHit.push_back(clust.fCellHit[2]);
00140     newclust.push_back(cl1);
00141     newclust.push_back(cl2);
00142   }
00143   else if (clust.fCellHit[2]->Cell()-clust.fCellHit[1]->Cell()>1) {
00144     clust.fStatus |= 0x0001;
00145     PlaneCluster cl1;
00146     PlaneCluster cl2;
00147     cl1.fCellHit.push_back(clust.fCellHit[0]);
00148     cl1.fCellHit.push_back(clust.fCellHit[1]);
00149     cl2.fCellHit.push_back(clust.fCellHit[2]);
00150     newclust.push_back(cl1);
00151     newclust.push_back(cl2);
00152   }
00153   else {
00154     if (clust.fCellHit[0]->Cell() > clust.fCellHit[1]->Cell() &&
00155         clust.fCellHit[2]->Cell() > clust.fCellHit[1]->Cell()) {
00156       clust.fStatus |= 0x0001;
00157       PlaneCluster cl1;
00158       PlaneCluster cl2;
00159       if (clust.fCellHit[0]->Cell() > clust.fCellHit[2]->Cell()) {
00160         cl1.fCellHit.push_back(clust.fCellHit[0]);
00161         cl1.fCellHit.push_back(clust.fCellHit[1]);
00162         cl2.fCellHit.push_back(clust.fCellHit[2]);
00163       }
00164       else {
00165         cl1.fCellHit.push_back(clust.fCellHit[0]);
00166         cl2.fCellHit.push_back(clust.fCellHit[1]);
00167         cl2.fCellHit.push_back(clust.fCellHit[2]);
00168       }
00169       newclust.push_back(cl1);
00170       newclust.push_back(cl2);
00171     }
00172   }
00173   return true;
00174 
00175 
00176 }

bool HitCluster::FitClust PlaneCluster  clust,
std::vector< PlaneCluster > &  newclust
 

Definition at line 178 of file HitCluster.cxx.

References recobase::PlaneCluster::fCellHit, and Fit3HitClust().

00179 {
00180 
00181 if (clust.fCellHit.size()<3)  return true;
00182   if (clust.fCellHit.size()==3) return HitCluster::Fit3HitClust(clust, newclust);  
00183 
00184   for (unsigned int i=0; i<clust.fCellHit.size(); ++i) {
00185     PlaneCluster tmpclust;
00186     double adcl, adcr;
00187     if (i==0) adcl = 0.0;
00188     else  
00189         {
00190                 float mips;
00191             if(clust.fCellHit[i-1]->MIP(mips))
00192             adcl = mips;
00193         }
00194     if (i==clust.fCellHit.size()-1) adcr = 0.0;
00195     else  
00196         {
00197                 float mips;
00198                 if(clust.fCellHit[i+1]->MIP(mips))
00199             adcr = mips;
00200         }
00201     tmpclust.fCellHit.push_back(clust.fCellHit[i]);
00202     float mips;
00203         if(!clust.fCellHit[i]->MIP(mips))continue;else
00204      if (mips<adcl && mips<adcr) {
00205       if (mips/(adcl+adcr)<0.5) {
00206         newclust.push_back(tmpclust);
00207         tmpclust.fCellHit.clear();
00208       }
00209     }
00210   }
00211   return true;
00212 
00213 }

std::vector<PlaneCluster> cluster::HitCluster::MakeClusters std::vector< const CellHit * > &  cellhit  ) 
 

Referenced by cluster::Clusterer::Reco().

void HitCluster::MakeHit PlaneCluster clust,
CellHit hit
 

Definition at line 235 of file HitCluster.cxx.

00236 {
00237 }

bool HitCluster::SortClust std::vector< PlaneCluster > &  newclust  ) 
 

Definition at line 215 of file HitCluster.cxx.

00216 {
00217   // Sort PlaneCluster by plane number.
00218   std::multimap<float,PlaneCluster> tmpclustmap;
00219 
00220   for (unsigned int i=0; i<clust.size(); ++i) {
00221    
00222     tmpclustmap.insert(std::multimap<float,PlaneCluster>::value_type(clust[i].Zpos(),clust[i]));
00223   }
00224   clust.clear();
00225 
00226   std::multimap<float,PlaneCluster>::iterator itr = tmpclustmap.begin();
00227   while( itr != tmpclustmap.end() )
00228   {
00229     clust.push_back((*itr).second);
00230     ++itr;
00231   }
00232   return true;
00233 }


The documentation for this class was generated from the following files:
Generated on Sat Oct 11 02:35:31 2008 for NOvA Offline by  doxygen 1.3.9.1