LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
TrajClusterAlg.h
Go to the documentation of this file.
1 //
3 //
4 // TrajClusterAlg
5 //
6 // Bruce Baller
7 //
9 #ifndef TRAJCLUSTERALG_H
10 #define TRAJCLUSTERALG_H
11 
16 
17 // C/C++ standard libraries
18 #include <array>
19 #include <vector>
20 #include <utility> // std::pair<>
21 #include <cmath>
22 #include <iostream>
23 #include <fstream>
24 #include <iomanip>
25 #include <algorithm>
26 
27 // framework libraries
28 #include "fhiclcpp/ParameterSet.h"
38 
39 // LArSoft libraries
41 
42 //#include "TH1F.h"
43 //#include "TH2F.h"
44 //#include "TProfile.h"
45 #include "TTree.h"
46 
47 namespace tca {
48 
50  public:
51 
52 
55 
57 
58  virtual void reconfigure(fhicl::ParameterSet const& pset);
59 
60  bool SetInputHits(std::vector<recob::Hit> const& inputHits);
61  void RunTrajClusterAlg(std::vector<unsigned int>& hitsInSlice, int sliceID);
62  bool CreateSlice(std::vector<unsigned int>& hitsInSlice);
63  void FinishEvent();
64 
65 
66  void DefineShTree(TTree* t);
67 
68 // void DefineCRTree(TTree* t);
69 
70  unsigned short GetSlicesSize() { return slices.size(); }
71  TCSlice const& GetSlice(unsigned short sliceIndex) const {return slices[sliceIndex]; }
72  void MergeTPHits(std::vector<unsigned int>& tpHits, std::vector<recob::Hit>& newHitCol,
73  std::vector<unsigned int>& newHitAssns);
74 
75  std::vector<unsigned int> const& GetAlgModCount() const {return fAlgModCount; }
76  std::vector<std::string> const& GetAlgBitNames() const {return AlgBitNames; }
77 
79  void ClearResults() { slices.resize(0); }
81 
82  private:
83 
84  recob::Hit MergeTPHitsOnWire(std::vector<unsigned int>& tpHits);
85 
86  // SHOWER VARIABLE TREE
87  TTree* showertree;
88 
89  // Cosmic Removal Variable Tree
90 // TTree* crtree;
91 
93  TMVA::Reader fMVAReader;
94 
95  std::vector<unsigned int> fAlgModCount;
96 
97  void ReconstructAllTraj(TCSlice& slc, CTP_t inCTP);
98  // Finds junk trajectories using unassigned hits
99  void FindJunkTraj(TCSlice& slc, CTP_t inCTP);
100  // Check allTraj -> inTraj associations
101  void ChkInTraj(std::string someText, TCSlice& slc);
102  void FindMissedVxTjs(TCSlice& slc);
103 
104  }; // class TrajClusterAlg
105 
106 } // namespace cluster
107 
108 #endif // ifndef TRAJCLUSTERALG_H
void ClearResults()
Deletes all the results.
unsigned short GetSlicesSize()
Deletes all the results.
TruthMatcher fTM
Deletes all the results.
recob::Hit MergeTPHitsOnWire(std::vector< unsigned int > &tpHits)
Deletes all the results.
const std::vector< std::string > AlgBitNames
Definition: DataStructs.cxx:13
void ReconstructAllTraj(TCSlice &slc, CTP_t inCTP)
Deletes all the results.
void FindMissedVxTjs(TCSlice &slc)
Deletes all the results.
calo::CalorimetryAlg fCaloAlg
Deletes all the results.
void MergeTPHits(std::vector< unsigned int > &tpHits, std::vector< recob::Hit > &newHitCol, std::vector< unsigned int > &newHitAssns)
Deletes all the results.
bool SetInputHits(std::vector< recob::Hit > const &inputHits)
Deletes all the results.
std::vector< std::string > const & GetAlgBitNames() const
Deletes all the results.
std::vector< unsigned int > fAlgModCount
Deletes all the results.
void DefineShTree(TTree *t)
Deletes all the results.
bool CreateSlice(std::vector< unsigned int > &hitsInSlice)
Deletes all the results.
virtual void reconfigure(fhicl::ParameterSet const &pset)
Deletes all the results.
TMVA::Reader fMVAReader
Deletes all the results.
std::vector< TCSlice > slices
Definition: DataStructs.cxx:10
TCSlice const & GetSlice(unsigned short sliceIndex) const
Deletes all the results.
void FinishEvent()
Deletes all the results.
unsigned int CTP_t
Definition: DataStructs.h:41
TTree * showertree
Deletes all the results.
TrajClusterAlg(fhicl::ParameterSet const &pset)
Deletes all the results.
2D representation of charge deposited in the TDC/wire plane
Definition: Hit.h:49
void ChkInTraj(std::string someText, TCSlice &slc)
Deletes all the results.
void RunTrajClusterAlg(std::vector< unsigned int > &hitsInSlice, int sliceID)
Deletes all the results.
void FindJunkTraj(TCSlice &slc, CTP_t inCTP)
Deletes all the results.
std::vector< unsigned int > const & GetAlgModCount() const
Deletes all the results.