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_CONF_2011_090 : public Analysis {
00016 public:
00017
00018
00019
00020
00021
00022
00023 ATLAS_2011_CONF_2011_090()
00024 : Analysis("ATLAS_2011_CONF_2011_090")
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, 10.0*GeV);
00063 muons.acceptIdPair(MUON);
00064 addProjection(muons, "muons");
00065
00066
00067
00068 VetoedFinalState vfs;
00069 vfs.addVetoPairDetail(MUON,10*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_mu_channel = bookHistogram1D("count_muon_channel", 1, 0., 1.);
00085 _count_e_channel = bookHistogram1D("count_electron_channel", 1, 0., 1.);
00086 _hist_eTmiss_e = bookHistogram1D("Et_miss_e", 50, 0., 500.);
00087 _hist_eTmiss_mu = bookHistogram1D("Et_miss_mu", 50, 0., 500.);
00088 _hist_m_eff_e = bookHistogram1D("m_eff_e", 30, 0., 1500.);
00089 _hist_m_eff_mu = bookHistogram1D("m_eff_mu", 30, 0., 1500.);
00090 _hist_m_eff_e_final = bookHistogram1D("m_eff_e_final", 30, 0., 1500.);
00091 _hist_m_eff_mu_final = bookHistogram1D("m_eff_mu_final", 30, 0., 1500.);
00092
00093
00094
00095 }
00096
00097
00098
00099
00100 void analyze(const Event& event) {
00101
00102 const double weight = event.weight();
00103
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.8 ) {
00116 cand_jets.push_back(jet);
00117 }
00118 }
00119
00120 ParticleVector candtemp_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 ParticleVector cand_e;
00128
00129
00130
00131 foreach ( const Particle & mu, candtemp_mu ) {
00132 double pTinCone = -mu.momentum().pT();
00133 foreach ( const Particle & track, chg_tracks ) {
00134 if ( deltaR(mu.momentum(),track.momentum()) < 0.2 )
00135 pTinCone += track.momentum().pT();
00136 }
00137 if ( pTinCone < 1.8*GeV )
00138 cand_mu.push_back(mu);
00139 }
00140
00141
00142
00143 foreach ( const Particle e, candtemp_e ) {
00144 double pTinCone = -e.momentum().pT();
00145 foreach ( const Particle & track, chg_tracks ) {
00146 if ( deltaR(e.momentum(),track.momentum()) < 0.2 )
00147 pTinCone += track.momentum().pT();
00148 }
00149 if ( pTinCone < 0.10 * e.momentum().pT() )
00150 cand_e.push_back(e);
00151 }
00152
00153
00154
00155
00156 Jets cand_jets_2;
00157 foreach ( const Jet& jet, cand_jets ) {
00158 bool away_from_e = true;
00159 foreach ( const Particle & e, cand_e ) {
00160 if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) {
00161 away_from_e = false;
00162 break;
00163 }
00164 }
00165 if ( away_from_e )
00166 cand_jets_2.push_back( jet );
00167 }
00168
00169
00170 ParticleVector recon_e, recon_mu;
00171 foreach ( const Particle & e, cand_e ) {
00172 bool e_near_jet = false;
00173 foreach ( const Jet& jet, cand_jets_2 ) {
00174 if ( deltaR(e.momentum(),jet.momentum()) < 0.4 &&
00175 deltaR(e.momentum(),jet.momentum()) > 0.2 )
00176 e_near_jet = true;
00177 }
00178 if ( e_near_jet == false )
00179 recon_e.push_back( e );
00180 }
00181
00182 foreach ( const Particle & mu, cand_mu ) {
00183 bool mu_near_jet = false;
00184 foreach ( const Jet& jet, cand_jets_2 ) {
00185 if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 )
00186 mu_near_jet = true;
00187 }
00188 if ( mu_near_jet == false )
00189 recon_mu.push_back( mu );
00190 }
00191
00192
00193 ParticleVector vfs_particles
00194 = applyProjection<VisibleFinalState>(event, "vfs").particles();
00195 FourMomentum pTmiss;
00196 foreach ( const Particle & p, vfs_particles ) {
00197 pTmiss -= p.momentum();
00198 }
00199 double eTmiss = pTmiss.pT();
00200
00201
00202
00203 Jets recon_jets;
00204 foreach ( const Jet& jet, cand_jets_2 ) {
00205 recon_jets.push_back( jet );
00206 }
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216 int Njets = 0;
00217 double pTmiss_phi = pTmiss.phi();
00218 foreach ( const Jet& jet, recon_jets ) {
00219 if ( fabs(jet.momentum().eta()) < 2.8 )
00220 Njets+=1;
00221 }
00222 if ( Njets < 3 ) {
00223 MSG_DEBUG("Only " << Njets << " jets w/ eta<2.8 left");
00224 vetoEvent;
00225 }
00226
00227 if ( recon_jets[0].momentum().pT() <= 60.0 * GeV ) {
00228 MSG_DEBUG("No hard leading jet in " << recon_jets.size() << " jets");
00229 vetoEvent;
00230 }
00231 for ( int i = 1; i < 3; ++i ) {
00232 if ( recon_jets[i].momentum().pT() <= 25*GeV ) {
00233 vetoEvent;
00234 }
00235 }
00236
00237 for ( int i = 0; i < 3; ++i ) {
00238 double dPhi = deltaPhi( pTmiss_phi, recon_jets[i].momentum().phi() );
00239 if ( dPhi <= 0.2 ) {
00240 MSG_DEBUG("dPhi too small");
00241 vetoEvent;
00242 break;
00243 }
00244 }
00245
00246
00247 ParticleVector lepton;
00248 if ( recon_mu.empty() && recon_e.empty() ) {
00249 MSG_DEBUG("No leptons");
00250 vetoEvent;
00251 }
00252 else {
00253 foreach ( const Particle & mu, recon_mu )
00254 lepton.push_back(mu);
00255 foreach ( const Particle & e, recon_e )
00256 lepton.push_back(e);
00257 }
00258
00259 std::sort(lepton.begin(), lepton.end(), cmpParticleByPt);
00260
00261 double e_id = 11;
00262 double mu_id = 13;
00263
00264
00265 if ( fabs(lepton[0].pdgId()) == e_id &&
00266 lepton[0].momentum().pT() <= 25*GeV ) {
00267 vetoEvent;
00268 }
00269 else if ( fabs(lepton[0].pdgId()) == mu_id &&
00270 lepton[0].momentum().pT() <= 20*GeV ) {
00271 vetoEvent;
00272 }
00273
00274
00275 if ( fabs(lepton[1].pdgId()) == e_id &&
00276 lepton[1].momentum().pT() > 20*GeV ) {
00277 vetoEvent;
00278 }
00279 else if ( fabs(lepton[1].pdgId()) == mu_id &&
00280 lepton[1].momentum().pT() > 10*GeV ) {
00281 vetoEvent;
00282 }
00283
00284
00285
00286
00287
00288
00289 FourMomentum pT_l = lepton[0].momentum();
00290
00291
00292 double dPhi = deltaPhi( pT_l.phi(), pTmiss_phi);
00293 double mT = sqrt( 2 * pT_l.pT() * eTmiss * (1 - cos(dPhi)) );
00294
00295
00296
00297 double m_eff = eTmiss + pT_l.pT()
00298 + recon_jets[0].momentum().pT()
00299 + recon_jets[1].momentum().pT()
00300 + recon_jets[2].momentum().pT();
00301
00302
00303
00304
00305 if ( fabs( lepton[0].pdgId() ) == e_id ) {
00306
00307 _hist_eTmiss_e->fill(eTmiss, weight);
00308 _hist_m_eff_e->fill(m_eff, weight);
00309
00310 if ( mT > 100*GeV && eTmiss > 125*GeV ) {
00311 _hist_m_eff_e_final->fill(m_eff, weight);
00312 if ( m_eff > 500*GeV && eTmiss > 0.25*m_eff ) {
00313 _count_e_channel->fill(0.5,weight);
00314 }
00315 }
00316 }
00317
00318
00319
00320 else if ( fabs( lepton[0].pdgId() ) == mu_id ) {
00321
00322 _hist_eTmiss_mu->fill(eTmiss, weight);
00323 _hist_m_eff_mu->fill(m_eff, weight);
00324
00325 if ( mT > 100*GeV && eTmiss > 125*GeV ) {
00326 _hist_m_eff_mu_final->fill(m_eff, weight);
00327 if ( m_eff > 500*GeV && eTmiss > 0.25*m_eff ) {
00328 _count_mu_channel->fill(0.5,weight);
00329 }
00330 }
00331
00332 }
00333
00334
00335 }
00336
00337
00338
00339
00340 void finalize() {
00341
00342
00343 scale( _hist_eTmiss_e, 10. * 165. * crossSection()/sumOfWeights() );
00344 scale( _hist_eTmiss_mu, 10. * 165. * crossSection()/sumOfWeights() );
00345 scale( _hist_m_eff_e, 50. * 165. * crossSection()/sumOfWeights() );
00346 scale( _hist_m_eff_mu, 50. * 165. * crossSection()/sumOfWeights() );
00347 scale( _hist_m_eff_e_final, 50. * 165. * crossSection()/sumOfWeights() );
00348 scale( _hist_m_eff_mu_final, 50. * 165. * crossSection()/sumOfWeights() );
00349
00350
00351 }
00352
00353 private:
00354
00355
00356
00357 AIDA::IHistogram1D* _count_e_channel;
00358 AIDA::IHistogram1D* _count_mu_channel;
00359
00360 AIDA::IHistogram1D* _hist_eTmiss_e;
00361 AIDA::IHistogram1D* _hist_eTmiss_mu;
00362
00363 AIDA::IHistogram1D* _hist_m_eff_e;
00364 AIDA::IHistogram1D* _hist_m_eff_mu;
00365 AIDA::IHistogram1D* _hist_m_eff_e_final;
00366 AIDA::IHistogram1D* _hist_m_eff_mu_final;
00367
00368
00369
00370
00371
00372 };
00373
00374
00375
00376
00377 AnalysisBuilder<ATLAS_2011_CONF_2011_090> plugin_ATLAS_2011_CONF_2011_090;
00378
00379
00380 }