Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix output format of MET covariance matrix in MET significance code #7852

Merged
merged 2 commits into from
Feb 20, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
31 changes: 8 additions & 23 deletions RecoMET/METProducers/src/METSignificanceProducer.cc
Expand Up @@ -30,12 +30,8 @@ namespace cms
metSigAlgo_ = new metsig::METSignificance(iConfig);

produces<double>("METSignificance");
//produces<reco::METCovMatrix>("METCovarianceMatrix");
produces<double>("CovarianceMatrix00");
produces<double>("CovarianceMatrix01");
produces<double>("CovarianceMatrix10");
produces<double>("CovarianceMatrix11");

produces<math::Error<2>::type>("METCovariance");

}

//____________________________________________________________________________||
Expand Down Expand Up @@ -83,26 +79,15 @@ namespace cms

std::auto_ptr<double> significance (new double);
(*significance) = sig;

std::auto_ptr<double> sigmatrix_00 (new double);
(*sigmatrix_00) = cov(0,0);
std::auto_ptr<double> sigmatrix_01 (new double);
(*sigmatrix_01) = cov(1,0);
std::auto_ptr<double> sigmatrix_10 (new double);
(*sigmatrix_10) = cov(0,1);
std::auto_ptr<double> sigmatrix_11 (new double);
(*sigmatrix_11) = cov(1,1);

//std::auto_ptr<reco::METCovMatrix> outputCov(new reco::METCovMatrix);
//(*outputCov) = cov;
std::auto_ptr<math::Error<2>::type> covPtr(new math::Error<2>::type());
(*covPtr)(0,0) = cov(0,0);
(*covPtr)(1,0) = cov(1,0);
(*covPtr)(1,1) = cov(1,1);

event.put( covPtr, "METCovariance" );
event.put( significance, "METSignificance" );
event.put( sigmatrix_00, "CovarianceMatrix00" );
event.put( sigmatrix_01, "CovarianceMatrix01" );
event.put( sigmatrix_10, "CovarianceMatrix10" );
event.put( sigmatrix_11, "CovarianceMatrix11" );
//event.put( outputCov, "CovarianceMatrix" );


}

//____________________________________________________________________________||
Expand Down