2
#include "Rivet/Analysis.hh"
3
#include "Rivet/Tools/BinnedHistogram.hh"
4
#include "Rivet/RivetAIDA.hh"
5
#include "Rivet/Tools/Logging.hh"
6
#include "Rivet/Projections/FinalState.hh"
7
#include "Rivet/Projections/ChargedFinalState.hh"
8
#include "Rivet/Projections/VisibleFinalState.hh"
9
#include "Rivet/Projections/VetoedFinalState.hh"
10
#include "Rivet/Projections/IdentifiedFinalState.hh"
11
#include "Rivet/Projections/FastJets.hh"
12
#include "Rivet/Tools/ParticleIdUtils.hh"
16
/// @author Peter Richardson
17
class ATLAS_2012_I1095236 : public Analysis {
20
/// @name Constructors etc.
25
: Analysis("ATLAS_2012_I1095236")
33
/// @name Analysis methods
36
/// Book histograms and initialise projections before the run
39
// Projection to find the electrons
40
std::vector<std::pair<double, double> > eta_e;
41
eta_e.push_back(make_pair(-2.47,2.47));
42
IdentifiedFinalState elecs(eta_e, 20.0*GeV);
43
elecs.acceptIdPair(ELECTRON);
44
addProjection(elecs, "elecs");
46
// Projection to find the muons
47
std::vector<std::pair<double, double> > eta_m;
48
eta_m.push_back(make_pair(-2.4,2.4));
49
IdentifiedFinalState muons(eta_m, 10.0*GeV);
50
muons.acceptIdPair(MUON);
51
addProjection(muons, "muons");
55
vfs.addVetoPairId(MUON);
56
addProjection(FastJets(vfs, FastJets::ANTIKT, 0.4), "AntiKtJets04");
58
// All tracks (to do deltaR with leptons)
59
addProjection(ChargedFinalState(-3.0,3.0),"cfs");
62
addProjection(VisibleFinalState(-4.9,4.9),"vfs");
65
_count_SR0_A1 = bookHistogram1D("count_SR0_A1", 1, 0., 1.);
66
_count_SR0_B1 = bookHistogram1D("count_SR0_B1", 1, 0., 1.);
67
_count_SR0_C1 = bookHistogram1D("count_SR0_C1", 1, 0., 1.);
68
_count_SR0_A2 = bookHistogram1D("count_SR0_A2", 1, 0., 1.);
69
_count_SR0_B2 = bookHistogram1D("count_SR0_B2", 1, 0., 1.);
70
_count_SR0_C2 = bookHistogram1D("count_SR0_C2", 1, 0., 1.);
71
_count_SR1_D = bookHistogram1D("count_SR1_D" , 1, 0., 1.);
72
_count_SR1_E = bookHistogram1D("count_SR1_E" , 1, 0., 1.);
74
_hist_meff_SR0_A1 = bookHistogram1D("hist_m_eff_SR0_A1", 14, 400., 1800.);
75
_hist_meff_SR0_A2 = bookHistogram1D("hist_m_eff_SR0_A2", 14, 400., 1800.);
76
_hist_meff_SR1_D_e = bookHistogram1D("hist_meff_SR1_D_e" , 16, 600., 2200.);
77
_hist_meff_SR1_D_mu = bookHistogram1D("hist_meff_SR1_D_mu", 16, 600., 2200.);
79
_hist_met_SR0_A1 = bookHistogram1D("hist_met_SR0_A1", 14, 0., 700.);
80
_hist_met_SR0_A2 = bookHistogram1D("hist_met_SR0_A2", 14, 0., 700.);
81
_hist_met_SR0_D_e = bookHistogram1D("hist_met_SR1_D_e" , 15, 0., 600.);
82
_hist_met_SR0_D_mu = bookHistogram1D("hist_met_SR1_D_mu", 15, 0., 600.);
87
/// Perform the per-event analysis
88
void analyze(const Event& event) {
89
const double weight = event.weight();
92
const Jets jets = applyProjection<FastJets>(event, "AntiKtJets04").jetsByPt(20.0*GeV);
93
foreach (const Jet& jet, jets) {
94
if ( fabs( jet.momentum().eta() ) < 2.8 ) {
95
cand_jets.push_back(jet);
99
const ParticleVector cand_e = applyProjection<IdentifiedFinalState>(event, "elecs").particlesByPt();
101
const ParticleVector cand_mu = applyProjection<IdentifiedFinalState>(event, "muons").particlesByPt();
102
// Resolve jet-lepton overlap for jets with |eta| < 2.8
104
foreach ( const Jet& jet, cand_jets ) {
105
if ( fabs( jet.momentum().eta() ) >= 2.8 ) continue;
106
bool away_from_e = true;
107
foreach ( const Particle & e, cand_e ) {
108
if ( deltaR(e.momentum(),jet.momentum()) <= 0.2 ) {
113
if ( away_from_e ) recon_jets.push_back( jet );
116
// get the loose leptons used to define the 0 lepton channel
117
ParticleVector loose_e, loose_mu;
118
foreach ( const Particle & e, cand_e ) {
120
foreach ( const Jet& jet, recon_jets ) {
121
if ( deltaR(e.momentum(),jet.momentum()) < 0.4 ) {
126
if ( away ) loose_e.push_back( e );
128
foreach ( const Particle & mu, cand_mu ) {
130
foreach ( const Jet& jet, recon_jets ) {
131
if ( deltaR(mu.momentum(),jet.momentum()) < 0.4 ) {
136
if ( away ) loose_mu.push_back( mu );
138
// tight leptons for the 1-lepton channel
139
ParticleVector tight_mu;
140
ParticleVector chg_tracks =
141
applyProjection<ChargedFinalState>(event, "cfs").particles();
142
foreach ( const Particle & mu, loose_mu) {
143
if(mu.momentum().perp()<20.) continue;
144
double pTinCone = -mu.momentum().pT();
145
foreach ( const Particle & track, chg_tracks ) {
146
if ( deltaR(mu.momentum(),track.momentum()) <= 0.2 )
147
pTinCone += track.momentum().pT();
149
if ( pTinCone < 1.8*GeV )
150
tight_mu.push_back(mu);
152
ParticleVector tight_e;
153
foreach ( const Particle & e, loose_e ) {
154
if(e.momentum().perp()<25.) continue;
155
double pTinCone = -e.momentum().perp();
156
foreach ( const Particle & track, chg_tracks ) {
157
if ( deltaR(e.momentum(),track.momentum()) <= 0.2 )
158
pTinCone += track.momentum().pT();
160
if (pTinCone/e.momentum().perp()<0.1) {
161
tight_e.push_back(e);
166
ParticleVector vfs_particles =
167
applyProjection<VisibleFinalState>(event, "vfs").particles();
169
foreach ( const Particle & p, vfs_particles ) {
170
pTmiss -= p.momentum();
172
double eTmiss = pTmiss.pT();
174
// get the number of b-tagged jets
175
unsigned int ntagged=0;
176
foreach (const Jet & jet, recon_jets ) {
177
if(jet.momentum().perp()>50. && abs(jet.momentum().eta())<2.5 &&
178
jet.containsBottom() && rand()/static_cast<double>(RAND_MAX)<=0.60)
182
// ATLAS calo problem
183
if(rand()/static_cast<double>(RAND_MAX)<=0.42) {
184
foreach ( const Jet & jet, recon_jets ) {
185
double eta = jet.momentum().rapidity();
186
double phi = jet.momentum().azimuthalAngle(MINUSPI_PLUSPI);
187
if(jet.momentum().perp()>50 && eta>-0.1&&eta<1.5&&phi>-0.9&&phi<-0.5)
193
if(ntagged==0) vetoEvent;
196
if(eTmiss<80.) vetoEvent;
198
// at least 3 jets pT > 50
199
if(recon_jets.size()<3 || recon_jets[2].momentum().perp()<50.)
203
double m_eff = eTmiss;
204
for(unsigned int ix=0;ix<3;++ix)
205
m_eff += recon_jets[ix].momentum().perp();
208
double min_dPhi = 999.999;
209
double pTmiss_phi = pTmiss.phi();
210
for(unsigned int ix=0;ix<3;++ix) {
211
min_dPhi = min( min_dPhi, deltaPhi( pTmiss_phi, recon_jets[ix].momentum().phi() ) );
215
if(loose_e.empty() && loose_mu.empty() &&
216
recon_jets[0].momentum().perp()>130. && eTmiss>130. &&
217
eTmiss/m_eff>0.25 && min_dPhi>0.4) {
219
bool jetCharge = true;
220
for(unsigned int ix=0;ix<3;++ix) {
221
if(fabs(recon_jets[ix].momentum().eta())>2.) continue;
223
foreach(const Particle & p, recon_jets[ix].particles()) {
224
if(PID::threeCharge(p.pdgId())==0) continue;
225
trackpT += p.momentum().perp();
227
if(trackpT/recon_jets[ix].momentum().perp()<0.05)
233
_count_SR0_A1->fill(0.5,weight);
234
_hist_meff_SR0_A1->fill(m_eff,weight);
235
_hist_met_SR0_A1 ->fill(eTmiss,weight);
237
_count_SR0_A2->fill(0.5,weight);
238
_hist_meff_SR0_A2->fill(m_eff,weight);
239
_hist_met_SR0_A2 ->fill(eTmiss,weight);
244
_count_SR0_B1->fill(0.5,weight);
245
if(ntagged>=2) _count_SR0_B2->fill(0.5,weight);
249
_count_SR0_C1->fill(0.5,weight);
250
if(ntagged>=2) _count_SR0_C2->fill(0.5,weight);
256
if(tight_e.size() + tight_mu.size() == 1 &&
257
recon_jets.size()>=4 && recon_jets[3].momentum().perp()>50.&&
258
recon_jets[0].momentum().perp()>60.) {
259
Particle lepton = tight_e.empty() ? tight_mu[0] : tight_e[0];
260
m_eff += lepton.momentum().perp() + recon_jets[3].momentum().perp();
261
// transverse mass cut
262
double mT = 2.*(lepton.momentum().perp()*eTmiss-
263
lepton.momentum().x()*pTmiss.x()-
264
lepton.momentum().y()*pTmiss.y());
266
if(mT>100.&&m_eff>700.) {
268
_count_SR1_D->fill(0.5,weight);
269
if(abs(lepton.pdgId())==ELECTRON) {
270
_hist_meff_SR1_D_e->fill(m_eff,weight);
271
_hist_met_SR0_D_e->fill(eTmiss,weight);
274
_hist_meff_SR1_D_mu->fill(m_eff,weight);
275
_hist_met_SR0_D_mu->fill(eTmiss,weight);
279
_count_SR1_E->fill(0.5,weight);
288
double norm = crossSection()/femtobarn*2.05/sumOfWeights();
289
// these are number of events at 2.05fb^-1 per 100 GeV
290
scale( _hist_meff_SR0_A1 , 100. * norm );
291
scale( _hist_meff_SR0_A2 , 100. * norm );
292
scale( _hist_meff_SR1_D_e , 100. * norm );
293
scale( _hist_meff_SR1_D_mu , 100. * norm );
294
// these are number of events at 2.05fb^-1 per 50 GeV
295
scale( _hist_met_SR0_A1, 50. * norm );
296
scale( _hist_met_SR0_A2, 40. * norm );
297
// these are number of events at 2.05fb^-1 per 40 GeV
298
scale( _hist_met_SR0_D_e , 40. * norm );
299
scale( _hist_met_SR0_D_mu, 40. * norm );
300
// these are number of events at 2.05fb^-1
301
scale(_count_SR0_A1,norm);
302
scale(_count_SR0_B1,norm);
303
scale(_count_SR0_C1,norm);
304
scale(_count_SR0_A2,norm);
305
scale(_count_SR0_B2,norm);
306
scale(_count_SR0_C2,norm);
307
scale(_count_SR1_D ,norm);
308
scale(_count_SR1_E ,norm);
316
AIDA::IHistogram1D* _count_SR0_A1;
317
AIDA::IHistogram1D* _count_SR0_B1;
318
AIDA::IHistogram1D* _count_SR0_C1;
319
AIDA::IHistogram1D* _count_SR0_A2;
320
AIDA::IHistogram1D* _count_SR0_B2;
321
AIDA::IHistogram1D* _count_SR0_C2;
322
AIDA::IHistogram1D* _count_SR1_D;
323
AIDA::IHistogram1D* _count_SR1_E;
325
AIDA::IHistogram1D* _hist_meff_SR0_A1;
326
AIDA::IHistogram1D* _hist_meff_SR0_A2;
327
AIDA::IHistogram1D* _hist_meff_SR1_D_e;
328
AIDA::IHistogram1D* _hist_meff_SR1_D_mu;
329
AIDA::IHistogram1D* _hist_met_SR0_A1;
330
AIDA::IHistogram1D* _hist_met_SR0_A2;
331
AIDA::IHistogram1D* _hist_met_SR0_D_e;
332
AIDA::IHistogram1D* _hist_met_SR0_D_mu;
337
// This global object acts as a hook for the plugin system
338
DECLARE_RIVET_PLUGIN(ATLAS_2012_I1095236);