CMS 3D CMS Logo

Public Member Functions | Private Attributes

Rivet::CMS_2011_S8978280 Class Reference

CMS strange particle spectra (Ks, Lambda, Cascade) in pp at 900 and 7000 GeV. More...

List of all members.

Public Member Functions

void analyze (const Event &event)
 Perform the per-event analysis.
 CMS_2011_S8978280 ()
 Constructor.
void finalize ()
void init ()

Private Attributes

AIDA::IHistogram1D * _h_dNKshort_dpT
AIDA::IHistogram1D * _h_dNKshort_dy
AIDA::IHistogram1D * _h_dNLambda_dpT
AIDA::IHistogram1D * _h_dNLambda_dy
AIDA::IHistogram1D * _h_dNXi_dpT
AIDA::IHistogram1D * _h_dNXi_dy
double _Nevt_after_cuts

Detailed Description

CMS strange particle spectra (Ks, Lambda, Cascade) in pp at 900 and 7000 GeV.

Author:
Kevin Stenson

Definition at line 12 of file CMS_2011_S8978280.cc.


Constructor & Destructor Documentation

Rivet::CMS_2011_S8978280::CMS_2011_S8978280 ( ) [inline]

Constructor.

Definition at line 16 of file CMS_2011_S8978280.cc.

      : Analysis("CMS_2011_S8978280"),
        _Nevt_after_cuts(0.0)
    {
      setBeams(PROTON, PROTON);
      setNeedsCrossSection(false);
    }

Member Function Documentation

void Rivet::CMS_2011_S8978280::analyze ( const Event event) [inline]

Perform the per-event analysis.

Definition at line 55 of file CMS_2011_S8978280.cc.

References _h_dNKshort_dpT, _h_dNKshort_dy, _h_dNLambda_dpT, _h_dNLambda_dy, _h_dNXi_dpT, _h_dNXi_dy, _Nevt_after_cuts, abs, event(), AlCaHLTBitMon_ParallelJobs::p, CfgNavigationSchool_cfi::parts, evf::utils::pid, CommonMethods::weight(), and detailsBasic3DVector::y.

                                     {
      if (!fuzzyEquals(sqrtS(), 900*GeV, 1E-3) && !fuzzyEquals(sqrtS(), 7000*GeV, 1E-3) ){
        return;
      }
      const double weight = event.weight();

      _Nevt_after_cuts += weight;

      // This works as long as the KShort, Lambda, and Cascade are not decayed in the generator.
      const UnstableFinalState& parts = applyProjection<UnstableFinalState>(event, "UFS");

      foreach (const Particle& p, parts.particles()) {
        const double pT = p.momentum().pT();
        const double y = fabs(p.momentum().rapidity());
        const PdgId pid = abs(p.pdgId());

        if (y < 2.0) {

          switch (pid) {
          case K0S:
              _h_dNKshort_dy->fill(y, weight);
              _h_dNKshort_dpT->fill(pT, weight);
            break;
          case LAMBDA:
            // Lambda should not have Cascade or Omega ancestors since they should not decay. But just in case...
            if ( !( p.hasAncestor(3322) || p.hasAncestor(-3322) || p.hasAncestor(3312) || p.hasAncestor(-3312) || p.hasAncestor(3334) || p.hasAncestor(-3334) ) ) {
              _h_dNLambda_dy->fill(y, weight);
              _h_dNLambda_dpT->fill(pT, weight);
                 }
            break;
          case XIMINUS:
            // Cascade should not have Omega ancestors since it should not decay.  But just in case...
            if ( !( p.hasAncestor(3334) || p.hasAncestor(-3334) ) ) {
              _h_dNXi_dy->fill(y, weight);
              _h_dNXi_dpT->fill(pT, weight);
            }
            break;
          }
        }
      }
      return;
    }
void Rivet::CMS_2011_S8978280::finalize ( void  ) [inline]

Definition at line 99 of file CMS_2011_S8978280.cc.

