|
|
Go to the documentation of this file.
20 :
maxHits(iConfig.getParameter<
int>(
"maxHits")),
23 navigationSchoolName(iConfig.getParameter<
std::
string>(
"NavigationSchool")) {
49 LogDebug(
"NuclearSeedGenerator") <<
"New NuclearInteractionFinder instance with parameters : \n"
50 <<
"maxHits : " <<
maxHits <<
"\n"
72 LogDebug(
"NuclearSeedGenerator") <<
"Analyzis of a new trajectory with a number of valid hits = " << traj.
foundHits();
74 std::vector<TrajectoryMeasurement> measurements = traj.
measurements();
86 std::vector<TrajectoryMeasurement>::const_iterator it_meas = measurements.begin();
88 std::vector<double> ncompatibleHits;
93 if (it_meas == measurements.end())
134 for (
int i = 0;
i < 3;
i++) {
135 pt[
i] = (it_meas->updatedState()).globalParameters().position();
145 LogDebug(
"NuclearSeedGenerator") <<
"currentState :" << currentState <<
"\n";
157 vector<const DetLayer*> nl;
162 edm::LogError(
"NuclearInteractionFinder") <<
"In findCompatibleMeasurements : lastLayer not accessible";
167 LogDebug(
"NuclearSeedGenerator") <<
"In findCompatibleMeasurements : no compatible layer found";
171 for (vector<const DetLayer*>::iterator il = nl.begin(); il != nl.end(); il++) {
196 const TM& innerTM = tmPairs.first;
197 const std::vector<TM>& outerTMs = tmPairs.second;
200 for (std::vector<TM>::const_iterator outtm = outerTMs.begin(); outtm != outerTMs.end(); outtm++) {
201 if ((innerTM.
recHit())->isValid() && (outtm->recHit())->isValid()) {
205 LogDebug(
"NuclearSeedGenerator") <<
"The initial hits for seeding are invalid"
212 auto output = std::make_unique<TrajectorySeedCollection>();
213 for (std::vector<SeedFromNuclearInteraction>::const_iterator it_seed =
allSeeds.begin(); it_seed !=
allSeeds.end();
215 if (it_seed->isValid()) {
216 output->push_back(it_seed->TrajSeed());
218 LogDebug(
"NuclearSeedGenerator") <<
"The seed is invalid"
225 std::vector<SeedFromNuclearInteraction> newSeedCollection;
230 for (std::vector<SeedFromNuclearInteraction>::const_iterator it_seed =
allSeeds.begin(); it_seed !=
allSeeds.end();
232 if (!it_seed->isValid())
236 std::vector<TM> thirdTMs =
240 for (std::vector<TM>::const_iterator tm = thirdTMs.begin(); tm != thirdTMs.end(); tm++) {
241 if (!tm->recHit()->isValid())
T const * product() const
bool run(const Trajectory &traj, const MeasurementTrackerEvent &event)
Run the Finder.
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.
const MeasurementEstimator * theEstimator
std::vector< TrajectoryMeasurement > measurements(const DetLayer &layer, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
std::vector< SeedFromNuclearInteraction > allSeeds
float signedInverseMomentum() const
Signed inverse momentum q/p (zero for neutrals).
TrajectoryStateOnSurface rescaleError(float rescale, const TSOS &state) const
PropagationDirection const & direction() const
void definePrimaryHelix(std::vector< TrajectoryMeasurement >::const_iterator it_meas)
Calculate the parameters of the circle representing the primary track at the interaction point.
std::vector< TrajectoryMeasurement > findCompatibleMeasurements(const TM &lastMeas, double rescaleFactor, const LayerMeasurements &layerMeasurements) const
Find compatible TM of a TM with error rescaled by rescaleFactor.
NuclearInteractionFinder()
const NavigationSchool * nav() const
TrajectoryStateOnSurface const & updatedState() const
const AlgebraicSymMatrix55 & matrix() const
void push_back(const TM &init_tm, const TMContainer &vecTM)
std::unique_ptr< TrajectorySeedCollection > getPersistentSeeds()
Fill 'output' with persistent nuclear seeds.
TrajectoryStateOnSurface TSOS
void fillSeeds(const std::pair< TrajectoryMeasurement, std::vector< TrajectoryMeasurement > > &tmPairs)
get the seeds at the interaction point
const TMPair & goodTMPair() const
const MeasurementTracker * theMeasurementTracker
std::vector< const DetLayer * > nextLayers(const DetLayer &detLayer, Args &&... args) const
FreeTrajectoryState const * freeState(bool withErrors=true) const
std::string navigationSchoolName
const Propagator * thePropagator
const DetLayer * detLayer(const DetId &id) const
obsolete method. Use idToLayer() instead.
SeedFromNuclearInteraction * currentSeed
double meanHitDistance(const std::vector< TrajectoryMeasurement > &vecTM) const
const TMContainer & back() const
unsigned int nHitsChecked() const
double rescaleErrorFactor
const LocalTrajectoryParameters & localParameters() const
edm::ESHandle< MagneticField > theMagField
std::vector< int > compatibleHits() const
bool isNuclearInteraction()
virtual ~NuclearInteractionFinder()
DataContainer const & measurements() const
ConstRecHitPointer const & recHit() const
T getParameter(std::string const &) const
void improveSeeds(const MeasurementTrackerEvent &event)
Improve the seeds with a third RecHit.
std::vector< TrajectoryMeasurement > findMeasurementsFromTSOS(const TSOS ¤tState, DetId detid, const LayerMeasurements &layerMeasurements) const
const NavigationSchool * theNavigationSchool
Class used to test if a track has interacted nuclearly.
TangentHelix * thePrimaryHelix
const MagneticField & magneticField() const
const SurfaceType & surface() const
NuclearTester * nuclTester
const GlobalTrajectoryParameters & globalParameters() const
const LocalTrajectoryError & localError() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
void reset(unsigned int nMeasurements)
SurfaceSide surfaceSide() const
Position relative to material, defined relative to momentum vector.
double fwdEstimate(const std::vector< TrajectoryMeasurement > &vecTM) const
const GeometricSearchTracker * theGeomSearchTracker
bool empty() const
True if trajectory has no measurements.