95 if( ! trh.isValid() ) {
127 if (
abs(
id) == 6 && st == 3) ntop++;
129 if (st==3 &&
abs(
id)==11) {
131 if ( p.
pt()>10 && fabs(p.
eta())<2.4) nelaccept++;
134 if (st==3 &&
abs(
id)==13) {
136 if ( p.
pt()>10 && fabs(p.
eta())<2.4) nmuaccept++;
139 if (st==3 &&
abs(
id)==15) ngentau++;
140 if (st==3 && (
abs(
id)==11 ||
abs(
id)==13 ||
abs(
id)==15)) ngenlep++;
155 std::map<double,reco::Muon> muonMap;
157 for (
size_t i = 0;
i< muonsH->size(); ++
i){
158 if ( (*muonsH)[
i].isGlobalMuon() && (*muonsH)[
i].pt()>15 && fabs((*muonsH)[
i].
eta())<2.1){
159 muonMap[(*muonsH)[
i].pt()] = (*muonsH)[
i];
164 bool TwoMuonsAccepted =
false;
166 std::vector<reco::Muon> selected_muons;
169 for( std::map<double,reco::Muon>::reverse_iterator rit=muonMap.rbegin(); rit!=muonMap.rend(); ++rit){
170 selected_muons.push_back( (*rit).second );
173 if (selected_muons.size()==1) muon1 = selected_muons[0];
175 if (selected_muons.size()>1){
176 muon1 = selected_muons[0];
177 muon2 = selected_muons[1];
181 if( selected_muons.size()>1 && muon1.pt() >20 && muon1.charge()*muon2.charge()<0 ) TwoMuonsAccepted =
true;
189 std::map<double,reco::GsfElectron> electronMap;
191 for (
size_t i = 0;
i<electronsH->size();++
i){
192 if( (*electronsH)[
i].pt()>15 && fabs( (*electronsH)[
i].
eta() )<2.4) {
193 electronMap[(*electronsH)[
i].pt()] = (*electronsH)[
i];
198 bool TwoElectronsAccepted =
false;
200 std::vector<reco::GsfElectron> selected_electrons;
203 for( std::map<double,reco::GsfElectron>::reverse_iterator rit=electronMap.rbegin(); rit!=electronMap.rend(); ++rit){
204 selected_electrons.push_back( (*rit).second );
207 if (selected_electrons.size()==1) electron1 = selected_electrons[0];
209 if (selected_electrons.size()>1){
211 electron1 = selected_electrons[0];
212 electron2 = selected_electrons[1];
216 if( selected_electrons.size()>1 && electron1.pt() >20 && electron1.charge()*electron2.charge()<0 ) TwoElectronsAccepted =
true;
228 reco::CaloJetCollection::const_iterator
jet;
235 if (fabs(
jet->eta()) <2.4 &&
jet->et() > 13) n_jets_20++;
272 bool offline_mu =
false;
273 bool offline_dimu =
false;
274 bool offline_el =
false;
275 bool offline_diel =
false;
276 bool offline_emu =
false;
279 if ( selected_muons.size()>0 && muon1.pt()>20 && n_jets_20>1) offline_mu=
true;
280 if ( TwoMuonsAccepted && n_jets_20>1) offline_dimu=
true;
281 if ( selected_electrons.size()>0 && electron1.pt()>20 && n_jets_20>1) offline_el=
true;
282 if ( TwoElectronsAccepted && n_jets_20>1) offline_diel=
true;
283 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;
292 int wtrig_[100] ={0};
293 int wtrig_m[100] ={0};
294 int wtrig_eg[100]={0};
295 int wtrig_jet[100]={0};
297 bool HLTQuadJet30 =
false;
306 const unsigned int n_TriggerResults( trh.product()->size());
308 for (
unsigned int itrig=0; itrig< n_TriggerResults; ++itrig) {
311 if (triggerNames.triggerName(itrig) ==
"HLT_QuadJet30"){
312 if ( trh.product()->accept( itrig ) ) HLTQuadJet30=
true;
314 if (triggerNames.triggerName(itrig) ==
"HLT_Mu9"){
315 if ( trh.product()->accept( itrig ) ) HLTMu9=
true;
318 if (trh.product()->accept(itrig)) {
320 for (
int i=0;
i<n_hlt_bits;
i++) {
325 for (
int j=0;
j<n_hlt_bits_mu;
j++) {
330 for (
int k=0;
k<n_hlt_bits_eg;
k++) {
336 for (
int l=0;
l<n_hlt_bits_jet;
l++) {
360 if ( ngenlep==1 && ngenmu==1 && nmuaccept==1){
364 for (
int j=0;
j<n_hlt_bits_mu;
j++) {
371 for (
int it=0; it<n_hlt_bits_jet;it++){
373 if (wtrig_jet[it]==1) {
387 for (
int it=0; it<n_hlt_bits_jet;it++){
389 if (wtrig_jet[it]==1) {
402 for (
int j=0;
j<n_hlt_bits_mu;
j++) {
440 if ( ngenlep==1 && ngenel==1 && nelaccept==1){
444 for (
int j=0;
j<n_hlt_bits_eg;
j++) {
446 if (wtrig_eg[
j]==1) {
451 for (
int it=0; it<n_hlt_bits_jet;it++){
453 if (wtrig_jet[it]==1) {
467 for (
int it=0; it<n_hlt_bits_jet;it++){
469 if (wtrig_jet[it]==1) {
482 for (
int k=0;
k<n_hlt_bits_eg;
k++) {
485 if (wtrig_eg[
k]==1) {
498 if ( ngenlep==2 && ngenmu==2 && nmuaccept==2){
509 for (
int j=0;
j<n_hlt_bits_mu;
j++) {
523 if ( ngenlep==2 && ngenel==2 && nelaccept==2){
534 for (
int k=0;
k<n_hlt_bits_eg;
k++) {
536 if (wtrig_eg[
k]==1) {
548 if ( ngenlep==2 && ngenel==1 && ngenmu==1 && nmuaccept==1 && nelaccept==1){
559 for (
int i=0;
i<n_hlt_bits;
i++) {
edm::EDGetTokenT< reco::CaloJetCollection > iterativeCone5CaloJetsToken_
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
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::InputTag offlineElectrons
MonitorElement * h_ptmu1_trig_em[100]
virtual float eta() const =0
momentum pseudorapidity
edm::EDGetTokenT< reco::MuonCollection > muonsToken_
TopValidation(const edm::ParameterSet &)
virtual int status() const =0
status word
MonitorElement * hlt_bitel_hist_gen
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
virtual float pt() const =0
transverse momentum
MonitorElement * h_mu_reco
MonitorElement * eta_off_diel2
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
MonitorElement * ptmuon_4jet1muSel
edm::EDGetTokenT< reco::GenParticleCollection > genParticlesToken_
MonitorElement * etamuon_4jet1muSel
Abs< T >::type abs(const T &t)
MonitorElement * Njets_4jet1muSel
std::string outputFileName
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
MonitorElement * h_ptel1_trig[100]
MonitorElement * h_ptmu1_trig_dimu[100]
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 &)
edm::EDGetTokenT< reco::GsfElectronCollection > offlineElectronsToken_
MonitorElement * h_jet_reco
MonitorElement * h_jet_reco_el
MonitorElement * hlt_bitjet_hist_reco
MonitorElement * h_el_gen
return(e1-e2)*(e1-e2)+dp *dp
MonitorElement * Njets_4jet1muSel_hltmu9
MonitorElement * h_ptmu1_trig[100]
std::vector< std::string > hlt_bitnamesEg
edm::EDGetTokenT< reco::TrackCollection > ctfWithMaterialTracksToken_
MonitorElement * pt_off_dimu2
MonitorElement * events_acc_off_electron
MonitorElement * eta_off_diel1
MonitorElement * h_ptel1_trig_em[100]
void showDirStructure(void) const
edm::EDGetTokenT< edm::TriggerResults > inputTagToken_
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
MonitorElement * eta_off_el
std::stringstream topFolder