Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added tilted and endcap module ring no. to L1TStub #166

Merged
merged 2 commits into from
Jun 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions L1Trigger/TrackFindingTracklet/interface/L1TStub.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ namespace trklet {
int isPSmodule,
int isFlipped,
bool tiltedBarrel,
unsigned int tiltedRingId,
unsigned int endcapRingId,
unsigned int detId,
double x,
double y,
Expand Down Expand Up @@ -96,7 +98,11 @@ namespace trklet {

bool isTilted() const { return tiltedBarrel_; } // Tilted barrel

unsigned int detId() const { return detId_; } // Lower sensor in module
// Tilted module ring no. (Increasing 1 to 12 as |z| increases).
unsigned int tiltedRingId() const { return tiltedRingId_; }
// Endcap disk module ring number (1-15 as r increases).
unsigned int endcapRingId() const { return endcapRingId_; }
unsigned int detId() const { return detId_; } // Of lower sensor in module

bool tpmatch(int tp) const;
bool tpmatch2(int tp) const;
Expand Down Expand Up @@ -128,10 +134,11 @@ namespace trklet {
double pt_;
double bend_;
unsigned int allstubindex_;

unsigned int isPSmodule_;
unsigned int isFlipped_;
bool tiltedBarrel_;
unsigned int tiltedRingId_;
unsigned int endcapRingId_;
unsigned int detId_;
};
}; // namespace trklet
Expand Down
2 changes: 2 additions & 0 deletions L1Trigger/TrackFindingTracklet/interface/SLHCEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ namespace trklet {
int isPSmodule,
int isFlipped,
bool tiltedBarrel,
unsigned int tiltedRingId,
unsigned int endcapRingId,
unsigned int detId,
double x,
double y,
Expand Down
14 changes: 14 additions & 0 deletions L1Trigger/TrackFindingTracklet/plugins/L1FPGATrackProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,18 @@ void L1FPGATrackProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSe
enum TypeBarrel { nonBarrel = 0, tiltedMinus = 1, tiltedPlus = 2, flat = 3 };
const TypeBarrel type = static_cast<TypeBarrel>(tTopo->tobSide(innerDetId));
bool tiltedBarrel = barrel && (type == tiltedMinus || type == tiltedPlus);
unsigned int tiltedRingId = 0;
// Tilted module ring no. (Increasing 1 to 12 as |z| increases).
if (tiltedBarrel) {
tiltedRingId = tTopo->tobRod(innerDetId);
if (type == tiltedMinus) {
unsigned int layp1 = 1 + layerdisk; // Setup counts from 1
unsigned int nTilted = setup_->numTiltedLayerRing(layp1);
tiltedRingId = 1 + nTilted - tiltedRingId;
}
}
// Endcap module ring number (1-15) in endcap disks.
unsigned int endcapRingId = barrel ? 0 : tTopo->tidRing(innerDetId);

const unsigned int intDetId = innerDetId.rawId();

Expand All @@ -593,6 +605,8 @@ void L1FPGATrackProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSe
setup_->psModule(dtcId),
isFlipped,
tiltedBarrel,
tiltedRingId,
endcapRingId,
intDetId,
ttPos.x(),
ttPos.y(),
Expand Down
4 changes: 4 additions & 0 deletions L1Trigger/TrackFindingTracklet/src/L1TStub.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ L1TStub::L1TStub(std::string DTClink,
int isPSmodule,
int isFlipped,
bool tiltedBarrel,
unsigned int tiltedRingId,
unsigned int endcapRingId,
unsigned int detId,
double x,
double y,
Expand Down Expand Up @@ -45,6 +47,8 @@ L1TStub::L1TStub(std::string DTClink,
isPSmodule_ = isPSmodule;
isFlipped_ = isFlipped;
tiltedBarrel_ = tiltedBarrel;
tiltedRingId_ = tiltedRingId;
endcapRingId_ = endcapRingId;
detId_ = detId;

allstubindex_ = 999;
Expand Down
40 changes: 36 additions & 4 deletions L1Trigger/TrackFindingTracklet/src/SLHCEvent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,31 @@ bool SLHCEvent::addStub(string DTClink,
int isPSmodule,
int isFlipped,
bool tiltedBarrel,
unsigned int tiltedRingId,
unsigned int endcapRingId,
unsigned int detId,
double x,
double y,
double z,
double bend,
double strip,
vector<int> tps) {
L1TStub stub(
DTClink, region, layerdisk, stubword, isPSmodule, isFlipped, tiltedBarrel, detId, x, y, z, bend, strip, tps);
L1TStub stub(DTClink,
region,
layerdisk,
stubword,
isPSmodule,
isFlipped,
tiltedBarrel,
tiltedRingId,
endcapRingId,
detId,
x,
y,
z,
bend,
strip,
tps);

stubs_.push_back(stub);
return true;
Expand Down Expand Up @@ -97,6 +113,8 @@ SLHCEvent::SLHCEvent(istream& in) {

// TO FIX: READ THESE FROM INPUT FILE
bool tiltedBarrel = false;
unsigned int tiltedRingId = 999999;
unsigned int endcapRingId = 999999;
unsigned int detId = 999999; // Lower sensor in module

for (unsigned int itps = 0; itps < ntps; itps++) {
Expand All @@ -105,8 +123,22 @@ SLHCEvent::SLHCEvent(istream& in) {
tps.push_back(tp);
}

L1TStub stub(
DTClink, region, layerdisk, stubword, isPSmodule, isFlipped, tiltedBarrel, detId, x, y, z, bend, strip, tps);
L1TStub stub(DTClink,
region,
layerdisk,
stubword,
isPSmodule,
isFlipped,
tiltedBarrel,
tiltedRingId,
endcapRingId,
detId,
x,
y,
z,
bend,
strip,
tps);

in >> tmp;

Expand Down