61 if( e.
getByLabel(pixelRecHitsTag, pixelHits)) {
62 pixelHitCollection = pixelHits.
product();
64 edm::LogWarning(
"CosmicTrackFinder") <<
"Collection SiPixelRecHitCollection with InputTag " << pixelRecHitsTag <<
" cannot be found, using empty collection of same type.";
73 e.
getByLabel( matchedrecHitsTag ,matchedrecHits);
77 e.
getByLabel( stereorecHitsTag, stereorecHits);
84 edm::LogVerbatim(
"CosmicTrackFinder") <<
"========== Cosmic Track Finder Info ==========";
85 edm::LogVerbatim(
"CosmicTrackFinder") <<
" Numbers of Seeds " << (*seed).size();
88 std::vector<Trajectory> trajoutput;
110 edm::LogVerbatim(
"CosmicTrackFinder") <<
" Numbers of Temp Trajectories " << trajoutput.size();
112 if(trajoutput.size()>0){
113 std::vector<Trajectory*> tmpTraj;
114 std::vector<Trajectory>::iterator itr;
115 for (itr=trajoutput.begin();itr!=trajoutput.end();itr++)tmpTraj.push_back(&(*itr));
120 if (
geometry==
"MTCC") stable_sort(tmpTraj.begin(),tmpTraj.end(),CompareTrajLay());
121 else stable_sort(tmpTraj.begin(),tmpTraj.end(),CompareTrajChi());
125 const Trajectory theTraj = *(*tmpTraj.begin());
130 LogDebug(
"CosmicTrackFinder")<<
"Reconstruction along momentum ";
132 LogDebug(
"CosmicTrackFinder")<<
"Reconstruction opposite to momentum";
140 theTraj.recHitsV(thits,
true);
145 for (Trajectory::RecHitContainer::const_iterator hitIt = thits.end()-1;
146 hitIt >= thits.begin(); hitIt--) {
147 recHits.
push_back( (**hitIt).hit()->clone());
151 unsigned int firstId;
153 firstState=theTraj.lastMeasurement().updatedState();
154 firstId = theTraj.lastMeasurement().recHit()->geographicalId().rawId();
169 edm::LogWarning(
"CosmicTrackFinder") <<
"invalid innerState, will not make TrackCandidate";
175 edm::LogWarning(
"CosmicTrackFinder") <<
"Mismatch in DetID of first hit: firstID= " <<firstId
T getParameter(std::string const &) const
const LocalTrajectoryParameters & localParameters() const
ROOT::Math::SMatrixIdentity AlgebraicMatrixID
std::vector< TrackCandidate > TrackCandidateCollection
CosmicTrajectoryBuilder cosmicTrajectoryBuilder_
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
const MagneticField * magneticField() const
uint32_t rawId() const
get the raw id
void run(const TrajectorySeedCollection &collseed, const SiStripRecHit2DCollection &collstereo, const SiStripRecHit2DCollection &collrphi, const SiStripMatchedRecHit2DCollection &collmatched, const SiPixelRecHitCollection &collpixel, const edm::EventSetup &es, edm::Event &e, std::vector< Trajectory > &trajoutput)
Runs the algorithm.
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
CRackTrajectoryBuilder crackTrajectoryBuilder_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
ConstRecHitContainer RecHitContainer
void run(const TrajectorySeedCollection &collseed, const SiStripRecHit2DCollection &collstereo, const SiStripRecHit2DCollection &collrphi, const SiStripMatchedRecHit2DCollection &collmatched, const SiPixelRecHitCollection &collpixel, const edm::EventSetup &es, edm::Event &e, std::vector< Trajectory > &trajoutput)
Runs the algorithm.
T const * product() const
const Surface & surface() const
DetId geographicalId() const