.....
63 edm::LogWarning(
"CosmicTrackFinder") <<
"Collection SiPixelRecHitCollection with InputTag " <<
l.module
64 <<
" cannot be found, using empty collection of same type.";
77 auto output = std::make_unique<TrackCandidateCollection>();
79 edm::LogVerbatim(
"CosmicTrackFinder") <<
"========== Cosmic Track Finder Info ==========";
80 edm::LogVerbatim(
"CosmicTrackFinder") <<
" Numbers of Seeds " << (*seed).size();
81 if (!(*seed).empty()) {
82 std::vector<Trajectory> trajoutput;
97 edm::LogVerbatim(
"CosmicTrackFinder") <<
" Numbers of Temp Trajectories " << trajoutput.size();
99 if (!trajoutput.empty()) {
101 std::vector<Trajectory*> tmpTraj;
102 std::vector<Trajectory>::iterator itr;
103 for (itr = trajoutput.begin(); itr != trajoutput.end(); itr++)
104 tmpTraj.push_back(&(*itr));
110 stable_sort(tmpTraj.begin(), tmpTraj.end(), CompareTrajLay());
112 stable_sort(tmpTraj.begin(), tmpTraj.end(), CompareTrajChi());
116 const Trajectory theTraj = *(*tmpTraj.begin());
117 bool seedplus = (theTraj.seed().direction() ==
alongMomentum);
120 LogDebug(
"CosmicTrackFinder") <<
"Reconstruction " << (seedplus ?
"along" :
"opposite to") <<
" momentum";
128 std::cout <<
"cosmic: along momentum... " << std::endl;
146 unsigned int firstId;
149 firstState = theTraj.lastMeasurement().updatedState();
150 firstId = theTraj.lastMeasurement().recHitR().rawId();
165 edm::LogWarning(
"CosmicTrackFinder") <<
"invalid innerState, will not make TrackCandidate";
171 if (firstId !=
recHits.front().rawId()) {
172 edm::LogWarning(
"CosmicTrackFinder") <<
"Mismatch in DetID of first hit: firstID= " << firstId
173 <<
" DetId= " <<
recHits.front().geographicalId().rawId();
Log< level::Info, true > LogVerbatim
edm::EDGetTokenT< SiStripRecHit2DCollection > stereorecHitsToken_
ROOT::Math::SMatrixIdentity AlgebraicMatrixID
const TransientTrackingRecHitBuilder * hitBuilder() const
CosmicTrajectoryBuilder cosmicTrajectoryBuilder_
const LocalTrajectoryParameters & localParameters() const
const SurfaceType & surface() const
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.
CRackTrajectoryBuilder crackTrajectoryBuilder_
edm::EDGetTokenT< SiPixelRecHitCollection > pixelRecHitsToken_
edm::EDGetTokenT< TrajectorySeedCollection > seedToken_
edm::EDGetTokenT< SiStripMatchedRecHit2DCollection > matchedrecHitsToken_
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.
edm::EDGetTokenT< SiStripRecHit2DCollection > rphirecHitsToken_
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
const MagneticField * magneticField() const
Log< level::Warning, false > LogWarning
const TransientTrackingRecHitBuilder * hitBuilder() const