27 const Settings* settings,
28 StubWindowSuggest* stubWindowSuggest,
29 const DegradeBend* degradeBend,
32 const list<TrackerModule>& listTrackerModule,
39 enableMCtruth_(settings->enableMCtruth()) {
45 iEvent.getByToken(stubToken, ttStubHandle);
47 iEvent.getByToken(tpToken, tpHandle);
48 iEvent.getByToken(stubTruthToken, mcTruthTTStubHandle);
49 iEvent.getByToken(clusterTruthToken, mcTruthTTClusterHandle);
56 unsigned int tpCount = 0;
57 for (
unsigned int i = 0;
i < tpHandle->size();
i++) {
60 constexpr
float ptMinScale = 0.7;
61 const float ptMin =
min(settings->genMinPt(), ptMinScale * settings->houghMinPt());
65 TP tp(tpPtr, tpCount, settings);
69 tp.fillNearestJetInfo(genJetHandle.
product());
81 map<edm::Ptr<TrackingParticle>,
const TP*> translateTP;
84 for (
const TP&
tp : vTPs_) {
86 translateTP[tpPtr] = &
tp;
92 std::unique_ptr<const StubKiller> stubKiller;
94 stubKiller = std::make_unique<StubKiller>(killOpt, trackerTopology, trackerGeometry,
iEvent);
99 for (
const TrackerModule& trackerModule : listTrackerModule) {
100 const DetId& stackedDetId = trackerModule.stackedDetId();
102 if (p_module != ttStubHandle->
end()) {
105 const unsigned int stubIndex = vAllStubs_.size();
108 vAllStubs_.emplace_back(
109 ttStubRef, stubIndex, settings, trackerTopology, &trackerModule, degradeBend, stubKiller.get());
112 if (enableMCtruth_) {
113 Stub& stub = vAllStubs_.back();
114 stub.fillTruth(translateTP, mcTruthTTStubHandle, mcTruthTTClusterHandle);
122 for (Stub&
s : vAllStubs_) {
123 if (
s.frontendPass()) {
124 vStubs_.push_back(&
s);
125 vStubsConst_.push_back(&
s);
129 if (settings->orderStubsByBend()) {
130 auto orderStubsByBend = [](
const Stub*
a,
const Stub*
b) {
return (
std::abs(
a->bend()) <
std::abs(
b->bend())); };
131 vStubs_.sort(orderStubsByBend);
138 if (enableMCtruth_) {
139 for (
TP&
tp : vTPs_) {
140 tp.fillTruth(vAllStubs_);
145 if (settings->printStubWindows()) {
146 for (
const Stub&
s : vAllStubs_) {
147 stubWindowSuggest->process(trackerTopology, &
s);
edm::Ref< typename HandleT::element_type, typename HandleT::element_type::value_type::value_type > makeRefTo(const HandleT &iHandle, typename HandleT::element_type::value_type::const_iterator itIter)
T const * product() const
data_type const * const_iterator
const_iterator end(bool update=false) const
Abs< T >::type abs(const T &t)
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
=== This is the base class for the linearised chi-squared track fit algorithms.
const_iterator find(id_type i, bool update=false) const
Monte Carlo truth information used for tracking validation.
double pt() const
Transverse momentum. Note this is taken from the first SimTrack only.