@@ -95,6 +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
99+ double dth[3 ] = {0.0 , 0.15 , 0.3 };
100+ double dthl[3 ] = {0.1 , 0.05 , 0 };
101+
98102private:
99103 void produce (edm::Event&, const edm::EventSetup&) override ;
100104
@@ -212,8 +216,15 @@ void DeepCoreSeedGenerator::produce(edm::Event& iEvent, const edm::EventSetup& i
212216 const reco::Vertex& jetVertex = vertices[0 ];
213217
214218 std::vector<GlobalVector> splitClustDirSet =
215- splittedClusterDirections (jet, tTopo, pixelCPE, jetVertex, 1 , inputPixelClusters_);
216- bool l2off = (splitClustDirSet.empty ());
219+ splittedClusterDirections (jet, tTopo, pixelCPE, jetVertex, 2 , inputPixelClusters_);
220+ bool l2off = (splitClustDirSet.empty ()); // no adc BPIX2
221+ splitClustDirSet = splittedClusterDirections (jet, tTopo, pixelCPE, jetVertex, 3 , inputPixelClusters_);
222+ bool l134off = (splitClustDirSet.empty ()); // no adc BPIX1 or BPIX3 or BPIX4
223+ splitClustDirSet = splittedClusterDirections (jet, tTopo, pixelCPE, jetVertex, 4 , inputPixelClusters_);
224+ l134off = (splitClustDirSet.empty () && l134off);
225+ splitClustDirSet = splittedClusterDirections (jet, tTopo, pixelCPE, jetVertex, 1 , inputPixelClusters_);
226+ l134off = (splitClustDirSet.empty () && l134off);
227+
217228 if (splitClustDirSet.empty ()) { // if layer 1 is broken find direcitons on layer 2
218229 splitClustDirSet = splittedClusterDirections (jet, tTopo, pixelCPE, jetVertex, 2 , inputPixelClusters_);
219230 }
@@ -296,7 +307,8 @@ void DeepCoreSeedGenerator::produce(edm::Event& iEvent, const edm::EventSetup& i
296307 for (int i = 0 ; i < jetDimX; i++) {
297308 for (int j = 0 ; j < jetDimY; j++) {
298309 for (int o = 0 ; o < Nover; o++) {
299- if (seedParamNN.second [i][j][o] > (probThr_ - o * 0.1 - (l2off ? 0.35 : 0 ))) {
310+ if (seedParamNN.second [i][j][o] >
311+ (probThr_ + dth[o] + (l2off ? 0.3 : 0 ) + (l134off ? dthl[o] : 0 ))) { // DeepCore 2.2.1 Threshold
300312 std::pair<bool , Basic3DVector<float >> interPair =
301313 findIntersection (bigClustDir, (reco::Candidate::Point)jetVertex.position (), globDet);
302314 auto localInter = globDet->specificSurface ().toLocal ((GlobalPoint)interPair.second );
@@ -319,8 +331,7 @@ void DeepCoreSeedGenerator::produce(edm::Event& iEvent, const edm::EventSetup& i
319331 double track_theta = 2 * std::atan (std::exp (-track_eta));
320332 double track_phi =
321333 seedParamNN.first [i][j][o][3 ] * 0.01 + bigClustDir.phi (); // pay attention to this 0.01
322-
323- double pt = 1 . / seedParamNN.first [i][j][o][4 ];
334+ double pt = seedParamNN.first [i][j][o][4 ];
324335 double normdirR = pt / sin (track_theta);
325336
326337 const GlobalVector globSeedDir (
@@ -545,17 +556,17 @@ void DeepCoreSeedGenerator::fillDescriptions(edm::ConfigurationDescriptions& des
545556 desc.add <edm::InputTag>(" vertices" , edm::InputTag (" offlinePrimaryVertices" ));
546557 desc.add <edm::InputTag>(" pixelClusters" , edm::InputTag (" siPixelClustersPreSplitting" ));
547558 desc.add <edm::InputTag>(" cores" , edm::InputTag (" jetsForCoreTracking" ));
548- desc.add <double >(" ptMin" , 100 );
549- 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
550561 desc.add <double >(" chargeFractionMin" , 18000.0 );
551562 desc.add <double >(" centralMIPCharge" , 2 );
552563 desc.add <std::string>(" pixelCPE" , " PixelCPEGeneric" );
553564 desc.add <edm::FileInPath>(
554565 " weightFile" ,
555- edm::FileInPath (" RecoTracker/TkSeedGenerator/data/DeepCore/DeepCoreSeedGenerator_TrainedModel_barrel_2017 .pb" ));
566+ edm::FileInPath (" RecoTracker/TkSeedGenerator/data/DeepCore/DeepCoreSeedGenerator_TrainedModel_barrel_2023 .pb" ));
556567 desc.add <std::vector<std::string>>(" inputTensorName" , {" input_1" , " input_2" , " input_3" });
557568 desc.add <std::vector<std::string>>(" outputTensorName" , {" output_node0" , " output_node1" });
558- desc.add <double >(" probThr" , 0.85 );
569+ desc.add <double >(" probThr" , 0.7 ); // DeepCore 2.2.1 baseline threshold
559570 descriptions.add (" deepCoreSeedGenerator" , desc);
560571}
561572
0 commit comments