CMS 3D CMS Logo

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::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

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
 
virtual void dqmBeginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
virtual void dqmEndLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

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 edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

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
 
void dqmBeginRun (edm::Run const &, edm::EventSetup const &) override
 
void dqmEndRun (edm::Run const &run, edm::EventSetup const &eSetup) override
 
- Protected Member Functions inherited from edm::ProducerBase
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

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::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 36 of file SUSY_HLT_Razor.h.

Constructor & Destructor Documentation

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
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_
std::string triggerPath_
edm::EDGetTokenT< edm::View< reco::MET > > theMETCollection_
edm::InputTag caloFilter_
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 ( )
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 }

Member Function Documentation

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

Reimplemented from DQMEDAnalyzer.

Definition at line 51 of file SUSY_HLT_Razor.cc.

References funct::abs(), edm::HLTGlobalStatus::accept(), CalcMR(), CalcR(), caloFilter_, dqm::impl::MonitorElement::Fill(), trigger::TriggerEvent::filterIndex(), trigger::TriggerEvent::filterKeys(), edm::Event::getByToken(), trigger::TriggerEvent::getObjects(), 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, edm::TriggerNames::size(), trigger::TriggerEvent::sizeFilters(), theHemispheres_, theJetCollection_, theMETCollection_, theTrigSummary_, triggerFilter_, edm::TriggerNames::triggerName(), edm::Event::triggerNames(), triggerMatchMonitor_cfi::triggerObjects, triggerPath_, triggerResults_, HLTMuonOfflineAnalyzer_cfi::triggerSummary, trigNames, and edm::HLTGlobalStatus::wasrun().

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

Implements DQMEDAnalyzer.

Definition at line 29 of file SUSY_HLT_Razor.cc.

References bookHistos().

29  {
30  edm::LogInfo("SUSY_HLT_Razor") << "SUSY_HLT_Razor::bookHistograms" << std::endl;
31  // book at beginRun
32  bookHistos(ibooker_);
33 }
void bookHistos(DQMStore::IBooker &)
void SUSY_HLT_Razor::bookHistos ( DQMStore::IBooker ibooker_)
private

Definition at line 225 of file SUSY_HLT_Razor.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::book1D(), dqm::dqmstoreimpl::DQMStore::IBooker::book2D(), dqm::dqmstoreimpl::DQMStore::IBooker::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::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder(), and triggerPath_.

Referenced by bookHistograms().

225  {
226  ibooker_.cd();
227  ibooker_.setCurrentFolder("HLT/SUSYBSM/" + triggerPath_);
228 
229  h_mr = ibooker_.book1D("mr", "M_{R} (R^{2} > 0.15) ; GeV", 100, 0.0, 4000);
230  h_rsq = ibooker_.book1D("rsq", "R^{2} (M_{R} > 300)", 100, 0.0, 1.5);
231  h_mrRsq = ibooker_.book2D("mrRsq", "R^{2} vs M_{R}; GeV; ", 100, 0.0, 4000.0, 100, 0.0, 1.5);
232 
233  h_mr_tight = ibooker_.book1D("mr_tight", "M_{R} (R^{2} > 0.25) ; GeV", 100, 0.0, 4000);
234  h_rsq_tight = ibooker_.book1D("rsq_tight", "R^{2} (M_{R} > 400) ; ", 100, 0.0, 1.5);
235 
236  h_rsq_loose = ibooker_.book1D("rsq_loose", "R^{2} (M_{R} > 0) ; ", 100, 0.0, 1.5);
237 
238  h_ht = ibooker_.book1D("ht", "HT; GeV; ", 100, 0.0, 4000.0);
239  h_met = ibooker_.book1D("met", "MET; GeV; ", 100, 0.0, 1000);
240  h_htMet = ibooker_.book2D("htMet", "MET vs HT; GeV; ", 100, 0.0, 4000.0, 100, 0.0, 1000);
241 
242  h_online_mr_vs_mr = ibooker_.book2D("online_mr_vs_mr",
243  "Online M_{R} vs Offline M_{R} (events passing "
244  "trigger); Offline M_{R} (GeV); Online M_{R} (GeV); ",
245  100,
246  0.0,
247  4000.0,
248  100,
249  0.0,
250  4000.0);
251  h_calo_mr_vs_mr = ibooker_.book2D("calo_mr_vs_mr",
252  "Calo M_{R} vs Offline M_{R} (events passing trigger); "
253  "Offline M_{R} (GeV); Calo M_{R} (GeV); ",
254  100,
255  0.0,
256  4000.0,
257  100,
258  0.0,
259  4000.0);
260  h_online_rsq_vs_rsq = ibooker_.book2D("online_rsq_vs_rsq",
261  "Online R^{2} vs Offline R^{2} (events passing trigger); "
262  "Offline R^{2}; Online R^{2}; ",
263  100,
264  0.0,
265  1.5,
266  100,
267  0.0,
268  1.5);
269  h_calo_rsq_vs_rsq = ibooker_.book2D("calo_rsq_vs_rsq",
270  "Calo R^{2} vs Offline R^{2} (events passing trigger); "
271  "Offline R^{2}; Calo R^{2}; ",
272  100,
273  0.0,
274  1.5,
275  100,
276  0.0,
277  1.5);
278 
279  ibooker_.cd();
280 }
MonitorElement * h_calo_rsq_vs_rsq
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 * h_online_rsq_vs_rsq
MonitorElement * h_mr
MonitorElement * h_mr_tight
MonitorElement * h_rsq_loose
double SUSY_HLT_Razor::CalcMR ( TLorentzVector  ja,
TLorentzVector  jb 
)
static

