CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 SUSY_HLT_Razor (const edm::ParameterSet &ps)
 
virtual ~SUSY_HLT_Razor ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual 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
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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 Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (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)
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &eSetup)
 
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)
 
void endRun (edm::Run const &run, edm::EventSetup const &eSetup)
 
- Protected Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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_mr_vs_mr_all
 
MonitorElementh_calo_rsq_vs_rsq
 
MonitorElementh_calo_rsq_vs_rsq_all
 
MonitorElementh_ht
 
MonitorElementh_ht_denom
 
MonitorElementh_htMet
 
MonitorElementh_htMet_denom
 
MonitorElementh_met
 
MonitorElementh_met_denom
 
MonitorElementh_mr
 
MonitorElementh_mr_denom
 
MonitorElementh_mr_tight
 
MonitorElementh_mr_tight_denom
 
MonitorElementh_mrRsq
 
MonitorElementh_mrRsq_denom
 
MonitorElementh_online_mr_vs_mr
 
MonitorElementh_online_mr_vs_mr_all
 
MonitorElementh_online_rsq_vs_rsq
 
MonitorElementh_online_rsq_vs_rsq_all
 
MonitorElementh_rsq
 
MonitorElementh_rsq_denom
 
MonitorElementh_rsq_loose
 
MonitorElementh_rsq_loose_denom
 
MonitorElementh_rsq_tight
 
MonitorElementh_rsq_tight_denom
 
edm::EDGetTokenT< std::vector
< math::XYZTLorentzVector > > 
theHemispheres_
 
edm::EDGetTokenT
< reco::PFJetCollection
thePfJetCollection_
 
edm::EDGetTokenT< edm::View
< reco::MET > > 
thePfMETCollection_
 
edm::EDGetTokenT
< trigger::TriggerEvent
theTrigSummary_
 
edm::InputTag triggerFilter_
 
std::string triggerPath_
 
edm::EDGetTokenT
< edm::TriggerResults
triggerResults_
 

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, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 

Detailed Description

Definition at line 32 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_, thePfJetCollection_, thePfMETCollection_, 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  thePfMETCollection_ = consumes<edm::View<reco::MET> >(ps.getParameter<edm::InputTag>("pfMETCollection"));
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  thePfJetCollection_ = consumes<reco::PFJetCollection>(ps.getParameter<edm::InputTag>("pfJetCollection"));
21 }
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::PFJetCollection > thePfJetCollection_
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_
std::string triggerPath_
edm::EDGetTokenT< edm::View< reco::MET > > thePfMETCollection_
edm::InputTag caloFilter_
edm::EDGetTokenT< std::vector< math::XYZTLorentzVector > > theHemispheres_
edm::InputTag triggerFilter_
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
SUSY_HLT_Razor::~SUSY_HLT_Razor ( )
virtual

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 
)
protectedvirtual

Implements edm::stream::EDAnalyzerBase.

Definition at line 46 of file SUSY_HLT_Razor.cc.

References CalcMR(), CalcR(), caloFilter_, MonitorElement::Fill(), edm::Event::getByToken(), h_calo_mr_vs_mr, h_calo_mr_vs_mr_all, h_calo_rsq_vs_rsq, h_calo_rsq_vs_rsq_all, h_ht, h_ht_denom, h_htMet, h_htMet_denom, h_met, h_met_denom, h_mr, h_mr_denom, h_mr_tight, h_mr_tight_denom, h_mrRsq, h_mrRsq_denom, h_online_mr_vs_mr, h_online_mr_vs_mr_all, h_online_rsq_vs_rsq, h_online_rsq_vs_rsq_all, h_rsq, h_rsq_denom, h_rsq_loose, h_rsq_loose_denom, h_rsq_tight, h_rsq_tight_denom, razorHemispheres_cff::hemispheres, trigger::TriggerObject::id(), j, relativeConstraints::keys, pfMET_cfi::pfMET, EnergyCorrector::pt, trigger::TriggerObject::px(), trigger::TriggerObject::py(), dttmaxenums::R, dt_dqm_sourceclient_common_cff::reco, AlCaHLTBitMon_QueryRunRegistry::string, theHemispheres_, thePfJetCollection_, thePfMETCollection_, theTrigSummary_, triggerFilter_, edm::Event::triggerNames(), triggerPath_, triggerResults_, and trigNames.

