70 std::vector<Trajectory>::const_iterator outInTrackItr;
110 std::vector<TrajectoryMeasurement> measurements = (*outInTrackItr).measurements();
112 std::vector<const DetLayer*> allLayers=
layerList();
115 for(
unsigned int i = 0;
i < allLayers.size(); ++
i) {
122 std::vector<const DetLayer*> myLayers;
124 std::vector<TrajectoryMeasurement>::reverse_iterator measurementItr;
125 std::vector<TrajectoryMeasurement*> myItr;
130 for(measurementItr = measurements.rbegin() ; measurementItr != measurements.rend(); ++measurementItr) {
133 if( (*measurementItr).recHit()->isValid()) {
138 myLayers.push_back( measurementItr->layer() ) ;
139 myItr.push_back( &(*measurementItr) );
153 if ( myItr.empty() ) {
157 for(ilayer = 0; ilayer < allLayers.size(); ++ilayer) {
159 if ( allLayers[ilayer] == myLayers[0]) {
179 }
else if ( allLayers[ilayer] == myLayers[1] ) {
202 if(ilayer == allLayers.size()) {
226 const DetLayer * previousLayer = allLayers[ilayer];
237 if ( allLayers[ilayer] == myLayers[0] ) {
250 }
else if ( ilayer-1==0) {
261 if(!stateAtPreviousLayer.
isValid()) {
268 startSeed(fts, stateAtPreviousLayer, -1, ilayer );
286 const DetLayer * previousLayer = allLayers[ilayer];
290 if(!stateAtPreviousLayer.
isValid()) {
297 startSeed(fts, stateAtPreviousLayer, -1, ilayer );
321 std::vector<const reco::CaloCluster*> bcVec;
329 std::vector<const reco::CaloCluster*>::iterator bcItr;
338 for(bcItr = bcVec.begin(); bcItr != bcVec.end(); ++bcItr) {
350 back1mm -= dir.unit()*0.1;
356 if ( !helix.isValid() )
continue;
371 std::vector<const reco::CaloCluster*>
result;
381 if (
std::abs(bcPhi-convPhi ) < .5 &&
382 ((charge<0 && bcPhi-convPhi >-.5) ||
383 (charge>0 && bcPhi-convPhi <.5))) result.push_back(&bc);
392 float transverseCurvature,
393 unsigned int startingLayer) {
396 std::vector<const DetLayer*> allLayers=
layerList();
402 m(0,0) = 0.1;
m(1,1) = 0.0001 ;
m(2,2) = 0.0001 ;
403 m(3,3) = 0.0001 ;
m(4,4) = 0.001;
408 double(transverseCurvature), 0, &(*theMF_) ),
410 if (fts.momentum().mag2() == 0){
411 edm::LogWarning(
"FailedToInitiateSeeding")<<
" initial FTS has a zero momentum, probably because of the zero field. ";
422 for(
unsigned int ilayer = startingLayer; ilayer <= startingLayer+1 && (ilayer < allLayers.size()-2); ++ilayer) {
423 const DetLayer * layer = allLayers[ilayer];
469 back1mm -= dir.unit()*0.1;
475 if ( !helix.isValid() )
continue;
482 helix.stateAtVertex().transverseCurvature(), 0, &(*theMF_)),
501 if (tmItr->recHit()->isValid() ) {
506 GlobalPoint back1mm = tmItr->recHit()->globalPosition();
508 back1mm -= dir.unit()*0.1;
514 if ( !helix.isValid() )
continue;
526 helix.stateAtVertex().transverseCurvature(), 0, &(*theMF_)),
585 std::vector<const DetLayer*> allLayers=
layerList();
586 const DetLayer * layer = allLayers[ilayer];
608 float m1dr =
sqrt(m1.
recHit()->localPositionError().yy());
620 if ( !tsos.isValid() ) {
629 std::vector<TrajectoryMeasurement> measurements = theLayerMeasurements_.
measurements( *layer, tsos, *propagator, *newEstimator);
633 for(
unsigned int i = 0;
i < measurements.size(); ++
i) {
634 if( measurements[
i].
recHit()->isValid() ) {
673 if ( updatedState1.
isValid() ) {
684 myHits.
push_back(meas1.recHit()->hit()->clone());
685 myHits.push_back(meas2.recHit()->hit()->clone());
const Propagator * thePropagatorAlongMomentum_
T getParameter(std::string const &) const
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
const MeasurementTracker * getMeasurementTracker() const
TrajectoryStateOnSurface const & predictedState() const
ConstRecHitPointer const & recHit() const
int maxNumberOfInOutSeedsPerInputTrack_
ROOT::Math::SMatrixIdentity AlgebraicMatrixID
const CurvilinearTrajectoryError & curvilinearError() const
virtual Location location() const =0
Which part of the detector (barrel, endcap)
Geom::Phi< T > phi() const
virtual void fillClusterSeeds()
GlobalPoint globalPosition() const
virtual const GeomDet * idToDet(DetId) const =0
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
void createSeed(const TrajectoryMeasurement &m1, const TrajectoryMeasurement &m2)
TrackCharge charge() const
std::vector< TrajectoryMeasurement > theFirstMeasurements_
TrajectorySeedCollection theSeeds_
~InOutConversionSeedFinder() override
const Propagator * thePropagatorOppositeToMomentum_
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
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
const TrackingGeometry * theTrackerGeom_
GlobalVector track2InitialMomentum_
edm::Handle< edm::View< reco::CaloCluster > > bcCollection_
void startSeed(const FreeTrajectoryState *fts, const TrajectoryStateOnSurface &stateAtPreviousLayer, int charge, int layer)
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
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