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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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 << 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 << std::endl; | ||||||
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.
Suggested change
|
||||||
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 << std::endl; | ||||||
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.
Suggested change
|
||||||
} | ||||||
|
||||||
if (L2muonEta < 0.0) { | ||||||
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.
Suggested change
What should happen in the case 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. It can enter the first, but I think It doesn't really matter. |
||||||
layerCount = 0; | ||||||
for (auto it = tecNegative.rbegin(); it != tecNegative.rend(); ++it) { | ||||||
LogTrace("TSGForOIFromL2") << "TSGForOIFromL2::produce: looping in TEC- layer " << layerCount << std::endl; | ||||||
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.
Suggested change
|
||||||
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 << std::endl; | ||||||
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.
Suggested change
|
||||||
} | ||||||
} | ||||||
|
||||||
for (std::vector<TrajectorySeed>::iterator it = out.begin(); it != out.end(); ++it) { | ||||||
result->push_back(*it); | ||||||
} | ||||||
|
@@ -425,7 +517,7 @@ void TSGForOIFromL2::makeSeedsFromHits(const GeometricSearchDet& layer, | |||||
hitSeedsMade++; | ||||||
if (found == numOfHitsToTry_) | ||||||
break; | ||||||
if (hitSeedsMade > maxHitSeeds_) | ||||||
if (hitSeedsMade > maxHitSeeds_) // | ||||||
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.
Suggested change
|
||||||
return; | ||||||
} | ||||||
|
||||||
|
@@ -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); | ||||||
} | ||||||
|
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.