rivet is hosted by Hepforge, IPPP Durham
SFM_1984_S1178091.cc
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/Projections/ChargedFinalState.hh"
00004 
00005 namespace Rivet {
00006 
00007 
00008   /// @brief SFM charged multiplicities in NSD and inelastic minbias events
00009   class SFM_1984_S1178091 : public Analysis {
00010   public:
00011 
00012     /// Constructor
00013     SFM_1984_S1178091() : Analysis("SFM_1984_S1178091") {
00014       _sumW = 0;
00015       _sumWDiff = 0;
00016     }
00017 
00018 
00019     /// @name Analysis methods
00020     //@{
00021 
00022     void init() {
00023       // Projections
00024       /// @todo Corrected to full phase space?
00025       addProjection(ChargedFinalState(-10,10,250*MeV), "FS");
00026 
00027       // Histograms
00028       if (fuzzyEquals(sqrtS()/GeV, 30.4, 1E-1)) {
00029         _hist_multiplicity_inel = bookHisto1D(1, 1, 1);
00030         _hist_multiplicity_nsd = bookHisto1D(2, 1, 1);
00031       } else if (fuzzyEquals(sqrtS(), 44.5, 1E-1)) {
00032         _hist_multiplicity_inel = bookHisto1D(1, 1, 2);
00033         _hist_multiplicity_nsd = bookHisto1D(2, 1, 2);
00034       } else if (fuzzyEquals(sqrtS(), 52.2, 1E-1)) {
00035         _hist_multiplicity_inel = bookHisto1D(1, 1, 3);
00036         _hist_multiplicity_nsd = bookHisto1D(2, 1, 3);
00037       } else if (fuzzyEquals(sqrtS(), 62.2, 1E-1)) {
00038         _hist_multiplicity_inel = bookHisto1D(1, 1, 4);
00039         _hist_multiplicity_nsd = bookHisto1D(2, 1, 4);
00040       }
00041 
00042     }
00043 
00044 
00045     // Analyse each event
00046     void analyze(const Event& event) {
00047       const double weight = event.weight();
00048       const ChargedFinalState& fs = applyProjection<ChargedFinalState>(event, "FS");
00049       //const size_t numParticles = fs.particles().size();
00050       size_t N=0;
00051 
00052       /// @todo Any trigger?
00053       //
00054       // Trigger
00055       //if (numParticles <1 ) vetoEvent;
00056 
00057       // Decide whether event is of diffractive type or not
00058       // @todo It is not so clear in the paper how this distinction is made.
00059       // They seem to require either exactly one particle with Feynman x larger
00060       // than 0.8 to call an event diffractive or that there are no tracks
00061       // reconstructed in either of the two hemispheres. For the latter
00062       // they require in addition also the number of charged particles
00063       // to be smaller than 8.
00064       int n_left(0), n_right(0), n_large_x(0);
00065       foreach (const Particle& p, fs.particles()) {
00066         // Calculate the particles' Feynman x
00067         if (p.pT() <=3*GeV) {
00068           N++;
00069           const double x_feyn = 2.0 * fabs(p.pz())/sqrtS();
00070           if (x_feyn > 0.8 ) n_large_x += 1;
00071 
00072           // Pseudorapidity
00073           const double eta = p.eta();
00074           if (eta > 0.0) n_right += 1;
00075           else if (eta < 0.0) n_left += 1;
00076         }
00077       }
00078       MSG_DEBUG("N_left: " << n_left << ", "
00079                 << "N_right: " << n_right << ", "
00080                 << "N_large_x: " << n_large_x);
00081 
00082       if ( N < 1 ) vetoEvent;
00083       // Not sure about the "=="!
00084       // @todo Not sure about the "== 1", the paper says no charged particle
00085       // that was reconstructed so the incoming protons must run down the beam
00086       // pipe. Since we look a the complete final state here no particle being
00087       // reconstructed should be equal to one particle (proton) in each
00088       // hemisphere.  The "< 8" is also not certain.
00089       const bool isDiffractive = (n_large_x == 1) ||
00090         (( (n_left + n_right) == 1) && (N < 7) );
00091         //((n_left == 1 || n_right == 1) && N < 8 );
00092         //((n_left == 1 || n_right == 1) && numParticles < 8 );
00093 
00094       // Increment weight counters
00095       _sumW += weight;
00096       _sumWDiff += weight;
00097 
00098       // Fill histos of charged multiplicity distributions
00099       //_hist_multiplicity_inel->fill(numParticles, weight);
00100       //if (!isDiffractive) _hist_multiplicity_nsd->fill(numParticles, weight);
00101       _hist_multiplicity_inel->fill(N, weight);
00102       if (!isDiffractive) _hist_multiplicity_nsd->fill(N, weight);
00103     }
00104 
00105 
00106     void finalize() {
00107       scale(_hist_multiplicity_inel, 1.0/_sumWDiff);
00108       scale(_hist_multiplicity_nsd, 1.0/_sumW );
00109     }
00110 
00111     //@}
00112 
00113 
00114   private:
00115 
00116     /// @name Weight counters
00117     //@{
00118     double _sumW, _sumWDiff;
00119     //@}
00120 
00121     /// @name Histograms
00122     //@{
00123     Histo1DPtr _hist_multiplicity_inel;
00124     Histo1DPtr _hist_multiplicity_nsd;
00125     //@}
00126 
00127   };
00128 
00129 
00130 
00131   // The hook for the plugin system
00132   DECLARE_RIVET_PLUGIN(SFM_1984_S1178091);
00133 
00134 }