StripSplitterAlg.h
Go to the documentation of this file.
1 //
2 // StripSplitterAlg.h
3 //
4 // Created by Eldwan Brianne on 18.04.2019
5 // Based on DDStripSplitter
6 // https://github.com/iLCSoft/MarlinReco/blob/master/Clustering/hybridEcalSplitter/include/DDStripSplitter.h
7 
8 #ifndef GAR_RECOALG_StripSplitterAlg_h
9 #define GAR_RECOALG_StripSplitterAlg_h
10 
12 #include "Geometry/GeometryCore.h"
13 #include "Geometry/BitFieldCoder.h"
14 
16 
17 #include "TVector3.h"
18 
19 namespace fhicl{
20  class ParameterSet;
21 }
22 
23 namespace gar{
24  namespace rec{
25  namespace alg{
26 
28  public:
29 
31 
32  virtual ~StripSplitterAlg();
33 
34  void reconfigure(fhicl::ParameterSet const& pset);
35 
36  void ClearLists();
37 
38  void PrepareAlgo(const std::vector< art::Ptr<gar::rec::CaloHit> > &hitVector);
39 
40  void DoStripSplitting();
41 
42  bool GetSaveStripEndsFlag() const { return fSaveStripEnds; }
43 
44  std::vector<const gar::rec::CaloHit*> getStripEndsHits() const { return fStripEndsHits; }
45 
46  std::vector<const gar::rec::CaloHit*> getIntersectionHits() const { return fIntersectionHits; }
47 
48  std::vector <const gar::rec::CaloHit*> getSplitHits() const { return splitStripHits; }
49 
50  std::vector <const gar::rec::CaloHit*> getUnSplitHits() const { return unSplitStripHits; }
51 
52  private:
53 
54  static bool SortByLayer(const gar::rec::CaloHit* rha, const gar::rec::CaloHit* rhb);
55 
56  void getVirtualHits(const gar::rec::CaloHit *hit, int orientation, bool isBarrel, std::vector <const gar::rec::CaloHit*> &virtualhits);
57 
58  TVector3 stripIntersect(const gar::rec::CaloHit *hit0, const TVector3& dir0, const gar::rec::CaloHit *hit1, const TVector3& dir1);
59 
60  gar::geo::GeometryCore const* fGeo; ///< geometry information
62 
66 
69  double fStripWidth;
70  double fStripLength;
71  int fnVirtual;
72 
73  std::vector<const gar::rec::CaloHit*> m_CaloHitVecOdd;
74  std::vector<const gar::rec::CaloHit*> m_CaloHitVecEven;
75 
76  std::vector<const gar::rec::CaloHit*> fStripEndsHits;
77  std::vector<const gar::rec::CaloHit*> fIntersectionHits;
78  std::vector <const gar::rec::CaloHit*> unSplitStripHits;
79  std::vector <const gar::rec::CaloHit*> splitStripHits;
80 
82  TRANSVERSE = 0, LONGITUDINAL
83  };
84  };
85 
86  } // namespace alg
87  } // namespace rec
88 } //namespace gar
89 
90 #endif /* GAR_RECOALG_KNNClusterAlg_h */
gar::geo::GeometryCore const * fGeo
geometry information
rec
Definition: tracks.py:88
std::vector< const gar::rec::CaloHit * > getStripEndsHits() const
std::vector< const gar::rec::CaloHit * > m_CaloHitVecEven
std::string string
Definition: nybbler.cc:12
std::vector< const gar::rec::CaloHit * > m_CaloHitVecOdd
std::vector< const gar::rec::CaloHit * > getIntersectionHits() const
struct vector vector
Description of geometry of one entire detector.
Definition: GeometryCore.h:436
std::vector< const gar::rec::CaloHit * > fIntersectionHits
virtual void reconfigure(fhicl::ParameterSet const &pset)
gar::geo::BitFieldCoder const * fFieldDecoder
Helper class for decoding and encoding a bit field of 64bits for convenient declaration.
std::vector< const gar::rec::CaloHit * > getSplitHits() const
std::vector< const gar::rec::CaloHit * > splitStripHits
std::vector< const gar::rec::CaloHit * > fStripEndsHits
std::vector< const gar::rec::CaloHit * > getUnSplitHits() const
Detector simulation of raw signals on wires.
General GArSoft Utilities.
std::vector< const gar::rec::CaloHit * > unSplitStripHits