46  {
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(thePfMETCollection_,inputMet);
60  if ( !inputMet.isValid() ){
61  edm::LogError ("SUSY_HLT_Razor") << "invalid collection: PFMET" << "\n";
62  return;
63  }
64  edm::Handle<reco::PFJetCollection> pfJetCollection;
65  e.getByToken (thePfJetCollection_,pfJetCollection);
66  if ( !pfJetCollection.isValid() ){
67  edm::LogError ("SUSY_HLT_Razor") << "invalid collection: PFJets" << "\n";
68  return;
69  }
70 
71  //check what is in the menu
73  e.getByToken(triggerResults_,hltresults);
74  if(!hltresults.isValid()){
75  edm::LogError ("SUSY_HLT_Razor") << "invalid collection: TriggerResults" << "\n";
76  return;
77  }
78 
79  //-------------------------------
80  //--- Trigger
81  //-------------------------------
83  e.getByToken(theTrigSummary_, triggerSummary);
84  if(!triggerSummary.isValid()) {
85  edm::LogError ("SUSY_HLT_Razor") << "invalid collection: TriggerSummary" << "\n";
86  return;
87  }
88  //get online objects
89  //HLTriggerOffline/Egamma/python/TriggerTypeDefs.py contains the trigger object IDs
90  double onlineMR = 0, onlineRsq = 0;
91  double caloMR = 0, caloRsq = 0; //online razor variables computed using calo quantities
92  size_t filterIndex = triggerSummary->filterIndex( triggerFilter_ );
93  size_t caloFilterIndex = triggerSummary->filterIndex( caloFilter_ );
94  //search for online MR and Rsq objects
95  trigger::TriggerObjectCollection triggerObjects = triggerSummary->getObjects();
96  if( !(filterIndex >= triggerSummary->sizeFilters()) ){
97  const trigger::Keys& keys = triggerSummary->filterKeys( filterIndex );
98  for( size_t j = 0; j < keys.size(); ++j ){
99  trigger::TriggerObject foundObject = triggerObjects[keys[j]];
100  if(foundObject.id() == 0){ //the MET object containing MR and Rsq will show up with ID = 0
101  onlineMR = foundObject.px(); //razor variables stored in dummy reco::MET objects
102  onlineRsq = foundObject.py();
103  }
104  }
105  }
106 
107  //search for calo MR and Rsq objects
108  if( !(caloFilterIndex >= triggerSummary->sizeFilters()) ){
109  const trigger::Keys& keys = triggerSummary->filterKeys( caloFilterIndex );
110  for( size_t j = 0; j < keys.size(); ++j ){
111  trigger::TriggerObject foundObject = triggerObjects[keys[j]];
112  if(foundObject.id() == 0){
113  caloMR = foundObject.px(); //razor variables stored in dummy reco::MET objects
114  caloRsq = foundObject.py();
115  }
116  }
117  }
118 
119  bool hasFired = false;
120  std::string denomPath = "HLT_Ele27_eta2p1_WP85_Gsf_v1"; //trigger path used as a reference for computing turn-ons and efficiencies
121  bool denomFired = false;
122  const edm::TriggerNames& trigNames = e.triggerNames(*hltresults);
123  unsigned int numTriggers = trigNames.size();
124  for( unsigned int hltIndex=0; hltIndex<numTriggers; ++hltIndex ){
125  if (trigNames.triggerName(hltIndex).find(triggerPath_) != std::string::npos && hltresults->wasrun(hltIndex) && hltresults->accept(hltIndex)) hasFired = true;
126  if (trigNames.triggerName(hltIndex).find(denomPath) != std::string::npos && hltresults->wasrun(hltIndex) && hltresults->accept(hltIndex)) denomFired = true;
127  }
128 
129  float pfHT = 0.0;
130  for (reco::PFJetCollection::const_iterator i_pfjet = pfJetCollection->begin(); i_pfjet != pfJetCollection->end(); ++i_pfjet){
131  if (i_pfjet->pt() < 40) continue;
132  if (fabs(i_pfjet->eta()) > 3.0) continue;
133  pfHT += i_pfjet->pt();
134  }
135 
136  float pfMET = (inputMet->front()).pt();
137 
138  //this part is adapted from HLTRFilter.cc
139 
140  // check that the input collections are available
141  if (not hemispheres.isValid()){
142  //This is happening many times (which is normal) and it's noisy for the output, we removed the error message
143  //edm::LogError("SUSY_HLT_Razor") << "Hemisphere object is invalid!" << "\n";
144  return;
145  }
146 
147  if(hasFired && denomFired){
148 
149  if(hemispheres->size() ==0){ // the Hemisphere Maker will produce an empty collection of hemispheres if the number of jets in the
150  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;
151  return;
152  }
153 
154  //***********************************
155  //Calculate R
156 
157  if(hemispheres->size() != 0 && hemispheres->size() != 2 && hemispheres->size() != 5 && hemispheres->size() != 10){
158  edm::LogError("SUSY_HLT_Razor") << "Invalid hemisphere collection! hemispheres->size() = " << hemispheres->size() << endl;
159  return;
160  }
161 
162  TLorentzVector ja(hemispheres->at(0).x(),hemispheres->at(0).y(),hemispheres->at(0).z(),hemispheres->at(0).t());
163  TLorentzVector jb(hemispheres->at(1).x(),hemispheres->at(1).y(),hemispheres->at(1).z(),hemispheres->at(1).t());
164 
165  //dummy vector (this trigger does not care about muons)
166  std::vector<math::XYZTLorentzVector> muonVec;
167 
168  double MR = CalcMR(ja,jb);
169  double R = CalcR(MR,ja,jb,inputMet,muonVec);
170  double Rsq = R*R;
171 
172  if(Rsq > 0.15) h_mr->Fill(MR);
173  if(MR > 300) h_rsq->Fill(Rsq);
174  h_mrRsq->Fill(MR, Rsq);
175  if(Rsq > 0.15) h_mr_denom->Fill(MR);
176  if(MR > 300) h_rsq_denom->Fill(Rsq);
177  h_mrRsq_denom->Fill(MR, Rsq);
178 
179  h_rsq_loose->Fill(Rsq);
180  h_rsq_loose_denom->Fill(Rsq);
181 
182  if(Rsq > 0.25){
183  h_mr_tight->Fill(MR);
184  h_mr_tight_denom->Fill(MR);
185  }
186  if(MR > 400){
187  h_rsq_tight->Fill(Rsq);
188  h_rsq_tight_denom->Fill(Rsq);
189  }
190 
191  h_ht->Fill(pfHT);
192  h_met->Fill(pfMET);
193  h_htMet->Fill(pfHT, pfMET);
194  h_ht_denom->Fill(pfHT);
196  h_htMet_denom->Fill(pfHT, pfMET);
197 
198  h_online_mr_vs_mr->Fill(MR, onlineMR);
199  h_online_rsq_vs_rsq->Fill(Rsq, onlineRsq);
200  h_online_mr_vs_mr_all->Fill(MR, onlineMR);
201  h_online_rsq_vs_rsq_all->Fill(Rsq, onlineRsq);
202 
203  h_calo_mr_vs_mr->Fill(MR, caloMR);
204  h_calo_rsq_vs_rsq->Fill(Rsq, caloRsq);
205  h_calo_mr_vs_mr_all->Fill(MR, caloMR);
206  h_calo_rsq_vs_rsq_all->Fill(Rsq, caloRsq);
207 
208  }
209  else if(denomFired){ //calculate M_R and R^2 for the denominator histograms
210 
211  if(hemispheres->size() ==0){ // the Hemisphere Maker will produce an empty collection of hemispheres if the number of jets in the event is larger than the threshold. In this case we cannot compute razor variables
212  return;
213  }
214 
215 
216  if(hemispheres->size() != 0 && hemispheres->size() != 2 && hemispheres->size() != 5 && hemispheres->size() != 10){
217  return;
218  }
219 
220  TLorentzVector ja(hemispheres->at(0).x(),hemispheres->at(0).y(),hemispheres->at(0).z(),hemispheres->at(0).t());
221  TLorentzVector jb(hemispheres->at(1).x(),hemispheres->at(1).y(),hemispheres->at(1).z(),hemispheres->at(1).t());
222  //dummy vector (this trigger does not care about muons)
223  std::vector<math::XYZTLorentzVector> muonVec;
224 
225  double MR = CalcMR(ja,jb);
226  double R = CalcR(MR,ja,jb,inputMet,muonVec);
227  double Rsq = R*R;
228 
229  if(Rsq > 0.15) h_mr_denom->Fill(MR);
230  if(MR > 300) h_rsq_denom->Fill(Rsq);
231  h_mrRsq_denom->Fill(MR, Rsq);
232 
233  h_rsq_loose_denom->Fill(Rsq);
234 
235  if(Rsq > 0.25) h_mr_tight_denom->Fill(MR);
236  if(MR > 400) h_rsq_tight_denom->Fill(Rsq);
237 
238  h_ht_denom->Fill(pfHT);
240  h_htMet_denom->Fill(pfHT, pfMET);
241 
242  h_online_mr_vs_mr_all->Fill(MR, onlineMR);
243  h_online_rsq_vs_rsq_all->Fill(Rsq, onlineRsq);
244 
245  h_calo_mr_vs_mr_all->Fill(MR, caloMR);
246  h_calo_rsq_vs_rsq_all->Fill(Rsq, caloRsq);
247  }
248 }
MonitorElement * h_calo_rsq_vs_rsq
edm::EDGetTokenT< reco::PFJetCollection > thePfJetCollection_
int id() const
getters
Definition: TriggerObject.h:55
MonitorElement * h_htMet_denom
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_
MonitorElement * h_rsq_tight
std::string triggerPath_
MonitorElement * h_ht_denom
tuple pfMET
Definition: pfMET_cfi.py:7
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
MonitorElement * h_online_rsq_vs_rsq_all
MonitorElement * h_rsq
MonitorElement * h_mrRsq
int j
Definition: DBlmapReader.cc:9
edm::EDGetTokenT< edm::View< reco::MET > > thePfMETCollection_
edm::InputTag caloFilter_
MonitorElement * h_online_mr_vs_mr_all
MonitorElement * h_mr_tight_denom
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::vector< size_type > Keys
MonitorElement * h_rsq_denom
edm::EDGetTokenT< std::vector< math::XYZTLorentzVector > > theHemispheres_
MonitorElement * h_online_rsq_vs_rsq
MonitorElement * h_calo_rsq_vs_rsq_all
MonitorElement * h_met_denom
MonitorElement * h_mr
edm::InputTag triggerFilter_
MonitorElement * h_rsq_tight_denom
MonitorElement * h_mrRsq_denom
MonitorElement * h_mr_tight
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
MonitorElement * h_calo_mr_vs_mr_all
MonitorElement * h_mr_denom
static double CalcMR(TLorentzVector ja, TLorentzVector jb)
MonitorElement * h_rsq_loose_denom
MonitorElement * h_rsq_loose
void SUSY_HLT_Razor::beginLuminosityBlock ( edm::LuminosityBlock const &  lumi,
edm::EventSetup const &  eSetup 
)
protectedvirtual

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 261 of file SUSY_HLT_Razor.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), DQMStore::IBooker::cd(), h_calo_mr_vs_mr, h_calo_mr_vs_mr_all, h_calo_rsq_vs_rsq, h_calo_rsq_vs_rsq_all, h_ht, h_ht_denom, h_htMet, h_htMet_denom, h_met, h_met_denom, h_mr, h_mr_denom, h_mr_tight, h_mr_tight_denom, h_mrRsq, h_mrRsq_denom, h_online_mr_vs_mr, h_online_mr_vs_mr_all, h_online_rsq_vs_rsq, h_online_rsq_vs_rsq_all, h_rsq, h_rsq_denom, h_rsq_loose, h_rsq_loose_denom, h_rsq_tight, h_rsq_tight_denom, DQMStore::IBooker::setCurrentFolder(), and triggerPath_.

