26 #include "CLHEP/Random/RandGauss.h"
56 smearedPVsigmaX_ = iConfig.
getParameter<
double>(
"smearedPVsigmaX");
57 smearedPVsigmaY_ = iConfig.
getParameter<
double>(
"smearedPVsigmaY");
58 smearedPVsigmaZ_ = iConfig.
getParameter<
double>(
"smearedPVsigmaZ");
61 if(Algorithm_ ==
"ConeBased") {
64 else if(Algorithm_ ==
"HPS") {
74 produces<PFTauCollection>();
77 delete PFRecoTauAlgo_;
85 PFRecoTauAlgo_->setTransientTrackBuilder(myTransientTrackBuilder.
product());
102 if(vertCollection.size()) thePV=*(vertCollection.begin());
105 SimPVError(0,0)=smearedPVsigmaX_*smearedPVsigmaX_;
106 SimPVError(1,1)=smearedPVsigmaY_*smearedPVsigmaY_;
107 SimPVError(2,2)=smearedPVsigmaZ_*smearedPVsigmaZ_;
108 Vertex::Point SimPVPoint(CLHEP::RandGauss::shoot(0.,smearedPVsigmaX_),
109 CLHEP::RandGauss::shoot(0.,smearedPVsigmaY_),
110 CLHEP::RandGauss::shoot(0.,smearedPVsigmaZ_));
111 thePV=
Vertex(SimPVPoint,SimPVError,1,1,1);
115 iEvent.
getByToken(PFTauTagInfoProducer_,thePFTauTagInfoCollection);
117 for(PFTauTagInfoCollection::const_iterator i_info=thePFTauTagInfoCollection->begin();i_info!=thePFTauTagInfoCollection->end();i_info++) {
118 if((*i_info).pfjetRef()->pt()>JetMinPt_){
121 resultPFTau->push_back(myPFTau);
125 iEvent.
put(resultPFTau);
T getParameter(std::string const &) const
std::vector< PFTau > PFTauCollection
collection of PFTau objects
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
PFRecoTauProducer(const edm::ParameterSet &iConfig)
math::Error< dimension >::type Error
covariance error matrix (3x3)
std::vector< Vertex > VertexCollection
collection of Vertex objects
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
math::XYZPoint Point
point in the space
virtual void produce(edm::Event &, const edm::EventSetup &) override
T const * product() const
T const * product() const
edm::InputTag ElectronPreIDProducer_
PFRecoTauAlgorithmBase * PFRecoTauAlgo_
edm::EDGetTokenT< PFTauTagInfoCollection > PFTauTagInfoProducer_
edm::EDGetTokenT< VertexCollection > PVProducer_