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.size()==0 ) {
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;
386 if (fabs(theBcPhi-theConvPhi ) < .5 &&
387 ((charge<0 && theBcPhi-theConvPhi >-.5) ||
388 (charge>0 && theBcPhi-theConvPhi <.5))){
412 float transverseCurvature,
413 unsigned int startingLayer)
const {
416 std::vector<const DetLayer*> allLayers=
layerList();
422 m(0,0) = 0.1;
m(1,1) = 0.0001 ;
m(2,2) = 0.0001 ;
423 m(3,3) = 0.0001 ;
m(4,4) = 0.001;
428 double(transverseCurvature), 0, &(*theMF_) ),
430 if (fts.momentum().mag2() == 0){
431 edm::LogWarning(
"FailedToInitiateSeeding")<<
" initial FTS has a zero momentum, probably because of the zero field. ";
442 for(
unsigned int ilayer = startingLayer; ilayer <= startingLayer+1 && (ilayer < allLayers.size()-2); ++ilayer) {
443 const DetLayer * layer = allLayers[ilayer];
489 back1mm -= dir.unit()*0.1;
495 if ( !helix.isValid() )
continue;
502 helix.stateAtVertex().transverseCurvature(), 0, &(*theMF_)),
521 if (tmItr->recHit()->isValid() ) {
526 GlobalPoint back1mm = tmItr->recHit()->globalPosition();
528 back1mm -= dir.unit()*0.1;
534 if ( !helix.isValid() )
continue;
546 helix.stateAtVertex().transverseCurvature(), 0, &(*theMF_)),
605 std::vector<const DetLayer*> allLayers=
layerList();
606 const DetLayer * layer = allLayers[ilayer];
628 float m1dr =
sqrt(m1.
recHit()->localPositionError().yy());
640 if ( !tsos.isValid() ) {
649 std::vector<TrajectoryMeasurement> measurements = theLayerMeasurements_.
measurements( *layer, tsos, *propagator, *newEstimator);
653 for(
unsigned int i = 0;
i < measurements.size(); ++
i) {
654 if( measurements[
i].recHit()->isValid() ) {
693 if ( updatedState1.
isValid() ) {
704 myHits.
push_back(meas1.recHit()->hit()->clone());
705 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
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
const MeasurementTracker * getMeasurementTracker() const
TrajectoryStateOnSurface const & predictedState() const
ConstRecHitPointer const & recHit() const
virtual void findSeeds(const TrajectoryStateOnSurface &startingState, float signedpt, unsigned int startingLayer) 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
GlobalPoint globalPosition() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
TrackCharge charge() const
std::vector< TrajectoryMeasurement > theFirstMeasurements_
TrajectorySeedCollection theSeeds_
const Propagator * thePropagatorOppositeToMomentum_
std::vector< Trajectory > inputTracks_
TrajectoryMeasurement * myPointer
std::vector< const reco::CaloCluster * > getSecondCaloClusters(const GlobalPoint &conversionPosition, float charge) const
void startSeed(const FreeTrajectoryState *fts, const TrajectoryStateOnSurface &stateAtPreviousLayer, int charge, int layer) const
TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const
FreeTrajectoryState const * freeTrajectoryState(bool withErrors=true) const
void printLayer(int i) const
virtual ~InOutConversionSeedFinder()
const DetLayer * layer() const
const TrackingGeometry * theTrackerGeom_
GlobalVector track2InitialMomentum_
edm::Handle< edm::View< reco::CaloCluster > > bcCollection_
void completeSeed(const TrajectoryMeasurement &m1, FreeTrajectoryState &fts, const Propagator *propagator, int ilayer) const
virtual const GeomDet * idToDet(DetId) const =0
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
reco::CaloCluster theSecondBC_
InOutConversionSeedFinder(const edm::ParameterSet &config, edm::ConsumesCollector &&iC)
TrajectoryStateOnSurface const & updatedState() const
edm::Handle< MeasurementTrackerEvent > theTrackerData_
void createSeed(const TrajectoryMeasurement &m1, const TrajectoryMeasurement &m2) const
std::vector< Trajectory > theOutInTracks_
virtual void makeSeeds(const edm::Handle< edm::View< reco::CaloCluster > > &allBc) const
virtual void fillClusterSeeds() const
GlobalVector globalDirection() const
double transverseCurvature() const