Referenced by bookHistograms().

262 {
263  ibooker_.cd();
264  ibooker_.setCurrentFolder("HLT/SUSYBSM/" + triggerPath_);
265 
266  h_mr = ibooker_.book1D("mr", "M_{R} (R^{2} > 0.15) ; GeV", 100, 0.0, 4000);
267  h_rsq = ibooker_.book1D("rsq", "R^{2} (M_{R} > 300)", 100, 0.0, 1.5);
268  h_mrRsq = ibooker_.book2D("mrRsq", "R^{2} vs M_{R}; GeV; ", 100, 0.0, 4000.0, 100, 0.0, 1.5);
269  h_mr_denom = ibooker_.book1D("mr_denom", "M_{R} (R^{2} > 0.15); GeV", 100, 0.0, 4000);
270  h_rsq_denom = ibooker_.book1D("rsq_denom", "R^{2} (MR > 300)", 100, 0.0, 1.5);
271  h_mrRsq_denom = ibooker_.book2D("mrRsq_denom", "R^{2} vs M_{R}; GeV; ", 100, 0.0, 4000.0, 100, 0.0, 1.5);
272 
273  h_mr_tight = ibooker_.book1D("mr_tight", "M_{R} (R^{2} > 0.25) ; GeV", 100, 0.0, 4000);
274  h_rsq_tight = ibooker_.book1D("rsq_tight", "R^{2} (M_{R} > 400) ; ", 100, 0.0, 1.5);
275  h_mr_tight_denom = ibooker_.book1D("mr_tight_denom", "M_{R} (R^{2} > 0.25) ; GeV", 100, 0.0, 4000);
276  h_rsq_tight_denom = ibooker_.book1D("rsq_tight_denom", "R^{2} (M_{R} > 400) ; ", 100, 0.0, 1.5);
277 
278  h_rsq_loose = ibooker_.book1D("rsq_loose", "R^{2} (M_{R} > 0) ; ", 100, 0.0, 1.5);
279  h_rsq_loose_denom = ibooker_.book1D("rsq_loose_denom", "R^{2} (M_{R} > 0) ; ", 100, 0.0, 1.5);
280 
281  h_ht = ibooker_.book1D("ht", "HT; GeV; ", 100, 0.0, 4000.0);
282  h_met = ibooker_.book1D("met", "MET; GeV; ", 100, 0.0, 1000);
283  h_htMet = ibooker_.book2D("htMet", "MET vs HT; GeV; ", 100, 0.0, 4000.0, 100, 0.0, 1000);
284  h_ht_denom = ibooker_.book1D("ht_denom", "HT; GeV; ", 100, 0.0, 4000.0);
285  h_met_denom = ibooker_.book1D("met_denom", "MET; GeV; ", 100, 0.0, 1000);
286  h_htMet_denom = ibooker_.book2D("htMet_denom", "MET vs HT; GeV; ", 100, 0.0, 4000.0, 100, 0.0, 1000);
287 
288  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);
289  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);
290  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);
291  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);
292 
293  h_online_mr_vs_mr_all = ibooker_.book2D("online_mr_vs_mr_all", "Online M_{R} vs Offline M_{R} (events passing reference trigger); Offline M_{R} (GeV); Online M_{R} (GeV); ", 100, 0.0, 4000.0, 100, 0.0, 4000.0);
294  h_calo_mr_vs_mr_all = ibooker_.book2D("calo_mr_vs_mr_all", "Calo M_{R} vs Offline M_{R} (events passing reference trigger); Offline M_{R} (GeV); Calo M_{R} (GeV); ", 100, 0.0, 4000.0, 100, 0.0, 4000.0);
295  h_online_rsq_vs_rsq_all = ibooker_.book2D("online_rsq_vs_rsq_all", "Online R^{2} vs Offline R^{2} (events passing reference trigger); Offline R^{2}; Online R^{2}; ", 100, 0.0, 1.5, 100, 0.0, 1.5);
296  h_calo_rsq_vs_rsq_all = ibooker_.book2D("calo_rsq_vs_rsq_all", "Calo R^{2} vs Offline R^{2} (events passing reference trigger); Offline R^{2}; Calo R^{2}; ", 100, 0.0, 1.5, 100, 0.0, 1.5);
297 
298  ibooker_.cd();
299 }
MonitorElement * h_calo_rsq_vs_rsq
MonitorElement * h_htMet_denom
MonitorElement * h_rsq_tight
void cd(void)
Definition: DQMStore.cc:266
std::string triggerPath_
MonitorElement * h_ht_denom
MonitorElement * h_online_mr_vs_mr
MonitorElement * h_ht
MonitorElement * h_online_rsq_vs_rsq_all
MonitorElement * h_rsq
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
MonitorElement * h_mrRsq
MonitorElement * h_online_mr_vs_mr_all
MonitorElement * h_mr_tight_denom
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:133
MonitorElement * h_rsq_denom
MonitorElement * h_online_rsq_vs_rsq
MonitorElement * h_calo_rsq_vs_rsq_all
MonitorElement * h_met_denom
MonitorElement * h_mr
MonitorElement * h_rsq_tight_denom
MonitorElement * h_mrRsq_denom
MonitorElement * h_mr_tight
MonitorElement * h_calo_mr_vs_mr_all
MonitorElement * h_mr_denom
MonitorElement * h_rsq_loose_denom
MonitorElement * h_rsq_loose
double SUSY_HLT_Razor::CalcMR ( TLorentzVector  ja,
TLorentzVector  jb 
)
static

