All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | Friends | List of all members
seaview::cluster Class Reference

#include <SEAviewer.h>

Public Member Functions

 cluster (int ID, int plane, std::vector< std::vector< double >> &pts, std::vector< art::Ptr< recob::Hit >> &hits)
 
int setScore (cluster_score &in_score)
 
void setLegend (const std::string &in_leg)
 
void setWireTickBasedLength (double d)
 
double getWireTickBasedLength () const
 
bool isTrackAnalyzed () const
 
cluster_scoregetScore ()
 
int getID () const
 
int getPlane () const
 
std::vector< std::vector
< double > > 
getPTS () const
 
TGraph * getGraph ()
 
TH1D * getADCHist ()
 
const TGraph * getGraph () const
 
const std::string & getLegend () const
 
const std::vector< art::Ptr
< recob::Hit > > & 
getHits ()
 
int getShowerRemerge () const
 
int setShowerRemerge (int remerge_in)
 
double getMeanADC () const
 
double getADCrms () const
 
void setImpactParam (double d)
 
void setAngleWRTShower (double d)
 
void setFitSlope (double d)
 
void setFitCons (double d)
 
double getAngleWRTShower () const
 
double getFitSlope () const
 
double getFitCons () const
 
double getImpactParam () const
 
double getMinHitImpactParam () const
 
double getMinHitConvDist () const
 
double getMinHitIOC () const
 
double getIOCbasedLength () const
 
size_t getTrackStartIdx () const
 
size_t getTrackEndIdx () const
 
double getMeanADCFirstHalf () const
 
double getMeanADCSecondHalf () const
 
double getMeanADCRatio () const
 
double getTrackAngleToShowerDirection () const
 
double getLinearChi () const
 
int InNuSlice (const std::map< int, std::vector< art::Ptr< recob::Hit >> > &sliceIDToHitsMap, int nuSliceID)
 
bool InRange (double tick_max, double tick_min, double wire_max, double wire_min) const
 

Private Attributes

int f_ID
 
int f_npts
 
int f_plane
 
bool f_track_treated = false
 
std::vector< std::vector
< double > > 
f_pts
 
std::vector< art::Ptr
< recob::Hit > > 
f_hits
 
std::vector< int > f_hit_group
 
cluster_score f_score
 
int f_shower_remerge = -1
 
TGraph f_graph
 
TH1D f_ADC_hist
 
std::string f_legend
 
double f_min_impact_parameter_to_shower = 1e10
 
double f_min_conversion_dist_to_shower_start = 1e10
 
double f_min_ioc_to_shower_start = 1e10
 
double f_ioc_based_length = -1.0
 
double f_wire_tick_based_length = -1.0
 
size_t start_hit_idx = SIZE_MAX
 
size_t end_hit_idx = SIZE_MAX
 
double f_mean_ADC_first_half = 0.0
 
double f_mean_ADC_second_half = 0.0
 
double f_mean_ADC_first_to_second_ratio = 0.0
 
double f_angle_wrt_shower_direction = -1.0
 
double f_fit_chi2 = 0.0
 
double f_ADC_RMS = -1.0
 
double f_meanADC = -1.0
 
double f_ImpactParameter = -1.0
 
double f_FitSlope = 0.0
 
double f_FitCons = 0.0
 
double f_AngleWRTShower = -1.0
 

Friends

class SEAviewer
 

Detailed Description

Definition at line 133 of file SEAviewer.h.

Constructor & Destructor Documentation

seaview::cluster::cluster ( int  ID,
int  plane,
std::vector< std::vector< double >> &  pts,
std::vector< art::Ptr< recob::Hit >> &  hits 
)
inline

Definition at line 138 of file SEAviewer.h.

138  :f_ID(ID), f_plane(plane), f_pts(pts), f_hits(hits), f_score(0,0), f_shower_remerge(-1){
139 
140  f_npts = f_pts.size();
141  if(pts.size() != hits.size()){
142  std::cerr<<"seaviewer::cluster, input hits and pts not alligned"<<std::endl;
143  }
144  std::vector<double> wires(f_npts);
145  std::vector<double> ticks(f_npts);
146  for(int p =0; p< f_npts; ++p){
147  wires[p]=f_pts[p][0];
148  ticks[p]=f_pts[p][1];
149  }
150  TGraph af_graph(f_npts, &wires[0], &ticks[0]);
151  f_graph = af_graph;
152 
153  };
BEGIN_PROLOG could also be cerr
pdgs p
Definition: selectors.fcl:22
std::vector< art::Ptr< recob::Hit > > f_hits
Definition: SEAviewer.h:224
tick ticks
Alias for common language habits.
Definition: electronics.h:78
cluster_score f_score
Definition: SEAviewer.h:226
std::vector< std::vector< double > > f_pts
Definition: SEAviewer.h:223

