8 #include <EVENT/LCFloatVec.h> 9 #include <IMPL/TrackerDataImpl.h> 10 #include <IMPL/TrackerPulseImpl.h> 11 #include <IMPL/TrackerHitImpl.h> 12 #include <IMPL/LCFlagImpl.h> 15 #include <gear/TPCParameters.h> 16 #include <gear/TPCModule.h> 17 #include <gearimpl/GlobalPadIndex.h> 20 #include <marlin/Global.h> 23 #include <streamlog/streamlog.h> 26 #include <lccd_exceptions.h> 29 #include "TPCCondDataExeptions.h" 30 #include "TPCConditions.h" 47 RowBasedHitFinderProcessor::RowBasedHitFinderProcessor() : Processor(
"RowBasedHitFinderProcessor"), _channelCorrectionListener(NULL), _tpcConditionsListener(NULL)
50 _description =
"RowBasedHitFinderProcessor calculates TrackerHits from TrackerPulses" ;
53 registerInputCollection(LCIO::TRACKERPULSE,
54 "InputTrackerPulses" ,
55 "Name of the input TrackerPulses collection" ,
57 string(
"TPCPulses")) ;
59 registerOutputCollection(LCIO::TRACKERHIT,
61 "Name of the output TrackerHits collection" ,
65 registerOptionalParameter(
"InputTPCConditions",
66 "Optional: Name of the input collection containing the TPC conditions data",
68 TPCConditions::getDefaultColName()) ;
70 registerProcessorParameter(
"WriteOutputToStorage" ,
71 "if true, the output hits collection is written to storage (default: true)" ,
75 registerProcessorParameter(
"ChannelCorrectionCollectionName" ,
76 "Name of the conditions collection in which the channel correction is stored",
78 tpcconddata::ChannelCorrection::getDefaultColName());
80 registerOptionalParameter(
"MaxEmptyPadsOverride" ,
81 "This parameter is depreciated and will be removed in the next release." ,
85 registerOptionalParameter(
"MaxDeadChannelsOverride" ,
86 "Maximum number of empty consecutive pads in hit (default: 1)" ,
90 registerOptionalParameter(
"MinHitSizeOverride" ,
91 "Minimum size of hit / Minimum number of Pads (default: 1)" ,
95 registerOptionalParameter(
"MinMaxPulseSliceHeightOverride",
96 "Minimum size of the maximum slice value of the maximal pulse (in charge) in a hit.",
100 registerOptionalParameter(
"MaxTimeSpreadOverride" ,
101 "Maximum time between pulses in a hit in ns (default: 200.)" ,
105 registerOptionalParameter(
"VDriftOverride" ,
106 "Optional: Set drift velocity in case there is no conditions data in mm/mu s" ,
110 registerOptionalParameter(
"DeadPadsOverride",
111 "Optional: the gear pad indices of dead channels",
115 registerProcessorParameter(
"ChargeConversionIsCalibrated" ,
116 "Set true, if the charge conversion factor from ADC values to primary electrons is known (default:true).",
120 registerOptionalParameter(
"ChargeConversionFactorOverride" ,
121 "Optional: The charge conversion factor from ADC values to primary electrons",
133 if(parameterSet(
"VDriftOverride"))
135 streamlog_out(WARNING) <<
"the drift velocity is taken from the steering file. please change" << endl;
144 catch(lccd::LCCDException &)
147 streamlog_out(ERROR) <<
"Use the ConditionsProcessor to provide it, or set the VDriftOverride parameter if this is not possible." << std::endl;
152 if(parameterSet(
"DeadPadsOverride"))
154 streamlog_out(WARNING) <<
"the indices of dead pads are taken from the steering file. please change" << endl;
162 catch(lccd::LCCDException &)
165 streamlog_out(ERROR) <<
"Use the ConditionsProcessor to provide it, or set the DeadPadsOverride parameter if this is not possible." << std::endl;
170 if(parameterSet(
"ChargeConversionFactorOverride"))
172 streamlog_out(WARNING) <<
"the conversion factor from adc counts to charge is taken from the steering file. please change" << endl;
180 catch(lccd::LCCDException &)
183 streamlog_out(ERROR) <<
"Use the ConditionsProcessor to provide it, or set the ChargeConversionFactorOverride parameter if this is not possible." << std::endl;
188 if(parameterSet(
"MaxEmptyPadsOverride"))
190 streamlog_out(WARNING) <<
"The parameter [MaxEmptyPadsOverride] is deprecated and has no effect! It will be removed in the next release. Please use [MaxDeadChannelsOverride]." << endl;
198 run->parameters().setValue(_processorName +
"_revision",
"$Rev: 1842 $");
200 for(ProcParamMap::iterator i = _map.begin(); i != _map.end(); i++)
202 if(!i->second->isOptional() || i->second->valueSet())
203 run->parameters().setValue(_processorName +
"_" + i->second->name(), i->second->value());
231 LCCollection* inputPulses;
236 catch(DataNotAvailableException &e)
239 streamlog_out(DEBUG) <<
"No pulses available in event " << evt->getEventNumber() << endl;
244 LCCollectionVec* tpcHitCollection =
new LCCollectionVec(LCIO::TRACKERHIT);
249 lcio::LCFlagImpl trkFlag(0);
250 trkFlag.setBit(lcio::LCIO::RTHBIT_ID1);
251 tpcHitCollection->setFlag(trkFlag.getFlag());
254 const gear::TPCParameters& tpcParameters = Global::GEAR->getTPCParameters();
276 map<int, map<int, vector<TrackerPulse*>*>*> theRowSortedPulsesPerModule;
277 map<int, vector<hitCandidate> > theHitCandidatesPerModule;
281 _sortPulses(inputPulses, tpcParameters, theRowSortedPulsesPerModule);
284 _findHitCandidates(theRowSortedPulsesPerModule, tpcParameters, theHitCandidatesPerModule);
287 map<int, map<int, vector<TrackerPulse*>* >* >::iterator aModuleWithPulses;
288 map<int, vector<TrackerPulse*>* >::iterator aRowWithPulses;
290 for(aModuleWithPulses = theRowSortedPulsesPerModule.begin();
291 aModuleWithPulses != theRowSortedPulsesPerModule.end(); ++aModuleWithPulses)
294 for(aRowWithPulses = aModuleWithPulses->second->begin();
295 aRowWithPulses != aModuleWithPulses->second->end(); ++aRowWithPulses)
297 delete aRowWithPulses->second;
299 delete aModuleWithPulses->second;
307 streamlog_out(DEBUG4) <<
"Found " << tpcHitCollection->getNumberOfElements() <<
" hits in the event." << endl;
309 streamlog_out(DEBUG3) <<
"There are " << inputPulses->getNumberOfElements()
310 <<
" pulses to begin with, and a total of " 311 << tpcHitCollection->getNumberOfElements() <<
" hits found." << endl;
332 map<
int, map<
int, vector<TrackerPulse*>* >* >& rowSortedPulsesPerModule)
343 pair<map<int, map<int, vector<TrackerPulse*>*>*>::iterator,
bool> moduleInserter;
344 pair<map<int, vector<TrackerPulse*>*>::iterator,
bool> rowInserter;
346 for(
int aPulse = 0; aPulse < inputPulses->getNumberOfElements(); ++aPulse)
348 TrackerPulse* inputPulse =
dynamic_cast<TrackerPulse*
>(inputPulses->getElementAt(aPulse));
349 if(inputPulse&&(!
_padIsDead(inputPulse->getCellID0(),inputPulse->getCellID1())))
351 const int moduleID = inputPulse->getCellID1();
352 const int padID = inputPulse->getCellID0();
354 const TPCModule& theModule = tpcParameters.getModule(moduleID);
355 const int rowID = theModule.getRowNumber(padID);
358 map<int, vector<TrackerPulse*>*>* rmap =
new map<int, vector<TrackerPulse*>*>;
360 rowSortedPulsesPerModule.insert(pair<
int, map<
int, vector<TrackerPulse*>* >* >
362 if(!moduleInserter.second)
365 vector<TrackerPulse*>* pmap =
new vector<TrackerPulse*>;
366 rowInserter = ((moduleInserter.first)->second)->insert
367 (pair<
int, vector<TrackerPulse*>* >(rowID, pmap));
368 if(!rowInserter.second)
372 ((rowInserter.first)->second)->push_back(inputPulse);
380 (map<
int, map<
int, vector<TrackerPulse*>* >* >& rowPulsesPerModule,
const gear::TPCParameters& tpcParameters,
381 map<
int, vector<hitCandidate> >& theHitCandidateMap)
391 map<int, map<int, vector<TrackerPulse*>* >* >::iterator aModuleWithPulses;
392 map<int, vector<TrackerPulse*>* >::iterator aRowWithPulses;
395 for(aModuleWithPulses = rowPulsesPerModule.begin(); aModuleWithPulses != rowPulsesPerModule.end(); ++aModuleWithPulses)
398 vector<hitCandidate> theHitCandidates;
401 for(aRowWithPulses = aModuleWithPulses->second->begin(); aRowWithPulses != aModuleWithPulses->second->end(); ++aRowWithPulses)
403 streamlog_out(DEBUG) <<
"Starting search of neighbouring pulses in in row: " << aRowWithPulses->first << endl;
406 while(aRowWithPulses->second->size() != 0)
410 moduleID = theSeedPulse->getCellID1();
412 streamlog_out(DEBUG) <<
"Found a highest pulse with charge = " << theSeedPulse->getCharge()
413 <<
" on pad " << theSeedPulse->getCellID0() <<
" and with time " << theSeedPulse->getTime() << endl;
418 streamlog_out(DEBUG) <<
"Pulse is rejected, since it is too small. Continue in next row. " << endl;
428 if(aRowWithPulses->second->size() != 0)
431 theHitCandidates.push_back(theProtoHit);
434 theHitCandidateMap.insert(pair<
int, vector<hitCandidate> >(moduleID, theHitCandidates));
436 streamlog_out(DEBUG) <<
"On module " << aModuleWithPulses->first
437 <<
" there are " << theHitCandidates.size() <<
" hits found." << endl;
446 TrackerPulse* highestPulse = pulsesInARow.at(0);
448 vector<TrackerPulse*>::iterator eraser = pulsesInARow.begin();
449 for(vector<TrackerPulse*>::iterator iter = pulsesInARow.begin(); iter < pulsesInARow.end(); ++iter)
451 if(fabs((*iter)->getCharge()) > fabs(highestPulse->getCharge()))
453 highestPulse = *iter;
457 pulsesInARow.erase(eraser);
465 EVENT::TrackerData* trackerData = theSeedPulse->getTrackerData();
466 vector<float> theADCSpectrum = trackerData->getChargeValues();
474 (
hitCandidate& theCandidate,
const gear::TPCParameters& tpcParameters, vector<TrackerPulse*>& pulsesInARow)
477 const int theStartPadIndex = (theCandidate.
getMaximumPulse())->getCellID0();
478 const int theModuleIndex = (theCandidate.
getMaximumPulse())->getCellID1();
479 const TPCModule& theModule = tpcParameters.getModule(theModuleIndex);
480 const float theStartTime = (theCandidate.
getMaximumPulse())->getTime();
484 unsigned int numberOfDeadChannels = 0;
485 float tempCharge = theHighestCharge;
486 int tempPadIndex = theStartPadIndex;
487 float tempTime = theStartTime;
488 bool finishedLeft =
false;
489 bool stopSearch =
false;
497 tempPadIndex = theModule.getLeftNeighbour(tempPadIndex);
499 tempPadIndex = theModule.getRightNeighbour(tempPadIndex);
503 streamlog_out(DEBUG) <<
"The hit candidate is at the border!" << endl;
509 tempPadIndex = theStartPadIndex;
518 numberOfDeadChannels++;
525 vector<vector<TrackerPulse*>::iterator> tempPulses;
529 for(vector<TrackerPulse*>::iterator iter = pulsesInARow.begin(); iter < pulsesInARow.end(); ++iter)
531 if(((*iter)->getCellID0() == tempPadIndex) && (fabs((*iter)->getTime() - tempTime) <
_getMaxTimeSpread()))
532 tempPulses.push_back(iter);
536 if(tempPulses.size() > 0)
538 if(tempPulses.size() > 1)
544 theCandidate.
addPulse(*bestPulseMatch);
545 tempTime = (*bestPulseMatch)->getTime();
546 pulsesInARow.erase(bestPulseMatch);
550 float thisCharge = (*bestPulseMatch)->getCharge();
551 if(fabs(thisCharge) > fabs(tempCharge))
553 tempCharge = thisCharge;
555 if(numberOfDeadChannels > 0)
558 numberOfDeadChannels = 0;
570 if(numberOfDeadChannels > 0)
576 tempTime = theStartTime;
577 numberOfDeadChannels = 0;
578 tempPadIndex = theStartPadIndex;
579 tempCharge = theHighestCharge;
595 tempTime = theStartTime;
596 numberOfDeadChannels = 0;
597 tempPadIndex = theStartPadIndex;
598 tempCharge = theHighestCharge;
604 streamlog_out(DEBUG) <<
"A hit candidate with a width of " << theCandidate.
getWidth() <<
" is found." << endl;
610 (vector<vector<TrackerPulse*>::iterator>& pulseMatches,
float theTime)
615 if(pulseMatches.size() == 1)
616 return pulseMatches.at(0);
619 vector<TrackerPulse*>::iterator bestMatch = *(pulseMatches.begin());
620 float minTime = fabs((*bestMatch)->getTime() - theTime);
622 for(vector<vector<TrackerPulse*>::iterator>::iterator searchIter = pulseMatches.begin();
623 searchIter < pulseMatches.end(); ++searchIter)
625 if(fabs((**searchIter)->getTime() - theTime) < minTime)
627 minTime = fabs((**searchIter)->getTime() - theTime);
628 bestMatch = *searchIter;
631 streamlog_out(DEBUG) <<
"In the hit more than one pulse was found to match to the protohit," 632 "the best match in time was chosen." << endl;
640 (map<
int, vector<hitCandidate> >& theHitCandidateMap,
const gear::TPCParameters& tpcParameters, LCCollectionVec* tpcHitCollection)
650 map<int, vector<hitCandidate> >::iterator hitCandidatesPerModule;
653 for(hitCandidatesPerModule = theHitCandidateMap.begin();
654 hitCandidatesPerModule != theHitCandidateMap.end(); ++hitCandidatesPerModule)
657 for(vector<hitCandidate>::iterator candidate = hitCandidatesPerModule->second.begin();
658 candidate < hitCandidatesPerModule->second.end(); ++candidate)
665 float covMatrix[6] = {0., 0., 0., 0., 0., 0.};
668 const double position[3] = { positionGlobal3D[0], positionGlobal3D[1], positionGlobal3D[2] };
670 TrackerHitImpl* theHit =
new TrackerHitImpl();
672 theHit->setPosition(position);
673 theHit->setCovMatrix(covMatrix);
683 theHit->setEDep(candidate->getCharge());
684 theHit->setEDepError(sqrt(candidate->getChargeMeasError()));
687 theHit->setCellID0((tpcParameters.getNearestPad( position[0],position[1])).getModuleID());
688 theHit->setCellID1((tpcParameters.getNearestPad( position[0],position[1])).getPadIndex());
690 vector<TrackerPulse*> hitPulses = candidate->getPulses();
691 for(vector<TrackerPulse*>::const_iterator aHitPulse = hitPulses.begin();
692 aHitPulse < hitPulses.end(); ++aHitPulse)
694 theHit->rawHits().push_back(*aHitPulse);
697 int pulseQuality = (*aHitPulse)->getQuality();
708 theHit->setQuality(candidate->qualityFlag);
711 theHit->setTime(candidate->getMaximumPulse()->getTime());
713 streamlog_out(DEBUG) <<
"The hit coordinates are [" << position[0] <<
"|" << position[1] <<
"|" << position[2] <<
"]" << endl
714 <<
" with standard deviations [" << sqrt(theHit->getCovMatrix().at(0)) <<
"|" << sqrt(theHit->getCovMatrix().at(2)) <<
"|" << sqrt(theHit->getCovMatrix().at(5)) <<
"]" << endl
715 <<
" with variances [" << theHit->getCovMatrix().at(0) <<
"|" << theHit->getCovMatrix().at(2) <<
"|" << theHit->getCovMatrix().at(5) <<
"]" << endl
716 <<
", the charge is " << theHit->getEDep() <<
" +- " << theHit->getEDepError() <<
" and has the quality byte: [" << theHit->getQuality() <<
"]" << endl;
717 streamlog_out(DEBUG) <<
"The detailed list of hit flags: " <<
" has dead channel [" <<
hitflag::hasDeadChannel(theHit->getQuality())
728 tpcHitCollection->addElement(theHit);
747 const gear::TPCModule& module = tpcParameters.getModule(maxPulse->getCellID1());
748 const gear::PadRowLayout2D& localPadPlane = module.getLocalPadLayout();
752 if(module.getCoordinateType() != PadRowLayout2D::CARTESIAN)
753 throw EVENT::Exception(
"The module does not return cartesian coordinates; this is against the general convention. Better fix it and catch the exception.");
757 bool cartesianPadPlane = (localPadPlane.getCoordinateType() == PadRowLayout2D::CARTESIAN);
758 bool polarPadPlane = !cartesianPadPlane;
762 vector<TrackerPulse*> thePulses = cand.
getPulses();
764 double chargeInPulse = 0.;
765 double chargeErrorInPulse = 0.;
766 double totalCharge = 0.;
768 double localPosition[2] = { 0., 0.};
769 double localPositionError[2] = { 0., 0.};
771 Vector2D localPadCenter, globalPadCenter;
773 for(vector<TrackerPulse*>::const_iterator aPulse = thePulses.begin(); aPulse < thePulses.end(); ++aPulse)
775 globalPadCenter = module.getPadCenter((*aPulse)->getCellID0());
776 localPadCenter = module.globalToLocal(globalPadCenter[0], globalPadCenter[1]);
777 chargeInPulse = (*aPulse)->getCharge();
778 totalCharge += chargeInPulse;
779 for(
unsigned int i = 0; i < 2; ++i)
781 localPosition[i] += chargeInPulse * localPadCenter[i];
785 Vector2D globalPosition2D = module.localToGlobal(localPosition[0] / totalCharge, localPosition[1] / totalCharge);
786 double xPosition = globalPosition2D[0];
787 double yPosition = globalPosition2D[1];
791 double zPosition = Global::GEAR->getTPCParameters().getMaxDriftLength()
796 covMatrix[5] = pow(
_getDriftVelocity(),2) * (maxPulse->getCovMatrix()).at(2) / 1000000.;
797 double tempDebug1 =0.0;
798 double tempDebug2 =0.0;
801 for(vector<TrackerPulse*>::const_iterator aPulse = thePulses.begin(); aPulse < thePulses.end(); ++aPulse)
803 globalPadCenter = module.getPadCenter((*aPulse)->getCellID0());
804 localPadCenter = module.globalToLocal(globalPadCenter[0], globalPadCenter[1]);
805 chargeInPulse = (*aPulse)->getCharge();
806 chargeErrorInPulse = ((*aPulse)->getCovMatrix())[0];
807 streamlog_out(DEBUG4) <<
"chargeErrorInPulse =" << chargeErrorInPulse <<endl;
808 localPositionError[1] += pow(chargeInPulse*module.getPadWidth((*aPulse)->getCellID0())/totalCharge,2)/12
809 +pow((localPadCenter[1]*totalCharge - localPosition[1]) / (totalCharge*totalCharge),2)*chargeErrorInPulse;
810 tempDebug1+=pow(chargeInPulse*module.getPadWidth((*aPulse)->getCellID0())/totalCharge,2) / 12;
811 tempDebug2+=pow((localPadCenter[1]*totalCharge - localPosition[1]) / (totalCharge*totalCharge),2)*chargeErrorInPulse;
815 streamlog_out(DEBUG4) <<
"totalCharge =" << totalCharge <<endl;
816 streamlog_out(DEBUG4) <<
"localPosition[0]/totalCharge =" << localPosition[0]/totalCharge <<endl;
817 streamlog_out(DEBUG4) <<
"localPosition[1]/totalCharge =" << localPosition[1]/totalCharge <<endl;
818 streamlog_out(DEBUG4) <<
"error from pad width =" << sqrt(tempDebug1) <<endl;
819 streamlog_out(DEBUG4) <<
"error from charge=" << sqrt(tempDebug2) <<endl;
820 double meanPhi = localPosition[1] / totalCharge;
821 streamlog_out(DEBUG4) <<
"meanPhi="<< meanPhi<<endl;
822 double meanRadius = localPosition[0] / totalCharge;
823 double radiusErrorSquare = pow(module.getRowHeight(module.getRowNumber(maxPulse->getCellID0())), 2) / 12.;
824 covMatrix[0] = pow(cos(meanPhi), 2) * radiusErrorSquare + pow(meanRadius, 2) * pow(sin(meanPhi), 2) * localPositionError[1];
825 covMatrix[1] = sin(meanPhi) * cos(meanPhi) * (radiusErrorSquare - pow(meanRadius, 2) * localPositionError[1]);
826 covMatrix[2] = pow(sin(meanPhi), 2) * radiusErrorSquare + pow(meanRadius, 2) * pow(cos(meanPhi), 2) * localPositionError[1];
829 else if(cartesianPadPlane)
831 for(vector<TrackerPulse*>::const_iterator aPulse = thePulses.begin(); aPulse < thePulses.end(); ++aPulse)
833 globalPadCenter = module.getPadCenter((*aPulse)->getCellID0());
834 localPadCenter = module.globalToLocal(globalPadCenter[0], globalPadCenter[1]);
835 chargeInPulse = (*aPulse)->getCharge();
836 chargeErrorInPulse = ((*aPulse)->getCovMatrix())[0];
837 localPositionError[0] += pow(chargeInPulse*module.getPadWidth((*aPulse)->getCellID0())/totalCharge,2)/12
838 +pow((localPadCenter[0]*totalCharge-localPosition[0])/(totalCharge*totalCharge)*chargeErrorInPulse,2);
841 covMatrix[0] = localPositionError[0];
842 covMatrix[2] = pow(module.getRowHeight(module.getRowNumber(maxPulse->getCellID0())),2) / 12.;
894 return Vector3D(xPosition, yPosition, zPosition);
907 : qualityFlag(0), _maxPulse(NULL), _maxPulseCharge(0.0), _numberOfDeadChannels(0)
917 _thePulses.push_back(aPulse);
918 if(fabs(aPulse->getCharge()) > fabs(_maxPulseCharge))
920 _maxPulseCharge = aPulse->getCharge();
928 _numberOfDeadChannels++;
935 double tmpCharge = 0.0;
936 for(vector<TrackerPulse*>::const_iterator aPulse = _thePulses.begin(); aPulse < _thePulses.end(); ++aPulse)
937 tmpCharge += (*aPulse)->getCharge();
943 double tmpChargeErrorSqr = 0.0;
944 for(vector<TrackerPulse*>::const_iterator aPulse = _thePulses.begin(); aPulse < _thePulses.end(); ++aPulse)
945 tmpChargeErrorSqr += ((*aPulse)->getCovMatrix())[0];
946 return tmpChargeErrorSqr;
952 return _maxPulseCharge;
959 return _thePulses.size();
966 return fabs(p0->getCharge()) < fabs(p1->getCharge());
973 if(parameterSet(
"MaxDeadChannelsOverride"))
979 throw tpcconddata::ConditionsObjectException(
string(
"[RowBasedHitFinderProcessor]::_getDeadChannels() Exception: number can't be found!"));
987 if(parameterSet(
"MinHitSizeOverride"))
993 throw tpcconddata::ConditionsObjectException(
string(
"[RowBasedHitFinderProcessor]::_getMinHitSize() Exception: Number can't be found!"));
1001 if(parameterSet(
"MinMaxPulseSliceHeightOverride"))
1007 throw tpcconddata::ConditionsObjectException(
string(
"[RowBasedHitFinderProcessor]::_getMinMaxPulseSliceHeight() Exception: Number can't be found!"));
1016 if(parameterSet(
"MaxTimeSpreadOverride"))
1022 throw tpcconddata::ConditionsObjectException(
string(
"[RowBasedHitFinderProcessor]::_getMaxTimeSpread() Exception: Number can't be found!"));
1031 if(parameterSet(
"VDriftOverride"))
1043 streamlog_out(ERROR) <<
"[getDriftVelocity failed] The Listener for TPCConditions could not be used. Maybe the conditions object is not available?" << endl;
1044 streamlog_out(ERROR) <<
" Possibly you need to use the override parameterin the steering file called (\"VDriftOverride\")." << endl;
1054 if(parameterSet(
"DeadPadsOverride"))
1060 pair<int, int> tmpPair;
1061 tmpPair.first = padID;
1062 tmpPair.second = moduleID;
1063 bool returnvalue=
false;
1074 catch (CondDataNotAvailableException &e)
1086 if(parameterSet(
"DeadPadsOverride"))
1090 pair<int, int> tmpPair;
1091 tmpPair.first = padID;
1092 tmpPair.second = moduleID;
1097 streamlog_out(MESSAGE)<<
"found noisy pad"<<endl;
1099 catch (CondDataNotAvailableException &e)
1112 if(parameterSet(
"ChargeConversionFactorOverride"))
void addPulse(EVENT::TrackerPulse *)
bool isMultipleHitCandidate(int r)
bool hasAnomalousPulseShape(int p)
void _createHitCollection(std::map< int, std::vector< RowBasedHitFinderProcessor::hitCandidate > > &, const gear::TPCParameters &, IMPL::LCCollectionVec *)
const EVENT::TrackerPulse * getMaximumPulse() const
void _addNeighbourPulses(hitCandidate &, const gear::TPCParameters &, std::vector< EVENT::TrackerPulse *> &)
bool hasOverflowPulse(int m)
std::vector< int > _deadChannelIndicesOverride
double _getMinMaxPulseSliceHeight()
void _findHitCandidates(std::map< int, std::map< int, std::vector< EVENT::TrackerPulse *> * > * > &, const gear::TPCParameters &, std::map< int, std::vector< RowBasedHitFinderProcessor::hitCandidate > > &)
RowBasedHitFinderProcessor aRowBasedHitFinderProcessor
std::string _inputTrackerPulsesCollectionName
bool hasSplitPulse(int n)
EVENT::TrackerPulse * _findHighestPulseInRow(std::vector< EVENT::TrackerPulse *> &)
bool isAnomalousShape(int j)
void setNextToDeadChannel(int &q)
bool _padIsNoisy(const int, const int)
double _convertCharge(const RowBasedHitFinderProcessor::hitCandidate &)
void setMultipleHitCandidate(int &r)
bool isPlateauCutoff(int l)
void setPlateauCutoffPulse(int &t)
std::vector< EVENT::TrackerPulse * >::iterator _findBestNeighbourPulseMatch(std::vector< std::vector< EVENT::TrackerPulse *>::iterator > &, float)
virtual void check(lcio::LCEvent *evt)
void setOverflowPulse(int &m)
float _maxTimeSpreadOverride
void _sortPulses(EVENT::LCCollection *, const gear::TPCParameters &, std::map< int, std::map< int, std::vector< EVENT::TrackerPulse *> * > * > &)
int _maxDeadChannelsOverride
bool hasDeadChannel(int i)
bool hasNoisyChannel(int j)
double getChargeMeasError() const
std::string _channelCorrectionCollectionName
unsigned int getWidth() const
bool _maxPulseHeightCheck(EVENT::TrackerPulse *)
virtual void processRunHeader(lcio::LCRunHeader *run)
TPCConditionsListener * _tpcConditionsListener
bool _padIsDead(const int, const int)
std::string _outputTrackerHitsCollectionName
unsigned int _getMaxDeadChannels()
void setSplitPulse(int &n)
bool _hitIsValid(const RowBasedHitFinderProcessor::hitCandidate &)
ChannelCorrectionListener * _channelCorrectionListener
void setDeadChannel(int &i)
double _getDriftVelocity()
const std::vector< EVENT::TrackerPulse * > & getPulses() const
bool _pulseComparator(EVENT::TrackerPulse *, EVENT::TrackerPulse *)
float _driftVelocityOverride
double _getMaxTimeSpread()
double _getChargeConversionFactor()
bool isNextToDeadChannel(int q)
bool isAtModuleBorder(int k)
gear::Vector3D _calculatePositionsAndErrors(const RowBasedHitFinderProcessor::hitCandidate &, const gear::TPCParameters &, float *)
float _chargeConversionFactorOverride
bool hasPlateauCutoffPulse(int t)
double getMaxPulseHeight()
std::string _inputTPCConditionsCollectionName
bool _outputHitsPersistent
float _minMaxPulseSliceHeightOverride
void setAtModuleBorder(int &k)
void setAnomalousPulseShape(int &p)
virtual void processEvent(lcio::LCEvent *evt)