File indexing completed on 2023-03-17 11:17:13
0001 #include <string>
0002
0003 #include "FWCore/Utilities/interface/Exception.h"
0004
0005 #include "DataFormats/BTauReco/interface/IPTagInfo.h"
0006
0007 #include "RecoBTag/SecondaryVertex/interface/TrackSorting.h"
0008
0009 using namespace reco;
0010
0011 reco::btag::SortCriteria TrackSorting::getCriterium(const std::string &name) {
0012 using namespace reco::btag;
0013 if (name == "sip3dSig")
0014 return IP3DSig;
0015 if (name == "prob3d")
0016 return Prob3D;
0017 if (name == "sip2dSig")
0018 return IP2DSig;
0019 if (name == "prob2d")
0020 return Prob2D;
0021 if (name == "sip2dVal")
0022 return IP2DValue;
0023
0024 throw cms::Exception("InvalidArgument") << "Identifier \"" << name << "\" does not represent a valid "
0025 << "track sorting criterium." << std::endl;
0026 }