ALEPH_1996_S3196992.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/Projections/FinalState.hh" 00004 #include "Rivet/Projections/ChargedFinalState.hh" 00005 #include "Rivet/Projections/IdentifiedFinalState.hh" 00006 #include "Rivet/Projections/FastJets.hh" 00007 #include "Rivet/Projections/Thrust.hh" 00008 00009 namespace Rivet { 00010 00011 00012 /// @brief ALEPH measurement of quark-to-photon fragmentation function 00013 class ALEPH_1996_S3196992 : public Analysis { 00014 public: 00015 00016 /// Constructor 00017 ALEPH_1996_S3196992() 00018 : Analysis("ALEPH_1996_S3196992") 00019 { } 00020 00021 00022 /// @name Analysis methods 00023 //@{ 00024 00025 void init() { 00026 // Set up projections 00027 FinalState fs; 00028 addProjection(FastJets(fs, FastJets::DURHAM, 0.7), "DurhamJets"); 00029 IdentifiedFinalState ifs; //(Cuts::pT > 0); 00030 ifs.acceptId(PID::PHOTON); 00031 addProjection(ifs, "Photons"); 00032 addProjection(Thrust(fs), "Thrust"); 00033 addProjection(ChargedFinalState(), "CFS"); 00034 00035 // Book histograms 00036 _h_z_2jet_001 = bookHisto1D(1, 1, 1); 00037 _h_z_2jet_006 = bookHisto1D(2, 1, 1); 00038 _h_z_2jet_01 = bookHisto1D(3, 1, 1); 00039 _h_z_2jet_033 = bookHisto1D(4, 1, 1); 00040 _h_z_3jet_001 = bookHisto1D(5, 1, 1); 00041 _h_z_3jet_006 = bookHisto1D(6, 1, 1); 00042 _h_z_3jet_01 = bookHisto1D(7, 1, 1); 00043 _h_z_4jet_001 = bookHisto1D(8, 1, 1); 00044 } 00045 00046 00047 /// Perform the per-event analysis 00048 void analyze(const Event& event) { 00049 const double weight = event.weight(); 00050 00051 if (applyProjection<FinalState>(event, "CFS").particles().size()<2) { 00052 vetoEvent; 00053 } 00054 00055 const Particles allphotons = applyProjection<IdentifiedFinalState>(event, "Photons").particles(); 00056 Particles photons; 00057 foreach (const Particle& photon, allphotons) { 00058 if (fabs(cos(photon.theta()))<0.95 && photon.E()>5.0*GeV) { 00059 photons.push_back(photon); 00060 } 00061 } 00062 if (photons.size()<1) { 00063 vetoEvent; 00064 } 00065 00066 const Thrust& thrust = applyProjection<Thrust>(event, "Thrust"); 00067 if (fabs(cos(thrust.thrustAxis().theta()))>0.95) { 00068 vetoEvent; 00069 } 00070 00071 const FastJets& durjet = applyProjection<FastJets>(event, "DurhamJets"); 00072 00073 foreach (const Particle& photon, photons) { 00074 00075 PseudoJets jets_001 = durjet.clusterSeq()->exclusive_jets_ycut(0.01); 00076 foreach (const fastjet::PseudoJet& jet, jets_001) { 00077 if (particleInJet(photon, jet, durjet.clusterSeq())) { 00078 double zgamma = photon.E()/jet.E(); 00079 if (jets_001.size() == 2) _h_z_2jet_001->fill(zgamma, weight); 00080 else if (jets_001.size() == 3) _h_z_3jet_001->fill(zgamma, weight); 00081 else if (jets_001.size() > 3) _h_z_4jet_001->fill(zgamma, weight); 00082 break; 00083 } 00084 } 00085 00086 PseudoJets jets_006 = durjet.clusterSeq()->exclusive_jets_ycut(0.06); 00087 foreach (const fastjet::PseudoJet& jet, jets_006) { 00088 if (particleInJet(photon, jet, durjet.clusterSeq())) { 00089 double zgamma = photon.E()/jet.E(); 00090 if (jets_006.size() == 2) _h_z_2jet_006->fill(zgamma, weight); 00091 else if (jets_006.size() == 3) _h_z_3jet_006->fill(zgamma, weight); 00092 break; 00093 } 00094 } 00095 00096 PseudoJets jets_01 = durjet.clusterSeq()->exclusive_jets_ycut(0.1); 00097 foreach (const fastjet::PseudoJet& jet, jets_01) { 00098 if (particleInJet(photon, jet, durjet.clusterSeq())) { 00099 double zgamma = photon.E()/jet.E(); 00100 if (jets_01.size() == 2) _h_z_2jet_01->fill(zgamma, weight); 00101 else if (jets_01.size() == 3) _h_z_3jet_01->fill(zgamma, weight); 00102 break; 00103 } 00104 } 00105 00106 PseudoJets jets_033 = durjet.clusterSeq()->exclusive_jets_ycut(0.33); 00107 foreach (const fastjet::PseudoJet& jet, jets_033) { 00108 if (particleInJet(photon, jet, durjet.clusterSeq())) { 00109 double zgamma = photon.E()/jet.E(); 00110 if (jets_033.size() == 2) _h_z_2jet_033->fill(zgamma, weight); 00111 break; 00112 } 00113 } 00114 00115 } 00116 } 00117 00118 00119 bool particleInJet(const Particle& p, const fastjet::PseudoJet& jet, 00120 const fastjet::ClusterSequence* cseq ) { 00121 foreach (const fastjet::PseudoJet& jetpart, cseq->constituents(jet)) { 00122 if (fuzzyEquals(jetpart.E(), p.E()) && 00123 fuzzyEquals(jetpart.px(), p.px()) && 00124 fuzzyEquals(jetpart.py(), p.py()) && 00125 fuzzyEquals(jetpart.pz(), p.pz())) { 00126 return true; 00127 } 00128 } 00129 return false; 00130 } 00131 00132 00133 /// Normalise histograms etc., after the run 00134 void finalize() { 00135 scale(_h_z_2jet_001, 1000.0/sumOfWeights()); 00136 scale(_h_z_2jet_006, 1000.0/sumOfWeights()); 00137 scale(_h_z_2jet_01, 1000.0/sumOfWeights()); 00138 scale(_h_z_2jet_033, 1000.0/sumOfWeights()); 00139 scale(_h_z_3jet_001, 1000.0/sumOfWeights()); 00140 scale(_h_z_3jet_006, 1000.0/sumOfWeights()); 00141 scale(_h_z_3jet_01, 1000.0/sumOfWeights()); 00142 scale(_h_z_4jet_001, 1000.0/sumOfWeights()); 00143 } 00144 00145 //@} 00146 00147 00148 private: 00149 00150 /// @name Histograms 00151 //@{ 00152 00153 Histo1DPtr _h_z_2jet_001, _h_z_2jet_006, _h_z_2jet_01, _h_z_2jet_033; 00154 Histo1DPtr _h_z_3jet_001, _h_z_3jet_006, _h_z_3jet_01; 00155 Histo1DPtr _h_z_4jet_001; 00156 //@} 00157 00158 }; 00159 00160 00161 00162 // The hook for the plugin system 00163 DECLARE_RIVET_PLUGIN(ALEPH_1996_S3196992); 00164 00165 } Generated on Thu Mar 10 2016 08:29:45 for The Rivet MC analysis system by ![]() |