Member Function Documentation

TH1D* seaview::cluster::getADCHist ( )
inline

Definition at line 167 of file SEAviewer.h.

167 {return &f_ADC_hist;}
double seaview::cluster::getADCrms ( ) const
inline

Definition at line 177 of file SEAviewer.h.

177 {return f_ADC_RMS;}
double f_ADC_RMS
Definition: SEAviewer.h:252
double seaview::cluster::getAngleWRTShower ( ) const
inline

Definition at line 186 of file SEAviewer.h.

186 {return f_AngleWRTShower;}
double f_AngleWRTShower
Definition: SEAviewer.h:262
double seaview::cluster::getFitCons ( ) const
inline

Definition at line 188 of file SEAviewer.h.

188 {return f_FitCons;}
double f_FitCons
Definition: SEAviewer.h:260
double seaview::cluster::getFitSlope ( ) const
inline

Definition at line 187 of file SEAviewer.h.

187 {return f_FitSlope; }
double f_FitSlope
Definition: SEAviewer.h:259
TGraph* seaview::cluster::getGraph ( )
inline

Definition at line 166 of file SEAviewer.h.

166 { return &f_graph;}
const TGraph* seaview::cluster::getGraph ( ) const
inline

Definition at line 168 of file SEAviewer.h.

168 { return &f_graph;}
const std::vector<art::Ptr<recob::Hit> >& seaview::cluster::getHits ( )
inline

Definition at line 170 of file SEAviewer.h.

170 {return f_hits;}
std::vector< art::Ptr< recob::Hit > > f_hits
Definition: SEAviewer.h:224
int seaview::cluster::getID ( ) const
inline

Definition at line 163 of file SEAviewer.h.

163 {return f_ID;}
double seaview::cluster::getImpactParam ( ) const
inline

Definition at line 189 of file SEAviewer.h.

189 {return f_ImpactParameter; }
double f_ImpactParameter
Definition: SEAviewer.h:258
double seaview::cluster::getIOCbasedLength ( ) const
inline

Definition at line 196 of file SEAviewer.h.

196 {return f_ioc_based_length; }
double f_ioc_based_length
Definition: SEAviewer.h:240
const std::string& seaview::cluster::getLegend ( ) const
inline

Definition at line 169 of file SEAviewer.h.

169 {return f_legend; }
std::string f_legend
Definition: SEAviewer.h:230
double seaview::cluster::getLinearChi ( ) const
inline

Definition at line 203 of file SEAviewer.h.

203 {return f_fit_chi2; }
double f_fit_chi2
Definition: SEAviewer.h:251
double seaview::cluster::getMeanADC ( ) const
inline

Definition at line 176 of file SEAviewer.h.

176 { return f_meanADC; }
double f_meanADC
Definition: SEAviewer.h:253
double seaview::cluster::getMeanADCFirstHalf ( ) const
inline

Definition at line 199 of file SEAviewer.h.

199 { return f_mean_ADC_first_half; }
double f_mean_ADC_first_half
Definition: SEAviewer.h:245
double seaview::cluster::getMeanADCRatio ( ) const
inline

Definition at line 201 of file SEAviewer.h.

double f_mean_ADC_first_to_second_ratio
Definition: SEAviewer.h:247
double seaview::cluster::getMeanADCSecondHalf ( ) const
inline

Definition at line 200 of file SEAviewer.h.

200 {return f_mean_ADC_second_half; }
double f_mean_ADC_second_half
Definition: SEAviewer.h:246
double seaview::cluster::getMinHitConvDist ( ) const
inline

Definition at line 194 of file SEAviewer.h.

double f_min_conversion_dist_to_shower_start
Definition: SEAviewer.h:238
double seaview::cluster::getMinHitImpactParam ( ) const
inline

Definition at line 193 of file SEAviewer.h.

double f_min_impact_parameter_to_shower
Definition: SEAviewer.h:236
double seaview::cluster::getMinHitIOC ( ) const
inline

