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 produces<CaloTauCollection>();
62 produces<DetIdCollection>();
65 delete CaloRecoTauAlgo_;
70 auto resultCaloTau = std::make_unique<CaloTauCollection>();
71 auto selectedDetIds = std::make_unique<DetIdCollection>();
75 CaloRecoTauAlgo_->setTransientTrackBuilder(myTransientTrackBuilder.product());
79 CaloRecoTauAlgo_->setMagneticField(myMF.
product());
86 if(!vertCollection.empty()) thePV=*(vertCollection.begin());
89 SimPVError(0,0)=smearedPVsigmaX_*smearedPVsigmaX_;
90 SimPVError(1,1)=smearedPVsigmaY_*smearedPVsigmaY_;
91 SimPVError(2,2)=smearedPVsigmaZ_*smearedPVsigmaZ_;
92 Vertex::Point SimPVPoint(CLHEP::RandGauss::shoot(0.,smearedPVsigmaX_),
93 CLHEP::RandGauss::shoot(0.,smearedPVsigmaY_),
94 CLHEP::RandGauss::shoot(0.,smearedPVsigmaZ_));
95 thePV=
Vertex(SimPVPoint,SimPVError,1,1,1);
99 iEvent.
getByLabel(CaloRecoTauTagInfoProducer_,theCaloTauTagInfoCollection);
101 for(CaloTauTagInfoCollection::const_iterator i_info=theCaloTauTagInfoCollection->begin();i_info!=theCaloTauTagInfoCollection->end();i_info++) {
102 if(i_info->jetRef()->pt()>JetMinPt_){
104 resultCaloTau->push_back(myCaloTau);
108 for(
unsigned int i =0;
i<CaloRecoTauAlgo_->mySelectedDetId_.size();
i++)
109 selectedDetIds->push_back(CaloRecoTauAlgo_->mySelectedDetId_[
i]);
120 desc.
add<
double>(
"LeadTrack_minPt", 0.5);
121 desc.
add<
double>(
"MatchingConeSize_min", 0.0);
126 desc.
add<
double>(
"IsolationTrack_minPt", 1.0);
127 desc.
add<
double>(
"ECALSignalConeSize_min", 0.0);
128 desc.
add<
double>(
"ECALRecHit_minEt", 0.5);
132 desc.
add<
double>(
"TrackerIsolConeSize_min", 0.0);
133 desc.
add<
double>(
"TrackerIsolConeSize_max", 0.6);
134 desc.
add<
double>(
"TrackerSignalConeSize_max", 0.6);
137 desc.
add<
double>(
"TrackerSignalConeSize_min", 0.0);
138 desc.
add<
double>(
"ECALIsolConeSize_max", 0.6);
139 desc.
add<
double>(
"AreaMetric_recoElements_maxabsEta", 2.5);
142 desc.
add<
double>(
"JetPtMin", 0.0);
144 desc.
add<
unsigned int>(
"IsolationTrack_minHits", 0);
146 desc.
add<
double>(
"TrackLeadTrack_maxDZ", 1.0);
147 desc.
add<
double>(
"Track_minPt", 0.5);
149 desc.
add<
double>(
"ECALSignalConeSize_max", 0.6);
150 desc.
add<
double>(
"ECALIsolConeSize_min", 0.0);
151 desc.
add<
bool>(
"UseTrackLeadTrackDZconstraint",
true);
152 desc.
add<
double>(
"smearedPVsigmaY", 0.0015);
153 desc.
add<
double>(
"smearedPVsigmaX", 0.0015);
154 desc.
add<
double>(
"smearedPVsigmaZ", 0.005);
156 desc.
add<
double>(
"MatchingConeSize_max", 0.6);
157 descriptions.
add(
"caloRecoTauProducer", desc);
T getParameter(std::string const &) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
CaloRecoTauProducer(const edm::ParameterSet &iConfig)
~CaloRecoTauProducer() override
math::Error< dimension >::type Error
covariance error matrix (3x3)
std::vector< Vertex > VertexCollection
collection of Vertex objects
CaloRecoTauAlgorithm * CaloRecoTauAlgo_
#define DEFINE_FWK_MODULE(type)
edm::InputTag CaloRecoTauTagInfoProducer_
math::XYZPoint Point
point in the space
void produce(edm::Event &, const edm::EventSetup &) override
ParameterDescriptionBase * add(U const &iLabel, T const &value)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
T const * product() const
edm::InputTag PVProducer_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
T const * product() const