27 : inputJetTag_(iConfig.getParameter<
edm::InputTag>(
"inputJetTag")) {
28 produces<std::vector<double>>();
48 std::unique_ptr<std::vector<double>>
result(
new std::vector<double>);
51 std::vector<TLorentzVector> myJets;
52 reco::CaloJetCollection::const_iterator jetIt;
53 for (jetIt = calojet_handle->begin(); jetIt != calojet_handle->end(); jetIt++) {
55 j.SetPtEtaPhiE(jetIt->pt(), jetIt->eta(), jetIt->phi(), jetIt->energy());
62 result->push_back(alphaT);
63 result->push_back(HT);
69 std::vector<double> ETs;
73 for (
unsigned int i = 0;
i < jets.size();
i++) {
74 if (jets[
i].Et() > 50. && fabs(jets[
i].
Eta()) < 2.5)
75 ETs.push_back(jets[
i].Et());
84 float AlphaT =
alphaT(HT, DHT,
MHT.Mag());
92 std::vector<double>
diff(1 << (ETs.size() - 1), 0.);
93 for (
unsigned i = 0;
i < diff.size();
i++)
94 for (
unsigned j = 0; j < ETs.size(); j++)
95 diff[
i] += ETs[j] * (1 - 2 * (
int(
i >> j) & 1));
96 std::vector<double>::const_iterator it;
98 for (it = diff.begin(); it != diff.end(); it++)
105 return 0.5 * (HT - DHT) /
sqrt(HT * HT - MHT * MHT);
110 for (
unsigned int i = 0;
i < jets.size();
i++) {
111 if (jets[
i].Et() > 50. && fabs(jets[
i].
Eta()) < 2.5)
120 for (
unsigned int i = 0;
i < jets.size();
i++) {
121 if (jets[
i].Et() > 50. && fabs(jets[
i].
Eta()) < 2.5)
122 MHT -= jets[
i].Vect();
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
static double CalcMHT(const std::vector< TLorentzVector > &)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
static double alphaT(const double, const double, const double)
edm::InputTag inputJetTag_
double CalcAlphaT(const std::vector< TLorentzVector > &)
AlphaTVarProducer(const edm::ParameterSet &)
#define DEFINE_FWK_MODULE(type)
~AlphaTVarProducer() override
edm::EDGetTokenT< reco::CaloJetCollection > inputJetTagToken_
void produce(edm::Event &, const edm::EventSetup &) override
static double deltaHt(const std::vector< double > &)
static double CalcHT(const std::vector< TLorentzVector > &)