CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
SUSY_HLT_Razor Class Reference

#include <SUSY_HLT_Razor.h>

Inheritance diagram for SUSY_HLT_Razor:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Member Functions

 SUSY_HLT_Razor (const edm::ParameterSet &ps)
 
 ~SUSY_HLT_Razor () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static double CalcMR (TLorentzVector ja, TLorentzVector jb)
 
static double CalcR (double MR, TLorentzVector ja, TLorentzVector jb, edm::Handle< edm::View< reco::MET >> met, const std::vector< math::XYZTLorentzVector > &muons)
 
static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 

Protected Member Functions

void analyze (edm::Event const &e, edm::EventSetup const &eSetup) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 

Private Member Functions

void bookHistos (DQMStore::IBooker &)
 

Private Attributes

edm::InputTag caloFilter_
 
MonitorElementh_calo_mr_vs_mr
 
MonitorElementh_calo_rsq_vs_rsq
 
MonitorElementh_ht
 
MonitorElementh_htMet
 
MonitorElementh_met
 
MonitorElementh_mr
 
MonitorElementh_mr_tight
 
MonitorElementh_mrRsq
 
MonitorElementh_online_mr_vs_mr
 
MonitorElementh_online_rsq_vs_rsq
 
MonitorElementh_rsq
 
MonitorElementh_rsq_loose
 
MonitorElementh_rsq_tight
 
edm::EDGetTokenT< std::vector< math::XYZTLorentzVector > > theHemispheres_
 
edm::EDGetTokenT< edm::View< reco::Jet > > theJetCollection_
 
edm::EDGetTokenT< edm::View< reco::MET > > theMETCollection_
 
edm::EDGetTokenT< trigger::TriggerEventtheTrigSummary_
 
edm::InputTag triggerFilter_
 
std::string triggerPath_
 
edm::EDGetTokenT< edm::TriggerResultstriggerResults_
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 36 of file SUSY_HLT_Razor.h.

Constructor & Destructor Documentation

◆ SUSY_HLT_Razor()

SUSY_HLT_Razor::SUSY_HLT_Razor ( const edm::ParameterSet ps)

Definition at line 8 of file SUSY_HLT_Razor.cc.

References caloFilter_, edm::ParameterSet::getParameter(), AlCaHLTBitMon_QueryRunRegistry::string, theHemispheres_, theJetCollection_, theMETCollection_, theTrigSummary_, triggerFilter_, triggerPath_, and triggerResults_.

