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
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 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
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) 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 void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- 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::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_
 
std::string denomPath_
 
std::string denomPathLoose_
 
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
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

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_, denomPath_, denomPathLoose_, 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  denomPath_ = ps.getParameter<std::string>("DenomPath");
19  denomPathLoose_ = ps.getParameter<std::string>("DenomPathLoose");
20  triggerFilter_ = ps.getParameter<edm::InputTag>("TriggerFilter");
21  caloFilter_ = ps.getParameter<edm::InputTag>("CaloFilter");
22  thePfJetCollection_ = consumes<reco::PFJetCollection>(ps.getParameter<edm::InputTag>("pfJetCollection"));
23 }
T getParameter(std::string const &) const
std::string denomPathLoose_
edm::EDGetTokenT< reco::PFJetCollection > thePfJetCollection_
std::string denomPath_
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 25 of file SUSY_HLT_Razor.cc.

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

Member Function Documentation

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

Implements edm::stream::EDAnalyzerBase.

Definition at line 63 of file SUSY_HLT_Razor.cc.

References CalcMR(), CalcR(), caloFilter_, denomPath_, denomPathLoose_, 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, theHemispheres_, thePfJetCollection_, thePfMETCollection_, theTrigSummary_, triggerFilter_, edm::Event::triggerNames(), triggerPath_, triggerResults_, and trigNames.

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

44 {
45  edm::LogInfo("SUSY_HLT_Razor") << "SUSY_HLT_Razor::beginLuminosityBlock" << std::endl;
46 }
void SUSY_HLT_Razor::bookHistograms ( DQMStore::IBooker ibooker_,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 35 of file SUSY_HLT_Razor.cc.

References bookHistos().

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

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

287 {
288  ibooker_.cd();
289  ibooker_.setCurrentFolder("HLT/SUSYBSM/" + triggerPath_);
290 
291  h_mr = ibooker_.book1D("mr", "M_{R} (R^{2} > 0.15) ; GeV", 100, 0.0, 4000);
292  h_rsq = ibooker_.book1D("rsq", "R^{2} (M_{R} > 300)", 100, 0.0, 1.5);
293  h_mrRsq = ibooker_.book2D("mrRsq", "R^{2} vs M_{R}; GeV; ", 100, 0.0, 4000.0, 100, 0.0, 1.5);
294  h_mr_denom = ibooker_.book1D("mr_denom", "M_{R} (R^{2} > 0.15); GeV", 100, 0.0, 4000);
295  h_rsq_denom = ibooker_.book1D("rsq_denom", "R^{2} (MR > 300)", 100, 0.0, 1.5);
296  h_mrRsq_denom = ibooker_.book2D("mrRsq_denom", "R^{2} vs M_{R}; GeV; ", 100, 0.0, 4000.0, 100, 0.0, 1.5);
297 
298  h_mr_tight = ibooker_.book1D("mr_tight", "M_{R} (R^{2} > 0.25) ; GeV", 100, 0.0, 4000);
299  h_rsq_tight = ibooker_.book1D("rsq_tight", "R^{2} (M_{R} > 400) ; ", 100, 0.0, 1.5);
300  h_mr_tight_denom = ibooker_.book1D("mr_tight_denom", "M_{R} (R^{2} > 0.25) ; GeV", 100, 0.0, 4000);
301  h_rsq_tight_denom = ibooker_.book1D("rsq_tight_denom", "R^{2} (M_{R} > 400) ; ", 100, 0.0, 1.5);
302 
303  h_rsq_loose = ibooker_.book1D("rsq_loose", "R^{2} (M_{R} > 0) ; ", 100, 0.0, 1.5);
304  h_rsq_loose_denom = ibooker_.book1D("rsq_loose_denom", "R^{2} (M_{R} > 0) ; ", 100, 0.0, 1.5);
305 
306  h_ht = ibooker_.book1D("ht", "HT; GeV; ", 100, 0.0, 4000.0);
307  h_met = ibooker_.book1D("met", "MET; GeV; ", 100, 0.0, 1000);
308  h_htMet = ibooker_.book2D("htMet", "MET vs HT; GeV; ", 100, 0.0, 4000.0, 100, 0.0, 1000);
309  h_ht_denom = ibooker_.book1D("ht_denom", "HT; GeV; ", 100, 0.0, 4000.0);
310  h_met_denom = ibooker_.book1D("met_denom", "MET; GeV; ", 100, 0.0, 1000);
311  h_htMet_denom = ibooker_.book2D("htMet_denom", "MET vs HT; GeV; ", 100, 0.0, 4000.0, 100, 0.0, 1000);
312 
313  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);
314  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);
315  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);
316  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);
317 
318  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);
319  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);
320  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);
321  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);
322 
323  ibooker_.cd();
324 }
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 328 of file SUSY_HLT_Razor.cc.

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

Referenced by analyze().

