19 #include "TLorentzVector.h"
31 inputTag_ (iConfig.getParameter<edm::InputTag>(
"inputTag")),
32 min_Jet_Pt_ (iConfig.getParameter<double> (
"minJetPt" )),
33 max_Eta_ (iConfig.getParameter<double> (
"maxEta" )),
34 max_NJ_ (iConfig.getParameter<int> (
"maxNJ" )),
35 accNJJets_ (iConfig.getParameter<bool> (
"acceptNJ" ))
37 LogDebug(
"") <<
"Input/minJetPt/maxEta/maxNJ/acceptNJ : "
45 produces<std::vector<math::XYZTLorentzVector> >();
56 desc.
add<
double>(
"minJetPt",30.0);
57 desc.
add<
double>(
"maxEta",3.0);
58 desc.
add<
int>(
"maxNJ",7);
59 desc.
add<
bool>(
"acceptNJ",
true);
60 descriptions.
add(
"hltRHemisphere",desc);
81 std::auto_ptr<vector<math::XYZTLorentzVector> > Hemispheres(
new vector<math::XYZTLorentzVector> );
86 CaloJetCollection::const_iterator
i (
jets->begin() );
87 for (
unsigned int i=0;
i<
jets->size();
i++) {
89 JETS.push_back(
jets->at(
i));
99 iEvent.
put(Hemispheres);
103 for(
unsigned int i = 0;
i < JETS.size();
i++){
108 double M_min = 9999999999.0;
109 double dHT_min = 99999999.0;
111 for(
int i=0;
i<N_comb;
i++){
117 if(itemp/j_count == 1){
118 j_temp1 += JETS.at(count).p4();
120 j_temp2 += JETS.at(count).p4();
122 itemp -= j_count*(itemp/j_count);
126 double M_temp = j_temp1.M2()+j_temp2.M2();
132 double dHT_temp = fabs(j_temp1.E()-j_temp2.E());
133 if(dHT_temp < dHT_min){
138 Hemispheres->push_back(j1);
139 Hemispheres->push_back(j2);
141 iEvent.
put(Hemispheres);
#define DEFINE_FWK_MODULE(type)
HLTRHemisphere(const edm::ParameterSet &)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
ParameterDescriptionBase * add(U const &iLabel, T const &value)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
virtual bool filter(edm::Event &, const edm::EventSetup &)
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects