24 navigationSchoolName(iConfig.getParameter<
std::
string>(
"NavigationSchool"))
52 LogDebug(
"NuclearSeedGenerator") <<
"New NuclearInteractionFinder instance with parameters : \n" 53 <<
"maxHits : " <<
maxHits <<
"\n" 75 LogDebug(
"NuclearSeedGenerator") <<
"Analyzis of a new trajectory with a number of valid hits = " << traj.
foundHits();
77 std::vector<TrajectoryMeasurement> measurements = traj.
measurements();
89 std::vector<TrajectoryMeasurement>::const_iterator it_meas = measurements.begin();
91 std::vector<double> ncompatibleHits;
97 if(it_meas == measurements.end())
break;
134 for(
int i=0;
i<3;
i++) {
135 pt[
i] = (it_meas->updatedState()).globalParameters().position();
142 std::vector<TrajectoryMeasurement>
146 LogDebug(
"NuclearSeedGenerator") <<
"currentState :" << currentState <<
"\n";
152 std::vector<TrajectoryMeasurement>
159 vector<const DetLayer*> nl;
165 edm::LogError(
"NuclearInteractionFinder") <<
"In findCompatibleMeasurements : lastLayer not accessible";
170 LogDebug(
"NuclearSeedGenerator") <<
"In findCompatibleMeasurements : no compatible layer found";
174 for (vector<const DetLayer*>::iterator il = nl.begin();
175 il != nl.end(); il++) {
179 if ( result.empty()) result = tmp;
182 result.insert( result.end()-invalidHits, tmp.begin(), tmp.end());
189 if ( result.size() > 1) {
199 const TM& innerTM = tmPairs.first;
200 const std::vector<TM>& outerTMs = tmPairs.second;
203 for(std::vector<TM>::const_iterator outtm = outerTMs.begin(); outtm!=outerTMs.end(); outtm++) {
204 if((innerTM.
recHit())->isValid() && (outtm->recHit())->isValid()) {
208 else LogDebug(
"NuclearSeedGenerator") <<
"The initial hits for seeding are invalid" <<
"\n";
214 auto output = std::make_unique<TrajectorySeedCollection>();
215 for(std::vector<SeedFromNuclearInteraction>::const_iterator it_seed =
allSeeds.begin(); it_seed !=
allSeeds.end(); it_seed++) {
216 if(it_seed->isValid()) {
217 output->push_back( it_seed->TrajSeed() );
219 else LogDebug(
"NuclearSeedGenerator") <<
"The seed is invalid" <<
"\n";
225 std::vector<SeedFromNuclearInteraction> newSeedCollection;
230 for(std::vector<SeedFromNuclearInteraction>::const_iterator it_seed =
allSeeds.begin(); it_seed !=
allSeeds.end(); it_seed++) {
232 if( !it_seed->isValid() )
continue;
235 std::vector<TM> thirdTMs =
findMeasurementsFromTSOS( it_seed->updatedTSOS() , it_seed->outerHitDetId(), layerMeasurements );
238 for(std::vector<TM>::const_iterator tm = thirdTMs.begin(); tm!= thirdTMs.end(); tm++) {
240 if( ! tm->recHit()->isValid() )
continue;
TangentHelix * thePrimaryHelix
bool empty() const
True if trajectory has no measurements.
T getParameter(std::string const &) const
std::vector< TrajectoryMeasurement > measurements(const DetLayer &layer, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
ConstRecHitPointer const & recHit() const
std::unique_ptr< TrajectorySeedCollection > getPersistentSeeds()
Fill 'output' with persistent nuclear seeds.
std::vector< int > compatibleHits() const
const LocalTrajectoryParameters & localParameters() const
const TMContainer & back() const
bool run(const Trajectory &traj, const MeasurementTrackerEvent &event)
Run the Finder.
std::vector< TrajectoryMeasurement > findMeasurementsFromTSOS(const TSOS ¤tState, DetId detid, const LayerMeasurements &layerMeasurements) const
void improveSeeds(const MeasurementTrackerEvent &event)
Improve the seeds with a third RecHit.
const NavigationSchool * nav() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
void setMeasurements(const TSOS &tsosAtInteractionPoint, ConstRecHitPointer ihit, ConstRecHitPointer ohit)
Fill all data members from 2 TM's where the first one is supposed to be at the interaction point...
double fwdEstimate(const std::vector< TrajectoryMeasurement > &vecTM) const
PropagationDirection const & direction() const
bool isNuclearInteraction()
float signedInverseMomentum() const
Signed inverse momentum q/p (zero for neutrals).
NuclearTester * nuclTester
DataContainer const & measurements() const
void push_back(const TM &init_tm, const TMContainer &vecTM)
const SurfaceType & surface() const
std::vector< TrajectoryMeasurement > findCompatibleMeasurements(const TM &lastMeas, double rescaleFactor, const LayerMeasurements &layerMeasurements) const
Find compatible TM of a TM with error rescaled by rescaleFactor.
SurfaceSide surfaceSide() const
Position relative to material, defined relative to momentum vector.
double meanHitDistance(const std::vector< TrajectoryMeasurement > &vecTM) const
FreeTrajectoryState const * freeState(bool withErrors=true) const
std::vector< SeedFromNuclearInteraction > allSeeds
void reset(unsigned int nMeasurements)
const MeasurementTracker * theMeasurementTracker
const DetLayer * detLayer(const DetId &id) const
obsolete method. Use idToLayer() instead.
const NavigationSchool * theNavigationSchool
const Propagator * thePropagator
const AlgebraicSymMatrix55 & matrix() const
const MeasurementEstimator * theEstimator
const LocalTrajectoryError & localError() const
NuclearInteractionFinder()
const GlobalTrajectoryParameters & globalParameters() const
std::vector< const DetLayer * > nextLayers(const DetLayer &detLayer, Args &&...args) const
NavigationDirection.
edm::ESHandle< MagneticField > theMagField
const GeometricSearchTracker * theGeomSearchTracker
measurementTrackerName
possibility to inhibit extended forward coverage
TrajectoryStateOnSurface TSOS
std::vector< std::vector< double > > tmp
std::string navigationSchoolName
void fillSeeds(const std::pair< TrajectoryMeasurement, std::vector< TrajectoryMeasurement > > &tmPairs)
get the seeds at the interaction point
Class used to test if a track has interacted nuclearly.
virtual ~NuclearInteractionFinder()
const MagneticField & magneticField() const
TrajectoryStateOnSurface const & updatedState() const
unsigned int nHitsChecked() const
void definePrimaryHelix(std::vector< TrajectoryMeasurement >::const_iterator it_meas)
Calculate the parameters of the circle representing the primary track at the interaction point...
TrajectoryStateOnSurface rescaleError(float rescale, const TSOS &state) const
T const * product() const
const TMPair & goodTMPair() const
double rescaleErrorFactor
SeedFromNuclearInteraction * currentSeed