328  {
329  if(ja.Pt()<=0.1) return -1;
330 
331  ja.SetPtEtaPhiM(ja.Pt(),ja.Eta(),ja.Phi(),0.0);
332  jb.SetPtEtaPhiM(jb.Pt(),jb.Eta(),jb.Phi(),0.0);
333 
334  if(ja.Pt() > jb.Pt()){
335  TLorentzVector temp = ja;
336  ja = jb;
337  jb = temp;
338  }
339 
340  double A = ja.P();
341  double B = jb.P();
342  double az = ja.Pz();
343  double bz = jb.Pz();
344  TVector3 jaT, jbT;
345  jaT.SetXYZ(ja.Px(),ja.Py(),0.0);
346  jbT.SetXYZ(jb.Px(),jb.Py(),0.0);
347  double ATBT = (jaT+jbT).Mag2();
348 
349  double MR = sqrt((A+B)*(A+B)-(az+bz)*(az+bz)-
350  (jbT.Dot(jbT)-jaT.Dot(jaT))*(jbT.Dot(jbT)-jaT.Dot(jaT))/(jaT+jbT).Mag2());
351 
352  double mybeta = (jbT.Dot(jbT)-jaT.Dot(jaT))/
353  sqrt(ATBT*((A+B)*(A+B)-(az+bz)*(az+bz)));
354 
355  double mygamma = 1./sqrt(1.-mybeta*mybeta);
356 
357  //use gamma times MRstar
358  return MR*mygamma;
359 }
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 362 of file SUSY_HLT_Razor.cc.

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

Referenced by analyze().

362  {
363  //now we can calculate MTR
364  TVector3 met;
365  met.SetPtEtaPhi((inputMet->front()).pt(),0.0,(inputMet->front()).phi());
366 
367  std::vector<math::XYZTLorentzVector>::const_iterator muonIt;
368  for(muonIt = muons.begin(); muonIt!=muons.end(); muonIt++){
369  TVector3 tmp;
370  tmp.SetPtEtaPhi(muonIt->pt(),0,muonIt->phi());
371  met-=tmp;
372  }
373 
374  double MTR = sqrt(0.5*(met.Mag()*(ja.Pt()+jb.Pt()) - met.Dot(ja.Vect()+jb.Vect())));
375 
376  //filter events
377  return float(MTR)/float(MR); //R
378 
379 }
T sqrt(T t)
Definition: SSEVec.h:48
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
tuple muons
Definition: patZpeak.py:38
void SUSY_HLT_Razor::dqmBeginRun ( edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 30 of file SUSY_HLT_Razor.cc.

31 {
32  edm::LogInfo("SUSY_HLT_Razor") << "SUSY_HLT_Razor::beginRun" << std::endl;
33 }
void SUSY_HLT_Razor::endLuminosityBlock ( edm::LuminosityBlock const &  lumi,
edm::EventSetup const &  eSetup 
)
protectedvirtual

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 275 of file SUSY_HLT_Razor.cc.

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

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 281 of file SUSY_HLT_Razor.cc.

282 {
283  edm::LogInfo("SUSY_HLT_Razor") << "SUSY_HLT_Razor::endRun" << std::endl;
284 }
void SUSY_HLT_Razor::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 48 of file SUSY_HLT_Razor.cc.

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

48  {
50  desc.add<edm::InputTag>("pfJetCollection",edm::InputTag("ak4PFJetsCHS"));
51  desc.add<edm::InputTag>("CaloFilter",edm::InputTag("hltRsqMR200Rsq0p01MR100Calo","","HLT"))->setComment("Calo HLT filter module used to save razor variable objects");
52  desc.add<edm::InputTag>("pfMETCollection",edm::InputTag("pfMet"));
53  desc.add<edm::InputTag>("hemispheres",edm::InputTag("hemispheres"))->setComment("hemisphere jets used to compute razor variables");
54  desc.add<std::string>("TriggerPath","HLT_RsqMR300_Rsq0p09_MR200_v")->setComment("trigger path name");
55  desc.add<std::string>("DenomPath","HLT_Ele40_eta2p1_WP85_Gsf_v")->setComment("tight denominator trigger path name (for 1.4e34 lumi)");
56  desc.add<std::string>("DenomPathLoose","HLT_Ele35_eta2p1_WP85_Gsf_v")->setComment("loose denominator trigger path name (for 7e33 lumi)");
57  desc.add<edm::InputTag>("TriggerFilter",edm::InputTag("hltRsqMR300Rsq0p09MR200","","HLT"))->setComment("PF HLT filter module used to save razor variable objects");
58  desc.add<edm::InputTag>("TriggerResults",edm::InputTag("TriggerResults","","HLT"));
59  desc.add<edm::InputTag>("trigSummary",edm::InputTag("hltTriggerSummaryAOD"));
60  descriptions.add("SUSY_HLT_Razor_Main",desc);
61 }
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 64 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and SUSY_HLT_Razor().

std::string SUSY_HLT_Razor::denomPath_
private

Definition at line 61 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and SUSY_HLT_Razor().

std::string SUSY_HLT_Razor::denomPathLoose_
private

Definition at line 62 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 89 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 91 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_calo_rsq_vs_rsq
private

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

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_ht
private

Definition at line 79 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_ht_denom
private

Definition at line 82 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_htMet
private

Definition at line 81 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_htMet_denom
private

Definition at line 84 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_met
private

Definition at line 80 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_met_denom
private

Definition at line 83 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_mr
private

Definition at line 67 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_mr_denom
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_mr_tight_denom
private

Definition at line 75 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_mrRsq
private

Definition at line 69 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_mrRsq_denom
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 85 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 87 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_online_rsq_vs_rsq
private

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

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_rsq
private

Definition at line 68 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

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

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_rsq_loose_denom
private

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

MonitorElement* SUSY_HLT_Razor::h_rsq_tight_denom
private

Definition at line 76 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 58 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 57 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 54 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 56 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and SUSY_HLT_Razor().

edm::InputTag SUSY_HLT_Razor::triggerFilter_
private

Definition at line 63 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and SUSY_HLT_Razor().

std::string SUSY_HLT_Razor::triggerPath_
private

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

Referenced by analyze(), and SUSY_HLT_Razor().