References _h_dNKshort_dpT, _h_dNKshort_dy, _h_dNLambda_dpT, _h_dNLambda_dy, _h_dNXi_dpT, _h_dNXi_dy, _Nevt_after_cuts, dir, and pileupReCalc_HLTpaths::scale.

                    {
      if (!fuzzyEquals(sqrtS(), 900*GeV, 1E-3) && !fuzzyEquals(sqrtS(), 7000*GeV, 1E-3) ){
        return;
      }
      AIDA::IHistogramFactory& hf = histogramFactory();
      const string dir = histoDir();

      // Making the Lambda/Kshort and Xi/Lambda ratios vs pT and y
      if (fuzzyEquals(sqrtS(), 900*GeV, 1E-3)){
        hf.divide(dir + "/d07-x01-y01",*_h_dNLambda_dpT, *_h_dNKshort_dpT);
        hf.divide(dir + "/d08-x01-y01",*_h_dNXi_dpT, *_h_dNLambda_dpT);
        hf.divide(dir + "/d09-x01-y01",*_h_dNLambda_dy, *_h_dNKshort_dy);
        hf.divide(dir + "/d10-x01-y01",*_h_dNXi_dy, *_h_dNLambda_dy);
      } else if (fuzzyEquals(sqrtS(), 7000*GeV, 1E-3)){
        hf.divide(dir + "/d07-x01-y02",*_h_dNLambda_dpT, *_h_dNKshort_dpT);
        hf.divide(dir + "/d08-x01-y02",*_h_dNXi_dpT, *_h_dNLambda_dpT);
        hf.divide(dir + "/d09-x01-y02",*_h_dNLambda_dy, *_h_dNKshort_dy);
        hf.divide(dir + "/d10-x01-y02",*_h_dNXi_dy, *_h_dNLambda_dy);
      }

      double normpT = 1.0/_Nevt_after_cuts;
      double normy = 0.5*normpT; // Accounts for using |y| instead of y
      scale(_h_dNKshort_dy, normy);
      scale(_h_dNKshort_dpT, normpT);
      scale(_h_dNLambda_dy, normy);
      scale(_h_dNLambda_dpT, normpT);
      scale(_h_dNXi_dy, normy);
      scale(_h_dNXi_dpT, normpT);

      return;
    }
void Rivet::CMS_2011_S8978280::init ( void  ) [inline]

Definition at line 25 of file CMS_2011_S8978280.cc.

References _h_dNKshort_dpT, _h_dNKshort_dy, _h_dNLambda_dpT, _h_dNLambda_dy, _h_dNXi_dpT, and _h_dNXi_dy.

                {

      addProjection(Beam(), "Beam");

      // Need wide range of eta because cut on rapidity not pseudorapidity
      UnstableFinalState ufs(-8.0, 8.0, 0.0*GeV);
      addProjection(ufs, "UFS");

      // Particle distributions versus rapidity and transverse momentum
      // Only make histograms if the correct energy is used.
      if (fuzzyEquals(sqrtS(), 900*GeV, 1E-3)){
        _h_dNKshort_dy = bookHistogram1D(1, 1, 1);
        _h_dNKshort_dpT = bookHistogram1D(2, 1, 1);
        _h_dNLambda_dy = bookHistogram1D(3, 1, 1);
        _h_dNLambda_dpT = bookHistogram1D(4, 1, 1);
        _h_dNXi_dy = bookHistogram1D(5, 1, 1);
        _h_dNXi_dpT = bookHistogram1D(6, 1, 1);
      } else if (fuzzyEquals(sqrtS(), 7000*GeV, 1E-3)){
        _h_dNKshort_dy = bookHistogram1D(1, 1, 2);
        _h_dNKshort_dpT = bookHistogram1D(2, 1, 2);
        _h_dNLambda_dy = bookHistogram1D(3, 1, 2);
        _h_dNLambda_dpT = bookHistogram1D(4, 1, 2);
        _h_dNXi_dy = bookHistogram1D(5, 1, 2);
        _h_dNXi_dpT = bookHistogram1D(6, 1, 2);
      }
      return;
    }

Member Data Documentation

AIDA::IHistogram1D* Rivet::CMS_2011_S8978280::_h_dNKshort_dpT [private]

Definition at line 138 of file CMS_2011_S8978280.cc.

Referenced by analyze(), finalize(), and init().

AIDA::IHistogram1D* Rivet::CMS_2011_S8978280::_h_dNKshort_dy [private]

Definition at line 137 of file CMS_2011_S8978280.cc.

Referenced by analyze(), finalize(), and init().

AIDA::IHistogram1D* Rivet::CMS_2011_S8978280::_h_dNLambda_dpT [private]

Definition at line 140 of file CMS_2011_S8978280.cc.

Referenced by analyze(), finalize(), and init().

AIDA::IHistogram1D* Rivet::CMS_2011_S8978280::_h_dNLambda_dy [private]

Definition at line 139 of file CMS_2011_S8978280.cc.

Referenced by analyze(), finalize(), and init().

AIDA::IHistogram1D* Rivet::CMS_2011_S8978280::_h_dNXi_dpT [private]

Definition at line 142 of file CMS_2011_S8978280.cc.

Referenced by analyze(), finalize(), and init().

AIDA::IHistogram1D* Rivet::CMS_2011_S8978280::_h_dNXi_dy [private]

Definition at line 141 of file CMS_2011_S8978280.cc.

Referenced by analyze(), finalize(), and init().

Definition at line 134 of file CMS_2011_S8978280.cc.

Referenced by analyze(), and finalize().