53 std::vector<Trajectory>::const_iterator outInTrackItr;
92 std::vector<TrajectoryMeasurement> measurements = (*outInTrackItr).measurements();
94 std::vector<const DetLayer*> allLayers =
layerList();
97 for (
unsigned int i = 0;
i < allLayers.size(); ++
i) {
102 std::vector<const DetLayer*> myLayers;
104 std::vector<TrajectoryMeasurement>::reverse_iterator measurementItr;
105 std::vector<TrajectoryMeasurement*> myItr;
110 for (measurementItr = measurements.rbegin(); measurementItr != measurements.rend(); ++measurementItr) {
111 if ((*measurementItr).recHit()->isValid()) {
114 myLayers.push_back(measurementItr->layer());
115 myItr.push_back(&(*measurementItr));
128 for (ilayer = 0; ilayer < allLayers.size(); ++ilayer) {
130 if (allLayers[ilayer] == myLayers[0]) {
148 }
else if (allLayers[ilayer] == myLayers[1]) {
166 if (ilayer == allLayers.size()) {
187 const DetLayer* previousLayer = allLayers[ilayer];
196 if (ilayer - 1 > 0) {
197 if (allLayers[ilayer] == myLayers[0]) {
209 }
else if (ilayer - 1 == 0) {
217 if (!stateAtPreviousLayer.
isValid()) {
224 startSeed(fts, stateAtPreviousLayer, -1, ilayer);
237 const DetLayer* previousLayer = allLayers[ilayer];
241 if (!stateAtPreviousLayer.
isValid()) {
248 startSeed(fts, stateAtPreviousLayer, -1, ilayer);
264 std::vector<const reco::CaloCluster*> bcVec;
272 std::vector<const reco::CaloCluster*>::iterator bcItr;
280 for (bcItr = bcVec.begin(); bcItr != bcVec.end(); ++bcItr) {
289 back1mm -=
dir.unit() * 0.1;
295 if (!helix.isValid())
303 std::vector<const reco::CaloCluster*>
result;
312 if (
std::abs(bcPhi - convPhi) < .5 &&
313 ((
charge < 0 && bcPhi - convPhi > -.5) || (
charge > 0 && bcPhi - convPhi < .5)))
321 float transverseCurvature,
322 unsigned int startingLayer) {
323 std::vector<const DetLayer*> allLayers =
layerList();
339 if (fts.momentum().mag2() == 0) {
341 <<
" initial FTS has a zero momentum, probably because of the zero field. ";
351 for (
unsigned int ilayer = startingLayer; ilayer <= startingLayer + 1 && (ilayer < allLayers.size() - 2); ++ilayer) {
393 back1mm -=
dir.unit() * 0.1;
399 if (!helix.isValid())
407 helix.stateAtVertex().transverseCurvature(),
420 if (tmItr->recHit()->isValid()) {
426 GlobalPoint back1mm = tmItr->recHit()->globalPosition();
428 back1mm -=
dir.unit() * 0.1;
434 if (!helix.isValid())
446 helix.stateAtVertex().transverseCurvature(),
493 std::vector<const DetLayer*> allLayers =
layerList();
511 float m1dr =
sqrt(m1.recHit()->localPositionError().yy());
521 if (!tsos.isValid()) {
530 std::vector<TrajectoryMeasurement> measurements =
535 for (
unsigned int i = 0;
i < measurements.size(); ++
i) {
536 if (measurements[
i].
recHit()->isValid()) {
545 if (m1.predictedState().isValid()) {
572 myHits.
push_back(meas1.recHit()->hit()->clone());
573 myHits.push_back(meas2.recHit()->hit()->clone());
const math::XYZPoint & position() const
cluster centroid position
const Propagator * thePropagatorAlongMomentum_
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
T getParameter(std::string const &) const
std::vector< const reco::CaloCluster * > getSecondCaloClusters(const GlobalPoint &conversionPosition, float charge) const
int maxNumberOfInOutSeedsPerInputTrack_
ROOT::Math::SMatrixIdentity AlgebraicMatrixID
Geom::Phi< T > phi() const
virtual void fillClusterSeeds()
void createSeed(const TrajectoryMeasurement &m1, const TrajectoryMeasurement &m2)
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
std::vector< TrajectoryMeasurement > theFirstMeasurements_
TrajectorySeedCollection theSeeds_
~InOutConversionSeedFinder() override
const Propagator * thePropagatorOppositeToMomentum_
std::vector< Trajectory > inputTracks_
TrajectoryMeasurement * myPointer
GlobalPoint globalPosition() const
TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const override
TrackCharge charge() const
void makeSeeds(const edm::Handle< edm::View< reco::CaloCluster > > &allBc) override
FreeTrajectoryState const * freeTrajectoryState(bool withErrors=true) const
Abs< T >::type abs(const T &t)
const TrackingGeometry * theTrackerGeom_
GlobalVector track2InitialMomentum_
edm::Handle< edm::View< reco::CaloCluster > > bcCollection_
void startSeed(const FreeTrajectoryState *fts, const TrajectoryStateOnSurface &stateAtPreviousLayer, int charge, int layer)
virtual const GeomDet * idToDet(DetId) const =0
GlobalVector globalDirection() const
double transverseCurvature() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
TrajectoryStateOnSurface const & updatedState() const
void printLayer(int i) const
reco::CaloCluster theSecondBC_
void completeSeed(const TrajectoryMeasurement &m1, const FreeTrajectoryState &fts, const Propagator *propagator, int ilayer)
std::vector< const DetLayer * > const & layerList() const
const MeasurementTracker * getMeasurementTracker() const
InOutConversionSeedFinder(const edm::ParameterSet &config, edm::ConsumesCollector &&iC)
Log< level::Warning, false > LogWarning
std::vector< TrajectoryMeasurement > measurements(const DetLayer &layer, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
edm::Handle< MeasurementTrackerEvent > theTrackerData_
virtual void findSeeds(const TrajectoryStateOnSurface &startingState, float signedpt, unsigned int startingLayer)
std::vector< Trajectory > theOutInTracks_
ConstRecHitPointer const & recHit() const