1 #ifndef ROWBASEDHITFINDERPROCESSOR_H
2 #define ROWBASEDHITFINDERPROCESSOR_H
5 #include "marlin/Processor.h"
6 #include "marlin/Global.h"
10 #include "EVENT/LCCollection.h"
11 #include "IMPL/LCCollectionVec.h"
12 #include "EVENT/TrackerPulse.h"
15 #include "gear/TPCParameters.h"
23 #include "ChannelCorrectionListener.h"
24 #include "TPCConditionsListener.h"
74 virtual Processor* newProcessor()
95 virtual void check(lcio::LCEvent * evt) ;
105 std::string _inputTrackerPulsesCollectionName ;
109 std::string _outputTrackerHitsCollectionName ;
113 std::string _inputTPCConditionsCollectionName;
116 std::string _channelCorrectionCollectionName;
123 std::vector<int> _deadChannelIndicesOverride;
127 bool _outputHitsPersistent;
135 int _maxEmptyChannelsOverride;
139 int _maxDeadChannelsOverride;
143 int _minHitSizeOverride;
147 float _minMaxPulseSliceHeightOverride;
151 float _maxTimeSpreadOverride;
155 float _driftVelocityOverride;
159 bool _chargeIsCalibrated;
163 float _chargeConversionFactorOverride;
177 hitCandidate(EVENT::TrackerPulse*);
179 void addPulse(EVENT::TrackerPulse*);
180 void addDeadChannel();
184 const EVENT::TrackerPulse* getMaximumPulse()
const
188 double getCharge()
const;
189 double getChargeMeasError()
const;
190 double getMaxPulseHeight();
191 const std::vector<EVENT::TrackerPulse*>& getPulses()
const
195 unsigned int getWidth()
const;
202 std::vector<EVENT::TrackerPulse*> _thePulses;
203 EVENT::TrackerPulse* _maxPulse;
204 double _maxPulseCharge;
205 int _numberOfDeadChannels;
210 void _sortPulses(EVENT::LCCollection*,
const gear::TPCParameters&,
211 std::map<
int, std::map<
int, std::vector<EVENT::TrackerPulse*>* >* >&);
212 void _findHitCandidates(std::map<
int, std::map<
int, std::vector<EVENT::TrackerPulse*>* >* >&,
213 const gear::TPCParameters&,
214 std::map<
int, std::vector<RowBasedHitFinderProcessor::hitCandidate> >&);
215 void _createHitCollection(std::map<
int, std::vector<RowBasedHitFinderProcessor::hitCandidate> >&,
216 const gear::TPCParameters&, IMPL::LCCollectionVec*);
218 bool _pulseComparator(EVENT::TrackerPulse*, EVENT::TrackerPulse*);
219 EVENT::TrackerPulse* _findHighestPulseInRow(std::vector<EVENT::TrackerPulse*>&);
220 bool _maxPulseHeightCheck(EVENT::TrackerPulse*);
221 void _addNeighbourPulses(hitCandidate&,
const gear::TPCParameters&, std::vector<EVENT::TrackerPulse*>&);
222 std::vector<EVENT::TrackerPulse*>::iterator _findBestNeighbourPulseMatch
223 (std::vector<std::vector<EVENT::TrackerPulse*>::iterator>&,
float);
225 bool _hitIsValid(
const RowBasedHitFinderProcessor::hitCandidate&);
226 gear::Vector3D _calculatePositionsAndErrors(
const RowBasedHitFinderProcessor::hitCandidate&,
const gear::TPCParameters&,
float*);
227 double _convertCharge(
const RowBasedHitFinderProcessor::hitCandidate&);
229 unsigned int _getMaxDeadChannels();
230 int _getMinHitSize();
231 double _getMinMaxPulseSliceHeight();
232 double _getMaxTimeSpread();
233 double _getDriftVelocity();
234 bool _padIsDead(
const int,
const int);
235 bool _padIsNoisy(
const int,
const int);
236 double _getChargeConversionFactor();
240 #endif//ROWBASEDHITFINDERPROCESSOR_H
virtual void processRunHeader(lcio::LCRunHeader *run)
Called for every run.
Definition: RowBasedHitFinderProcessor.cc:196
A hit finder for row based (pad) geometries It searches for connected pulses in a row and combines th...
Definition: RowBasedHitFinderProcessor.h:70
Helper Class which provides access to the ChannelCorrections for every event.
Definition: ChannelCorrectionListener.h:39
virtual void init()
Called at the begin of the job before anything is read.
Definition: RowBasedHitFinderProcessor.cc:128
Helper Class which provides access to the TPC conditions for every event.
Definition: TPCConditionsListener.h:37
virtual void end()
Called after data processing for clean up.
Definition: RowBasedHitFinderProcessor.cc:322
virtual void processEvent(lcio::LCEvent *evt)
Called for every event - the working horse.
Definition: RowBasedHitFinderProcessor.cc:209