Definition at line 303 of file SUSY_HLT_Razor.cc.

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

Referenced by analyze().

303  {
304  if(ja.Pt()<=0.1) return -1;
305 
306  ja.SetPtEtaPhiM(ja.Pt(),ja.Eta(),ja.Phi(),0.0);
307  jb.SetPtEtaPhiM(jb.Pt(),jb.Eta(),jb.Phi(),0.0);
308 
309  if(ja.Pt() > jb.Pt()){
310  TLorentzVector temp = ja;
311  ja = jb;
312  jb = temp;
313  }
314 
315  double A = ja.P();
316  double B = jb.P();
317  double az = ja.Pz();
318  double bz = jb.Pz();
319  TVector3 jaT, jbT;
320  jaT.SetXYZ(ja.Px(),ja.Py(),0.0);
321  jbT.SetXYZ(jb.Px(),jb.Py(),0.0);
322  double ATBT = (jaT+jbT).Mag2();
323 
324  double MR = sqrt((A+B)*(A+B)-(az+bz)*(az+bz)-
325  (jbT.Dot(jbT)-jaT.Dot(jaT))*(jbT.Dot(jbT)-jaT.Dot(jaT))/(jaT+jbT).Mag2());
326 
327  double mybeta = (jbT.Dot(jbT)-jaT.Dot(jaT))/
328  sqrt(ATBT*((A+B)*(A+B)-(az+bz)*(az+bz)));
329 
330  double mygamma = 1./sqrt(1.-mybeta*mybeta);
331 
332  //use gamma times MRstar
333  return MR*mygamma;
334 }
T sqrt(T t)
Definition: SSEVec.h:48
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 337 of file SUSY_HLT_Razor.cc.

