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_;
81 auto resultPFTau = std::make_unique<PFTauCollection>();
85 PFRecoTauAlgo_->setTransientTrackBuilder(myTransientTrackBuilder.product());
102 if(!vertCollection.empty()) 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);
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
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
math::XYZPoint Point
point in the space
void produce(edm::Event &, const edm::EventSetup &) override
T const * product() const
edm::InputTag ElectronPreIDProducer_
PFRecoTauAlgorithmBase * PFRecoTauAlgo_
edm::EDGetTokenT< PFTauTagInfoCollection > PFTauTagInfoProducer_
~PFRecoTauProducer() override
edm::EDGetTokenT< VertexCollection > PVProducer_