2 #include "Rivet/Analysis.hh"
3 #include "Rivet/RivetAIDA.hh"
4 #include "Rivet/Projections/ChargedFinalState.hh"
5 #include "Rivet/Projections/HadronicFinalState.hh"
6 #include "Rivet/Tools/ParticleIdUtils.hh"
7 #include "Rivet/Projections/Beam.hh"
17 setBeams(PROTON, PROTON);
18 setNeedsCrossSection(
false);
131 ChargedFinalState cfs(-2.4, 2.4, 0.0*GeV);
132 addProjection(cfs,
"CFS");
133 addProjection(Beam(),
"Beam");
136 _Nevt_after_cuts = 0;
139 _etabins.push_back(0.5) ; _etabins.push_back(1.0) ; _etabins.push_back(1.5) ; _etabins.push_back(2.0) ; _etabins.push_back(2.4) ;
140 _h_dNch_dn.reserve( _etabins.size() );
143 if(fuzzyEquals(sqrtS(), 900, 1E-3)){
145 for (
unsigned ietabin=0; ietabin < _etabins.size(); ietabin++){
146 t.str(
"") ; t <<
"$|\\eta| <$ " << _etabins[ietabin] <<
" , $\\sqrt(s)$ = 0.9 TeV" ;
147 _h_dNch_dn.push_back( bookHistogram1D( 2 + ietabin, 1, 1 , t.str() ,
"n" ,
"$P_{n}$") );
150 _h_dNch_dn_pt500_eta24 = bookHistogram1D( 20 , 1, 1 ,
"$p_{T} >$ 500 GeV/c , $|\\eta| <$ 2.4 , $\\sqrt(s)$ = 0.9 TeV" ,
"n" ,
"$P_{n}$");
155 _h_dmpt_dNch_eta24 = bookProfile1D( 23 , 1, 1 ,
"$|\\eta| <$ 2.4 , $\\sqrt(s)$ = 0.9 TeV" ,
"n" ,
"$< p_{T}> [ GeV/c ]$");
159 if(fuzzyEquals(sqrtS(), 2360, 1E-3)){
160 for (
unsigned ietabin=0; ietabin < _etabins.size(); ietabin++){
161 t.str(
"") ; t <<
"$|\\eta| <$ " << _etabins[ietabin] <<
" , $\\sqrt(s)$ = 2.36 TeV" ;
162 _h_dNch_dn.push_back( bookHistogram1D( 7 + ietabin, 1, 1 , t.str() ,
"n" ,
"$P_{n}$") );
165 _h_dNch_dn_pt500_eta24 = bookHistogram1D( 21 , 1, 1 ,
"$p_{T} >$ 500 GeV/c , $|\\eta| <$ 2.4 , $\\sqrt(s)$ = 2.36 TeV" ,
"n" ,
"$P_{n}$");
170 _h_dmpt_dNch_eta24 = bookProfile1D( 24 , 1, 1 ,
"$|\\eta| <$ 2.4 , $\\sqrt(s)$ = 2.36 TeV" ,
"n" ,
"$< p_{T}> [ GeV/c ]$");
173 if(fuzzyEquals(sqrtS(), 7000, 1E-3)){
174 for (
unsigned ietabin=0; ietabin < _etabins.size(); ietabin++){
175 t.str(
"") ; t <<
"$|\\eta| <$ " << _etabins[ietabin] <<
" , $\\sqrt(s)$ = 7 TeV" ;
176 _h_dNch_dn.push_back( bookHistogram1D( 12 + ietabin, 1, 1 , t.str() ,
"n" ,
"$P_{n}$") );
179 _h_dNch_dn_pt500_eta24 = bookHistogram1D( 22 , 1, 1 ,
"$p_{T} >$ 500 GeV/c , $|\\eta| <$ 2.4 , $\\sqrt(s)$ = 7 TeV" ,
"n" ,
"$P_{n}$");
184 _h_dmpt_dNch_eta24 = bookProfile1D( 25 , 1, 1 ,
"$|\\eta| <$2.4 , $\\sqrt(s)$ = 7 TeV" ,
"n" ,
"$< p_{T}> [ GeV/c ]$");
195 const double weight =
event.weight();
198 const ChargedFinalState& charged = applyProjection<ChargedFinalState>(
event,
"CFS");
206 _Nevt_after_cuts +=
weight;
209 _nch_in_Evt.assign(_etabins.size() , 0);
210 _nch_in_Evt_pt500.assign(_etabins.size() , 0);
216 foreach (
const Particle&
p, charged.particles()) {
219 if(! PID::isHadron(p.pdgId()))
continue;
221 double pT = p.momentum().pT();
222 double eta = p.momentum().eta();
228 for (
int ietabin=_etabins.size()-1; ietabin >= 0 ; --ietabin){
230 if (fabs(eta) <= _etabins[ietabin]){
231 ++(_nch_in_Evt[ietabin]);
234 ++(_nch_in_Evt_pt500[ietabin]);
245 for (
unsigned ietabin=0; ietabin < _etabins.size(); ietabin++){
246 _h_dNch_dn[ietabin]->fill(_nch_in_Evt[ietabin] , weight);
250 if(_etabins[4] == 2.4 && _etabins[0] == 0.5){
251 if(_nch_in_Evt[4] != 0) _h_dmpt_dNch_eta24->fill(_nch_in_Evt[4] , _sumpt / _nch_in_Evt[4] , weight);
253 _h_dNch_dn_pt500_eta24->fill(_nch_in_Evt_pt500[4] , weight);
262 getLog() <<
Log::WARNING <<
"You changed the number of eta bins, but forgot to propagate it everywhere !! " << endl;
267 void CMS_2011_S8884919::finalize() {
268 getLog() << Log::INFO <<
"Number of events after event selection: " << _Nevt_after_cuts << endl;
278 for (
unsigned ietabin=0; ietabin < _etabins.size(); ietabin++){
279 normalize(_h_dNch_dn[ietabin]);
281 normalize(_h_dNch_dn_pt500_eta24);
vector< int > _nch_in_Evt
AIDA::IHistogram1D * _h_KNO_eta24
AIDA::IHistogram1D * _h_dNch_dn_pt500_eta24
vector< AIDA::IHistogram1D * > _h_dNch_dn
vector< double > _etabins
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
AIDA::IProfile1D * _h_dmpt_dNch_eta24
vector< int > _nch_in_Evt_pt500
AnalysisBuilder< CMS_2011_S8884919 > plugin_CMS_2011_S8884919
AIDA::IHistogram1D * _h_KNO_eta05