MarlinTPC  1.2.0
SimpleTrackSeederProcessor.h
1 #ifndef SIMPLETRACKSEEDERPROCESSOR_H
2 #define SIMPLETRACKSEEDERPROCESSOR_H 1
3 
4 #include "marlin/Processor.h"
5 #include "lcio.h"
6 #include <string>
7 #include <vector>
8 
9 #include <EVENT/TrackerHit.h>
10 
11 namespace marlintpc
12 {
13 
58 class SimpleTrackSeederProcessor : public marlin::Processor
59 {
60 
61  public:
62 
66 
67 
71 
72 
75  Processor * newProcessor();
76 
77 
80  void init();
81 
82 
85  void processRunHeader(lcio::LCRunHeader *run);
86 
87 
90  virtual void processEvent(lcio::LCEvent *evt);
91 
92 
95  virtual void check(lcio::LCEvent *evt);
96 
97 
100  virtual void end();
101 
102  private:
103 
106  std::string _input_track_candidates_collection_name;
107 
110  std::string _output_seed_tracks_collection_name;
111 
116  int _outputIsTransient; //< if not 0 the hits collection is set transient (default 0)
117 
121  class sort_by_y
122  {
123  public:
124  bool operator()(EVENT::TrackerHit* hit1, EVENT::TrackerHit* hit2)
125  {
126  return (hit1->getPosition()[1] < hit2->getPosition()[1]);
127  }
128  };
129 
133  class sort_by_z
134  {
135  public:
136  bool operator()(std::pair<double, double> sz1, std::pair<double, double> sz2)
137  {
138  return (sz1.second < sz2.second);
139  }
140  };
141 
142 // /// The pad layout as defined in GEAR
143 // gear::PadRowLayout2D const *_padLayout;
144 // int _padLayoutType; ///< Pad layout type (PadRowLayout2D::CARTESIAN or PadRowLayout2D::POLAR)
145 
146 };
147 
148 }// namespace marlintoc
149 
150 #endif // SIMPLETRACKSEEDERPROCESSOR_H
151 
152 
153 
virtual void end()
Called after data processing for clean up in the inverse order of the init() method so that resources...
Definition: SimpleTrackSeederProcessor.cc:532
void processRunHeader(lcio::LCRunHeader *run)
Called once per run to process the event's header.
Definition: SimpleTrackSeederProcessor.cc:103
virtual void processEvent(lcio::LCEvent *evt)
Called for every event - the working horse.
Definition: SimpleTrackSeederProcessor.cc:118
virtual void check(lcio::LCEvent *evt)
Called for every event - right after processEvent() has been called for all processors.
Definition: SimpleTrackSeederProcessor.cc:525
Processor * newProcessor()
Return a new instance of this processor.
Definition: SimpleTrackSeederProcessor.cc:518
SimpleTrackSeederProcessor takes the TrackerHits of each track and calculates initial track parameter...
Definition: SimpleTrackSeederProcessor.h:58
void init()
Called at the begin of the job before anything is read.
Definition: SimpleTrackSeederProcessor.cc:70
SimpleTrackSeederProcessor()
Default constructor.
Definition: SimpleTrackSeederProcessor.cc:40
~SimpleTrackSeederProcessor()
Destructor.
Definition: SimpleTrackSeederProcessor.cc:64