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::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns > 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 &ev, edm::EventSetup const &es) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
 DQMEDAnalyzer ()
 
 DQMEDAnalyzer (DQMEDAnalyzer const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer &&)=delete
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) override
 
 ~DQMEDAnalyzer () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () 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
 
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)
 
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 endRun (edm::Run const &run, edm::EventSetup const &eSetup) override
 
- 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 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 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 37 of file SUSY_HLT_Razor.h.

Constructor & Destructor Documentation

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

Definition at line 9 of file SUSY_HLT_Razor.cc.

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

10 {
11  edm::LogInfo("SUSY_HLT_Razor") << "Constructor SUSY_HLT_Razor::SUSY_HLT_Razor " << std::endl;
12  // Get parameters from configuration file
13  theTrigSummary_ = consumes<trigger::TriggerEvent>(ps.getParameter<edm::InputTag>("trigSummary"));
14  theMETCollection_ = consumes<edm::View<reco::MET> >(ps.getParameter<edm::InputTag>("METCollection"));
15  theHemispheres_ = consumes<std::vector<math::XYZTLorentzVector> >(ps.getParameter<edm::InputTag>("hemispheres"));
16  triggerResults_ = consumes<edm::TriggerResults>(ps.getParameter<edm::InputTag>("TriggerResults"));
17  triggerPath_ = ps.getParameter<std::string>("TriggerPath");
18  triggerFilter_ = ps.getParameter<edm::InputTag>("TriggerFilter");
19  caloFilter_ = ps.getParameter<edm::InputTag>("CaloFilter");
20  theJetCollection_ = consumes<edm::View<reco::Jet> >(ps.getParameter<edm::InputTag>("jetCollection"));
21 }
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 23 of file SUSY_HLT_Razor.cc.

24 {
25  edm::LogInfo("SUSY_HLT_Razor") << "Destructor SUSY_HLT_Razor::~SUSY_HLT_Razor " << std::endl;
26 }

Member Function Documentation

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

Reimplemented from DQMEDAnalyzer.

Definition at line 54 of file SUSY_HLT_Razor.cc.

References funct::abs(), edm::HLTGlobalStatus::accept(), CalcMR(), CalcR(), caloFilter_, 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, mps_fire::i, trigger::TriggerObject::id(), edm::HandleBase::isValid(), relativeConstraints::keys, EnergyCorrector::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(), TriggerAnalyzer::triggerObjects, triggerPath_, triggerResults_, trigNames, and edm::HLTGlobalStatus::wasrun().

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

References bookHistos().

34 {
35  edm::LogInfo("SUSY_HLT_Razor") << "SUSY_HLT_Razor::bookHistograms" << std::endl;
36  //book at beginRun
37  bookHistos(ibooker_);
38 }
void bookHistos(DQMStore::IBooker &)
void SUSY_HLT_Razor::bookHistos ( DQMStore::IBooker ibooker_)
private

Definition at line 220 of file SUSY_HLT_Razor.cc.

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

Referenced by bookHistograms().

221 {
222  ibooker_.cd();
223  ibooker_.setCurrentFolder("HLT/SUSYBSM/" + triggerPath_);
224 
225  h_mr = ibooker_.book1D("mr", "M_{R} (R^{2} > 0.15) ; GeV", 100, 0.0, 4000);
226  h_rsq = ibooker_.book1D("rsq", "R^{2} (M_{R} > 300)", 100, 0.0, 1.5);
227  h_mrRsq = ibooker_.book2D("mrRsq", "R^{2} vs M_{R}; GeV; ", 100, 0.0, 4000.0, 100, 0.0, 1.5);
228 
229  h_mr_tight = ibooker_.book1D("mr_tight", "M_{R} (R^{2} > 0.25) ; GeV", 100, 0.0, 4000);
230  h_rsq_tight = ibooker_.book1D("rsq_tight", "R^{2} (M_{R} > 400) ; ", 100, 0.0, 1.5);
231 
232  h_rsq_loose = ibooker_.book1D("rsq_loose", "R^{2} (M_{R} > 0) ; ", 100, 0.0, 1.5);
233 
234  h_ht = ibooker_.book1D("ht", "HT; GeV; ", 100, 0.0, 4000.0);
235  h_met = ibooker_.book1D("met", "MET; GeV; ", 100, 0.0, 1000);
236  h_htMet = ibooker_.book2D("htMet", "MET vs HT; GeV; ", 100, 0.0, 4000.0, 100, 0.0, 1000);
237 
238  h_online_mr_vs_mr = ibooker_.book2D("online_mr_vs_mr", "Online M_{R} vs Offline M_{R} (events passing trigger); Offline M_{R} (GeV); Online M_{R} (GeV); ", 100, 0.0, 4000.0, 100, 0.0, 4000.0);
239  h_calo_mr_vs_mr = ibooker_.book2D("calo_mr_vs_mr", "Calo M_{R} vs Offline M_{R} (events passing trigger); Offline M_{R} (GeV); Calo M_{R} (GeV); ", 100, 0.0, 4000.0, 100, 0.0, 4000.0);
240  h_online_rsq_vs_rsq = ibooker_.book2D("online_rsq_vs_rsq", "Online R^{2} vs Offline R^{2} (events passing trigger); Offline R^{2}; Online R^{2}; ", 100, 0.0, 1.5, 100, 0.0, 1.5);
241  h_calo_rsq_vs_rsq = ibooker_.book2D("calo_rsq_vs_rsq", "Calo R^{2} vs Offline R^{2} (events passing trigger); Offline R^{2}; Calo R^{2}; ", 100, 0.0, 1.5, 100, 0.0, 1.5);
242 
243  ibooker_.cd();
244 }
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 * book1D(Args &&...args)
Definition: DQMStore.h:118
MonitorElement * h_mrRsq
MonitorElement * h_calo_mr_vs_mr
MonitorElement * h_htMet
MonitorElement * h_met
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:136
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 248 of file SUSY_HLT_Razor.cc.

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