References caloMETBenchmarkGeneric_cfi::met, phi, EnergyCorrector::pt, mathSSE::sqrt(), and tmp.

Referenced by analyze().

337  {
338  //now we can calculate MTR
339  TVector3 met;
340  met.SetPtEtaPhi((inputMet->front()).pt(),0.0,(inputMet->front()).phi());
341 
342  std::vector<math::XYZTLorentzVector>::const_iterator muonIt;
343  for(muonIt = muons.begin(); muonIt!=muons.end(); muonIt++){
344  TVector3 tmp;
345  tmp.SetPtEtaPhi(muonIt->pt(),0,muonIt->phi());
346  met-=tmp;
347  }
348 
349  double MTR = sqrt(0.5*(met.Mag()*(ja.Pt()+jb.Pt()) - met.Dot(ja.Vect()+jb.Vect())));
350 
351  //filter events
352  return float(MTR)/float(MR); //R
353 
354 }
T sqrt(T t)
Definition: SSEVec.h:48
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
tuple muons
Definition: patZpeak.py:38
Definition: DDAxes.h:10
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 
)
protectedvirtual

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 250 of file SUSY_HLT_Razor.cc.

251 {
252  edm::LogInfo("SUSY_HLT_Razor") << "SUSY_HLT_Razor::endLuminosityBlock" << std::endl;
253 }
void SUSY_HLT_Razor::endRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
protectedvirtual

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 256 of file SUSY_HLT_Razor.cc.

