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()) {
225 const DetLayer * previousLayer = allLayers[ilayer];
236 if ( allLayers[ilayer] == myLayers[0] ) {
249 }
else if ( ilayer-1==0) {
260 if(!stateAtPreviousLayer.
isValid()) {
267 startSeed(fts, stateAtPreviousLayer, -1, ilayer );
285 const DetLayer * previousLayer = allLayers[ilayer];
289 if(!stateAtPreviousLayer.
isValid()) {
296 startSeed(fts, stateAtPreviousLayer, -1, ilayer );
320 std::vector<const reco::CaloCluster*> bcVec;
328 std::vector<const reco::CaloCluster*>::iterator bcItr;
337 for(bcItr = bcVec.begin(); bcItr != bcVec.end(); ++bcItr) {
349 back1mm -= dir.unit()*0.1;
355 if ( !helix.isValid() )
continue;
370 std::vector<const reco::CaloCluster*>
result;
385 if (fabs(theBcPhi-theConvPhi ) < .5 &&
386 ((charge<0 && theBcPhi-theConvPhi >-.5) ||
387 (charge>0 && theBcPhi-theConvPhi <.5))){
411 float transverseCurvature,
412 unsigned int startingLayer)
const {
415 std::vector<const DetLayer*> allLayers=
layerList();
421 m(0,0) = 0.1;
m(1,1) = 0.0001 ;
m(2,2) = 0.0001 ;
422 m(3,3) = 0.0001 ;
m(4,4) = 0.001;
427 double(transverseCurvature), 0, &(*theMF_) ),
429 if (fts.momentum().mag2() == 0){
430 edm::LogWarning(
"FailedToInitiateSeeding")<<
" initial FTS has a zero momentum, probably because of the zero field. ";
441 for(
unsigned int ilayer = startingLayer; ilayer <= startingLayer+1 && (ilayer < allLayers.size()-2); ++ilayer) {
442 const DetLayer * layer = allLayers[ilayer];
488 back1mm -= dir.unit()*0.1;
494 if ( !helix.isValid() )
continue;
501 helix.stateAtVertex().transverseCurvature(), 0, &(*theMF_)),
520 if (tmItr->recHit()->isValid() ) {
525 GlobalPoint back1mm = tmItr->recHit()->globalPosition();
527 back1mm -= dir.unit()*0.1;
533 if ( !helix.isValid() )
continue;
545 helix.stateAtVertex().transverseCurvature(), 0, &(*theMF_)),
604 std::vector<const DetLayer*> allLayers=
layerList();
605 const DetLayer * layer = allLayers[ilayer];
627 float m1dr =
sqrt(m1.
recHit()->localPositionError().yy());
639 if ( !tsos.isValid() ) {
648 std::vector<TrajectoryMeasurement> measurements = theLayerMeasurements_.
measurements( *layer, tsos, *propagator, *newEstimator);
652 for(
unsigned int i = 0;
i < measurements.size(); ++
i) {
653 if( measurements[
i].recHit()->isValid() ) {
692 if ( updatedState1.
isValid() ) {
703 myHits.
push_back(meas1.recHit()->hit()->clone());
704 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