Definition at line 195 of file SEAviewer.h.

double f_min_ioc_to_shower_start
Definition: SEAviewer.h:239
int seaview::cluster::getPlane ( ) const
inline

Definition at line 164 of file SEAviewer.h.

164 {return f_plane; }
std::vector<std::vector<double> > seaview::cluster::getPTS ( ) const
inline

Definition at line 165 of file SEAviewer.h.

165 {return f_pts;}
std::vector< std::vector< double > > f_pts
Definition: SEAviewer.h:223
cluster_score* seaview::cluster::getScore ( )
inline

Definition at line 162 of file SEAviewer.h.

162 {return &f_score;};
cluster_score f_score
Definition: SEAviewer.h:226
int seaview::cluster::getShowerRemerge ( ) const
inline

Definition at line 171 of file SEAviewer.h.

171 {return f_shower_remerge;}
double seaview::cluster::getTrackAngleToShowerDirection ( ) const
inline

Definition at line 202 of file SEAviewer.h.

double f_angle_wrt_shower_direction
Definition: SEAviewer.h:249
size_t seaview::cluster::getTrackEndIdx ( ) const
inline

Definition at line 198 of file SEAviewer.h.

198 {return end_hit_idx;}
size_t end_hit_idx
Definition: SEAviewer.h:244
size_t seaview::cluster::getTrackStartIdx ( ) const
inline

Definition at line 197 of file SEAviewer.h.

197 {return start_hit_idx; }
size_t start_hit_idx
Definition: SEAviewer.h:243
double seaview::cluster::getWireTickBasedLength ( ) const
inline

Definition at line 160 of file SEAviewer.h.

160 {return f_wire_tick_based_length; }
double f_wire_tick_based_length
Definition: SEAviewer.h:241
int seaview::cluster::InNuSlice ( const std::map< int, std::vector< art::Ptr< recob::Hit >> > &  sliceIDToHitsMap,
int  nuSliceID 
)

Definition at line 7 of file SEAviewer.cxx.

7  {
8 
9  const std::vector<art::Ptr<recob::Hit>>& slice_hits = sliceIDToHitsMap.at(nuSliceID);
10  bool found_hit_in_slice = false, found_hit_not_in_slice = false;
11  for(auto hit : f_hits){
12  auto iter = std::find(slice_hits.begin(), slice_hits.end(), hit);
13  if( iter == slice_hits.end())
14  found_hit_not_in_slice = true;
15  else{
16  found_hit_in_slice = true;
17  }
18 
19  if(found_hit_in_slice && found_hit_not_in_slice) return 0;
20  }
21 
22  return found_hit_in_slice ? 1 : -1;
23  }
process_name hit
Definition: cheaterreco.fcl:51
std::vector< art::Ptr< recob::Hit > > f_hits
Definition: SEAviewer.h:224
bool seaview::cluster::InRange ( double  tick_max,
double  tick_min,
double  wire_max,
double  wire_min 
) const
inline

Definition at line 212 of file SEAviewer.h.

212  {
213  return f_score.min_wire < wire_max && f_score.max_wire > wire_min && f_score.max_tick > tick_min && f_score.min_tick < tick_max;
214  }
cluster_score f_score
Definition: SEAviewer.h:226
bool seaview::cluster::isTrackAnalyzed ( ) const
inline

Definition at line 161 of file SEAviewer.h.

161 {return f_track_treated; }
bool f_track_treated
Definition: SEAviewer.h:221
void seaview::cluster::setAngleWRTShower ( double  d)
inline

Definition at line 183 of file SEAviewer.h.

183 {f_AngleWRTShower = d;}
double f_AngleWRTShower
Definition: SEAviewer.h:262
void seaview::cluster::setFitCons ( double  d)
inline

Definition at line 185 of file SEAviewer.h.

185 { f_FitCons = d;}
double f_FitCons
Definition: SEAviewer.h:260
void seaview::cluster::setFitSlope ( double  d)
inline

Definition at line 184 of file SEAviewer.h.

184 { f_FitSlope = d;}
double f_FitSlope
Definition: SEAviewer.h:259
void seaview::cluster::setImpactParam ( double  d)
inline

Definition at line 180 of file SEAviewer.h.

180 {f_ImpactParameter = d; }
double f_ImpactParameter
Definition: SEAviewer.h:258
void seaview::cluster::setLegend ( const std::string &  in_leg)
inline

