18 maxHits(iConfig.getParameter<int>(
"maxHits")),
19 rescaleErrorFactor(iConfig.getParameter<double>(
"rescaleErrorFactor")),
20 checkCompletedTrack(iConfig.getParameter<bool>(
"checkCompletedTrack")),
21 navigationSchoolName(iConfig.getParameter<std::string>(
"NavigationSchool"))
24 std::string measurementTrackerName = iConfig.
getParameter<std::string>(
"MeasurementTrackerName");
50 LogDebug(
"NuclearSeedGenerator") <<
"New NuclearInteractionFinder instance with parameters : \n"
51 <<
"maxHits : " <<
maxHits <<
"\n"
80 LogDebug(
"NuclearSeedGenerator") <<
"Analyzis of a new trajectory with a number of valid hits = " << traj.
foundHits();
82 std::vector<TrajectoryMeasurement> measurements = traj.
measurements();
90 std::reverse(measurements.begin(), measurements.end());
93 std::vector<TrajectoryMeasurement>::const_iterator it_meas = measurements.begin();
95 std::vector<double> ncompatibleHits;
101 if(it_meas == measurements.end())
break;
138 for(
int i=0;
i<3;
i++) {
139 pt[
i] = (it_meas->updatedState()).globalParameters().position();
146 std::vector<TrajectoryMeasurement>
150 LogDebug(
"NuclearSeedGenerator") <<
"currentState :" << currentState <<
"\n";
156 std::vector<TrajectoryMeasurement>
163 vector<const DetLayer*> nl;
169 edm::LogError(
"NuclearInteractionFinder") <<
"In findCompatibleMeasurements : lastLayer not accessible";
174 LogDebug(
"NuclearSeedGenerator") <<
"In findCompatibleMeasurements : no compatible layer found";
178 for (vector<const DetLayer*>::iterator il = nl.begin();
179 il != nl.end(); il++) {
186 result.insert(
result.end()-invalidHits, tmp.begin(), tmp.end());
203 const TM& innerTM = tmPairs.first;
204 const std::vector<TM>& outerTMs = tmPairs.second;
207 for(std::vector<TM>::const_iterator outtm = outerTMs.begin(); outtm!=outerTMs.end(); outtm++) {
208 if((innerTM.
recHit())->isValid() && (outtm->recHit())->isValid()) {
212 else LogDebug(
"NuclearSeedGenerator") <<
"The initial hits for seeding are invalid" <<
"\n";
219 for(std::vector<SeedFromNuclearInteraction>::const_iterator it_seed =
allSeeds.begin(); it_seed !=
allSeeds.end(); it_seed++) {
220 if(it_seed->isValid()) {
221 output->push_back( it_seed->TrajSeed() );
223 else LogDebug(
"NuclearSeedGenerator") <<
"The seed is invalid" <<
"\n";
229 std::vector<SeedFromNuclearInteraction> newSeedCollection;
232 for(std::vector<SeedFromNuclearInteraction>::const_iterator it_seed =
allSeeds.begin(); it_seed !=
allSeeds.end(); it_seed++) {
234 if( !it_seed->isValid() )
continue;
240 for(std::vector<TM>::const_iterator tm = thirdTMs.begin(); tm!= thirdTMs.end(); tm++) {
242 if( ! tm->recHit()->isValid() )
continue;
263 mr(1,1) = 1E-2*rescale*rescale;
264 mr(2,2) = 1E-2*rescale*rescale;
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
void improveSeeds()
Improve the seeds with a third RecHit.
std::vector< int > compatibleHits() const
const LocalTrajectoryParameters & localParameters() const
const TMContainer & back() const
virtual void update(const edm::Event &) const
virtual std::vector< const DetLayer * > nextLayers(NavigationDirection direction) const
ConstRecHitPointer recHit() const
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...
bool run(const Trajectory &traj)
Run the Finder.
double fwdEstimate(const std::vector< TrajectoryMeasurement > &vecTM) const
PropagationDirection const & direction() const
bool isNuclearInteraction()
NuclearTester * nuclTester
DataContainer const & measurements() const
std::vector< TrajectoryMeasurement > findCompatibleMeasurements(const TM &lastMeas, double rescaleFactor) const
Find compatible TM of a TM with error rescaled by rescaleFactor.
void push_back(const TM &init_tm, const TMContainer &vecTM)
std::vector< TrajectoryMeasurement > findMeasurementsFromTSOS(const TSOS ¤tState, DetId detid) const
std::vector< TrajectorySeed > TrajectorySeedCollection
FreeTrajectoryState * freeState(bool withErrors=true) const
SurfaceSide surfaceSide() const
Position relative to material, defined relative to momentum vector.
double meanHitDistance(const std::vector< TrajectoryMeasurement > &vecTM) 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
TrajectoryStateOnSurface updatedState() const
const Propagator * thePropagator
const AlgebraicSymMatrix55 & matrix() const
const MeasurementEstimator * theEstimator
const LocalTrajectoryError & localError() const
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
NuclearInteractionFinder()
const GlobalTrajectoryParameters & globalParameters() const
edm::ESHandle< MagneticField > theMagField
T const * product() const
const LayerMeasurements * theLayerMeasurements
const GeometricSearchTracker * theGeomSearchTracker
TrajectoryStateOnSurface TSOS
std::vector< std::vector< double > > tmp
std::auto_ptr< TrajectorySeedCollection > getPersistentSeeds()
Fill 'output' with persistent nuclear seeds.
std::string navigationSchoolName
const Surface & surface() const
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
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
double signedInverseMomentum() const
Signed inverse momentum q/p (zero for neutrals).
const TMPair & goodTMPair() const
tuple size
Write out results.
void setEvent(const edm::Event &event) const
define the measurement (to be called for each event)
double rescaleErrorFactor
SeedFromNuclearInteraction * currentSeed