39 theCategory =
"TSGForRoadSearch|TrackerSeedGenerator";
46 if (!errorMatrixPset.
empty()){
83 std::vector<TrajectorySeed> &
result){
111 if (fts.position().mag()==0 && fts.momentum().mag()==0){
edm::LogError(
theCategory)<<
"initial state of muon is (0,0,0)(0,0,0). no seed.";
127 if (!
IPfts(muon, cIPFTS))
return;
145 if( fabs(z) < ptidc.front()->surface().position().z() ) {
146 inLayer = blc.front();
147 }
else if ( fabs(z) < ptecc.front()->surface().position().z() ) {
148 inLayer = ( z < 0 ) ? ntidc.front() : ptidc.front() ;
150 inLayer = ( z < 0 ) ? ntecc.front() : ptecc.front() ;
154 std::vector< DetLayer::DetWithState > compatible;
155 compatible.reserve(10);
159 while (compatible.size()==0) {
169 inLayer = ( z < 0 ) ? ntidc.front() : ptidc.front() ;
172 inLayer = ( z < 0 ) ? ntecc.front() : ptecc.front() ;
202 if (!
IPfts(muon, cIPFTS))
return;
211 if ( !outer.isValid() ) {
LogDebug(
theCategory) <<
"outer state is not valid. no seed.";
return;}
216 double z = outer.globalPosition().z();
221 LogDebug(
theCategory)<<
"starting looking for a compatible layer from: "<<outer<<
"\nz: "<<z<<
"TEC1 z: "<<ptecc.front()->surface().position().z();
223 unsigned int layerShift=0;
225 if (fabs(z) < ptecc.front()->surface().position().z() ){
226 inLayer = *(blc.rbegin()+layerShift);
229 unsigned int tecIt=1;
230 for (; tecIt!=ptecc.size();tecIt++){
232 <<
"z: "<<ptecc[tecIt]->surface().position().z();
233 if (fabs(z) < ptecc[tecIt]->surface().
position().
z())
234 {inLayer = ( z < 0 ) ? ntecc[tecIt-1] : ptecc[tecIt-1] ;
239 if (!inLayer) {inLayer = ( z < 0 ) ? ntecc.back() : ptecc.back();
245 std::vector< DetLayer::DetWithState > compatible;
246 compatible.reserve(10);
250 while (compatible.size()==0) {
258 if (layerShift>=blc.size()){
259 LogDebug(
theCategory) <<
"all barrel layers are exhausted to find starting state. no seed,";
261 inLayer = *(blc.rbegin()+layerShift);
265 LogDebug(
theCategory) <<
"failed to get a compatible module on a TEC layer, using the last TOB layer.";
266 inLayer = *(blc.rbegin()+layerShift);
271 inLayer = ( z < 0 ) ? ntecc[layerShift] : ptecc[layerShift] ;
293 if (!
IPfts(muon, cIPFTS))
return;
297 if (blc.empty()){
edm::LogError(
theCategory)<<
"want to start from pixel layer, but no barrel exists. trying without pixel.";
316 if ((ppxlc.empty() || npxlc.empty()) && (ptidc.empty() || ptecc.empty()) )
322 std::vector<ForwardDetLayer*>::const_iterator layerIt ;
327 if (fz < fabs(((z>0)?ppxlc:npxlc).
front()->surface().
position().
z())){
328 inLayer = blc.front();}
329 else if (fz < fabs(((z>0)?ppxlc:npxlc).
back()->surface().
position().
z())){
330 layerIt = ((z>0)?ppxlc:npxlc).begin();
332 else if (fz < fabs(((z>0)?ptidc:ntidc).
front()->surface().
position().
z())){
333 layerIt = ((z>0)?ppxlc:npxlc).end()-1;
335 else if (fz < fabs(((z>0)?ptecc:ntecc).
front()->surface().
position().
z())){
336 layerIt = ((z>0)?ptidc:ntidc).begin();
338 else if (fz < fabs(((z>0)?ptecc:ntecc).
back()->surface().
position().
z())){
339 layerIt = ((z>0)?ptecc:ntecc).begin();
347 std::vector< DetLayer::DetWithState > compatible;
348 compatible.reserve(10);
352 if (compatible.size()==0){
353 std::vector<ForwardDetLayer*>::const_iterator pxlEnd = (z>0)? ppxlc.end() : npxlc.end();
354 std::vector<ForwardDetLayer*>::const_iterator tidEnd = (z>0)? ptidc.end() : ntidc.end();
355 std::vector<ForwardDetLayer*>::const_iterator tecEnd = (z>0)? ptecc.end() : ntecc.end();
356 std::vector<ForwardDetLayer*>::const_iterator pxlBegin = (z>0)? ppxlc.begin() : npxlc.begin();
357 std::vector<ForwardDetLayer*>::const_iterator tidBegin = (z>0)? ptidc.begin() : ntidc.begin();
358 std::vector<ForwardDetLayer*>::const_iterator tecBegin = (z>0)? ptecc.begin() : ntecc.begin();
361 if (!dynamic_cast<const ForwardDetLayer*>(inLayer)) layerIt =pxlBegin--;
363 while (compatible.size()==0) {
364 switch ( (*layerIt)->subDetector() ) {
369 if (layerIt==pxlEnd) layerIt=tidBegin;
376 if (layerIt==tidEnd) layerIt = tecBegin;
382 if (layerIt==tecEnd){
407 if (compatible.empty()){
415 for (std::vector<DetLayer::DetWithState >::iterator DWSit = compatible.begin(); DWSit!=compatible.end();++DWSit){
417 const GeomDet * gd = DWSit->first;
423 for (std::vector<TrajectoryMeasurement>::iterator Mit = tmp.begin(); Mit!=tmp.end();++Mit){
431 rhContainer.
push_back( (*trit).get()->clone() ); }}
433 if ( hit->isValid()) {
442 rhContainer.
clear();}
443 rhContainer.
push_back(hit->hit()->clone());
469 LogDebug(
theCategory)<<
"state used to build a bare trajectory seed: \n"<<compatible.front().second
470 <<
"on detector: "<<compatible.front().first->geographicalId().rawId();
477 rhContainer.
push_back( (*trit).get()->clone() ); }}
T getParameter(std::string const &) const
MeasurementDetWithData idToDet(const DetId &id) const
Previous MeasurementDetSystem interface.
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
edm::InputTag theMeasurementTrackerEventTag
void adjust(FreeTrajectoryState &state)
adjust the error matrix on the state
const edm::EventSetup & eventSetup() const
get the whole EventSetup
edm::ESHandle< GeometricSearchTracker > theGeometricSearchTracker
std::pair< const Trajectory *, reco::TrackRef > TrackCand
virtual TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TransientTrackingRecHit &) const =0
size_t recHitsSize() const
Get number of RecHits. (Warning, this includes invalid hits, which are not physical hits)...
bool IPfts(const reco::Track &, FreeTrajectoryState &)
get the FTS for a Track: adjusting the error matrix if requested
edm::ESHandle< MeasurementTracker > theMeasurementTracker
virtual SubDetector subDetector() const =0
The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap)
GlobalPoint globalPosition() const
void makeSeeds_2(const reco::Track &, std::vector< TrajectorySeed > &)
not implemented
edm::ESHandle< MagneticField > magneticField() const
get the magnetic field
static int position[TOTALCHAMBERS][3]
bool theAdjustAtIp
adjust the state at IP or where it is defined for the seed
uint32_t rawId() const
get the raw id
std::vector< TrajectoryMeasurement > fastMeasurements(const TrajectoryStateOnSurface &stateOnThisDet, const TrajectoryStateOnSurface &tsos2, const Propagator &prop, const MeasurementEstimator &est) const
bool notAtIPtsos(TrajectoryStateOnSurface &state)
make the adjustement away from PCA state if requested
Chi2MeasurementEstimator * theChi2Estimator
void setEvent(const edm::Event &event)
set the event: update the MeasurementTracker
DetId geographicalId() const
The label of this GeomDet.
TSGForRoadSearch(const edm::ParameterSet &pset, edm::ConsumesCollector &IC)
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
void makeSeeds_1(const reco::Track &, std::vector< TrajectorySeed > &)
not implemented
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
tuple Chi2MeasurementEstimator
const MuonServiceProxy * theProxyService
const MeasurementTrackerEvent * theMeasurementTrackerEvent
void makeSeeds_3(const reco::Track &, std::vector< TrajectorySeed > &)
outside-in: outermost Strip layer
void makeSeeds_0(const reco::Track &, std::vector< TrajectorySeed > &)
oseed from inside-out: innermost Strip layer
MuonErrorMatrix * theErrorMatrixAdjuster
void pushTrajectorySeed(const reco::Track &muon, std::vector< DetLayer::DetWithState > &compatible, PropagationDirection direction, std::vector< TrajectorySeed > &result) const
add the seed(s) to the collection of seeds
void trackerSeeds(const TrackCand &, const TrackingRegion &, const TrackerTopology *, BTSeedCollection &)
generated seed(s) for a track. the tracking region is not used.
T const * product() const
void init(const MuonServiceProxy *service)
initialize the service
std::string thePropagatorCompatibleName
std::vector< std::vector< double > > tmp
void makeSeeds_4(const reco::Track &, std::vector< TrajectorySeed > &)
inside-out: innermost Pixel/Strip layer
virtual ~TSGForRoadSearch()
char data[epos_bytes_allocation]
std::string thePropagatorName
const PositionType & position() const
TrajectoryStateUpdator * theUpdator
virtual void compatibleDetsV(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetWithState > &result) const
edm::ESHandle< Propagator > propagator(std::string propagatorName) const
get the propagator
trackingRecHit_iterator recHitsEnd() const
Iterator to last hit on the track.