00001
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/Tools/BinnedHistogram.hh"
00004 #include "Rivet/RivetAIDA.hh"
00005 #include "Rivet/Tools/Logging.hh"
00006 #include "Rivet/Projections/FinalState.hh"
00007 #include "Rivet/Projections/ChargedFinalState.hh"
00008 #include "Rivet/Projections/VisibleFinalState.hh"
00009 #include "Rivet/Projections/IdentifiedFinalState.hh"
00010 #include "Rivet/Projections/VetoedFinalState.hh"
00011 #include "Rivet/Projections/FastJets.hh"
00012
00013 namespace Rivet {
00014
00015
00016 class ATLAS_2011_CONF_2011_090 : public Analysis {
00017 public:
00018
00019
00020
00021
00022
00023
00024 ATLAS_2011_CONF_2011_090()
00025 : Analysis("ATLAS_2011_CONF_2011_090")
00026 { }
00027
00028
00029
00030
00031 public:
00032
00033
00034
00035
00036
00037 void init() {
00038
00039
00040 std::vector<std::pair<double, double> > eta_e;
00041 eta_e.push_back(make_pair(-2.47,2.47));
00042 IdentifiedFinalState elecs(eta_e, 20.0*GeV);
00043 elecs.acceptIdPair(ELECTRON);
00044 addProjection(elecs, "elecs");
00045
00046
00047
00048 std::vector<std::pair<double, double> > eta_v_e;
00049 eta_v_e.push_back(make_pair(-1.52,-1.37));
00050 eta_v_e.push_back(make_pair( 1.37, 1.52));
00051 IdentifiedFinalState veto_elecs(eta_v_e, 10.0*GeV);
00052 veto_elecs.acceptIdPair(ELECTRON);
00053 addProjection(veto_elecs, "veto_elecs");
00054
00055
00056
00057 std::vector<std::pair<double, double> > eta_m;
00058 eta_m.push_back(make_pair(-2.4,2.4));
00059 IdentifiedFinalState muons(eta_m, 10.0*GeV);
00060 muons.acceptIdPair(MUON);
00061 addProjection(muons, "muons");
00062
00063
00064
00065 VetoedFinalState vfs;
00066 vfs.addVetoPairId(MUON);
00067 addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4),
00068 "AntiKtJets04");
00069
00070
00071
00072 addProjection(ChargedFinalState(-3.0,3.0,0.5*GeV),"cfs");
00073
00074
00075
00076 addProjection(VisibleFinalState(-4.9,4.9),"vfs");
00077
00078
00079
00080 _count_mu_channel = bookHistogram1D("count_muon_channel", 1, 0., 1.);
00081 _count_e_channel = bookHistogram1D("count_electron_channel", 1, 0., 1.);
00082 _hist_eTmiss_e = bookHistogram1D("Et_miss_e", 50, 0., 500.);
00083 _hist_eTmiss_mu = bookHistogram1D("Et_miss_mu", 50, 0., 500.);
00084 _hist_m_eff_e = bookHistogram1D("m_eff_e", 60, 0., 1500.);
00085 _hist_m_eff_mu = bookHistogram1D("m_eff_mu", 60, 0., 1500.);
00086 _hist_m_eff_e_final = bookHistogram1D("m_eff_e_final", 15, 0., 1500.);
00087 _hist_m_eff_mu_final = bookHistogram1D("m_eff_mu_final", 15, 0., 1500.);
00088
00089
00090
00091 }
00092
00093
00094
00095
00096 void analyze(const Event& event) {
00097
00098 const double weight = event.weight();
00099
00100
00101 ParticleVector veto_e
00102 = applyProjection<IdentifiedFinalState>(event, "veto_elecs").particles();
00103 if ( ! veto_e.empty() ) {
00104 MSG_DEBUG("electrons in veto region");
00105 vetoEvent;
00106 }
00107
00108 Jets cand_jets;
00109 foreach ( const Jet& jet,
00110 applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV) ) {
00111 if ( fabs( jet.momentum().eta() ) < 2.8 ) {
00112 cand_jets.push_back(jet);
00113 }
00114 }
00115
00116 ParticleVector candtemp_e =
00117 applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt();
00118 ParticleVector candtemp_mu =
00119 applyProjection<IdentifiedFinalState>(event,"muons").particlesByPt();
00120 ParticleVector chg_tracks =
00121 applyProjection<ChargedFinalState>(event, "cfs").particles();
00122 ParticleVector cand_mu;
00123 ParticleVector cand_e;
00124
00125
00126
00127 foreach ( const Particle & mu, candtemp_mu ) {
00128 double pTinCone = -mu.momentum().pT();
00129 foreach ( const Particle & track, chg_tracks ) {
00130 if ( deltaR(mu.momentum(),track.momentum()) < 0.2 )
00131 pTinCone += track.momentum().pT();
00132 }
00133 if ( pTinCone < 1.8*GeV )
00134 cand_mu.push_back(mu);
00135 }
00136
00137
00138
00139 foreach ( const Particle e, candtemp_e ) {
00140 double pTinCone = -e.momentum().pT();
00141 foreach ( const Particle & track, chg_tracks ) {
00142 if ( deltaR(e.momentum(),track.momentum()) < 0.2 )
00143 pTinCone += track.momentum().pT();
00144 }
00145 if ( pTinCone < 0.10 * e.momentum().pT() )
00146 cand_e.push_back(e);
00147 }
00148
00149
00150
00151
00152 Jets cand_jets_2;
00153 foreach ( const Jet& jet, cand_jets ) {
00154 bool away_from_e = true;
00155 foreach ( const Particle & e, cand_e ) {
00156 if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) {
00157 away_from_e = false;
00158 break;
00159 }
00160 }
00161 if ( away_from_e )
00162 cand_jets_2.push_back( jet );
00163 }
00164
00165
00166 ParticleVector recon_e, recon_mu;
00167 foreach ( const Particle & e, cand_e ) {
00168 bool e_near_jet = false;
00169 foreach ( const Jet& jet, cand_jets_2 ) {
00170 if ( deltaR(e.momentum(),jet.momentum()) < 0.4 &&
00171 deltaR(e.momentum(),jet.momentum()) > 0.2 )
00172 e_near_jet = true;
00173 }
00174 if ( ! e_near_jet )
00175 recon_e.push_back( e );
00176 }
00177
00178 foreach ( const Particle & mu, cand_mu ) {
00179 bool mu_near_jet = false;
00180 foreach ( const Jet& jet, cand_jets_2 ) {
00181 if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 )
00182 mu_near_jet = true;
00183 }
00184 if ( ! mu_near_jet )
00185 recon_mu.push_back( mu );
00186 }
00187
00188
00189 ParticleVector vfs_particles
00190 = applyProjection<VisibleFinalState>(event, "vfs").particles();
00191 FourMomentum pTmiss;
00192 foreach ( const Particle & p, vfs_particles ) {
00193 pTmiss -= p.momentum();
00194 }
00195 double eTmiss = pTmiss.pT();
00196
00197
00198
00199 Jets recon_jets;
00200 foreach ( const Jet& jet, cand_jets_2 ) {
00201 recon_jets.push_back( jet );
00202 }
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212 int Njets = 0;
00213 double pTmiss_phi = pTmiss.phi();
00214 foreach ( const Jet& jet, recon_jets ) {
00215 if ( fabs(jet.momentum().eta()) < 2.8 )
00216 Njets+=1;
00217 }
00218 if ( Njets < 3 ) {
00219 MSG_DEBUG("Only " << Njets << " jets w/ eta<2.8 left");
00220 vetoEvent;
00221 }
00222
00223 if ( recon_jets[0].momentum().pT() <= 60.0 * GeV ) {
00224 MSG_DEBUG("No hard leading jet in " << recon_jets.size() << " jets");
00225 vetoEvent;
00226 }
00227 for ( int i = 1; i < 3; ++i ) {
00228 if ( recon_jets[i].momentum().pT() <= 25*GeV ) {
00229 vetoEvent;
00230 }
00231 }
00232
00233 for ( int i = 0; i < 3; ++i ) {
00234 double dPhi = deltaPhi( pTmiss_phi, recon_jets[i].momentum().phi() );
00235 if ( dPhi <= 0.2 ) {
00236 MSG_DEBUG("dPhi too small");
00237 vetoEvent;
00238 break;
00239 }
00240 }
00241
00242
00243 ParticleVector lepton;
00244 if ( recon_mu.empty() && recon_e.empty() ) {
00245 MSG_DEBUG("No leptons");
00246 vetoEvent;
00247 }
00248 else {
00249 foreach ( const Particle & mu, recon_mu )
00250 lepton.push_back(mu);
00251 foreach ( const Particle & e, recon_e )
00252 lepton.push_back(e);
00253 }
00254
00255 std::sort(lepton.begin(), lepton.end(), cmpParticleByPt);
00256
00257 double e_id = 11;
00258 double mu_id = 13;
00259
00260
00261 if ( fabs(lepton[0].pdgId()) == e_id &&
00262 lepton[0].momentum().pT() <= 25*GeV ) {
00263 vetoEvent;
00264 }
00265 else if ( fabs(lepton[0].pdgId()) == mu_id &&
00266 lepton[0].momentum().pT() <= 20*GeV ) {
00267 vetoEvent;
00268 }
00269
00270
00271 if ( fabs(lepton[1].pdgId()) == e_id &&
00272 lepton[1].momentum().pT() > 20*GeV ) {
00273 vetoEvent;
00274 }
00275 else if ( fabs(lepton[1].pdgId()) == mu_id &&
00276 lepton[1].momentum().pT() > 10*GeV ) {
00277 vetoEvent;
00278 }
00279
00280
00281
00282
00283
00284
00285 FourMomentum pT_l = lepton[0].momentum();
00286
00287
00288 double dPhi = deltaPhi( pT_l.phi(), pTmiss_phi);
00289 double mT = sqrt( 2 * pT_l.pT() * eTmiss * (1 - cos(dPhi)) );
00290
00291
00292
00293 double m_eff = eTmiss + pT_l.pT()
00294 + recon_jets[0].momentum().pT()
00295 + recon_jets[1].momentum().pT()
00296 + recon_jets[2].momentum().pT();
00297
00298
00299
00300
00301 if ( fabs( lepton[0].pdgId() ) == e_id ) {
00302
00303 _hist_eTmiss_e->fill(eTmiss, weight);
00304 _hist_m_eff_e->fill(m_eff, weight);
00305
00306 if ( mT > 100*GeV && eTmiss > 125*GeV ) {
00307 _hist_m_eff_e_final->fill(m_eff, weight);
00308 if ( m_eff > 500*GeV && eTmiss > 0.25*m_eff ) {
00309 _count_e_channel->fill(0.5,weight);
00310 }
00311 }
00312 }
00313
00314
00315
00316 else if ( fabs( lepton[0].pdgId() ) == mu_id ) {
00317
00318 _hist_eTmiss_mu->fill(eTmiss, weight);
00319 _hist_m_eff_mu->fill(m_eff, weight);
00320
00321 if ( mT > 100*GeV && eTmiss > 125*GeV ) {
00322 _hist_m_eff_mu_final->fill(m_eff, weight);
00323 if ( m_eff > 500*GeV && eTmiss > 0.25*m_eff ) {
00324 _count_mu_channel->fill(0.5,weight);
00325 }
00326 }
00327
00328 }
00329
00330
00331 }
00332
00333
00334
00335
00336 void finalize() {
00337 scale( _hist_eTmiss_e, 10. * 165. * crossSection()/sumOfWeights() );
00338 scale( _hist_eTmiss_mu, 10. * 165. * crossSection()/sumOfWeights() );
00339 scale( _hist_m_eff_e, 25. * 165. * crossSection()/sumOfWeights() );
00340 scale( _hist_m_eff_mu, 25. * 165. * crossSection()/sumOfWeights() );
00341 scale( _hist_m_eff_e_final, 100. * 165. * crossSection()/sumOfWeights() );
00342 scale( _hist_m_eff_mu_final, 100. * 165. * crossSection()/sumOfWeights() );
00343 }
00344
00345 private:
00346
00347
00348
00349 AIDA::IHistogram1D* _count_e_channel;
00350 AIDA::IHistogram1D* _count_mu_channel;
00351
00352 AIDA::IHistogram1D* _hist_eTmiss_e;
00353 AIDA::IHistogram1D* _hist_eTmiss_mu;
00354
00355 AIDA::IHistogram1D* _hist_m_eff_e;
00356 AIDA::IHistogram1D* _hist_m_eff_mu;
00357 AIDA::IHistogram1D* _hist_m_eff_e_final;
00358 AIDA::IHistogram1D* _hist_m_eff_mu_final;
00359
00360
00361
00362
00363
00364 };
00365
00366
00367
00368
00369 DECLARE_RIVET_PLUGIN(ATLAS_2011_CONF_2011_090);
00370
00371 }