00001
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/RivetAIDA.hh"
00004 #include "Rivet/Tools/Logging.hh"
00005 #include "Rivet/Projections/FinalState.hh"
00006 #include "Rivet/Projections/ChargedFinalState.hh"
00007 #include "Rivet/Projections/IdentifiedFinalState.hh"
00008 #include "Rivet/Projections/FastJets.hh"
00009 #include "Rivet/Projections/Thrust.hh"
00010
00011 namespace Rivet {
00012
00013
00014
00015 class ALEPH_1996_S3196992 : public Analysis {
00016 public:
00017
00018
00019 ALEPH_1996_S3196992() : Analysis("ALEPH_1996_S3196992")
00020 {
00021 setBeams(ELECTRON, POSITRON);
00022 }
00023
00024
00025
00026
00027
00028 void init() {
00029
00030 FinalState fs;
00031 addProjection(FastJets(fs, FastJets::DURHAM, 0.7), "DurhamJets");
00032 IdentifiedFinalState ifs(-MAXRAPIDITY, +MAXRAPIDITY, 0.0);
00033 ifs.acceptId(PHOTON);
00034 addProjection(ifs, "Photons");
00035 addProjection(Thrust(fs), "Thrust");
00036 addProjection(ChargedFinalState(), "CFS");
00037
00038
00039 _h_z_2jet_001 = bookHistogram1D(1, 1, 1);
00040 _h_z_2jet_006 = bookHistogram1D(2, 1, 1);
00041 _h_z_2jet_01 = bookHistogram1D(3, 1, 1);
00042 _h_z_2jet_033 = bookHistogram1D(4, 1, 1);
00043 _h_z_3jet_001 = bookHistogram1D(5, 1, 1);
00044 _h_z_3jet_006 = bookHistogram1D(6, 1, 1);
00045 _h_z_3jet_01 = bookHistogram1D(7, 1, 1);
00046 _h_z_4jet_001 = bookHistogram1D(8, 1, 1);
00047 }
00048
00049
00050
00051 void analyze(const Event& event) {
00052 const double weight = event.weight();
00053
00054 if (applyProjection<FinalState>(event, "CFS").particles().size()<2) {
00055 vetoEvent;
00056 }
00057
00058 const ParticleVector allphotons = applyProjection<IdentifiedFinalState>(event, "Photons").particles();
00059 ParticleVector photons;
00060 foreach (const Particle& photon, allphotons) {
00061 if (fabs(cos(photon.momentum().theta()))<0.95 && photon.momentum().E()>5.0*GeV) {
00062 photons.push_back(photon);
00063 }
00064 }
00065 if (photons.size()<1) {
00066 vetoEvent;
00067 }
00068
00069 const Thrust& thrust = applyProjection<Thrust>(event, "Thrust");
00070 if (fabs(cos(thrust.thrustAxis().theta()))>0.95) {
00071 vetoEvent;
00072 }
00073
00074 const FastJets& durjet = applyProjection<FastJets>(event, "DurhamJets");
00075
00076 foreach (const Particle& photon, photons) {
00077
00078 PseudoJets jets_001 = durjet.clusterSeq()->exclusive_jets_ycut(0.01);
00079 foreach (const fastjet::PseudoJet& jet, jets_001) {
00080 if (particleInJet(photon, jet, durjet.clusterSeq())) {
00081 double zgamma = photon.momentum().E()/jet.E();
00082 if (jets_001.size() == 2) _h_z_2jet_001->fill(zgamma, weight);
00083 else if (jets_001.size() == 3) _h_z_3jet_001->fill(zgamma, weight);
00084 else if (jets_001.size() > 3) _h_z_4jet_001->fill(zgamma, weight);
00085 break;
00086 }
00087 }
00088
00089 PseudoJets jets_006 = durjet.clusterSeq()->exclusive_jets_ycut(0.06);
00090 foreach (const fastjet::PseudoJet& jet, jets_006) {
00091 if (particleInJet(photon, jet, durjet.clusterSeq())) {
00092 double zgamma = photon.momentum().E()/jet.E();
00093 if (jets_006.size() == 2) _h_z_2jet_006->fill(zgamma, weight);
00094 else if (jets_006.size() == 3) _h_z_3jet_006->fill(zgamma, weight);
00095 break;
00096 }
00097 }
00098
00099 PseudoJets jets_01 = durjet.clusterSeq()->exclusive_jets_ycut(0.1);
00100 foreach (const fastjet::PseudoJet& jet, jets_01) {
00101 if (particleInJet(photon, jet, durjet.clusterSeq())) {
00102 double zgamma = photon.momentum().E()/jet.E();
00103 if (jets_01.size() == 2) _h_z_2jet_01->fill(zgamma, weight);
00104 else if (jets_01.size() == 3) _h_z_3jet_01->fill(zgamma, weight);
00105 break;
00106 }
00107 }
00108
00109 PseudoJets jets_033 = durjet.clusterSeq()->exclusive_jets_ycut(0.33);
00110 foreach (const fastjet::PseudoJet& jet, jets_033) {
00111 if (particleInJet(photon, jet, durjet.clusterSeq())) {
00112 double zgamma = photon.momentum().E()/jet.E();
00113 if (jets_033.size() == 2) _h_z_2jet_033->fill(zgamma, weight);
00114 break;
00115 }
00116 }
00117
00118 }
00119 }
00120
00121
00122 bool particleInJet(const Particle& p, const fastjet::PseudoJet& jet,
00123 const fastjet::ClusterSequence* cseq ) {
00124 foreach (const fastjet::PseudoJet& jetpart, cseq->constituents(jet)) {
00125 if (fuzzyEquals(jetpart.E(), p.momentum().E()) &&
00126 fuzzyEquals(jetpart.px(), p.momentum().x()) &&
00127 fuzzyEquals(jetpart.py(), p.momentum().y()) &&
00128 fuzzyEquals(jetpart.pz(), p.momentum().z())) {
00129 return true;
00130 }
00131 }
00132 return false;
00133 }
00134
00135
00136
00137 void finalize() {
00138 scale(_h_z_2jet_001, 1000.0/sumOfWeights());
00139 scale(_h_z_2jet_006, 1000.0/sumOfWeights());
00140 scale(_h_z_2jet_01, 1000.0/sumOfWeights());
00141 scale(_h_z_2jet_033, 1000.0/sumOfWeights());
00142 scale(_h_z_3jet_001, 1000.0/sumOfWeights());
00143 scale(_h_z_3jet_006, 1000.0/sumOfWeights());
00144 scale(_h_z_3jet_01, 1000.0/sumOfWeights());
00145 scale(_h_z_4jet_001, 1000.0/sumOfWeights());
00146 }
00147
00148
00149
00150
00151 private:
00152
00153
00154
00155
00156 AIDA::IHistogram1D *_h_z_2jet_001, *_h_z_2jet_006, *_h_z_2jet_01, *_h_z_2jet_033;
00157 AIDA::IHistogram1D *_h_z_3jet_001, *_h_z_3jet_006, *_h_z_3jet_01;
00158 AIDA::IHistogram1D *_h_z_4jet_001;
00159
00160
00161 };
00162
00163
00164
00165
00166 AnalysisBuilder<ALEPH_1996_S3196992> plugin_ALEPH_1996_S3196992;
00167
00168
00169 }