68 std::vector<Trajectory>::const_iterator outInTrackItr;
108 std::vector<TrajectoryMeasurement> measurements = (*outInTrackItr).measurements();
110 std::vector<const DetLayer*> allLayers=
layerList();
113 for(
unsigned int i = 0;
i < allLayers.size(); ++
i) {
120 std::vector<const DetLayer*> myLayers;
122 std::vector<TrajectoryMeasurement>::reverse_iterator measurementItr;
123 std::vector<TrajectoryMeasurement*> myItr;
128 for(measurementItr = measurements.rbegin() ; measurementItr != measurements.rend(); ++measurementItr) {
131 if( (*measurementItr).recHit()->isValid()) {
136 myLayers.push_back( measurementItr->layer() ) ;
137 myItr.push_back( &(*measurementItr) );
151 if ( myItr.size()==0 ) {
155 for(ilayer = 0; ilayer < allLayers.size(); ++ilayer) {
157 if ( allLayers[ilayer] == myLayers[0]) {
177 }
else if ( allLayers[ilayer] == myLayers[1] ) {
200 if(ilayer == allLayers.size()) {
223 const DetLayer * previousLayer = allLayers[ilayer];
234 if ( allLayers[ilayer] == myLayers[0] ) {
247 }
else if ( ilayer-1==0) {
258 if(!stateAtPreviousLayer.
isValid()) {
265 startSeed(fts, stateAtPreviousLayer, -1, ilayer );
283 const DetLayer * previousLayer = allLayers[ilayer];
287 if(!stateAtPreviousLayer.
isValid()) {
294 startSeed(fts, stateAtPreviousLayer, -1, ilayer );
318 std::vector<const reco::CaloCluster*> bcVec;
326 std::vector<const reco::CaloCluster*>::iterator bcItr;
335 for(bcItr = bcVec.begin(); bcItr != bcVec.end(); ++bcItr) {
347 back1mm -= dir.unit()*0.1;
353 if ( !helix.isValid() )
continue;
368 std::vector<const reco::CaloCluster*>
result;
383 if (fabs(theBcPhi-theConvPhi ) < .5 &&
384 ((charge<0 && theBcPhi-theConvPhi >-.5) ||
385 (charge>0 && theBcPhi-theConvPhi <.5))){
409 float transverseCurvature,
410 unsigned int startingLayer)
const {
413 std::vector<const DetLayer*> allLayers=
layerList();
419 m(0,0) = 0.1;
m(1,1) = 0.0001 ;
m(2,2) = 0.0001 ;
420 m(3,3) = 0.0001 ;
m(4,4) = 0.001;
425 double(transverseCurvature), 0, &(*theMF_) ),
427 if (fts.momentum().mag2() == 0){
428 edm::LogWarning(
"FailedToInitiateSeeding")<<
" initial FTS has a zero momentum, probably because of the zero field. ";
439 for(
unsigned int ilayer = startingLayer; ilayer <= startingLayer+1 && (ilayer < allLayers.size()-2); ++ilayer) {
440 const DetLayer * layer = allLayers[ilayer];
486 back1mm -= dir.unit()*0.1;
492 if ( !helix.isValid() )
continue;
499 helix.stateAtVertex().transverseCurvature(), 0, &(*theMF_)),
518 if (tmItr->recHit()->isValid() ) {
523 GlobalPoint back1mm = tmItr->recHit()->globalPosition();
525 back1mm -= dir.unit()*0.1;
531 if ( !helix.isValid() )
continue;
543 helix.stateAtVertex().transverseCurvature(), 0, &(*theMF_)),
602 std::vector<const DetLayer*> allLayers=
layerList();
603 const DetLayer * layer = allLayers[ilayer];
625 float m1dr =
sqrt(m1.
recHit()->localPositionError().yy());
637 if ( !tsos.isValid() ) {
645 std::vector<TrajectoryMeasurement> measurements = theLayerMeasurements_.
measurements( *layer, tsos, *propagator, *newEstimator);
649 for(
unsigned int i = 0;
i < measurements.size(); ++
i) {
650 if( measurements[
i].recHit()->isValid() ) {
689 if ( updatedState1.
isValid() ) {
700 myHits.
push_back(meas1.recHit()->hit()->clone());
701 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
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_
FreeTrajectoryState * freeTrajectoryState(bool withErrors=true) const
ROOT::Math::SMatrixIdentity AlgebraicMatrixID
const CurvilinearTrajectoryError & curvilinearError() const
Geom::Phi< T > phi() const
GlobalPoint globalPosition() const
ConstRecHitPointer recHit() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
TrackCharge charge() const
void startSeed(FreeTrajectoryState *fts, const TrajectoryStateOnSurface &stateAtPreviousLayer, int charge, int layer) 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 printLayer(int i) const
virtual ~InOutConversionSeedFinder()
const DetLayer * layer() const
TrajectoryStateOnSurface updatedState() const
const TrackingGeometry * theTrackerGeom_
TrajectoryStateOnSurface predictedState() const
GlobalVector track2InitialMomentum_
virtual TrajectoryStateOnSurface propagate(const FreeTrajectoryState &, const Surface &) const
edm::Handle< edm::View< reco::CaloCluster > > bcCollection_
void completeSeed(const TrajectoryMeasurement &m1, FreeTrajectoryState &fts, const Propagator *propagator, int ilayer) const
InOutConversionSeedFinder(const edm::ParameterSet &config)
virtual const GeomDet * idToDet(DetId) const =0
TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TransientTrackingRecHit &) const
reco::CaloCluster theSecondBC_
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