Go to the documentation of this file.00001 #include "RecoVertex/ConfigurableVertexReco/interface/ConfigurableAdaptiveReconstructor.h"
00002 #include "RecoVertex/AdaptiveVertexFinder/interface/AdaptiveVertexReconstructor.h"
00003
00004 using namespace std;
00005
00006 namespace {
00007 edm::ParameterSet mydefaults()
00008 {
00009 edm::ParameterSet ret;
00010 ret.addParameter<double>("primcut",2.0);
00011 ret.addParameter<double>("primT",256.0);
00012 ret.addParameter<double>("primr",0.25);
00013 ret.addParameter<double>("seccut",6.0);
00014 ret.addParameter<double>("secT",256.0);
00015 ret.addParameter<double>("secr",0.25);
00016 ret.addParameter<double>("minweight",0.5);
00017 ret.addParameter<double>("weightthreshold",0.001 );
00018 ret.addParameter<bool>("smoothing",false );
00019 return ret;
00020 }
00021 }
00022
00023 ConfigurableAdaptiveReconstructor::ConfigurableAdaptiveReconstructor() :
00024 theRector( new AdaptiveVertexReconstructor() )
00025 {}
00026
00027 void ConfigurableAdaptiveReconstructor::configure(
00028 const edm::ParameterSet & n )
00029 {
00030 edm::ParameterSet m=n;
00031 m.augment ( mydefaults() );
00032 if ( theRector ) delete theRector;
00033 theRector = new AdaptiveVertexReconstructor( m );
00034 }
00035
00036 ConfigurableAdaptiveReconstructor::~ConfigurableAdaptiveReconstructor()
00037 {
00038 if ( theRector ) delete theRector;
00039 }
00040
00041 ConfigurableAdaptiveReconstructor::ConfigurableAdaptiveReconstructor
00042 ( const ConfigurableAdaptiveReconstructor & o ) :
00043 theRector ( o.theRector->clone() )
00044 {}
00045
00046
00047 ConfigurableAdaptiveReconstructor * ConfigurableAdaptiveReconstructor::clone() const
00048 {
00049 return new ConfigurableAdaptiveReconstructor ( *this );
00050 }
00051
00052 vector < TransientVertex > ConfigurableAdaptiveReconstructor::vertices (
00053 const std::vector < reco::TransientTrack > & t ) const
00054 {
00055 return theRector->vertices ( t );
00056 }
00057
00058 vector < TransientVertex > ConfigurableAdaptiveReconstructor::vertices (
00059 const std::vector < reco::TransientTrack > & t,
00060 const reco::BeamSpot & s ) const
00061 {
00062 return theRector->vertices ( t, s );
00063 }
00064
00065 vector < TransientVertex > ConfigurableAdaptiveReconstructor::vertices (
00066 const std::vector < reco::TransientTrack > & prims,
00067 const std::vector < reco::TransientTrack > & secs,
00068 const reco::BeamSpot & s ) const
00069 {
00070 return theRector->vertices ( prims, secs, s );
00071 }
00072
00073
00074
00075 edm::ParameterSet ConfigurableAdaptiveReconstructor::defaults() const
00076 {
00077 return mydefaults();
00078 }
00079
00080 #include "RecoVertex/ConfigurableVertexReco/interface/ConfRecoBuilder.h"
00081
00082 namespace {
00083 ConfRecoBuilder < ConfigurableAdaptiveReconstructor > t
00084 ( "avr", "Adaptive Vertex Reconstructor [ = Iterative avf]" );
00085
00086 }