MarlinTPC  1.2.0
TopoFinder.h
1 #ifndef TOPO_FINDER_H
2 #define TOPO_FINDER_H 1
3 
4 #include <map>
5 #include <list>
6 
7 #include <lcio.h>
8 #include <EVENT/TrackerHit.h>
9 #include <EVENT/TrackerPulse.h>
10 #include <gear/TPCParameters.h>
11 #include <gear/PadRowLayout2D.h>
12 #include <gearimpl/GlobalPadIndex.h>
13 
14 namespace marlintpc
15 {
16 
29 {
30 
31  protected:
32 
34  TopoFinder();
35 
36 // void setPulseMap(std::multimap<int, EVENT::TrackerPulse*> *map);
37 
41  EVENT::TrackerHit* findHit(
42  std::multimap<gear::GlobalPadIndex, EVENT::TrackerPulse*>::iterator currentPulseIter);
43 
49  std::list<EVENT::TrackerPulse *> findNeighbouringPulses(
50  gear::GlobalPadIndex currentPadIndex,
51  EVENT::TrackerPulse * currentPulse,
52  const gear::TPCModule &module);
53 
58  EVENT::TrackerHitVec *findHitsInNeighbouringRows(EVENT::TrackerHit* hit, int moduleID);
59 
63  EVENT::TrackerHitVec *findHitsInRange(gear::GlobalPadIndex index1, gear::GlobalPadIndex index2,
64  float minADCIndex, float maxADCIndex);
65 
71 
72  float _vDrift;
73 
74  // /// The pad layout as defined in GEAR
75  // int _padLayoutType; ///< Pad layout type (PadRowLayout2D::CARTESIAN or PadRowLayout2D::POLAR)
76  // gear::PadRowLayout2D const *_padLayout;
77 
79  float _zAnode;
80 
87 
91  std::multimap<gear::GlobalPadIndex, EVENT::TrackerPulse*> *_pulsesByIndex;
92 
93 // /**
94 // * A nested helper class for sorting gear::GlobalPadIndex.
95 // * They are sorted by moduleID, and within moduleID in padIndex
96 // */
97 // class sortGlobalIndex {
98 // public:
99 // bool operator()(gear::GlobalPadIndex index1, gear::GlobalPadIndex index2) {
100 // if (index1.getModuleID() == index2.getModuleID() )
101 // { // the modules IDs are equal, distiguish using pad index
102 // return ( index1.getPadIndex() < index2.getPadIndex() );
103 // }
104 // else
105 // { // the modules IDs are equal, distiguish using pad index
106 // return ( index1.getModuleID() < index2.getModuleID() );
107 // }
108 // }
109 // };
110  unsigned int _recursionCounter;
111 
112  public:
117  static void addTrackerHitVecs(EVENT::TrackerHitVec **vectorToAddTo, EVENT::TrackerHitVec **vectorToBeAdded);
118 
125  std::string getRevision() ;
126 
127 };
128 
129 }// namespace marlintpc
130 
131 #endif //TOPO_FINDER_H
int _maxEmptyPads
Maximum number of consecuitve empty pads in cluster.
Definition: TopoFinder.h:66
int _maxSkipRows
Maximum number of empty rows.
Definition: TopoFinder.h:70
static void addTrackerHitVecs(EVENT::TrackerHitVec **vectorToAddTo, EVENT::TrackerHitVec **vectorToBeAdded)
A helper function to add the contents of one TrackerHitVec to another.
Definition: TopoFinder.cc:575
float _maxTimeSpread
Maximum time between pulses in a cluster in ??
Definition: TopoFinder.h:68
std::list< EVENT::TrackerPulse * > findNeighbouringPulses(gear::GlobalPadIndex currentPadIndex, EVENT::TrackerPulse *currentPulse, const gear::TPCModule &module)
Iteratively searches for pulses that are on neighbouring pads.
Definition: TopoFinder.cc:208
float _vDrift
Optional: Set drift velocity in case there is no conditions data.
Definition: TopoFinder.h:72
unsigned int _recursionCounter
A nested helper class for sorting gear::GlobalPadIndex.
Definition: TopoFinder.h:110
int _negativeZDirection
Flag to determine if the second half TPC is reconstructed, which looks in the negative z direction...
Definition: TopoFinder.h:86
EVENT::TrackerHitVec * findHitsInRange(gear::GlobalPadIndex index1, gear::GlobalPadIndex index2, float minADCIndex, float maxADCIndex)
Find all the hits in the given pad range.
Definition: TopoFinder.cc:499
std::string getRevision()
Get the revision of the TopoFinder.
Definition: TopoFinder.cc:595
TopoFinder contains finding algorithms for clusters of TrackerPulses.
Definition: TopoFinder.h:28
TopoFinder()
The constructor.
Definition: TopoFinder.cc:29
float _zAnode
The position of the readout anode (positive value, TPC currently assumed to be symmetrical) ...
Definition: TopoFinder.h:79
int _minTrackHits
Minimum number of hits on track.
Definition: TopoFinder.h:69
int _minHitSize
Minimum number of pads per hit.
Definition: TopoFinder.h:67
std::multimap< gear::GlobalPadIndex, EVENT::TrackerPulse * > * _pulsesByIndex
A multimap containing the pad index and the corresponding pulse.
Definition: TopoFinder.h:91
EVENT::TrackerHit * findHit(std::multimap< gear::GlobalPadIndex, EVENT::TrackerPulse * >::iterator currentPulseIter)
Find the hit which contains the given pulse.
Definition: TopoFinder.cc:35
EVENT::TrackerHitVec * findHitsInNeighbouringRows(EVENT::TrackerHit *hit, int moduleID)
Find Hits in the neighbouring rows.
Definition: TopoFinder.cc:368