Referenced by analyze().

248  {
249  if(ja.Pt()<=0.1) return -1;
250 
251  ja.SetPtEtaPhiM(ja.Pt(),ja.Eta(),ja.Phi(),0.0);
252  jb.SetPtEtaPhiM(jb.Pt(),jb.Eta(),jb.Phi(),0.0);
253 
254  if(ja.Pt() > jb.Pt()){
255  TLorentzVector temp = ja;
256  ja = jb;
257  jb = temp;
258  }
259 
260  double A = ja.P();
261  double B = jb.P();
262  double az = ja.Pz();
263  double bz = jb.Pz();
264  TVector3 jaT, jbT;
265  jaT.SetXYZ(ja.Px(),ja.Py(),0.0);
266  jbT.SetXYZ(jb.Px(),jb.Py(),0.0);
267  double ATBT = (jaT+jbT).Mag2();
268 
269  double MR = sqrt((A+B)*(A+B)-(az+bz)*(az+bz)-
270  (jbT.Dot(jbT)-jaT.Dot(jaT))*(jbT.Dot(jbT)-jaT.Dot(jaT))/(jaT+jbT).Mag2());
271 
272  double mybeta = (jbT.Dot(jbT)-jaT.Dot(jaT))/
273  sqrt(ATBT*((A+B)*(A+B)-(az+bz)*(az+bz)));
274 
275  double mygamma = 1./sqrt(1.-mybeta*mybeta);
276 
277  //use gamma times MRstar
278  return MR*mygamma;
279 }
T sqrt(T t)
Definition: SSEVec.h:18
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 282 of file SUSY_HLT_Razor.cc.

References DEFINE_FWK_MODULE, objects.autophobj::float, RazorAnalyzer::met, phi, EnergyCorrector::pt, mathSSE::sqrt(), and tmp.

Referenced by analyze().

282  {
283  //now we can calculate MTR
284  TVector3 met;
285  met.SetPtEtaPhi((inputMet->front()).pt(),0.0,(inputMet->front()).phi());
286 
287  std::vector<math::XYZTLorentzVector>::const_iterator muonIt;
288  for(muonIt = muons.begin(); muonIt!=muons.end(); muonIt++){
289  TVector3 tmp;
290  tmp.SetPtEtaPhi(muonIt->pt(),0,muonIt->phi());
291  met-=tmp;
292  }
293 
294  double MTR = sqrt(0.5*(met.Mag()*(ja.Pt()+jb.Pt()) - met.Dot(ja.Vect()+jb.Vect())));
295 
296  //filter events
297  return float(MTR)/float(MR); //R
298 
299 }
T sqrt(T t)
Definition: SSEVec.h:18
met
===> hadronic RAZOR
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
void SUSY_HLT_Razor::dqmBeginRun ( edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 28 of file SUSY_HLT_Razor.cc.

29 {
30  edm::LogInfo("SUSY_HLT_Razor") << "SUSY_HLT_Razor::beginRun" << std::endl;
31 }
void SUSY_HLT_Razor::endRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
overrideprotected

Definition at line 215 of file SUSY_HLT_Razor.cc.

216 {
217  edm::LogInfo("SUSY_HLT_Razor") << "SUSY_HLT_Razor::endRun" << std::endl;
218 }
void SUSY_HLT_Razor::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 41 of file SUSY_HLT_Razor.cc.

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

41  {
43  desc.add<edm::InputTag>("jetCollection",edm::InputTag("ak4PFJetsCHS"));
44  desc.add<edm::InputTag>("CaloFilter",edm::InputTag("hltRsqMR200Rsq0p01MR100Calo","","HLT"))->setComment("Calo HLT filter module used to save razor variable objects");
45  desc.add<edm::InputTag>("METCollection",edm::InputTag("pfMet"));
46  desc.add<edm::InputTag>("hemispheres",edm::InputTag("hemispheres"))->setComment("hemisphere jets used to compute razor variables");
47  desc.add<std::string>("TriggerPath","HLT_RsqMR300_Rsq0p09_MR200_v")->setComment("trigger path name");
48  desc.add<edm::InputTag>("TriggerFilter",edm::InputTag("hltRsqMR300Rsq0p09MR200","","HLT"))->setComment("PF HLT filter module used to save razor variable objects");
49  desc.add<edm::InputTag>("TriggerResults",edm::InputTag("TriggerResults","","HLT"));
50  desc.add<edm::InputTag>("trigSummary",edm::InputTag("hltTriggerSummaryAOD"));
51  descriptions.add("SUSY_HLT_Razor_Main",desc);
52 }
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 65 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 79 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

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().

MonitorElement* SUSY_HLT_Razor::h_ht
private

Definition at line 74 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_htMet
private

Definition at line 76 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_met
private

Definition at line 75 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_mr
private

Definition at line 68 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_mr_tight
private

Definition at line 71 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_mrRsq
private

Definition at line 70 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

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().

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().

MonitorElement* SUSY_HLT_Razor::h_rsq
private

Definition at line 69 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_rsq_loose
private

Definition at line 73 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_rsq_tight
private

Definition at line 72 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 61 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 60 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 57 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 59 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and SUSY_HLT_Razor().

edm::InputTag SUSY_HLT_Razor::triggerFilter_
private

Definition at line 64 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and SUSY_HLT_Razor().

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().

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().