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::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 SUSY_HLT_Razor (const edm::ParameterSet &ps)
 
 ~SUSY_HLT_Razor () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void beginRun (edm::Run const &, edm::EventSetup const &) final
 
void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer ()
 
void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDAnalyzerBase () 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 DQMEDAnalyzer
static std::shared_ptr< dqmDetails::NoCacheglobalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr< dqmDetails::NoCacheglobalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
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 beginLuminosityBlock (edm::LuminosityBlock const &lumi, 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 endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &eSetup) 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::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

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

Implements edm::stream::EDAnalyzerBase.

Definition at line 59 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().

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

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 40 of file SUSY_HLT_Razor.cc.

42 {
43  edm::LogInfo("SUSY_HLT_Razor") << "SUSY_HLT_Razor::beginLuminosityBlock" << std::endl;
44 }
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 229 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().

230 {
231  ibooker_.cd();
232  ibooker_.setCurrentFolder("HLT/SUSYBSM/" + triggerPath_);
233 
234  h_mr = ibooker_.book1D("mr", "M_{R} (R^{2} > 0.15) ; GeV", 100, 0.0, 4000);
235  h_rsq = ibooker_.book1D("rsq", "R^{2} (M_{R} > 300)", 100, 0.0, 1.5);
236  h_mrRsq = ibooker_.book2D("mrRsq", "R^{2} vs M_{R}; GeV; ", 100, 0.0, 4000.0, 100, 0.0, 1.5);
237 
238  h_mr_tight = ibooker_.book1D("mr_tight", "M_{R} (R^{2} > 0.25) ; GeV", 100, 0.0, 4000);
239  h_rsq_tight = ibooker_.book1D("rsq_tight", "R^{2} (M_{R} > 400) ; ", 100, 0.0, 1.5);
240 
241  h_rsq_loose = ibooker_.book1D("rsq_loose", "R^{2} (M_{R} > 0) ; ", 100, 0.0, 1.5);
242 
243  h_ht = ibooker_.book1D("ht", "HT; GeV; ", 100, 0.0, 4000.0);
244  h_met = ibooker_.book1D("met", "MET; GeV; ", 100, 0.0, 1000);
245  h_htMet = ibooker_.book2D("htMet", "MET vs HT; GeV; ", 100, 0.0, 4000.0, 100, 0.0, 1000);
246 
247  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);
248  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);
249  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);
250  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);
251 
252  ibooker_.cd();
253 }
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:279
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 257 of file SUSY_HLT_Razor.cc.

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

Referenced by analyze().

257  {
258  if(ja.Pt()<=0.1) return -1;
259 
260  ja.SetPtEtaPhiM(ja.Pt(),ja.Eta(),ja.Phi(),0.0);
261  jb.SetPtEtaPhiM(jb.Pt(),jb.Eta(),jb.Phi(),0.0);
262 
263  if(ja.Pt() > jb.Pt()){
264  TLorentzVector temp = ja;
265  ja = jb;
266  jb = temp;
267  }
268 
269  double A = ja.P();
270  double B = jb.P();
271  double az = ja.Pz();
272  double bz = jb.Pz();
273  TVector3 jaT, jbT;
274  jaT.SetXYZ(ja.Px(),ja.Py(),0.0);
275  jbT.SetXYZ(jb.Px(),jb.Py(),0.0);
276  double ATBT = (jaT+jbT).Mag2();
277 
278  double MR = sqrt((A+B)*(A+B)-(az+bz)*(az+bz)-
279  (jbT.Dot(jbT)-jaT.Dot(jaT))*(jbT.Dot(jbT)-jaT.Dot(jaT))/(jaT+jbT).Mag2());
280 
281  double mybeta = (jbT.Dot(jbT)-jaT.Dot(jaT))/
282  sqrt(ATBT*((A+B)*(A+B)-(az+bz)*(az+bz)));
283 
284  double mygamma = 1./sqrt(1.-mybeta*mybeta);
285 
286  //use gamma times MRstar
287  return MR*mygamma;
288 }
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 291 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().

291  {
292  //now we can calculate MTR
293  TVector3 met;
294  met.SetPtEtaPhi((inputMet->front()).pt(),0.0,(inputMet->front()).phi());
295 
296  std::vector<math::XYZTLorentzVector>::const_iterator muonIt;
297  for(muonIt = muons.begin(); muonIt!=muons.end(); muonIt++){
298  TVector3 tmp;
299  tmp.SetPtEtaPhi(muonIt->pt(),0,muonIt->phi());
300  met-=tmp;
301  }
302 
303  double MTR = sqrt(0.5*(met.Mag()*(ja.Pt()+jb.Pt()) - met.Dot(ja.Vect()+jb.Vect())));
304 
305  //filter events
306  return float(MTR)/float(MR); //R
307 
308 }
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::endLuminosityBlock ( edm::LuminosityBlock const &  lumi,
edm::EventSetup const &  eSetup 
)
overrideprotectedvirtual

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 218 of file SUSY_HLT_Razor.cc.

219 {
220  edm::LogInfo("SUSY_HLT_Razor") << "SUSY_HLT_Razor::endLuminosityBlock" << std::endl;
221 }
void SUSY_HLT_Razor::endRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
overrideprotectedvirtual

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 224 of file SUSY_HLT_Razor.cc.

225 {
226  edm::LogInfo("SUSY_HLT_Razor") << "SUSY_HLT_Razor::endRun" << std::endl;
227 }
void SUSY_HLT_Razor::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 46 of file SUSY_HLT_Razor.cc.

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

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