Definition at line 155 of file SEAviewer.h.

155  {
156  f_legend = in_leg;
157  }
std::string f_legend
Definition: SEAviewer.h:230
int seaview::cluster::setScore ( cluster_score in_score)
inline

Definition at line 154 of file SEAviewer.h.

154 { f_score = in_score;return 0;}
cluster_score f_score
Definition: SEAviewer.h:226
int seaview::cluster::setShowerRemerge ( int  remerge_in)
inline

Definition at line 172 of file SEAviewer.h.

172  {
173  f_shower_remerge = remerge_in;
174  return f_shower_remerge;
175  }
void seaview::cluster::setWireTickBasedLength ( double  d)
inline

Definition at line 159 of file SEAviewer.h.

double f_wire_tick_based_length
Definition: SEAviewer.h:241

Friends And Related Function Documentation

friend class SEAviewer
friend

Definition at line 134 of file SEAviewer.h.

Member Data Documentation

size_t seaview::cluster::end_hit_idx = SIZE_MAX
private

Definition at line 244 of file SEAviewer.h.

TH1D seaview::cluster::f_ADC_hist
private

Definition at line 229 of file SEAviewer.h.

double seaview::cluster::f_ADC_RMS = -1.0
private

Definition at line 252 of file SEAviewer.h.

double seaview::cluster::f_angle_wrt_shower_direction = -1.0
private

Definition at line 249 of file SEAviewer.h.

double seaview::cluster::f_AngleWRTShower = -1.0
private

Definition at line 262 of file SEAviewer.h.

double seaview::cluster::f_fit_chi2 = 0.0
private

Definition at line 251 of file SEAviewer.h.

double seaview::cluster::f_FitCons = 0.0
private

Definition at line 260 of file SEAviewer.h.

double seaview::cluster::f_FitSlope = 0.0
private

Definition at line 259 of file SEAviewer.h.

TGraph seaview::cluster::f_graph
private

Definition at line 228 of file SEAviewer.h.

std::vector<int> seaview::cluster::f_hit_group
private

Definition at line 225 of file SEAviewer.h.

std::vector<art::Ptr<recob::Hit> > seaview::cluster::f_hits
private

Definition at line 224 of file SEAviewer.h.

int seaview::cluster::f_ID
private

Definition at line 218 of file SEAviewer.h.

double seaview::cluster::f_ImpactParameter = -1.0
private

Definition at line 258 of file SEAviewer.h.

double seaview::cluster::f_ioc_based_length = -1.0
private

Definition at line 240 of file SEAviewer.h.

std::string seaview::cluster::f_legend
private

Definition at line 230 of file SEAviewer.h.

double seaview::cluster::f_mean_ADC_first_half = 0.0
private

Definition at line 245 of file SEAviewer.h.

double seaview::cluster::f_mean_ADC_first_to_second_ratio = 0.0
private

Definition at line 247 of file SEAviewer.h.

double seaview::cluster::f_mean_ADC_second_half = 0.0
private

Definition at line 246 of file SEAviewer.h.

double seaview::cluster::f_meanADC = -1.0
private

Definition at line 253 of file SEAviewer.h.

double seaview::cluster::f_min_conversion_dist_to_shower_start = 1e10
private

Definition at line 238 of file SEAviewer.h.

double seaview::cluster::f_min_impact_parameter_to_shower = 1e10
private

Definition at line 236 of file SEAviewer.h.

double seaview::cluster::f_min_ioc_to_shower_start = 1e10
private

Definition at line 239 of file SEAviewer.h.

int seaview::cluster::f_npts
private

Definition at line 219 of file SEAviewer.h.

int seaview::cluster::f_plane
private

Definition at line 220 of file SEAviewer.h.

std::vector<std::vector<double> > seaview::cluster::f_pts
private

Definition at line 223 of file SEAviewer.h.

cluster_score seaview::cluster::f_score
private

Definition at line 226 of file SEAviewer.h.

int seaview::cluster::f_shower_remerge = -1
private

Definition at line 227 of file SEAviewer.h.

bool seaview::cluster::f_track_treated = false
private

Definition at line 221 of file SEAviewer.h.

double seaview::cluster::f_wire_tick_based_length = -1.0
private

Definition at line 241 of file SEAviewer.h.

size_t seaview::cluster::start_hit_idx = SIZE_MAX
private

Definition at line 243 of file SEAviewer.h.


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