CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/RecoJets/JetProducers/plugins/CATopJetProducer.cc

Go to the documentation of this file.
00001 #include "FWCore/Framework/interface/MakerMacros.h"
00002 #include "CATopJetProducer.h"
00003 
00004 using namespace edm;
00005 using namespace cms;
00006 using namespace reco;
00007 
00008 CATopJetProducer::CATopJetProducer(edm::ParameterSet const& conf):
00009        FastjetJetProducer( conf ),
00010            alg_(src_,
00011        conf.getParameter<bool>  ("verbose"),              
00012        conf.getParameter<int>   ("algorithm"),                  // 0 = KT, 1 = CA, 2 = anti-KT
00013        conf.getParameter<int>   ("useAdjacency"),               // choose adjacency requirement:
00014                                                                                 //  0 = no adjacency
00015                                                                                 //  1 = deltar adjacency 
00016                                                                                 //  2 = modified adjacency
00017                                                                                 //  3 = calotower neirest neigbor based adjacency (untested)
00018        conf.getParameter<double>("centralEtaCut"),              // eta for defining "central" jets
00019        conf.getParameter<double>("jetPtMin"),                   // min jet pt
00020        conf.getParameter<std::vector<double> >("sumEtBins"),    // sumEt bins over which cuts may vary. vector={bin 0 lower bound, bin 1 lower bound, ...} 
00021        conf.getParameter<std::vector<double> >("rBins"),        // Jet distance paramter R. R values depend on sumEt bins.
00022        conf.getParameter<std::vector<double> >("ptFracBins"),   // fraction of hard jet pt that subjet must have (deltap)
00023        conf.getParameter<std::vector<double> >("deltarBins"),   // Applicable only if useAdjacency=1. deltar adjacency values for each sumEtBin
00024        conf.getParameter<std::vector<double> >("nCellBins"),    // Applicable only if useAdjacency=3. number of cells to consider two subjets adjacent
00025        conf.getParameter<double>("inputEtMin"),                 // seed threshold - NOT USED
00026        conf.getParameter<bool>  ("useMaxTower"),                // use max tower as adjacency criterion, otherwise use centroid - NOT USED
00027        conf.getParameter<double>("sumEtEtaCut"),                // eta for event SumEt - NOT USED
00028        conf.getParameter<double>("etFrac")                      // fraction of event sumEt / 2 for a jet to be considered "hard" -NOT USED
00029        )
00030 {}
00031 
00032 void CATopJetProducer::produce(  edm::Event & e, const edm::EventSetup & c ) 
00033 {
00034   FastjetJetProducer::produce(e, c);
00035 }
00036 
00037 void CATopJetProducer::runAlgorithm( edm::Event& iEvent, const edm::EventSetup& iSetup)
00038 {
00039   if ( !doAreaFastjet_ && !doRhoFastjet_) {
00040     fjClusterSeq_ = ClusterSequencePtr( new fastjet::ClusterSequence( fjInputs_, *fjJetDefinition_ ) );
00041   } else if (voronoiRfact_ <= 0) {
00042     fjClusterSeq_ = ClusterSequencePtr( new fastjet::ClusterSequenceArea( fjInputs_, *fjJetDefinition_ , *fjAreaDefinition_ ) );
00043   } else {
00044     fjClusterSeq_ = ClusterSequencePtr( new fastjet::ClusterSequenceVoronoiArea( fjInputs_, *fjJetDefinition_ , fastjet::VoronoiAreaSpec(voronoiRfact_) ) );
00045   }
00046 
00047   alg_.run( fjInputs_, fjJets_, fjClusterSeq_ );
00048 
00049 }
00050 
00051   
00052 //define this as a plug-in
00053 DEFINE_FWK_MODULE(CATopJetProducer);