![]() |
![]() |
Public Member Functions | |
void | analyze (const Event &event) |
CMS_2010_S8547297 () | |
void | finalize () |
void | init () |
Private Attributes | |
double | _etabins [13] |
AIDA::IHistogram1D * | _h_dNch_dEta_2360 |
AIDA::IHistogram1D * | _h_dNch_dEta_900 |
AIDA::IHistogram1D * | _h_dNch_dpT_2360 [12] |
AIDA::IHistogram1D * | _h_dNch_dpT_900 [12] |
int | _netabins |
double | _Nevt_after_cuts |
Definition at line 10 of file CMS_2010_S8547297.cc.
Rivet::CMS_2010_S8547297::CMS_2010_S8547297 | ( | ) | [inline] |
Definition at line 13 of file CMS_2010_S8547297.cc.
: Analysis("CMS_2010_S8547297") { setBeams(PROTON, PROTON); setNeedsCrossSection(false); }
void Rivet::CMS_2010_S8547297::analyze | ( | const Event & | event | ) | [inline] |
Definition at line 76 of file CMS_2010_S8547297.cc.
References _etabins, _h_dNch_dEta_2360, _h_dNch_dEta_900, _h_dNch_dpT_2360, _h_dNch_dpT_900, _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(), 900, 1E-3)){ _h_dNch_dEta_900->fill(eta, weight); for (int ietabin=0; ietabin <= (_netabins-1); ietabin++){ if (fabs(eta) < _etabins[ietabin+1] && fabs(eta) > _etabins[ietabin]){ _h_dNch_dpT_900[ietabin]->fill(pT, weight); } } } if(fuzzyEquals(sqrtS(), 2360, 1E-3)){ _h_dNch_dEta_2360->fill(eta, weight); for (int ietabin=0; ietabin <= (_netabins-1); ietabin++){ if (fabs(eta) < _etabins[ietabin+1] && fabs(eta) > _etabins[ietabin]){ _h_dNch_dpT_2360[ietabin]->fill(pT, weight); } } } } }
void Rivet::CMS_2010_S8547297::finalize | ( | void | ) | [inline] |
Definition at line 134 of file CMS_2010_S8547297.cc.
References _h_dNch_dEta_2360, _h_dNch_dEta_900, _h_dNch_dpT_2360, _h_dNch_dpT_900, _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(), 900, 1E-3)){ for (int ietabin=0; ietabin < _netabins; ietabin++){ scale(_h_dNch_dpT_900[ietabin], normfac/(0.2*2.0)); //AK normalize to events and rapidity-bin } scale(_h_dNch_dEta_900, normfac); } if(fuzzyEquals(sqrtS(), 2360, 1E-3)){ for (int ietabin=0; ietabin < _netabins; ietabin++){ scale(_h_dNch_dpT_2360[ietabin], normfac/(0.2*2.0)); //AK normalize to events and rapidity-bin } scale(_h_dNch_dEta_2360, normfac); } }
void Rivet::CMS_2010_S8547297::init | ( | void | ) | [inline] |
Definition at line 19 of file CMS_2010_S8547297.cc.
References _etabins, _h_dNch_dEta_2360, _h_dNch_dEta_900, _h_dNch_dpT_2360, _h_dNch_dpT_900, _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 900 GeV - pt spectra in eta bins _h_dNch_dpT_900[0] = bookHistogram1D(1, 1, 1); _h_dNch_dpT_900[1] = bookHistogram1D(1, 1, 2); _h_dNch_dpT_900[2] = bookHistogram1D(1, 1, 3); _h_dNch_dpT_900[3] = bookHistogram1D(1, 1, 4); _h_dNch_dpT_900[4] = bookHistogram1D(2, 1, 1); _h_dNch_dpT_900[5] = bookHistogram1D(2, 1, 2); _h_dNch_dpT_900[6] = bookHistogram1D(2, 1, 3); _h_dNch_dpT_900[7] = bookHistogram1D(2, 1, 4); _h_dNch_dpT_900[8] = bookHistogram1D(3, 1, 1); _h_dNch_dpT_900[9] = bookHistogram1D(3, 1, 2); _h_dNch_dpT_900[10] = bookHistogram1D(3, 1, 3); _h_dNch_dpT_900[11] = bookHistogram1D(3, 1, 4); //AK 2360 GeV - pt spectra in eta bins _h_dNch_dpT_2360[0] = bookHistogram1D(4, 1, 1); _h_dNch_dpT_2360[1] = bookHistogram1D(4, 1, 2); _h_dNch_dpT_2360[2] = bookHistogram1D(4, 1, 3); _h_dNch_dpT_2360[3] = bookHistogram1D(4, 1, 4); _h_dNch_dpT_2360[4] = bookHistogram1D(5, 1, 1); _h_dNch_dpT_2360[5] = bookHistogram1D(5, 1, 2); _h_dNch_dpT_2360[6] = bookHistogram1D(5, 1, 3); _h_dNch_dpT_2360[7] = bookHistogram1D(5, 1, 4); _h_dNch_dpT_2360[8] = bookHistogram1D(6, 1, 1); _h_dNch_dpT_2360[9] = bookHistogram1D(6, 1, 2); _h_dNch_dpT_2360[10] = bookHistogram1D(6, 1, 3); _h_dNch_dpT_2360[11] = bookHistogram1D(6, 1, 4); //Eta spectra _h_dNch_dEta_900 = bookHistogram1D(8, 1, 1); _h_dNch_dEta_2360 = bookHistogram1D(8, 1, 2); }
double Rivet::CMS_2010_S8547297::_etabins[13] [private] |
Definition at line 168 of file CMS_2010_S8547297.cc.
AIDA::IHistogram1D* Rivet::CMS_2010_S8547297::_h_dNch_dEta_2360 [private] |
Definition at line 164 of file CMS_2010_S8547297.cc.
Referenced by analyze(), finalize(), and init().
AIDA::IHistogram1D* Rivet::CMS_2010_S8547297::_h_dNch_dEta_900 [private] |
Definition at line 163 of file CMS_2010_S8547297.cc.
Referenced by analyze(), finalize(), and init().
AIDA::IHistogram1D* Rivet::CMS_2010_S8547297::_h_dNch_dpT_2360[12] [private] |
Definition at line 161 of file CMS_2010_S8547297.cc.
Referenced by analyze(), finalize(), and init().
AIDA::IHistogram1D* Rivet::CMS_2010_S8547297::_h_dNch_dpT_900[12] [private] |
Definition at line 160 of file CMS_2010_S8547297.cc.
Referenced by analyze(), finalize(), and init().
int Rivet::CMS_2010_S8547297::_netabins [private] |
Definition at line 166 of file CMS_2010_S8547297.cc.
Referenced by analyze(), finalize(), and init().
double Rivet::CMS_2010_S8547297::_Nevt_after_cuts [private] |
Definition at line 167 of file CMS_2010_S8547297.cc.
Referenced by analyze(), finalize(), and init().