8  {
9  edm::LogInfo("SUSY_HLT_Razor") << "Constructor SUSY_HLT_Razor::SUSY_HLT_Razor " << std::endl;
10  // Get parameters from configuration file
11  theTrigSummary_ = consumes<trigger::TriggerEvent>(ps.getParameter<edm::InputTag>("trigSummary"));
12  theMETCollection_ = consumes<edm::View<reco::MET>>(ps.getParameter<edm::InputTag>("METCollection"));
13  theHemispheres_ = consumes<std::vector<math::XYZTLorentzVector>>(ps.getParameter<edm::InputTag>("hemispheres"));
14  triggerResults_ = consumes<edm::TriggerResults>(ps.getParameter<edm::InputTag>("TriggerResults"));
15  triggerPath_ = ps.getParameter<std::string>("TriggerPath");
16  triggerFilter_ = ps.getParameter<edm::InputTag>("TriggerFilter");
17  caloFilter_ = ps.getParameter<edm::InputTag>("CaloFilter");
18  theJetCollection_ = consumes<edm::View<reco::Jet>>(ps.getParameter<edm::InputTag>("jetCollection"));
19 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_
std::string triggerPath_
edm::EDGetTokenT< edm::View< reco::MET > > theMETCollection_
edm::InputTag caloFilter_
Log< level::Info, false > LogInfo
edm::EDGetTokenT< std::vector< math::XYZTLorentzVector > > theHemispheres_
edm::EDGetTokenT< edm::View< reco::Jet > > theJetCollection_
edm::InputTag triggerFilter_
edm::EDGetTokenT< edm::TriggerResults > triggerResults_

◆ ~SUSY_HLT_Razor()

SUSY_HLT_Razor::~SUSY_HLT_Razor ( )
override

Definition at line 21 of file SUSY_HLT_Razor.cc.

21  {
22  edm::LogInfo("SUSY_HLT_Razor") << "Destructor SUSY_HLT_Razor::~SUSY_HLT_Razor " << std::endl;
23 }
Log< level::Info, false > LogInfo

Member Function Documentation

◆ analyze()

void SUSY_HLT_Razor::analyze ( edm::Event const &  e,
edm::EventSetup const &  eSetup 
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 47 of file SUSY_HLT_Razor.cc.

References funct::abs(), CalcMR(), CalcR(), caloFilter_, MillePedeFileConverter_cfg::e, dqm::impl::MonitorElement::Fill(), h_calo_mr_vs_mr, h_calo_rsq_vs_rsq, h_ht, h_htMet, h_met, h_mr, h_mr_tight, h_mrRsq, h_online_mr_vs_mr, h_online_rsq_vs_rsq, h_rsq, h_rsq_loose, h_rsq_tight, razorHemispheres_cff::hemispheres, HLTBitAnalyser_cfi::hltresults, mps_fire::i, trigger::TriggerObject::id(), edm::HandleBase::isValid(), dqmiolumiharvest::j, jetfilter_cfi::jetCollection, relativeConstraints::keys, DiDispStaMuonMonitor_cfi::pt, trigger::TriggerObject::px(), trigger::TriggerObject::py(), dttmaxenums::R, theHemispheres_, theJetCollection_, theMETCollection_, theTrigSummary_, triggerFilter_, triggerMatchMonitor_cfi::triggerObjects, triggerPath_, triggerResults_, HLTMuonOfflineAnalyzer_cfi::triggerSummary, and trigNames.

47  {
48  edm::LogInfo("SUSY_HLT_Razor") << "SUSY_HLT_Razor::analyze" << std::endl;
49 
50  using namespace std;
51  using namespace edm;
52  using namespace reco;
53 
54  // get hold of collection of objects
56  e.getByToken(theHemispheres_, hemispheres);
57  // get hold of the MET Collection
59  e.getByToken(theMETCollection_, inputMet);
60  if (!inputMet.isValid()) {
61  edm::LogError("SUSY_HLT_Razor") << "invalid collection: MET"
62  << "\n";
63  return;
64  }
65  // edm::Handle<reco::PFJetCollection> jetCollection;
67  e.getByToken(theJetCollection_, jetCollection);
68  if (!jetCollection.isValid()) {
69  edm::LogError("SUSY_HLT_Razor") << "invalid collection: jets"
70  << "\n";
71  return;
72  }
73 
74  // check what is in the menu
76  e.getByToken(triggerResults_, hltresults);
77  if (!hltresults.isValid()) {
78  edm::LogError("SUSY_HLT_Razor") << "invalid collection: TriggerResults"
79  << "\n";
80  return;
81  }
82 
83  //-------------------------------
84  //--- Trigger
85  //-------------------------------
87  e.getByToken(theTrigSummary_, triggerSummary);
88  if (!triggerSummary.isValid()) {
89  edm::LogError("SUSY_HLT_Razor") << "invalid collection: TriggerSummary"
90  << "\n";
91  return;
92  }
93  // get online objects
94  // HLTriggerOffline/Egamma/python/TriggerTypeDefs.py contains the trigger
95  // object IDs
96  double onlineMR = 0, onlineRsq = 0;
97  double caloMR = 0,
98  caloRsq = 0; // online razor variables computed using calo quantities
99  size_t filterIndex = triggerSummary->filterIndex(triggerFilter_);
100  size_t caloFilterIndex = triggerSummary->filterIndex(caloFilter_);
101  // search for online MR and Rsq objects
103  if (!(filterIndex >= triggerSummary->sizeFilters())) {
104  const trigger::Keys &keys = triggerSummary->filterKeys(filterIndex);
105  for (size_t j = 0; j < keys.size(); ++j) {
107  if (foundObject.id() == 0) { // the MET object containing MR and Rsq will show up with ID = 0
108  onlineMR = foundObject.px(); // razor variables stored in dummy reco::MET objects
109  onlineRsq = foundObject.py();
110  }
111  }
112  }
113 
114  // search for calo MR and Rsq objects
115  if (!(caloFilterIndex >= triggerSummary->sizeFilters())) {
116  const trigger::Keys &keys = triggerSummary->filterKeys(caloFilterIndex);
117  for (size_t j = 0; j < keys.size(); ++j) {
119  if (foundObject.id() == 0) {
120  caloMR = foundObject.px(); // razor variables stored in dummy reco::MET objects
121  caloRsq = foundObject.py();
122  }
123  }
124  }
125 
126  bool hasFired = false;
127  const edm::TriggerNames &trigNames = e.triggerNames(*hltresults);
128  unsigned int numTriggers = trigNames.size();
129  for (unsigned int hltIndex = 0; hltIndex < numTriggers; ++hltIndex) {
130  if (trigNames.triggerName(hltIndex).find(triggerPath_) != std::string::npos && hltresults->wasrun(hltIndex) &&
131  hltresults->accept(hltIndex)) {
132  hasFired = true;
133  }
134  }
135 
136  float HT = 0.0;
137 
138  for (unsigned int i = 0; i < jetCollection->size(); i++) {
139  if (std::abs(jetCollection->at(i).eta()) < 3.0 && jetCollection->at(i).pt() >= 40.0) {
140  HT += jetCollection->at(i).pt();
141  }
142  }
143  // for (reco::PFJetCollection::const_iterator i_jet = jetCollection->begin();
144  // i_jet != jetCollection->end(); ++i_jet){
145  // if (i_pfjet->pt() < 40) continue;
146  // if (fabs(i_pfjet->eta()) > 3.0) continue;
147  // pfHT += i_pfjet->pt();
148  //}
149  float MET = (inputMet->front()).pt();
150 
151  // this part is adapted from HLTRFilter.cc
152 
153  // check that the input collections are available
154  if (not hemispheres.isValid()) {
155  // This is happening many times (which is normal) and it's noisy for the
156  // output, we removed the error message edm::LogError("SUSY_HLT_Razor") <<
157  // "Hemisphere object is invalid!" << "\n";
158  return;
159  }
160 
161  if (hasFired) {
162  if (hemispheres->empty()) { // the Hemisphere Maker will produce an empty
163  // collection of hemispheres if the number of
164  // jets in the
165  edm::LogError("SUSY_HLT_Razor") << "Cannot calculate M_R and R^2 because there are too many jets! "
166  "(trigger passed automatically without forming the hemispheres)"
167  << endl;
168  return;
169  }
170 
171  //***********************************
172  // Calculate R
173 
174  if (!hemispheres->empty() && hemispheres->size() != 2 && hemispheres->size() != 5 && hemispheres->size() != 10) {
175  edm::LogError("SUSY_HLT_Razor") << "Invalid hemisphere collection! hemispheres->size() = " << hemispheres->size()
176  << endl;
177  return;
178  }
179 
180  TLorentzVector ja(hemispheres->at(0).x(), hemispheres->at(0).y(), hemispheres->at(0).z(), hemispheres->at(0).t());
181  TLorentzVector jb(hemispheres->at(1).x(), hemispheres->at(1).y(), hemispheres->at(1).z(), hemispheres->at(1).t());
182 
183  // dummy vector (this trigger does not care about muons)
184  std::vector<math::XYZTLorentzVector> muonVec;
185 
186  double MR = CalcMR(ja, jb);
187  double R = CalcR(MR, ja, jb, inputMet, muonVec);
188  double Rsq = R * R;
189 
190  if (Rsq > 0.15)
191  h_mr->Fill(MR);
192  if (MR > 300)
193  h_rsq->Fill(Rsq);
194  h_mrRsq->Fill(MR, Rsq);
195 
196  h_rsq_loose->Fill(Rsq);
197 
198  if (Rsq > 0.25) {
199  h_mr_tight->Fill(MR);
200  }
201  if (MR > 400) {
202  h_rsq_tight->Fill(Rsq);
203  }
204 
205  h_ht->Fill(HT);
206  h_met->Fill(MET);
207  h_htMet->Fill(HT, MET);
208 
209  h_online_mr_vs_mr->Fill(MR, onlineMR);
210  h_online_rsq_vs_rsq->Fill(Rsq, onlineRsq);
211 
212  h_calo_mr_vs_mr->Fill(MR, caloMR);
213  h_calo_rsq_vs_rsq->Fill(Rsq, caloRsq);
214  }
215 }
MonitorElement * h_calo_rsq_vs_rsq
static double CalcR(double MR, TLorentzVector ja, TLorentzVector jb, edm::Handle< edm::View< reco::MET >> met, const std::vector< math::XYZTLorentzVector > &muons)
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_
MonitorElement * h_rsq_tight
std::string triggerPath_
Log< level::Error, false > LogError
MonitorElement * h_online_mr_vs_mr
MonitorElement * h_ht
void Fill(long long x)
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:21
edm::EDGetTokenT< edm::View< reco::MET > > theMETCollection_
Definition: MET.h:41
MonitorElement * h_rsq
MonitorElement * h_mrRsq
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int id() const
getters
Definition: TriggerObject.h:51
edm::InputTag caloFilter_
MonitorElement * h_calo_mr_vs_mr
MonitorElement * h_htMet
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:75
Log< level::Info, false > LogInfo
static const char *const trigNames[]
Definition: EcalDumpRaw.cc:57
MonitorElement * h_met
std::vector< size_type > Keys
bool isValid() const
Definition: HandleBase.h:70
edm::EDGetTokenT< std::vector< math::XYZTLorentzVector > > theHemispheres_
MonitorElement * h_online_rsq_vs_rsq
fixed size matrix
HLT enums.
edm::EDGetTokenT< edm::View< reco::Jet > > theJetCollection_
MonitorElement * h_mr
edm::InputTag triggerFilter_
Definition: HT.h:21
MonitorElement * h_mr_tight
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
static double CalcMR(TLorentzVector ja, TLorentzVector jb)
MonitorElement * h_rsq_loose

◆ bookHistograms()

void SUSY_HLT_Razor::bookHistograms ( DQMStore::IBooker ibooker_,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 25 of file SUSY_HLT_Razor.cc.

References bookHistos().

25  {
26  edm::LogInfo("SUSY_HLT_Razor") << "SUSY_HLT_Razor::bookHistograms" << std::endl;
27  // book at beginRun
28  bookHistos(ibooker_);
29 }
void bookHistos(DQMStore::IBooker &)
Log< level::Info, false > LogInfo

◆ bookHistos()

void SUSY_HLT_Razor::bookHistos ( DQMStore::IBooker ibooker_)
private

Definition at line 217 of file SUSY_HLT_Razor.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), dqm::implementation::NavigatorBase::cd(), h_calo_mr_vs_mr, h_calo_rsq_vs_rsq, h_ht, h_htMet, h_met, h_mr, h_mr_tight, h_mrRsq, h_online_mr_vs_mr, h_online_rsq_vs_rsq, h_rsq, h_rsq_loose, h_rsq_tight, dqm::implementation::NavigatorBase::setCurrentFolder(), and triggerPath_.

Referenced by bookHistograms().

217  {
218  ibooker_.cd();
219  ibooker_.setCurrentFolder("HLT/SUSYBSM/" + triggerPath_);
220 
221  h_mr = ibooker_.book1D("mr", "M_{R} (R^{2} > 0.15) ; GeV", 100, 0.0, 4000);
222  h_rsq = ibooker_.book1D("rsq", "R^{2} (M_{R} > 300)", 100, 0.0, 1.5);
223  h_mrRsq = ibooker_.book2D("mrRsq", "R^{2} vs M_{R}; GeV; ", 100, 0.0, 4000.0, 100, 0.0, 1.5);
224 
225  h_mr_tight = ibooker_.book1D("mr_tight", "M_{R} (R^{2} > 0.25) ; GeV", 100, 0.0, 4000);
226  h_rsq_tight = ibooker_.book1D("rsq_tight", "R^{2} (M_{R} > 400) ; ", 100, 0.0, 1.5);
227 
228  h_rsq_loose = ibooker_.book1D("rsq_loose", "R^{2} (M_{R} > 0) ; ", 100, 0.0, 1.5);
229 
230  h_ht = ibooker_.book1D("ht", "HT; GeV; ", 100, 0.0, 4000.0);
231  h_met = ibooker_.book1D("met", "MET; GeV; ", 100, 0.0, 1000);
232  h_htMet = ibooker_.book2D("htMet", "MET vs HT; GeV; ", 100, 0.0, 4000.0, 100, 0.0, 1000);
233 
234  h_online_mr_vs_mr = ibooker_.book2D("online_mr_vs_mr",
235  "Online M_{R} vs Offline M_{R} (events passing "
236  "trigger); Offline M_{R} (GeV); Online M_{R} (GeV); ",
237  100,
238  0.0,
239  4000.0,
240  100,
241  0.0,
242  4000.0);
243  h_calo_mr_vs_mr = ibooker_.book2D("calo_mr_vs_mr",
244  "Calo M_{R} vs Offline M_{R} (events passing trigger); "
245  "Offline M_{R} (GeV); Calo M_{R} (GeV); ",
246  100,
247  0.0,
248  4000.0,
249  100,
250  0.0,
251  4000.0);
252  h_online_rsq_vs_rsq = ibooker_.book2D("online_rsq_vs_rsq",
253  "Online R^{2} vs Offline R^{2} (events passing trigger); "
254  "Offline R^{2}; Online R^{2}; ",
255  100,
256  0.0,
257  1.5,
258  100,
259  0.0,
260  1.5);
261  h_calo_rsq_vs_rsq = ibooker_.book2D("calo_rsq_vs_rsq",
262  "Calo R^{2} vs Offline R^{2} (events passing trigger); "
263  "Offline R^{2}; Calo R^{2}; ",
264  100,
265  0.0,
266  1.5,
267  100,
268  0.0,
269  1.5);
270 
271  ibooker_.cd();
272 }
MonitorElement * h_calo_rsq_vs_rsq
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
MonitorElement * h_rsq_tight
std::string triggerPath_
MonitorElement * h_online_mr_vs_mr
MonitorElement * h_ht
MonitorElement * h_rsq
MonitorElement * h_mrRsq
MonitorElement * h_calo_mr_vs_mr
MonitorElement * h_htMet
MonitorElement * h_met
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212
MonitorElement * h_online_rsq_vs_rsq
MonitorElement * h_mr
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
MonitorElement * h_mr_tight
MonitorElement * h_rsq_loose

◆ CalcMR()

double SUSY_HLT_Razor::CalcMR ( TLorentzVector  ja,
TLorentzVector  jb 
)
static

Definition at line 275 of file SUSY_HLT_Razor.cc.

References A, B, mathSSE::sqrt(), and groupFilesInBlocks::temp.

Referenced by analyze().

275  {
276  if (ja.Pt() <= 0.1)
277  return -1;
278 
279  ja.SetPtEtaPhiM(ja.Pt(), ja.Eta(), ja.Phi(), 0.0);
280  jb.SetPtEtaPhiM(jb.Pt(), jb.Eta(), jb.Phi(), 0.0);
281 
282  if (ja.Pt() > jb.Pt()) {
283  TLorentzVector temp = ja;
284  ja = jb;
285  jb = temp;
286  }
287 
288  double A = ja.P();
289  double B = jb.P();
290  double az = ja.Pz();
291  double bz = jb.Pz();
292  TVector3 jaT, jbT;
293  jaT.SetXYZ(ja.Px(), ja.Py(), 0.0);
294  jbT.SetXYZ(jb.Px(), jb.Py(), 0.0);
295  double ATBT = (jaT + jbT).Mag2();
296 
297  double MR = sqrt((A + B) * (A + B) - (az + bz) * (az + bz) -
298  (jbT.Dot(jbT) - jaT.Dot(jaT)) * (jbT.Dot(jbT) - jaT.Dot(jaT)) / (jaT + jbT).Mag2());
299 
300  double mybeta = (jbT.Dot(jbT) - jaT.Dot(jaT)) / sqrt(ATBT * ((A + B) * (A + B) - (az + bz) * (az + bz)));
301 
302  double mygamma = 1. / sqrt(1. - mybeta * mybeta);
303 
304  // use gamma times MRstar
305  return MR * mygamma;
306 }
Definition: APVGainStruct.h:7
T sqrt(T t)
Definition: SSEVec.h:19
Definition: APVGainStruct.h:7

◆ CalcR()

double SUSY_HLT_Razor::CalcR ( double  MR,
TLorentzVector  ja,
TLorentzVector  jb,
edm::Handle< edm::View< reco::MET >>  met,
const std::vector< math::XYZTLorentzVector > &  muons 
)
static

Definition at line 308 of file SUSY_HLT_Razor.cc.

References dqmMemoryStats::float, BTaggingMonitor_cfi::met, PDWG_BPHSkim_cff::muons, phi, DiDispStaMuonMonitor_cfi::pt, mathSSE::sqrt(), and createJobs::tmp.

Referenced by analyze().

312  {
313  // now we can calculate MTR
314  TVector3 met;
315  met.SetPtEtaPhi((inputMet->front()).pt(), 0.0, (inputMet->front()).phi());
316 
317  std::vector<math::XYZTLorentzVector>::const_iterator muonIt;
318  for (muonIt = muons.begin(); muonIt != muons.end(); muonIt++) {
319  TVector3 tmp;
320  tmp.SetPtEtaPhi(muonIt->pt(), 0, muonIt->phi());
321  met -= tmp;
322  }
323 
324  double MTR = sqrt(0.5 * (met.Mag() * (ja.Pt() + jb.Pt()) - met.Dot(ja.Vect() + jb.Vect())));
325 
326  // filter events
327  return float(MTR) / float(MR); // R
328 }
T sqrt(T t)
Definition: SSEVec.h:19
tmp
align.sh
Definition: createJobs.py:716

◆ fillDescriptions()

void SUSY_HLT_Razor::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 31 of file SUSY_HLT_Razor.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, HLT_2022v11_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

31  {
33  desc.add<edm::InputTag>("jetCollection", edm::InputTag("ak4PFJetsCHS"));
34  desc.add<edm::InputTag>("CaloFilter", edm::InputTag("hltRsqMR200Rsq0p01MR100Calo", "", "HLT"))
35  ->setComment("Calo HLT filter module used to save razor variable objects");
36  desc.add<edm::InputTag>("METCollection", edm::InputTag("pfMet"));
37  desc.add<edm::InputTag>("hemispheres", edm::InputTag("hemispheres"))
38  ->setComment("hemisphere jets used to compute razor variables");
39  desc.add<std::string>("TriggerPath", "HLT_RsqMR300_Rsq0p09_MR200_v")->setComment("trigger path name");
40  desc.add<edm::InputTag>("TriggerFilter", edm::InputTag("hltRsqMR300Rsq0p09MR200", "", "HLT"))
41  ->setComment("PF HLT filter module used to save razor variable objects");
42  desc.add<edm::InputTag>("TriggerResults", edm::InputTag("TriggerResults", "", "HLT"));
43  desc.add<edm::InputTag>("trigSummary", edm::InputTag("hltTriggerSummaryAOD"));
44  descriptions.add("SUSY_HLT_Razor_Main", desc);
45 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

Member Data Documentation

◆ caloFilter_

edm::InputTag SUSY_HLT_Razor::caloFilter_
private

Definition at line 65 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and SUSY_HLT_Razor().

◆ h_calo_mr_vs_mr

MonitorElement* SUSY_HLT_Razor::h_calo_mr_vs_mr
private

Definition at line 79 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

◆ h_calo_rsq_vs_rsq

MonitorElement* SUSY_HLT_Razor::h_calo_rsq_vs_rsq
private

Definition at line 80 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

◆ h_ht

MonitorElement* SUSY_HLT_Razor::h_ht
private

Definition at line 74 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

◆ h_htMet

MonitorElement* SUSY_HLT_Razor::h_htMet
private

Definition at line 76 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

◆ h_met

MonitorElement* SUSY_HLT_Razor::h_met
private

Definition at line 75 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

◆ h_mr

MonitorElement* SUSY_HLT_Razor::h_mr
private

Definition at line 68 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

◆ h_mr_tight

MonitorElement* SUSY_HLT_Razor::h_mr_tight
private

Definition at line 71 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

◆ h_mrRsq

MonitorElement* SUSY_HLT_Razor::h_mrRsq
private

Definition at line 70 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

◆ h_online_mr_vs_mr

MonitorElement* SUSY_HLT_Razor::h_online_mr_vs_mr
private

Definition at line 77 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

◆ h_online_rsq_vs_rsq

MonitorElement* SUSY_HLT_Razor::h_online_rsq_vs_rsq
private

Definition at line 78 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

◆ h_rsq

MonitorElement* SUSY_HLT_Razor::h_rsq
private

Definition at line 69 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

◆ h_rsq_loose

MonitorElement* SUSY_HLT_Razor::h_rsq_loose
private

Definition at line 73 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

◆ h_rsq_tight

MonitorElement* SUSY_HLT_Razor::h_rsq_tight
private

Definition at line 72 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

◆ theHemispheres_

edm::EDGetTokenT<std::vector<math::XYZTLorentzVector> > SUSY_HLT_Razor::theHemispheres_
private

Definition at line 61 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and SUSY_HLT_Razor().

◆ theJetCollection_

edm::EDGetTokenT<edm::View<reco::Jet> > SUSY_HLT_Razor::theJetCollection_
private

Definition at line 60 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and SUSY_HLT_Razor().

◆ theMETCollection_

edm::EDGetTokenT<edm::View<reco::MET> > SUSY_HLT_Razor::theMETCollection_
private

Definition at line 57 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and SUSY_HLT_Razor().

◆ theTrigSummary_

edm::EDGetTokenT<trigger::TriggerEvent> SUSY_HLT_Razor::theTrigSummary_
private

Definition at line 59 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and SUSY_HLT_Razor().

◆ triggerFilter_

edm::InputTag SUSY_HLT_Razor::triggerFilter_
private

Definition at line 64 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and SUSY_HLT_Razor().

◆ triggerPath_

std::string SUSY_HLT_Razor::triggerPath_
private

Definition at line 63 of file SUSY_HLT_Razor.h.

Referenced by analyze(), bookHistos(), and SUSY_HLT_Razor().

◆ triggerResults_

edm::EDGetTokenT<edm::TriggerResults> SUSY_HLT_Razor::triggerResults_
private

Definition at line 58 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and SUSY_HLT_Razor().