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
Implemented new strategy to generate OI seeds for displaced muons #38076
Merged
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,8 +47,11 @@ TSGForOIFromL2::TSGForOIFromL2(const edm::ParameterSet& iConfig) | |
SF4_(iConfig.getParameter<double>("SF4")), | ||
SF5_(iConfig.getParameter<double>("SF5")), | ||
SF6_(iConfig.getParameter<double>("SF6")), | ||
SFHld_(iConfig.getParameter<double>("SFHld")), | ||
SFHd_(iConfig.getParameter<double>("SFHd")), | ||
tsosDiff1_(iConfig.getParameter<double>("tsosDiff1")), | ||
tsosDiff2_(iConfig.getParameter<double>("tsosDiff2")), | ||
displacedReco_(iConfig.getParameter<bool>("displacedReco")), | ||
propagatorName_(iConfig.getParameter<std::string>("propagatorName")), | ||
theCategory_(std::string("Muon|RecoMuon|TSGForOIFromL2")), | ||
estimatorToken_(esConsumes(edm::ESInputTag("", estimatorName_))), | ||
|
@@ -72,6 +75,7 @@ void TSGForOIFromL2::produce(edm::StreamID sid, edm::Event& iEvent, const edm::E | |
unsigned int hitlessSeedsMadeIP = 0; | ||
unsigned int hitlessSeedsMadeMuS = 0; | ||
unsigned int hitSeedsMade = 0; | ||
unsigned int hitSeedsMadeMuS = 0; | ||
|
||
// Surface used to make a TSOS at the PCA to the beamline | ||
Plane::PlanePointer dummyPlane = Plane::build(Plane::PositionType(), Plane::RotationType()); | ||
|
@@ -167,6 +171,7 @@ void TSGForOIFromL2::produce(edm::StreamID sid, edm::Event& iEvent, const edm::E | |
hitlessSeedsMadeIP = 0; | ||
hitlessSeedsMadeMuS = 0; | ||
hitSeedsMade = 0; | ||
hitSeedsMadeMuS = 0; | ||
|
||
// calculate scale factors | ||
double errorSFHits = (adjustErrorsDynamicallyForHits_ ? calculateSFFromL2(l2) : fixedErrorRescalingForHits_); | ||
|
@@ -201,7 +206,7 @@ void TSGForOIFromL2::produce(edm::StreamID sid, edm::Event& iEvent, const edm::E | |
layerCount, | ||
out); | ||
|
||
if (useBoth) { | ||
if (useBoth && !displacedReco_) { | ||
if (useHitLessSeeds_ && hitlessSeedsMadeMuS < maxHitlessSeeds_ && numSeedsMade < maxSeeds_) | ||
makeSeedsWithoutHits(**it, | ||
outerTkStateOutside, | ||
|
@@ -218,7 +223,7 @@ void TSGForOIFromL2::produce(edm::StreamID sid, edm::Event& iEvent, const edm::E | |
} | ||
|
||
// Reset number of seeds if in overlap region | ||
if (absL2muonEta > minEtaForTEC_ && absL2muonEta < maxEtaForTOB_) { | ||
if (absL2muonEta > minEtaForTEC_ && absL2muonEta < maxEtaForTOB_ && !displacedReco_) { | ||
numSeedsMade = 0; | ||
hitlessSeedsMadeIP = 0; | ||
hitlessSeedsMadeMuS = 0; | ||
|
@@ -252,7 +257,7 @@ void TSGForOIFromL2::produce(edm::StreamID sid, edm::Event& iEvent, const edm::E | |
layerCount, | ||
out); | ||
|
||
if (useBoth) { | ||
if (useBoth && !displacedReco_) { | ||
if (useHitLessSeeds_ && hitlessSeedsMadeMuS < maxHitlessSeeds_ && numSeedsMade < maxSeeds_) | ||
makeSeedsWithoutHits(**it, | ||
outerTkStateOutside, | ||
|
@@ -295,7 +300,7 @@ void TSGForOIFromL2::produce(edm::StreamID sid, edm::Event& iEvent, const edm::E | |
layerCount, | ||
out); | ||
|
||
if (useBoth) { | ||
if (useBoth && !displacedReco_) { | ||
if (useHitLessSeeds_ && hitlessSeedsMadeMuS < maxHitlessSeeds_ && numSeedsMade < maxSeeds_) | ||
makeSeedsWithoutHits(**it, | ||
outerTkStateOutside, | ||
|
@@ -311,6 +316,93 @@ void TSGForOIFromL2::produce(edm::StreamID sid, edm::Event& iEvent, const edm::E | |
<< " , layerCount = " << layerCount << std::endl; | ||
} | ||
|
||
// Displaced Reconstruction | ||
if (displacedReco_ && outerTkStateOutside.isValid()) { | ||
layerCount = 0; | ||
for (auto it = tob.rbegin(); it != tob.rend(); ++it) { | ||
LogTrace("TSGForOIFromL2") << "TSGForOIFromL2::produce: looping in TOB layer " << layerCount; | ||
if (useHitLessSeeds_ && hitlessSeedsMadeMuS < maxHitlessSeeds_ && numSeedsMade < maxSeeds_) | ||
makeSeedsWithoutHits(**it, | ||
outerTkStateOutside, | ||
*(propagatorOpposite.get()), | ||
estimatorH, | ||
errorSFHitless * SFHld_, | ||
hitlessSeedsMadeMuS, | ||
numSeedsMade, | ||
out); | ||
if (hitSeedsMadeMuS < maxHitSeeds_ && numSeedsMade < maxSeeds_) | ||
makeSeedsFromHits(**it, | ||
outerTkStateOutside, | ||
*(propagatorOpposite.get()), | ||
estimatorH, | ||
measurementTrackerH, | ||
errorSFHits * SFHd_, | ||
hitSeedsMadeMuS, | ||
numSeedsMade, | ||
layerCount, | ||
out); | ||
} | ||
LogTrace("TSGForOIFromL2") << "TSGForOIFromL2:::produce: NumSeedsMade = " << numSeedsMade | ||
<< " , layerCount = " << layerCount; | ||
if (L2muonEta >= 0.0) { | ||
layerCount = 0; | ||
for (auto it = tecPositive.rbegin(); it != tecPositive.rend(); ++it) { | ||
LogTrace("TSGForOIFromL2") << "TSGForOIFromL2::produce: looping in TEC+ layer " << layerCount << std::endl; | ||
if (useHitLessSeeds_ && hitlessSeedsMadeMuS < maxHitlessSeeds_ && numSeedsMade < maxSeeds_) | ||
makeSeedsWithoutHits(**it, | ||
outerTkStateOutside, | ||
*(propagatorOpposite.get()), | ||
estimatorH, | ||
errorSFHitless * SFHld_, | ||
hitlessSeedsMadeMuS, | ||
numSeedsMade, | ||
out); | ||
if (hitSeedsMadeMuS < maxHitSeeds_ && numSeedsMade < maxSeeds_) | ||
makeSeedsFromHits(**it, | ||
outerTkStateOutside, | ||
*(propagatorOpposite.get()), | ||
estimatorH, | ||
measurementTrackerH, | ||
errorSFHits * SFHd_, | ||
hitSeedsMadeMuS, | ||
numSeedsMade, | ||
layerCount, | ||
out); | ||
} | ||
LogTrace("TSGForOIFromL2") << "TSGForOIFromL2:::produce: NumSeedsMade = " << numSeedsMade | ||
<< " , layerCount = " << layerCount; | ||
} | ||
|
||
else if (L2muonEta < 0.0) { | ||
layerCount = 0; | ||
for (auto it = tecNegative.rbegin(); it != tecNegative.rend(); ++it) { | ||
LogTrace("TSGForOIFromL2") << "TSGForOIFromL2::produce: looping in TEC- layer " << layerCount; | ||
if (useHitLessSeeds_ && hitlessSeedsMadeMuS < maxHitlessSeeds_ && numSeedsMade < maxSeeds_) | ||
makeSeedsWithoutHits(**it, | ||
outerTkStateOutside, | ||
*(propagatorOpposite.get()), | ||
estimatorH, | ||
errorSFHitless * SFHld_, | ||
hitlessSeedsMadeMuS, | ||
numSeedsMade, | ||
out); | ||
if (hitSeedsMadeMuS < maxHitSeeds_ && numSeedsMade < maxSeeds_) | ||
makeSeedsFromHits(**it, | ||
outerTkStateOutside, | ||
*(propagatorOpposite.get()), | ||
estimatorH, | ||
measurementTrackerH, | ||
errorSFHits * SFHd_, | ||
hitSeedsMadeMuS, | ||
numSeedsMade, | ||
layerCount, | ||
out); | ||
} | ||
LogTrace("TSGForOIFromL2") << "TSGForOIFromL2:::produce: NumSeedsMade = " << numSeedsMade | ||
<< " , layerCount = " << layerCount; | ||
} | ||
} | ||
|
||
for (std::vector<TrajectorySeed>::iterator it = out.begin(); it != out.end(); ++it) { | ||
result->push_back(*it); | ||
} | ||
|
@@ -541,8 +633,11 @@ void TSGForOIFromL2::fillDescriptions(edm::ConfigurationDescriptions& descriptio | |
desc.add<double>("SF4", 7.0); | ||
desc.add<double>("SF5", 10.0); | ||
desc.add<double>("SF6", 2.0); | ||
desc.add<double>("SFHld", 2.0); | ||
desc.add<double>("SFHd", 4.0); | ||
desc.add<double>("tsosDiff1", 0.2); | ||
desc.add<double>("tsosDiff2", 0.02); | ||
desc.add<bool>("displacedReco", false); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add
|
||
desc.add<std::string>("propagatorName", "PropagatorWithMaterialParabolicMf"); | ||
descriptions.add("TSGForOIFromL2", desc); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.