Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:33:39

0001 #ifndef ImpactParameter_TemplatedNegativeTrackCountingComputer_h
0002 #define ImpactParameter_TemplatedNegativeTrackCountingComputer_h
0003 
0004 #include "RecoBTag/ImpactParameter/interface/TemplatedTrackCountingComputer.h"
0005 
0006 template <class Container, class Base>
0007 class TemplatedNegativeTrackCountingComputer : public TemplatedTrackCountingComputer<Container, Base> {
0008 public:
0009   TemplatedNegativeTrackCountingComputer(const edm::ParameterSet& parameters)
0010       : TemplatedTrackCountingComputer<Container, Base>(parameters) {}
0011 
0012   float discriminator(const JetTagComputer::TagInfoHelper& ti) const override {
0013     const typename TemplatedTrackCountingComputer<Container, Base>::TagInfo& tkip =
0014         ti.get<typename TemplatedTrackCountingComputer<Container, Base>::TagInfo>();
0015     std::multiset<float> significances = this->orderedSignificances(tkip);
0016     std::multiset<float>::iterator nth = significances.begin();
0017     for (int i = 0; i < this->m_nthTrack - 1 && nth != significances.end(); i++)
0018       nth++;
0019     if (nth != significances.end())
0020       return -(*nth);
0021     else
0022       return -100.;
0023   }
0024 };
0025 
0026 #endif  // ImpactParameter_TemplatedNegativeTrackCountingComputer_h