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/FastJets.hh"
00011
00012 namespace Rivet {
00013
00014
00015 class ATLAS_2011_S9019561 : public Analysis {
00016 public:
00017
00018
00019
00020
00021
00022
00023 ATLAS_2011_S9019561()
00024 : Analysis("ATLAS_2011_S9019561")
00025
00026 {
00027
00028 setNeedsCrossSection(false);
00029 }
00030
00031
00032
00033
00034 public:
00035
00036
00037
00038
00039
00040 void init() {
00041
00042
00043 std::vector<std::pair<double, double> > eta_e;
00044 eta_e.push_back(make_pair(-2.47,2.47));
00045 IdentifiedFinalState elecs(eta_e, 20.0*GeV);
00046 elecs.acceptIdPair(ELECTRON);
00047 addProjection(elecs, "elecs");
00048
00049
00050
00051 std::vector<std::pair<double, double> > eta_v_e;
00052 eta_v_e.push_back(make_pair(-1.52,-1.37));
00053 eta_v_e.push_back(make_pair( 1.37, 1.52));
00054 IdentifiedFinalState veto_elecs(eta_v_e, 10.0*GeV);
00055 veto_elecs.acceptIdPair(ELECTRON);
00056 addProjection(veto_elecs, "veto_elecs");
00057
00058
00059
00060 std::vector<std::pair<double, double> > eta_m;
00061 eta_m.push_back(make_pair(-2.4,2.4));
00062 IdentifiedFinalState muons(eta_m, 20.0*GeV);
00063 muons.acceptIdPair(MUON);
00064 addProjection(muons, "muons");
00065
00066
00067
00068 VetoedFinalState vfs;
00069 vfs.addVetoPairDetail(MUON,20*GeV,7000*GeV);
00070 vfs.addVetoPairDetail(ELECTRON,20*GeV,7000*GeV);
00071 addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4),
00072 "AntiKtJets04");
00073
00074
00075
00076 addProjection(ChargedFinalState(-3.0,3.0,0.5*GeV),"cfs");
00077
00078
00079
00080 addProjection(VisibleFinalState(-4.9,4.9),"vfs");
00081
00082
00083
00084 _count_OS_e_mu = bookHistogram1D("count_OS_e+-mu-+", 1, 0., 1.);
00085 _count_OS_e_e = bookHistogram1D("count_OS_e+e-", 1, 0., 1.);
00086 _count_OS_mu_mu = bookHistogram1D("count_OS_mu+mu-", 1, 0., 1.);
00087 _count_SS_e_mu = bookHistogram1D("count_SS_e+-mu+-", 1, 0., 1.);
00088 _count_SS_e_e = bookHistogram1D("count_SS_e+-e+-", 1, 0., 1.);
00089 _count_SS_mu_mu = bookHistogram1D("count_SS_mu+-mu+-", 1, 0., 1.);
00090
00091 _hist_eTmiss_OS = bookHistogram1D("Et_miss_OS", 20, 0., 400.);
00092 _hist_eTmiss_SS = bookHistogram1D("Et_miss_SS", 20, 0., 400.);
00093
00094
00095 }
00096
00097
00098
00099
00100
00101 void analyze(const Event& event) {
00102
00103 const double weight = event.weight();
00104
00105 ParticleVector veto_e
00106 = applyProjection<IdentifiedFinalState>(event, "veto_elecs").particles();
00107 if ( ! veto_e.empty() ) {
00108 MSG_DEBUG("electrons in veto region");
00109 vetoEvent;
00110 }
00111
00112 Jets cand_jets;
00113 foreach (const Jet& jet,
00114 applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV) ) {
00115 if ( fabs( jet.momentum().eta() ) < 2.5 ) {
00116 cand_jets.push_back(jet);
00117 }
00118 }
00119
00120 ParticleVector cand_e =
00121 applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt();
00122 ParticleVector candtemp_mu =
00123 applyProjection<IdentifiedFinalState>(event,"muons").particlesByPt();
00124 ParticleVector chg_tracks =
00125 applyProjection<ChargedFinalState>(event, "cfs").particles();
00126 ParticleVector cand_mu;
00127
00128
00129
00130 foreach ( const Particle & mu, candtemp_mu ) {
00131 double pTinCone = -mu.momentum().pT();
00132 foreach ( const Particle & track, chg_tracks ) {
00133 if ( deltaR(mu.momentum(),track.momentum()) < 0.2 )
00134 pTinCone += track.momentum().pT();
00135 }
00136 if ( pTinCone < 1.8*GeV )
00137 cand_mu.push_back(mu);
00138 }
00139
00140
00141
00142 Jets cand_jets_2;
00143 foreach ( const Jet& jet, cand_jets ) {
00144 if ( fabs( jet.momentum().eta() ) < 1.5 )
00145 cand_jets_2.push_back( jet );
00146 else {
00147 bool away_from_e = true;
00148 foreach ( const Particle & e, cand_e ) {
00149 if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) {
00150 away_from_e = false;
00151 break;
00152 }
00153 }
00154 if ( away_from_e )
00155 cand_jets_2.push_back( jet );
00156 }
00157 }
00158
00159
00160
00161 ParticleVector recon_e, recon_mu;
00162 foreach ( const Particle & e, cand_e ) {
00163 bool e_near_jet = false;
00164 foreach ( const Jet& jet, cand_jets_2 ) {
00165 if ( deltaR(e.momentum(),jet.momentum()) < 0.4 )
00166 e_near_jet = true;
00167 }
00168 if ( e_near_jet == false )
00169 recon_e.push_back( e );
00170 }
00171
00172 foreach ( const Particle & mu, cand_mu ) {
00173 bool mu_near_jet = false;
00174 foreach ( const Jet& jet, cand_jets_2 ) {
00175 if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 )
00176 mu_near_jet = true;
00177 }
00178 if ( mu_near_jet == false)
00179 recon_mu.push_back( mu );
00180 }
00181
00182
00183
00184 ParticleVector vfs_particles
00185 = applyProjection<VisibleFinalState>(event, "vfs").particles();
00186 FourMomentum pTmiss;
00187 foreach ( const Particle & p, vfs_particles ) {
00188 pTmiss -= p.momentum();
00189 }
00190 double eTmiss = pTmiss.pT();
00191
00192
00193
00194 Jets recon_jets;
00195 foreach ( const Jet& jet, cand_jets_2 ) {
00196 recon_jets.push_back( jet );
00197 }
00198
00199
00200
00201 foreach ( Particle e, recon_e ) {
00202 double EtinCone = -e.momentum().Et();
00203 foreach ( const Particle & track, chg_tracks) {
00204 if ( deltaR(e.momentum(),track.momentum()) <= 0.2 )
00205 EtinCone += track.momentum().Et();
00206 }
00207 if ( EtinCone/e.momentum().pT() >= 0.15 )
00208 vetoEvent;
00209 }
00210
00211
00212
00213 int num_leptons = recon_mu.size() + recon_e.size();
00214 if ( num_leptons != 2)
00215 vetoEvent;
00216
00217
00218
00219
00220 double mass_leptons = 0;
00221 foreach ( Particle e, recon_e ) {
00222 mass_leptons += e.momentum().E();
00223 }
00224 foreach ( Particle mu, recon_mu) {
00225 mass_leptons += mu.momentum().E();
00226 }
00227
00228 if ( mass_leptons <= 5.0 * GeV) {
00229 MSG_DEBUG("Not enough m_ll: " << mass_leptons << " < 5");
00230 vetoEvent;
00231 }
00232
00233
00234
00235
00236
00237
00238
00239 if (recon_e.size() == 2 ) {
00240
00241
00242 if ( recon_e[0].pdgId() * recon_e[1].pdgId() > 0 ) {
00243 _hist_eTmiss_SS->fill(eTmiss, weight);
00244 if ( eTmiss > 100 ) {
00245 MSG_DEBUG("Hits SS e+/-e+/-");
00246 _count_SS_e_e->fill(0.5, weight);
00247 }
00248 }
00249
00250
00251 else if ( recon_e[0].pdgId() * recon_e[1].pdgId() < 0) {
00252 _hist_eTmiss_OS->fill(eTmiss, weight);
00253 if ( eTmiss > 150 ) {
00254 MSG_DEBUG("Hits OS e+e-");
00255 _count_OS_e_e->fill(0.5, weight);
00256 }
00257 }
00258 }
00259
00260
00261
00262 else if ( recon_e.size() == 1 ) {
00263
00264
00265 if ( recon_e[0].pdgId() * recon_mu[0].pdgId() > 0 ) {
00266 _hist_eTmiss_SS->fill(eTmiss, weight);
00267 if ( eTmiss > 100 ) {
00268 MSG_DEBUG("Hits SS e+/-mu+/-");
00269 _count_SS_e_mu->fill(0.5, weight);
00270 }
00271 }
00272
00273
00274 else if ( recon_e[0].pdgId() * recon_mu[0].pdgId() < 0) {
00275 _hist_eTmiss_OS->fill(eTmiss, weight);
00276 if ( eTmiss > 150 ) {
00277 MSG_DEBUG("Hits OS e+mu-");
00278 _count_OS_e_mu->fill(0.5, weight);
00279 }
00280 }
00281 }
00282
00283
00284
00285 else if ( recon_mu.size() == 2 ) {
00286
00287
00288 if ( recon_mu[0].pdgId() * recon_mu[1].pdgId() > 0 ) {
00289 _hist_eTmiss_SS->fill(eTmiss, weight);
00290 if ( eTmiss > 100 ) {
00291 MSG_DEBUG("Hits SS mu+/-mu+/-");
00292 _count_SS_mu_mu->fill(0.5, weight);
00293 }
00294 }
00295
00296
00297 else if ( recon_mu[0].pdgId() * recon_mu[1].pdgId() < 0) {
00298 _hist_eTmiss_OS->fill(eTmiss, weight);
00299 if ( eTmiss > 150 ) {
00300 MSG_DEBUG("Hits OS mu+mu-");
00301 _count_OS_mu_mu->fill(0.5, weight);
00302 }
00303 }
00304 }
00305
00306
00307 }
00308
00309
00310
00311
00312 void finalize() { }
00313
00314
00315 private:
00316
00317
00318
00319 AIDA::IHistogram1D* _count_OS_e_mu;
00320 AIDA::IHistogram1D* _count_OS_e_e;
00321 AIDA::IHistogram1D* _count_OS_mu_mu;
00322 AIDA::IHistogram1D* _count_SS_e_mu;
00323 AIDA::IHistogram1D* _count_SS_e_e;
00324 AIDA::IHistogram1D* _count_SS_mu_mu;
00325 AIDA::IHistogram1D* _hist_eTmiss_OS;
00326 AIDA::IHistogram1D* _hist_eTmiss_SS;
00327
00328
00329
00330
00331 };
00332
00333
00334
00335
00336 AnalysisBuilder<ATLAS_2011_S9019561> plugin_ATLAS_2011_S9019561;
00337
00338
00339 }