257 {
258  edm::LogInfo("SUSY_HLT_Razor") << "SUSY_HLT_Razor::endRun" << std::endl;
259 }

Member Data Documentation

edm::InputTag SUSY_HLT_Razor::caloFilter_
private

Definition at line 61 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 86 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_calo_mr_vs_mr_all
private

Definition at line 88 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_calo_rsq_vs_rsq
private

Definition at line 87 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_calo_rsq_vs_rsq_all
private

Definition at line 89 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_ht_denom
private

Definition at line 79 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_htMet_denom
private

Definition at line 81 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_met_denom
private

Definition at line 80 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_mr
private

Definition at line 64 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_mr_denom
private

Definition at line 67 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_mr_tight
private

Definition at line 70 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_mr_tight_denom
private

Definition at line 72 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_mrRsq
private

Definition at line 66 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_mrRsq_denom
private

Definition at line 69 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_online_mr_vs_mr
private

Definition at line 82 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_online_mr_vs_mr_all
private

Definition at line 84 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_online_rsq_vs_rsq
private

Definition at line 83 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_online_rsq_vs_rsq_all
private

Definition at line 85 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_rsq
private

Definition at line 65 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_rsq_denom
private

Definition at line 68 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_rsq_loose
private

Definition at line 74 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_rsq_loose_denom
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 71 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_rsq_tight_denom
private

Definition at line 73 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 57 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and SUSY_HLT_Razor().

edm::EDGetTokenT<reco::PFJetCollection> SUSY_HLT_Razor::thePfJetCollection_
private

Definition at line 56 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and SUSY_HLT_Razor().

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

Definition at line 53 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 55 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and SUSY_HLT_Razor().

edm::InputTag SUSY_HLT_Razor::triggerFilter_
private

Definition at line 60 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and SUSY_HLT_Razor().

std::string SUSY_HLT_Razor::triggerPath_
private

Definition at line 59 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 54 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and SUSY_HLT_Razor().