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)))
314 result.push_back(&bc);
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(),
423 if (tmItr->recHit()->isValid()) {
429 GlobalPoint back1mm = tmItr->recHit()->globalPosition();
431 back1mm -= dir.unit() * 0.1;
437 if (!helix.isValid())
449 helix.stateAtVertex().transverseCurvature(),
496 std::vector<const DetLayer*> allLayers =
layerList();
514 float m1dr =
sqrt(m1.
recHit()->localPositionError().yy());
524 if (!tsos.isValid()) {
533 std::vector<TrajectoryMeasurement> measurements =
534 theLayerMeasurements_.
measurements(*layer, tsos, *propagator, *newEstimator);
538 for (
unsigned int i = 0;
i < measurements.size(); ++
i) {
539 if (measurements[
i].recHit()->isValid()) {
575 myHits.
push_back(meas1.recHit()->hit()->clone());
576 myHits.push_back(meas2.recHit()->hit()->clone());
const Propagator * thePropagatorAlongMomentum_
const math::XYZPoint & position() const
cluster centroid position
std::vector< TrajectoryMeasurement > measurements(const DetLayer &layer, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
std::vector< const DetLayer * > const & layerList() const
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
const MeasurementTracker * getMeasurementTracker() const
TrajectoryStateOnSurface const & predictedState() const
ConstRecHitPointer const & recHit() const
virtual Location location() const =0
Which part of the detector (barrel, endcap)
int maxNumberOfInOutSeedsPerInputTrack_
ROOT::Math::SMatrixIdentity AlgebraicMatrixID
const CurvilinearTrajectoryError & curvilinearError() const
Geom::Phi< T > phi() const
virtual void fillClusterSeeds()
GlobalPoint globalPosition() const
void createSeed(const TrajectoryMeasurement &m1, const TrajectoryMeasurement &m2)
TrackCharge charge() const
std::vector< TrajectoryMeasurement > theFirstMeasurements_
TrajectorySeedCollection theSeeds_
~InOutConversionSeedFinder() override
const Propagator * thePropagatorOppositeToMomentum_
constexpr std::array< uint8_t, layerIndexSize > layer
std::vector< Trajectory > inputTracks_
TrajectoryMeasurement * myPointer
std::vector< const reco::CaloCluster * > getSecondCaloClusters(const GlobalPoint &conversionPosition, float charge) const
TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const override
FreeTrajectoryState const * freeTrajectoryState(bool withErrors=true) const
void printLayer(int i) const
void makeSeeds(const edm::Handle< edm::View< reco::CaloCluster > > &allBc) override
Abs< T >::type abs(const T &t)
const DetLayer * layer() const
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
T getParameter(std::string const &) const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
reco::CaloCluster theSecondBC_
void completeSeed(const TrajectoryMeasurement &m1, const FreeTrajectoryState &fts, const Propagator *propagator, int ilayer)
InOutConversionSeedFinder(const edm::ParameterSet &config, edm::ConsumesCollector &&iC)
TrajectoryStateOnSurface const & updatedState() const
Log< level::Warning, false > LogWarning
edm::Handle< MeasurementTrackerEvent > theTrackerData_
virtual void findSeeds(const TrajectoryStateOnSurface &startingState, float signedpt, unsigned int startingLayer)
std::vector< Trajectory > theOutInTracks_
GlobalVector globalDirection() const
double transverseCurvature() const