Definition at line 283 of file SUSY_HLT_Razor.cc.

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

Referenced by analyze().

283  {
284  if (ja.Pt() <= 0.1)
285  return -1;
286 
287  ja.SetPtEtaPhiM(ja.Pt(), ja.Eta(), ja.Phi(), 0.0);
288  jb.SetPtEtaPhiM(jb.Pt(), jb.Eta(), jb.Phi(), 0.0);
289 
290  if (ja.Pt() > jb.Pt()) {
291  TLorentzVector temp = ja;
292  ja = jb;
293  jb = temp;
294  }
295 
296  double A = ja.P();
297  double B = jb.P();
298  double az = ja.Pz();
299  double bz = jb.Pz();
300  TVector3 jaT, jbT;
301  jaT.SetXYZ(ja.Px(), ja.Py(), 0.0);
302  jbT.SetXYZ(jb.Px(), jb.Py(), 0.0);
303  double ATBT = (jaT + jbT).Mag2();
304 
305  double MR = sqrt((A + B) * (A + B) - (az + bz) * (az + bz) -
306  (jbT.Dot(jbT) - jaT.Dot(jaT)) * (jbT.Dot(jbT) - jaT.Dot(jaT)) / (jaT + jbT).Mag2());
307 
308  double mybeta = (jbT.Dot(jbT) - jaT.Dot(jaT)) / sqrt(ATBT * ((A + B) * (A + B) - (az + bz) * (az + bz)));
309 
310  double mygamma = 1. / sqrt(1. - mybeta * mybeta);
311 
312  // use gamma times MRstar
313  return MR * mygamma;
314 }
T sqrt(T t)
Definition: SSEVec.h:19
static const std::string B
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 316 of file SUSY_HLT_Razor.cc.

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

Referenced by analyze().

320  {
321  // now we can calculate MTR
322  TVector3 met;
323  met.SetPtEtaPhi((inputMet->front()).pt(), 0.0, (inputMet->front()).phi());
324 
325  std::vector<math::XYZTLorentzVector>::const_iterator muonIt;
326  for (muonIt = muons.begin(); muonIt != muons.end(); muonIt++) {
327  TVector3 tmp;
328  tmp.SetPtEtaPhi(muonIt->pt(), 0, muonIt->phi());
329  met -= tmp;
330  }
331 
332  double MTR = sqrt(0.5 * (met.Mag() * (ja.Pt() + jb.Pt()) - met.Dot(ja.Vect() + jb.Vect())));
333 
334  // filter events
335  return float(MTR) / float(MR); // R
336 }
T sqrt(T t)
Definition: SSEVec.h:19
tmp
align.sh
Definition: createJobs.py:716
void SUSY_HLT_Razor::dqmBeginRun ( edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 25 of file SUSY_HLT_Razor.cc.

25  {
26  edm::LogInfo("SUSY_HLT_Razor") << "SUSY_HLT_Razor::beginRun" << std::endl;
27 }
void SUSY_HLT_Razor::dqmEndRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 221 of file SUSY_HLT_Razor.cc.

221  {
222  edm::LogInfo("SUSY_HLT_Razor") << "SUSY_HLT_Razor::endRun" << std::endl;
223 }
void SUSY_HLT_Razor::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 35 of file SUSY_HLT_Razor.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), HLT_2018_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

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

Member Data Documentation

edm::InputTag SUSY_HLT_Razor::caloFilter_
private

Definition at line 67 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and SUSY_HLT_Razor().

MonitorElement* SUSY_HLT_Razor::h_calo_mr_vs_mr
private

Definition at line 81 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_calo_rsq_vs_rsq
private

Definition at line 82 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_ht
private

Definition at line 76 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_htMet
private

Definition at line 78 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_met
private

Definition at line 77 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_mr
private

Definition at line 70 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_mr_tight
private

Definition at line 73 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_mrRsq
private

Definition at line 72 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_online_mr_vs_mr
private

Definition at line 79 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_online_rsq_vs_rsq
private

Definition at line 80 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_rsq
private

Definition at line 71 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_rsq_loose
private

Definition at line 75 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_rsq_tight
private

Definition at line 74 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

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

Definition at line 63 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and SUSY_HLT_Razor().

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

Definition at line 62 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and SUSY_HLT_Razor().

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

Definition at line 59 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and SUSY_HLT_Razor().

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

Definition at line 61 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and SUSY_HLT_Razor().

edm::InputTag SUSY_HLT_Razor::triggerFilter_
private

Definition at line 66 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and SUSY_HLT_Razor().

std::string SUSY_HLT_Razor::triggerPath_
private

Definition at line 65 of file SUSY_HLT_Razor.h.

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

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

Definition at line 60 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and SUSY_HLT_Razor().