28 inputTag_ (iConfig.getParameter<
edm::InputTag>(
"inputTag")),
29 inputMetTag_ (iConfig.getParameter<
edm::InputTag>(
"inputMetTag")),
30 doMuonCorrection_(iConfig.getParameter<
bool> (
"doMuonCorrection" )),
31 min_R_ (iConfig.getParameter<double> (
"minR" )),
32 min_MR_ (iConfig.getParameter<double> (
"minMR" )),
33 DoRPrime_ (iConfig.getParameter<
bool> (
"doRPrime" )),
34 accept_NJ_ (iConfig.getParameter<
bool> (
"acceptNJ" )),
35 R_offset_ ((iConfig.existsAs<double>(
"R2Offset") ? iConfig.getParameter<double>(
"R2Offset"):0)),
36 MR_offset_ ((iConfig.existsAs<double>(
"MROffset") ? iConfig.getParameter<double>(
"MROffset"):0)),
37 R_MR_cut_ ((iConfig.existsAs<double>(
"RMRCut") ? iConfig.getParameter<double>(
"RMRCut"):-999999.))
42 LogDebug(
"") <<
"Inputs/minR/minMR/doRPrime/acceptNJ/R2Offset/MROffset/RMRCut : " 54 produces<reco::METCollection>();
66 desc.
add<
bool>(
"doMuonCorrection",
false);
67 desc.
add<
double>(
"minR",0.3);
68 desc.
add<
double>(
"minMR",100.0);
69 desc.
add<
bool>(
"doRPrime",
false);
70 desc.
add<
bool>(
"acceptNJ",
true);
71 desc.
add<
double>(
"R2Offset",0.0);
72 desc.
add<
double>(
"MROffset",0.0);
73 desc.
add<
double>(
"RMRCut",-999999.0);
74 descriptions.
add(
"hltRFilter",desc);
101 if(hemispheres->empty()){
109 switch(hemispheres->size()){
121 TLorentzVector ja(hemispheres->at(0).x(),hemispheres->at(0).y(),hemispheres->at(0).z(),hemispheres->at(0).t());
122 TLorentzVector jb(hemispheres->at(1).x(),hemispheres->at(1).y(),hemispheres->at(1).z(),hemispheres->at(1).t());
124 std::vector<math::XYZTLorentzVector> muonVec;
126 double MR =
CalcMR(ja,jb);
127 double R =
CalcR(MR,ja,jb,inputMet,muonVec);
139 ja.SetXYZT(hemispheres->at(3).x(),hemispheres->at(3).y(),hemispheres->at(3).z(),hemispheres->at(3).t());
140 jb.SetXYZT(hemispheres->at(4).x(),hemispheres->at(4).y(),hemispheres->at(4).z(),hemispheres->at(4).t());
141 muonVec.push_back(hemispheres->at(2));
144 R =
CalcR(MR,ja,jb,inputMet,muonVec);
158 ja.SetXYZT(hemispheres->at(6).x(),hemispheres->at(6).y(),hemispheres->at(6).z(),hemispheres->at(6).t());
159 jb.SetXYZT(hemispheres->at(7).x(),hemispheres->at(7).y(),hemispheres->at(7).z(),hemispheres->at(7).t());
160 muonVec.push_back(hemispheres->at(5));
163 R =
CalcR(MR,ja,jb,inputMet,muonVec);
170 ja.SetXYZT(hemispheres->at(8).x(),hemispheres->at(8).y(),hemispheres->at(8).z(),hemispheres->at(8).t());
171 jb.SetXYZT(hemispheres->at(9).x(),hemispheres->at(9).y(),hemispheres->at(9).z(),hemispheres->at(9).t());
172 muonVec.push_back(hemispheres->at(2));
175 R =
CalcR(MR,ja,jb,inputMet,muonVec);
196 razorObject->push_back(mrRsq);
211 if(ja.Pt()<=0.1)
return -1;
213 ja.SetPtEtaPhiM(ja.Pt(),ja.Eta(),ja.Phi(),0.0);
214 jb.SetPtEtaPhiM(jb.Pt(),jb.Eta(),jb.Phi(),0.0);
216 if(ja.Pt() > jb.Pt()){
217 TLorentzVector
temp = ja;
227 jaT.SetXYZ(ja.Px(),ja.Py(),0.0);
228 jbT.SetXYZ(jb.Px(),jb.Py(),0.0);
229 double ATBT = (jaT+jbT).Mag2();
231 double MR =
sqrt((A+B)*(A+B)-(az+bz)*(az+bz)-
232 (jbT.Dot(jbT)-jaT.Dot(jaT))*(jbT.Dot(jbT)-jaT.Dot(jaT))/(jaT+jbT).Mag2());
234 double mybeta = (jbT.Dot(jbT)-jaT.Dot(jaT))/
235 sqrt(ATBT*((A+B)*(A+B)-(az+bz)*(az+bz)));
237 double mygamma = 1./
sqrt(1.-mybeta*mybeta);
247 met.SetPtEtaPhi((inputMet->front()).
pt(),0.0,(inputMet->front()).
phi());
249 std::vector<math::XYZTLorentzVector>::const_iterator muonIt;
250 for(muonIt = muons.begin(); muonIt!=muons.end(); muonIt++){
252 tmp.SetPtEtaPhi(muonIt->pt(),0,muonIt->phi());
256 double MTR =
sqrt(0.5*(met.Mag()*(ja.Pt()+jb.Pt()) - met.Dot(ja.Vect()+jb.Vect())));
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
bool hltFilter(edm::Event &, const edm::EventSetup &, trigger::TriggerFilterObjectWithRefs &filterproduct) const override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::vector< reco::MET > METCollection
collection of MET objects
void addObjects(edm::Event &, trigger::TriggerFilterObjectWithRefs &filterproduct, double MR, double Rsq) const
void addObject(int id, const reco::RecoEcalCandidateRef &ref)
setters for L3 collections: (id=physics type, and Ref<C>)
#define DEFINE_FWK_MODULE(type)
static double CalcMR(TLorentzVector ja, TLorentzVector jb)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
static double CalcR(double MR, TLorentzVector ja, TLorentzVector jb, edm::Handle< edm::View< reco::MET > > met, const std::vector< math::XYZTLorentzVector > &muons)
HLTRFilter(const edm::ParameterSet &)
static const std::string B
ParameterDescriptionBase * add(U const &iLabel, T const &value)
const std::string * moduleLabel() const
RefProd< PROD > getRefBeforePut()
static void makeHLTFilterDescription(edm::ParameterSetDescription &desc)
edm::InputTag inputMetTag_
edm::EDGetTokenT< std::vector< math::XYZTLorentzVector > > m_theInputToken
void addCollectionTag(const edm::InputTag &collectionTag)
collectionTags
void add(std::string const &label, ParameterSetDescription const &psetDescription)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
std::vector< std::vector< double > > tmp
edm::EDGetTokenT< edm::View< reco::MET > > m_theMETToken
math::XYZPoint Point
point in the space