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

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

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

Referenced by analyze().

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

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

Referenced by analyze().

368  {
369  //now we can calculate MTR
370  TVector3 met;
371  met.SetPtEtaPhi((inputMet->front()).pt(),0.0,(inputMet->front()).phi());
372 
373  std::vector<math::XYZTLorentzVector>::const_iterator muonIt;
374  for(muonIt = muons.begin(); muonIt!=muons.end(); muonIt++){
375  TVector3 tmp;
376  tmp.SetPtEtaPhi(muonIt->pt(),0,muonIt->phi());
377  met-=tmp;
378  }
379 
380  double MTR = sqrt(0.5*(met.Mag()*(ja.Pt()+jb.Pt()) - met.Dot(ja.Vect()+jb.Vect())));
381 
382  //filter events
383  return float(MTR)/float(MR); //R
384 
385 }
T sqrt(T t)
Definition: SSEVec.h:18
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 281 of file SUSY_HLT_Razor.cc.

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

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 287 of file SUSY_HLT_Razor.cc.

288 {
289  edm::LogInfo("SUSY_HLT_Razor") << "SUSY_HLT_Razor::endRun" << std::endl;
290 }
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_FULL_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

48  {
50  desc.add<edm::InputTag>("jetCollection",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>("METCollection",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 69 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and SUSY_HLT_Razor().

std::string SUSY_HLT_Razor::denomPath_
private

Definition at line 66 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and SUSY_HLT_Razor().

std::string SUSY_HLT_Razor::denomPathLoose_
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 94 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 96 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_calo_rsq_vs_rsq
private

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

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_ht
private

Definition at line 84 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_ht_denom
private

Definition at line 87 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_htMet
private

Definition at line 86 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_htMet_denom
private

Definition at line 89 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_met
private

Definition at line 85 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_met_denom
private

Definition at line 88 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_mr
private

Definition at line 72 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_mr_denom
private

Definition at line 75 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_mr_tight
private

Definition at line 78 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_mr_tight_denom
private

Definition at line 80 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_mrRsq
private

Definition at line 74 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_mrRsq_denom
private

Definition at line 77 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_online_mr_vs_mr
private

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

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_online_rsq_vs_rsq
private

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

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_rsq
private

Definition at line 73 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_rsq_denom
private

Definition at line 76 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_rsq_loose
private

Definition at line 82 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_rsq_loose_denom
private

Definition at line 83 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_rsq_tight
private

Definition at line 79 of file SUSY_HLT_Razor.h.

Referenced by analyze(), and bookHistos().

MonitorElement* SUSY_HLT_Razor::h_rsq_tight_denom
private

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