| 
| void  | PerformClusterPCA (const std::vector< art::Ptr< recob::Hit > > &HitsThisCluster, double *PrincDirectionWT, double &PrincValue, double &TotalCharge, bool NormPC) | 
|   | 
| void  | analyze (art::Event const &evt) | 
|   | 
| void  | beginJob () | 
|   | 
Definition at line 38 of file ClusterPCA_module.cc.
 
  
  
      
        
          | cluster::ClusterPCA::ClusterPCA  | 
          ( | 
          fhicl::ParameterSet const &  | 
          pset | ) | 
           | 
         
       
   | 
  
explicit   | 
  
 
 
      
        
          | cluster::ClusterPCA::~ClusterPCA  | 
          ( | 
           | ) | 
           | 
        
      
 
 
  
  
      
        
          | void cluster::ClusterPCA::analyze  | 
          ( | 
          art::Event const &  | 
          evt | ) | 
           | 
         
       
   | 
  
private   | 
  
 
Definition at line 102 of file ClusterPCA_module.cc.
  105     art::Handle< std::vector<recob::Cluster> > clusterVecHandle;
 
  108     constexpr 
size_t nViews = 3;
 
  112     std::array<std::vector<size_t>, nViews> ClsIndex;
 
  115     for(
size_t i = 0; i < clusterVecHandle->size(); ++i){
 
  118       art::Ptr<recob::Cluster> cl(clusterVecHandle, i);
 
  131         mf::LogError(
"ClusterPCA")
 
  132           << 
"Hit belongs to an unsupported view (#" << cl->View() << 
")";
 
  136       ClsIndex[
fView].push_back(i);
 
  142       const std::vector<size_t>& ClsIndices = ClsIndex[
fView];
 
  144       for(
size_t c = 0; c < ClsIndices.size(); ++c){
 
  147         const std::vector<art::Ptr<recob::Hit>>& ptrvs = fm.at(ClsIndices[c]);
 
  149         double PrincDir[2], PrincValue=0;
 
  150         double TotalCharge=0;
 
Planes which measure Z direction. 
 
std::string fClusterModuleLabel
 
void PerformClusterPCA(const std::vector< art::Ptr< recob::Hit > > &HitsThisCluster, double *PrincDirectionWT, double &PrincValue, double &TotalCharge, bool NormPC)
 
 
 
 
  
  
      
        
          | void cluster::ClusterPCA::beginJob  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
private   | 
  
 
Definition at line 89 of file ClusterPCA_module.cc.
   91     art::ServiceHandle<art::TFileService const> 
tfs;
 
   92     fTree = tfs->make<TTree>(
"PCATree",
"PCATree");
 
art::ServiceHandle< art::TFileService > tfs
 
 
 
 
  
  
      
        
          | void cluster::ClusterPCA::PerformClusterPCA  | 
          ( | 
          const std::vector< art::Ptr< recob::Hit > > &  | 
          HitsThisCluster,  | 
         
        
           | 
           | 
          double *  | 
          PrincDirectionWT,  | 
         
        
           | 
           | 
          double &  | 
          PrincValue,  | 
         
        
           | 
           | 
          double &  | 
          TotalCharge,  | 
         
        
           | 
           | 
          bool  | 
          NormPC  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
private   | 
  
 
Definition at line 188 of file ClusterPCA_module.cc.
  191   double Center[2] = {0,0};
 
  194   for(
auto itHit = HitsThisCluster.begin(); itHit!=HitsThisCluster.end(); ++itHit)
 
  196       Center[0] += (*itHit)->WireID().Wire;
 
  197       Center[1] += (*itHit)->PeakTime();
 
  198       TotalCharge += (*itHit)->Integral();
 
  201   Center[0] /= float(HitsThisCluster.size());
 
  202   Center[1] /= float(HitsThisCluster.size());
 
  207   std::string OptionString;
 
  214   TPrincipal  pc(2, OptionString.c_str());
 
  217   for(
auto itHit = HitsThisCluster.begin(); itHit!=HitsThisCluster.end(); ++itHit)
 
  219       WireTime[0] = (*itHit)->WireID().Wire - Center[0];
 
  220       WireTime[1] = (*itHit)->PeakTime()    - Center[1];
 
  228   PrincipalEigenvalue = (*pc.GetEigenValues())[0];
 
  230   for(
size_t n=0; 
n!=2; ++
n)
 
  232       PrincipalDirection[
n]=        (*pc.GetEigenVectors())[0][
n];
 
 
 
 
  
  
      
        
          | std::string cluster::ClusterPCA::fClusterModuleLabel | 
         
       
   | 
  
private   | 
  
 
 
  
  
      
        
          | Float_t cluster::ClusterPCA::fNHits | 
         
       
   | 
  
private   | 
  
 
 
  
  
      
        
          | bool cluster::ClusterPCA::fNormPC | 
         
       
   | 
  
private   | 
  
 
 
  
  
      
        
          | Float_t cluster::ClusterPCA::fPrincDirT | 
         
       
   | 
  
private   | 
  
 
 
  
  
      
        
          | Float_t cluster::ClusterPCA::fPrincDirW | 
         
       
   | 
  
private   | 
  
 
 
  
  
      
        
          | Float_t cluster::ClusterPCA::fPrincValue | 
         
       
   | 
  
private   | 
  
 
 
  
  
      
        
          | Float_t cluster::ClusterPCA::fTotalCharge | 
         
       
   | 
  
private   | 
  
 
 
  
  
      
        
          | TTree* cluster::ClusterPCA::fTree | 
         
       
   | 
  
private   | 
  
 
 
  
  
      
        
          | Int_t cluster::ClusterPCA::fView | 
         
       
   | 
  
private   | 
  
 
 
The documentation for this class was generated from the following file: