80 iEvent.
getByLabel(
"iterativeCone5CaloJets", jetsHandle);
91 if( ! trh.isValid() ) {
104 bool topevent =
false;
123 if (
abs(
id) == 6 && st == 3) ntop++;
125 if (st==3 &&
abs(
id)==11) {
127 if ( p.
pt()>10 && fabs(p.
eta())<2.4) nelaccept++;
130 if (st==3 &&
abs(
id)==13) {
132 if ( p.
pt()>10 && fabs(p.
eta())<2.4) nmuaccept++;
135 if (st==3 &&
abs(
id)==15) ngentau++;
136 if (st==3 && (
abs(
id)==11 ||
abs(
id)==13 ||
abs(
id)==15)) ngenlep++;
140 if (ntop == 2) topevent =
true;
151 std::map<double,reco::Muon> muonMap;
153 for (
size_t i = 0;
i< muonsH->size(); ++
i){
154 if ( (*muonsH)[
i].isGlobalMuon() && (*muonsH)[
i].pt()>15 && fabs((*muonsH)[
i].
eta())<2.1){
155 muonMap[(*muonsH)[
i].pt()] = (*muonsH)[
i];
160 bool TwoMuonsAccepted =
false;
162 std::vector<reco::Muon> selected_muons;
165 for( std::map<double,reco::Muon>::reverse_iterator rit=muonMap.rbegin(); rit!=muonMap.rend(); ++rit){
166 selected_muons.push_back( (*rit).second );
169 if (selected_muons.size()==1) muon1 = selected_muons[0];
171 if (selected_muons.size()>1){
172 muon1 = selected_muons[0];
173 muon2 = selected_muons[1];
177 if( selected_muons.size()>1 && muon1.pt() >20 && muon1.charge()*muon2.charge()<0 ) TwoMuonsAccepted =
true;
185 std::map<double,reco::GsfElectron> electronMap;
187 for (
size_t i = 0;
i<electronsH->size();++
i){
188 if( (*electronsH)[
i].pt()>15 && fabs( (*electronsH)[
i].
eta() )<2.4) {
189 electronMap[(*electronsH)[
i].pt()] = (*electronsH)[
i];
194 bool TwoElectronsAccepted =
false;
196 std::vector<reco::GsfElectron> selected_electrons;
199 for( std::map<double,reco::GsfElectron>::reverse_iterator rit=electronMap.rbegin(); rit!=electronMap.rend(); ++rit){
200 selected_electrons.push_back( (*rit).second );
203 if (selected_electrons.size()==1) electron1 = selected_electrons[0];
205 if (selected_electrons.size()>1){
207 electron1 = selected_electrons[0];
208 electron2 = selected_electrons[1];
212 if( selected_electrons.size()>1 && electron1.pt() >20 && electron1.charge()*electron2.charge()<0 ) TwoElectronsAccepted =
true;
224 reco::CaloJetCollection::const_iterator
jet;
231 if (fabs(
jet->eta()) <2.4 &&
jet->et() > 13) n_jets_20++;
268 bool offline_mu =
false;
269 bool offline_dimu =
false;
270 bool offline_el =
false;
271 bool offline_diel =
false;
272 bool offline_emu =
false;
275 if ( selected_muons.size()>0 && muon1.pt()>20 && n_jets_20>1) offline_mu=
true;
276 if ( TwoMuonsAccepted && n_jets_20>1) offline_dimu=
true;
277 if ( selected_electrons.size()>0 && electron1.pt()>20 && n_jets_20>1) offline_el=
true;
278 if ( TwoElectronsAccepted && n_jets_20>1) offline_diel=
true;
279 if ( selected_muons.size()>0 && selected_electrons.size()>0 && (muon1.pt()>20 || electron1.pt()>20) && (muon1.charge()!= electron1.charge()) && n_jets_20>1) offline_emu=
true;
288 int wtrig_[100] ={0};
289 int wtrig_m[100] ={0};
290 int wtrig_eg[100]={0};
291 int wtrig_jet[100]={0};
293 bool HLTQuadJet30 =
false;
302 const unsigned int n_TriggerResults( trh.product()->size());
304 for (
unsigned int itrig=0; itrig< n_TriggerResults; ++itrig) {
307 if (triggerNames.triggerName(itrig) ==
"HLT_QuadJet30"){
308 if ( trh.product()->accept( itrig ) ) HLTQuadJet30=
true;
310 if (triggerNames.triggerName(itrig) ==
"HLT_Mu9"){
311 if ( trh.product()->accept( itrig ) ) HLTMu9=
true;
314 if (trh.product()->accept(itrig)) {
316 for (
int i=0;
i<n_hlt_bits;
i++) {
321 for (
int j=0;
j<n_hlt_bits_mu;
j++) {
326 for (
int k=0;
k<n_hlt_bits_eg;
k++) {
332 for (
int l=0;
l<n_hlt_bits_jet;
l++) {
356 if ( ngenlep==1 && ngenmu==1 && nmuaccept==1){
360 for (
int j=0;
j<n_hlt_bits_mu;
j++) {
367 for (
int it=0; it<n_hlt_bits_jet;it++){
369 if (wtrig_jet[it]==1) {
383 for (
int it=0; it<n_hlt_bits_jet;it++){
385 if (wtrig_jet[it]==1) {
398 for (
int j=0;
j<n_hlt_bits_mu;
j++) {
436 if ( ngenlep==1 && ngenel==1 && nelaccept==1){
440 for (
int j=0;
j<n_hlt_bits_eg;
j++) {
442 if (wtrig_eg[
j]==1) {
447 for (
int it=0; it<n_hlt_bits_jet;it++){
449 if (wtrig_jet[it]==1) {
463 for (
int it=0; it<n_hlt_bits_jet;it++){
465 if (wtrig_jet[it]==1) {
478 for (
int k=0;
k<n_hlt_bits_eg;
k++) {
481 if (wtrig_eg[
k]==1) {
494 if ( ngenlep==2 && ngenmu==2 && nmuaccept==2){
505 for (
int j=0;
j<n_hlt_bits_mu;
j++) {
519 if ( ngenlep==2 && ngenel==2 && nelaccept==2){
530 for (
int k=0;
k<n_hlt_bits_eg;
k++) {
532 if (wtrig_eg[
k]==1) {
544 if ( ngenlep==2 && ngenel==1 && ngenmu==1 && nmuaccept==1 && nelaccept==1){
555 for (
int i=0;
i<n_hlt_bits;
i++) {
678 std::string histname_ptmu_em =
"Muon1Pt_EM_"+
hlt_bitnames[
j];
679 std::string histname_etamu_em =
"Muon1Eta_EM_"+
hlt_bitnames[
j];
680 std::string histname_ptel_em =
"Electron1Pt_EM_"+
hlt_bitnames[
j];
681 std::string histname_etael_em =
"Electron1Eta_EM_"+
hlt_bitnames[
j];
697 std::string histname_ptmu_dimu =
"Muon1Pt_MM_"+
hlt_bitnamesMu[jj];
698 std::string histname_etamu_dimu =
"Muon1Eta_MM_"+
hlt_bitnamesMu[jj];
730 std::string histname_etael_diel =
"Electron1Eta_EE_"+
hlt_bitnamesEg[
k];
MonitorElement * etamuon_4jet1muSel_hltmu9
T getParameter(std::string const &) const
MonitorElement * pt_off_dimu1
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
MonitorElement * eta_off_emu_muon
MonitorElement * h_etamu1_trig[100]
MonitorElement * ptmuon_4jet1muSel_hltmu9
MonitorElement * h_mu_gen
MonitorElement * events_acc_off_muon
MonitorElement * eta_off_mu
MonitorElement * h_etael1_trig_em[100]
MonitorElement * hlt_bitel_hist_reco
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
MonitorElement * eta_off_dimu2
MonitorElement * h_ptmu1_trig_em[100]
virtual double pt() const =0
transverse momentum
#define DEFINE_FWK_MODULE(type)
TopValidation(const edm::ParameterSet &)
virtual int status() const =0
status word
MonitorElement * hlt_bitel_hist_gen
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
MonitorElement * hlt_bitmu_hist_gen
MonitorElement * hlt_bitjet_hist_reco_el
MonitorElement * eta_off_emu_electron
MonitorElement * pt_off_diel1
std::vector< std::string > hlt_bitnamesMu
MonitorElement * pt_off_mu
MonitorElement * h_etael1_trig_diel[100]
MonitorElement * pt_off_emu_electron
MonitorElement * h_etamu1_trig_dimu[100]
std::vector< std::string > hlt_bitnames
MonitorElement * pt_off_emu_muon
MonitorElement * eta_off_dimu1
std::vector< std::string > hlt_bitnamesJet
MonitorElement * hlt_bitmu_hist_reco
MonitorElement * h_mu_reco
MonitorElement * eta_off_diel2
MonitorElement * ptmuon_4jet1muSel
MonitorElement * etamuon_4jet1muSel
MonitorElement * Njets_4jet1muSel
std::string outputFileName
MonitorElement * h_ptel1_trig[100]
MonitorElement * h_ptmu1_trig_dimu[100]
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
MonitorElement * pt_off_diel2
MonitorElement * h_jet_gen
MonitorElement * h_etael1_trig[100]
virtual int pdgId() const =0
PDG identifier.
virtual void analyze(const edm::Event &, const edm::EventSetup &)
MonitorElement * h_jet_reco
MonitorElement * h_jet_reco_el
MonitorElement * hlt_bitjet_hist_reco
MonitorElement * h_el_gen
MonitorElement * Njets_4jet1muSel_hltmu9
MonitorElement * h_ptmu1_trig[100]
std::vector< std::string > hlt_bitnamesEg
MonitorElement * pt_off_dimu2
MonitorElement * events_acc_off_electron
MonitorElement * eta_off_diel1
MonitorElement * h_ptel1_trig_em[100]
void showDirStructure(void) const
MonitorElement * h_jet_gen_el
MonitorElement * h_ptel1_trig_diel[100]
MonitorElement * h_etamu1_trig_em[100]
MonitorElement * pt_off_el
MonitorElement * hlt_bitjet_hist_gen_el
void setCurrentFolder(const std::string &fullpath)
MonitorElement * h_el_reco
MonitorElement * hlt_bitjet_hist_gen
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects
virtual double eta() const =0
momentum pseudorapidity
MonitorElement * eta_off_el
std::stringstream topFolder