Public Member Functions | |
void | analyze (const Event &event) |
CMS_2010_S8656010 () | |
void | finalize () |
void | init () |
Private Attributes | |
double | _etabins [13] |
AIDA::IHistogram1D * | _h_dNch_dEta_7 |
AIDA::IHistogram1D * | _h_dNch_dpT_7 [12] |
int | _netabins |
double | _Nevt_after_cuts |
Definition at line 10 of file CMS_2010_S8656010.cc.
Rivet::CMS_2010_S8656010::CMS_2010_S8656010 | ( | ) | [inline] |
Definition at line 13 of file CMS_2010_S8656010.cc.
: Analysis("CMS_2010_S8656010") { setBeams(PROTON, PROTON); setNeedsCrossSection(false); }
void Rivet::CMS_2010_S8656010::analyze | ( | const Event & | event | ) | [inline] |
Definition at line 57 of file CMS_2010_S8656010.cc.
References _etabins, _h_dNch_dEta_7, _h_dNch_dpT_7, _netabins, _Nevt_after_cuts, eta(), event(), L1TEmulatorMonitor_cff::p, and CommonMethods::weight().
{ const double weight = event.weight(); // This "trigger" is commented out for now - a HF tower is not defined on particle level // better: turn off Single Diffraction in the MC //AK const FinalState& hadronic = applyProjection<FinalState>(event, "HFS"); //AK double HFEsumplus = 0.0; //AK double HFEsumminus = 0.0; //AK foreach (const Particle& p, hadronic.particles()) { //AK double Ehad = p.momentum().E(); //AK double etahad = p.momentum().eta(); //AK //AK if(etahad < 5.2 && etahad > 3.15 ) //AK HFEsumplus = HFEsumplus + Ehad; //AK //AK if(etahad > -5.2 && etahad < -3.15 ) //AK HFEsumminus = HFEsumminus + Ehad; //AK //AK } //AK if (!(HFEsumplus > 3.0 && HFEsumminus > 3.0)) vetoEvent; //charge particles const ChargedFinalState& charged = applyProjection<ChargedFinalState>(event, "CFS"); if (charged.particles().size()<1) { vetoEvent; } _Nevt_after_cuts += weight; foreach (const Particle& p, charged.particles()) { double pT = p.momentum().pT(); double eta = p.momentum().eta(); if(fuzzyEquals(sqrtS(), 7000, 1E-3)){ _h_dNch_dEta_7->fill(eta, weight); for (int ietabin=0; ietabin <= (_netabins-1); ietabin++){ if (fabs(eta) < _etabins[ietabin+1] && fabs(eta) > _etabins[ietabin]){ _h_dNch_dpT_7[ietabin]->fill(pT, weight); } } } } }
void Rivet::CMS_2010_S8656010::finalize | ( | void | ) | [inline] |
Definition at line 105 of file CMS_2010_S8656010.cc.
References _h_dNch_dEta_7, _h_dNch_dpT_7, _netabins, _Nevt_after_cuts, and dtT0WireCalibration_cfg::INFO.
{ double normfac=1.0/_Nevt_after_cuts; getLog() << Log::INFO << "Number of events after event selection: " << _Nevt_after_cuts << endl; if(fuzzyEquals(sqrtS(), 7000, 1E-3)){ for (int ietabin=0; ietabin < _netabins; ietabin++){ scale(_h_dNch_dpT_7[ietabin], normfac/(0.2*2.0)); //AK normalize to events and rapidity-bin } scale(_h_dNch_dEta_7, normfac); } }
void Rivet::CMS_2010_S8656010::init | ( | void | ) | [inline] |
Definition at line 19 of file CMS_2010_S8656010.cc.
References _etabins, _h_dNch_dEta_7, _h_dNch_dpT_7, _netabins, and _Nevt_after_cuts.
{ ChargedFinalState cfs(-2.5, 2.5, 0.1*GeV); addProjection(cfs, "CFS"); addProjection(Beam(), "Beam"); FinalState hfs(-5.5, 5.5, 0.1*GeV); addProjection(hfs, "HFS"); _Nevt_after_cuts = 0; //eta bins _netabins=12; for (int ietabin=0; ietabin <= _netabins; ietabin++){ _etabins[ietabin]=0.2*ietabin; } //AK 7 TeV - pt spectra in eta bins _h_dNch_dpT_7[0] = bookHistogram1D(1, 1, 1); _h_dNch_dpT_7[1] = bookHistogram1D(1, 1, 2); _h_dNch_dpT_7[2] = bookHistogram1D(1, 1, 3); _h_dNch_dpT_7[3] = bookHistogram1D(1, 1, 4); _h_dNch_dpT_7[4] = bookHistogram1D(2, 1, 1); _h_dNch_dpT_7[5] = bookHistogram1D(2, 1, 2); _h_dNch_dpT_7[6] = bookHistogram1D(2, 1, 3); _h_dNch_dpT_7[7] = bookHistogram1D(2, 1, 4); _h_dNch_dpT_7[8] = bookHistogram1D(3, 1, 1); _h_dNch_dpT_7[9] = bookHistogram1D(3, 1, 2); _h_dNch_dpT_7[10] = bookHistogram1D(3, 1, 3); _h_dNch_dpT_7[11] = bookHistogram1D(3, 1, 4); _h_dNch_dEta_7 = bookHistogram1D(5, 1, 1); }
double Rivet::CMS_2010_S8656010::_etabins[13] [private] |
Definition at line 128 of file CMS_2010_S8656010.cc.
AIDA::IHistogram1D* Rivet::CMS_2010_S8656010::_h_dNch_dEta_7 [private] |
Definition at line 124 of file CMS_2010_S8656010.cc.
Referenced by analyze(), finalize(), and init().
AIDA::IHistogram1D* Rivet::CMS_2010_S8656010::_h_dNch_dpT_7[12] [private] |
Definition at line 123 of file CMS_2010_S8656010.cc.
Referenced by analyze(), finalize(), and init().
int Rivet::CMS_2010_S8656010::_netabins [private] |
Definition at line 126 of file CMS_2010_S8656010.cc.
Referenced by analyze(), finalize(), and init().
double Rivet::CMS_2010_S8656010::_Nevt_after_cuts [private] |
Definition at line 127 of file CMS_2010_S8656010.cc.
Referenced by analyze(), finalize(), and init().