27 inputJetTag_ (iConfig.getParameter<edm::
InputTag>(
"inputJetTag")){
29 produces<std::vector<double> >();
55 std::auto_ptr<std::vector<double> >
result(
new std::vector<double>);
57 if (calojet_handle.isValid()){
58 std::vector<TLorentzVector> myJets;
59 reco::CaloJetCollection::const_iterator jetIt;
60 for(jetIt = calojet_handle->begin(); jetIt != calojet_handle->end(); jetIt++){
61 TLorentzVector
j; j.SetPtEtaPhiE(jetIt->pt(),jetIt->eta(), jetIt->phi(), jetIt->energy());
68 result->push_back(alphaT);
69 result->push_back(HT);
76 std::vector<double> ETs;
77 TVector3 MHT{
CalcMHT(jets),0.0,0.0};
80 for(
unsigned int i = 0;
i < jets.size();
i++){
81 if(jets[
i].Et() > 50. && fabs(jets[
i].
Eta()) < 2.5) ETs.push_back(jets[
i].Et());
84 if(ETs.size() < 2.)
return 0.0;
85 if(ETs.size() > 16.)
return 0.0;
95 if(ETs.size() > 16.)
return 9999999;
96 std::vector<double>
diff( 1<<(ETs.size()-1) , 0. );
97 for(
unsigned i=0;
i < diff.size();
i++)
98 for(
unsigned j=0;
j < ETs.size();
j++)
99 diff[
i] += ETs[
j] * ( 1 - 2 * (
int(
i>>
j)&1) ) ;
100 std::vector<double>::const_iterator it;
102 for(it = diff.begin(); it !=diff.end(); it++)
if(*it<min) min = *it;
107 return 0.5 * ( HT - DHT ) /
sqrt( HT*HT - MHT*MHT );
114 for(
unsigned int i = 0;
i < jets.size();
i++){
115 if(jets[
i].Et() > 50. && fabs(jets[
i].
Eta()) < 2.5) HT += jets[
i].Et();
124 for(
unsigned int i = 0;
i < jets.size();
i++){
125 if(jets[
i].Et() > 50. && fabs(jets[
i].
Eta()) < 2.5) MHT -= jets[
i].Vect();
T getParameter(std::string const &) const
static double CalcMHT(const std::vector< TLorentzVector > &)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
static double alphaT(const double, const double, const double)
edm::InputTag inputJetTag_
double CalcAlphaT(const std::vector< TLorentzVector > &)
AlphaTVarProducer(const edm::ParameterSet &)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< reco::CaloJetCollection > inputJetTagToken_
virtual void produce(edm::Event &, const edm::EventSetup &)
static double deltaHt(const std::vector< double > &)
static double CalcHT(const std::vector< TLorentzVector > &)