Skip to content

Commit

Permalink
rebase with tschuh_TrackBuilder and code format
Browse files Browse the repository at this point in the history
  • Loading branch information
tschuh committed Nov 4, 2021
1 parent 2969ff5 commit cdd14a2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
11 changes: 5 additions & 6 deletions L1Trigger/TrackFindingTracklet/test/ProducerIRin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ namespace trackFindingTracklet {
vector<int> channelEncoding_;
};

ProducerIRin::ProducerIRin(const ParameterSet& iConfig) :
iConfig_(iConfig)
{
ProducerIRin::ProducerIRin(const ParameterSet& iConfig) : iConfig_(iConfig) {
const InputTag& inputTag = iConfig.getParameter<InputTag>("InputTagDTC");
const string& branchStubs = iConfig.getParameter<string>("BranchAcceptedStubs");
// book in- and output ED products
Expand Down Expand Up @@ -90,7 +88,8 @@ namespace trackFindingTracklet {
if (setup_->configurationSupported()) {
Handle<TTDTC> handleTTDTC;
iEvent.getByToken<TTDTC>(edGetTokenTTDTC_, handleTTDTC);
const int numChannel = summerChain_ ? channelEncoding_.size() : handleTTDTC->tfpRegions().size() * handleTTDTC->tfpChannels().size();
const int numChannel =
summerChain_ ? channelEncoding_.size() : handleTTDTC->tfpRegions().size() * handleTTDTC->tfpChannels().size();
streamStubs.reserve(numChannel);
for (int tfpRegion : handleTTDTC->tfpRegions())
for (int tfpChannel : summerChain_ ? channelEncoding_ : handleTTDTC->tfpChannels())
Expand All @@ -100,6 +99,6 @@ namespace trackFindingTracklet {
iEvent.emplace(edPutTokenStubs_, move(streamStubs));
}

} // namespace trackFindingTracklet
} // namespace trackFindingTracklet

DEFINE_FWK_MODULE(trackFindingTracklet::ProducerIRin);
DEFINE_FWK_MODULE(trackFindingTracklet::ProducerIRin);
13 changes: 6 additions & 7 deletions L1Trigger/TrackFindingTracklet/test/ProducerTBout.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,7 @@ namespace trackFindingTracklet {
trklet::Settings settings_;
};

ProducerTBout::ProducerTBout(const ParameterSet& iConfig) :
iConfig_(iConfig)
{
ProducerTBout::ProducerTBout(const ParameterSet& iConfig) : iConfig_(iConfig) {
const InputTag& inputTag = iConfig.getParameter<InputTag>("InputTag");
const InputTag& inputTagDTC = iConfig.getParameter<InputTag>("InputTagDTC");
const string& branchAcceptedStubs = iConfig.getParameter<string>("BranchAcceptedStubs");
Expand Down Expand Up @@ -193,7 +191,7 @@ namespace trackFindingTracklet {
const bool valid = trackBuilderChannel_->channelId(ttTrackRef, channelId);
const bool truncate = enableTruncation_ && (int)streamAcceptedTracks[channelId].size() > setup_->numFrames();
StreamTrack& tracks = truncate ? streamLostTracks[channelId] : streamAcceptedTracks[channelId];
if (!valid && !truncate) { // fill gap
if (!valid && !truncate) { // fill gap
tracks.emplace_back(FrameTrack());
for (int projection = 0; projection < trackBuilderChannel_->maxNumProjectionLayers(); projection++) {
const int channelStub = channelId * trackBuilderChannel_->maxNumProjectionLayers() + projection;
Expand Down Expand Up @@ -245,7 +243,8 @@ namespace trackFindingTracklet {
static const double baseTanL = settings_.kz() / settings_.kr() * pow(2, settings_.t_shift());
// sub words
// phi0 w.r.t. processing region border in rad
double phi0 = deltaPhi(ttTrackRef->phi() - ttTrackRef->phiSector() * setup_->baseRegion() + setup_->hybridRangePhi() / 2.);
double phi0 =
deltaPhi(ttTrackRef->phi() - ttTrackRef->phiSector() * setup_->baseRegion() + setup_->hybridRangePhi() / 2.);
if (phi0 < 0.)
phi0 += 2. * M_PI;
const TTBV hwValid(1, 1);
Expand Down Expand Up @@ -290,6 +289,6 @@ namespace trackFindingTracklet {
return hw.bs();
}

} // namespace trackFindingTracklet
} // namespace trackFindingTracklet

DEFINE_FWK_MODULE(trackFindingTracklet::ProducerTBout);
DEFINE_FWK_MODULE(trackFindingTracklet::ProducerTBout);

0 comments on commit cdd14a2

Please sign in to comment.