80 ProducerTBout::ProducerTBout(
const ParameterSet& iConfig) : iConfig_(iConfig) {
82 const string& branchAcceptedStubs = iConfig.
getParameter<
string>(
"BranchAcceptedStubs");
83 const string& branchAcceptedTracks = iConfig.
getParameter<
string>(
"BranchAcceptedTracks");
84 const string& branchLostStubs = iConfig.
getParameter<
string>(
"BranchLostStubs");
85 const string& branchLostTracks = iConfig.
getParameter<
string>(
"BranchLostTracks");
127 vector<deque<TTTrackRef>> ttTrackRefs(numStreamsTracks);
131 for (
int i = 0;
i < (
int)handleTTTracks->size();
i++) {
140 for (
const Stream& streamTrack : *handleTracks) {
141 const int nTracks = accumulate(
142 streamTrack.begin(), streamTrack.end(), 0, [](
int& sum,
const Frame&
f) {
return sum +=
f.any() ? 1 : 0; });
145 auto limit = streamTrack.end();
151 const deque<TTTrackRef>& ttTracks = ttTrackRefs[
channelId++];
152 if ((
int)ttTracks.size() !=
nTracks) {
157 <<
" tracks found but created " << ttTracks.size() <<
" TTTracks.";
158 exception.addContext(
"trklet::ProducerTBout::produce");
161 auto toFrameTrack = [&nFrame, &ttTracks](
const Frame&
frame) {
166 transform(streamTrack.begin(),
limit, back_inserter(accepted), toFrameTrack);
167 transform(
limit, streamTrack.end(), back_inserter(lost), toFrameTrack);
175 for (
const StreamStub& streamStub : streamsStub) {
176 auto limit = streamStub.end();
void produce(Event &, const EventSetup &) override
EDGetTokenT< StreamsStub > edGetTokenStubs_
std::bitset< TTBV::S_ > Frame
T getParameter(std::string const &) const
std::vector< StreamTrack > StreamsTrack
void beginRun(const Run &, const EventSetup &) override
Class to process and provide run-time constants used by Track Trigger emulators.
std::vector< StreamStub > StreamsStub
EDGetTokenT< TTTracks > edGetTokenTTTracks_
std::vector< FrameStub > StreamStub
EDPutTokenT< StreamsTrack > edPutTokenLostTracks_
ESGetToken< DataFormats, DataFormatsRcd > esGetTokenDataFormats_
int numChannelsTrack() const
EDPutTokenT< StreamsStub > edPutTokenLostStubs_
Class to assign tracklet tracks and stubs to output channel based on their Pt or seed type as well as...
std::vector< FrameTrack > StreamTrack
bool channelId(const TTTrackRef &ttTrackRef, int &channelId)
std::pair< TTTrackRef, Frame > FrameTrack
ESGetToken< ChannelAssignment, ChannelAssignmentRcd > esGetTokenChannelAssignment_
ChannelAssignment * channelAssignment_
bool configurationSupported() const
EDPutTokenT< StreamsTrack > edPutTokenAcceptedTracks_
#define DEFINE_FWK_MODULE(type)
ProcessHistory const & processHistory() const
bool getData(T &iHolder) const
void checkHistory(const edm::ProcessHistory &processHistory) const
std::vector< Frame > Stream
uint8_t channelId(const VFATFrame &frame)
retrieve this channel identifier
EDGetTokenT< Streams > edGetTokenTracks_
ESGetToken< Setup, SetupRcd > esGetTokenSetup_
std::vector< Stream > Streams
Transforms TTTracks and Streams from Tracklet pattern reco. into StreamsTrack by adding to the digiti...
deadvectors [0] push_back({0.0175431, 0.538005, 6.80997, 13.29})
int numChannelsStub() const
const DataFormats * dataFormats_
std::vector< TTTrack< Ref_Phase2TrackerDigi_ > > TTTracks
EDPutTokenT< StreamsStub > edPutTokenAcceptedStubs_
~ProducerTBout() override