27 inputJetTag_ (iConfig.getParameter<edm::InputTag>(
"inputJetTag")){
29 produces<std::vector<double> >();
52 std::auto_ptr<std::vector<double> >
result(
new std::vector<double>);
54 if (calojet_handle.isValid()){
55 std::vector<TLorentzVector> myJets;
56 reco::CaloJetCollection::const_iterator jetIt;
57 for(jetIt = calojet_handle->begin(); jetIt != calojet_handle->end(); jetIt++){
58 TLorentzVector
j; j.SetPtEtaPhiE(jetIt->pt(),jetIt->eta(), jetIt->phi(), jetIt->energy());
65 result->push_back(alphaT);
66 result->push_back(HT);
73 std::vector<double> ETs;
77 for(
unsigned int i = 0;
i < jets.size();
i++){
78 if(jets[
i].Et() > 50. && fabs(jets[
i].
Eta()) < 2.5) ETs.push_back(jets[
i].Et());
81 if(ETs.size() < 2.)
return 0.0;
82 if(ETs.size() > 16.)
return 0.0;
92 if(ETs.size() > 16.)
return 9999999;
93 std::vector<double>
diff( 1<<(ETs.size()-1) , 0. );
94 for(
unsigned i=0;
i < diff.size();
i++)
95 for(
unsigned j=0;
j < ETs.size();
j++)
96 diff[
i] += ETs[
j] * ( 1 - 2 * (
int(
i>>
j)&1) ) ;
97 std::vector<double>::const_iterator it;
99 for(it = diff.begin(); it !=diff.end(); it++)
if(*it<min) min = *it;
104 return 0.5 * ( HT - DHT ) /
sqrt( HT*HT - MHT*MHT );
111 for(
unsigned int i = 0;
i < jets.size();
i++){
112 if(jets[
i].Et() > 50. && fabs(jets[
i].
Eta()) < 2.5) HT += jets[
i].Et();
121 for(
unsigned int i = 0;
i < jets.size();
i++){
122 if(jets[
i].Et() > 50. && fabs(jets[
i].
Eta()) < 2.5) MHT -= jets[
i].Vect();
double CalcAlphaT(std::vector< TLorentzVector >)
static double CalcMHT(const std::vector< TLorentzVector >)
#define DEFINE_FWK_MODULE(type)
static double alphaT(const double, const double, const double)
edm::InputTag inputJetTag_
AlphaTVarProducer(const edm::ParameterSet &)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual void produce(edm::Event &, const edm::EventSetup &)
static double deltaHt(const std::vector< double > &)
static double CalcHT(const std::vector< TLorentzVector >)