26 #include "CLHEP/Random/RandGauss.h"
52 smearedPVsigmaX_ = iConfig.
getParameter<
double>(
"smearedPVsigmaX");
53 smearedPVsigmaY_ = iConfig.
getParameter<
double>(
"smearedPVsigmaY");
54 smearedPVsigmaZ_ = iConfig.
getParameter<
double>(
"smearedPVsigmaZ");
57 produces<CaloTauCollection>();
58 produces<DetIdCollection>();
61 delete CaloRecoTauAlgo_;
71 CaloRecoTauAlgo_->setTransientTrackBuilder(myTransientTrackBuilder.
product());
75 CaloRecoTauAlgo_->setMagneticField(myMF.
product());
82 if(vertCollection.size()) thePV=*(vertCollection.begin());
85 SimPVError(0,0)=smearedPVsigmaX_*smearedPVsigmaX_;
86 SimPVError(1,1)=smearedPVsigmaY_*smearedPVsigmaY_;
87 SimPVError(2,2)=smearedPVsigmaZ_*smearedPVsigmaZ_;
88 Vertex::Point SimPVPoint(CLHEP::RandGauss::shoot(0.,smearedPVsigmaX_),
89 CLHEP::RandGauss::shoot(0.,smearedPVsigmaY_),
90 CLHEP::RandGauss::shoot(0.,smearedPVsigmaZ_));
91 thePV=
Vertex(SimPVPoint,SimPVError,1,1,1);
95 iEvent.
getByLabel(CaloRecoTauTagInfoProducer_,theCaloTauTagInfoCollection);
97 for(CaloTauTagInfoCollection::const_iterator i_info=theCaloTauTagInfoCollection->begin();i_info!=theCaloTauTagInfoCollection->end();i_info++) {
98 if(i_info->jetRef()->pt()>JetMinPt_){
100 resultCaloTau->push_back(myCaloTau);
104 for(
unsigned int i =0;
i<CaloRecoTauAlgo_->mySelectedDetId_.size();
i++)
105 selectedDetIds->push_back(CaloRecoTauAlgo_->mySelectedDetId_[
i]);
108 iEvent.
put(resultCaloTau);
109 iEvent.
put(selectedDetIds);
T getParameter(std::string const &) const
CaloRecoTauProducer(const edm::ParameterSet &iConfig)
#define DEFINE_FWK_MODULE(type)
math::Error< dimension >::type Error
covariance error matrix (3x3)
std::vector< Vertex > VertexCollection
collection of Vertex objects
CaloRecoTauAlgorithm * CaloRecoTauAlgo_
std::vector< CaloTau > CaloTauCollection
collection of CaloTau objects
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
edm::InputTag CaloRecoTauTagInfoProducer_
math::XYZPoint Point
point in the space
virtual void produce(edm::Event &, const edm::EventSetup &) override
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
T const * product() const
edm::InputTag PVProducer_
T const * product() const