Skip to content

Commit c12018b

Browse files
Updating comments formatting
1 parent 6ce519c commit c12018b

File tree

1 file changed

+11
-26
lines changed

1 file changed

+11
-26
lines changed

RecoTracker/TkSeedGenerator/plugins/DeepCoreSeedGenerator.cc

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,10 @@ class DeepCoreSeedGenerator : public edm::stream::EDProducer<edm::GlobalCache<te
9595
static constexpr int Nover = 3; //Max number of tracks recorded per pixel
9696
static constexpr int Npar = 5; //Number of track parameter
9797

98-
// DeepCore 2.2.1 thresholds delta
98+
// DeepCore 2.2.1 thresholds delta
9999
double dth[3] = {0.0, 0.15, 0.3};
100100
double dthl[3] = {0.1, 0.05, 0};
101101

102-
103102
private:
104103
void produce(edm::Event&, const edm::EventSetup&) override;
105104

@@ -215,25 +214,17 @@ void DeepCoreSeedGenerator::produce(edm::Event& iEvent, const edm::EventSetup& i
215214
if (jet.pt() > ptMin_) {
216215
std::set<unsigned long long int> ids;
217216
const reco::Vertex& jetVertex = vertices[0];
218-
// DeepCore 1.0:
219-
/*
217+
220218
std::vector<GlobalVector> splitClustDirSet =
221-
splittedClusterDirections(jet, tTopo, pixelCPE, jetVertex, 1, inputPixelClusters_);
222-
bool l2off = (splitClustDirSet.empty());
223-
224-
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
225-
// DeepCore 2.2.1 Threshold checks:
226-
*/
227-
std::vector<GlobalVector> splitClustDirSet = splittedClusterDirections(jet, tTopo, pixelCPE, jetVertex, 2, inputPixelClusters_);
228-
bool l2off = (splitClustDirSet.empty()); // no adc BPIX2
219+
splittedClusterDirections(jet, tTopo, pixelCPE, jetVertex, 2, inputPixelClusters_);
220+
bool l2off = (splitClustDirSet.empty()); // no adc BPIX2
229221
splitClustDirSet = splittedClusterDirections(jet, tTopo, pixelCPE, jetVertex, 3, inputPixelClusters_);
230-
bool l134off = (splitClustDirSet.empty()); // no adc BPIX1 or BPIX3 or BPIX4
222+
bool l134off = (splitClustDirSet.empty()); // no adc BPIX1 or BPIX3 or BPIX4
231223
splitClustDirSet = splittedClusterDirections(jet, tTopo, pixelCPE, jetVertex, 4, inputPixelClusters_);
232224
l134off = (splitClustDirSet.empty() && l134off);
233225
splitClustDirSet = splittedClusterDirections(jet, tTopo, pixelCPE, jetVertex, 1, inputPixelClusters_);
234226
l134off = (splitClustDirSet.empty() && l134off);
235227

236-
237228
if (splitClustDirSet.empty()) { //if layer 1 is broken find direcitons on layer 2
238229
splitClustDirSet = splittedClusterDirections(jet, tTopo, pixelCPE, jetVertex, 2, inputPixelClusters_);
239230
}
@@ -316,8 +307,8 @@ void DeepCoreSeedGenerator::produce(edm::Event& iEvent, const edm::EventSetup& i
316307
for (int i = 0; i < jetDimX; i++) {
317308
for (int j = 0; j < jetDimY; j++) {
318309
for (int o = 0; o < Nover; o++) {
319-
// if (seedParamNN.second[i][j][o] > (probThr_ - o * 0.1 - (l2off ? 0.35 : 0))) { // DeepCore 1.0 Threshold
320-
if (seedParamNN.second[i][j][o] > (probThr_ + dth[o] + (l2off ? 0.3 : 0) + (l134off ? dthl[o] : 0))) { // DeepCore 2.2.1 Threshold
310+
if (seedParamNN.second[i][j][o] >
311+
(probThr_ + dth[o] + (l2off ? 0.3 : 0) + (l134off ? dthl[o] : 0))) { // DeepCore 2.2.1 Threshold
321312
std::pair<bool, Basic3DVector<float>> interPair =
322313
findIntersection(bigClustDir, (reco::Candidate::Point)jetVertex.position(), globDet);
323314
auto localInter = globDet->specificSurface().toLocal((GlobalPoint)interPair.second);
@@ -340,8 +331,6 @@ void DeepCoreSeedGenerator::produce(edm::Event& iEvent, const edm::EventSetup& i
340331
double track_theta = 2 * std::atan(std::exp(-track_eta));
341332
double track_phi =
342333
seedParamNN.first[i][j][o][3] * 0.01 + bigClustDir.phi(); //pay attention to this 0.01
343-
// DeepCore 1.0 predicts 1/pt instead of pt, while DeepCore 2.2.1 directly predicts pt
344-
// double pt = 1. / seedParamNN.first[i][j][o][4];
345334
double pt = seedParamNN.first[i][j][o][4];
346335
double normdirR = pt / sin(track_theta);
347336

@@ -567,21 +556,17 @@ void DeepCoreSeedGenerator::fillDescriptions(edm::ConfigurationDescriptions& des
567556
desc.add<edm::InputTag>("vertices", edm::InputTag("offlinePrimaryVertices"));
568557
desc.add<edm::InputTag>("pixelClusters", edm::InputTag("siPixelClustersPreSplitting"));
569558
desc.add<edm::InputTag>("cores", edm::InputTag("jetsForCoreTracking"));
570-
desc.add<double>("ptMin", 100);
571-
desc.add<double>("deltaR", 0.25); // the current training makes use of 0.1
559+
desc.add<double>("ptMin", 100); // the current training uses 500 GeV
560+
desc.add<double>("deltaR", 0.25); // the current training uses 0.1
572561
desc.add<double>("chargeFractionMin", 18000.0);
573562
desc.add<double>("centralMIPCharge", 2);
574563
desc.add<std::string>("pixelCPE", "PixelCPEGeneric");
575564
desc.add<edm::FileInPath>(
576565
"weightFile",
577-
// DeepCore 1.0
578-
// edm::FileInPath("RecoTracker/TkSeedGenerator/data/DeepCore/DeepCoreSeedGenerator_TrainedModel_barrel_2017.pb"));
579-
// DeepCore 2.2.1
580-
edm::FileInPath("RecoTracker/TkSeedGenerator/data/DeepCore/DeepCoreSeedGenerator_TrainedModel_barrel_2023.pb"));
566+
edm::FileInPath("RecoTracker/TkSeedGenerator/data/DeepCore/DeepCoreSeedGenerator_TrainedModel_barrel_2023.pb"));
581567
desc.add<std::vector<std::string>>("inputTensorName", {"input_1", "input_2", "input_3"});
582568
desc.add<std::vector<std::string>>("outputTensorName", {"output_node0", "output_node1"});
583-
// desc.add<double>("probThr", 0.85); // DeepCore 1.0
584-
desc.add<double>("probThr", 0.7); // DeepCore 2.2.1 Threshold
569+
desc.add<double>("probThr", 0.7); // DeepCore 2.2.1 baseline threshold
585570
descriptions.add("deepCoreSeedGenerator", desc);
586571
}
587572

0 commit comments

Comments
 (0)