CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
Rivet::CMS_2011_S8884919 Class Reference
Inheritance diagram for Rivet::CMS_2011_S8884919:

Public Member Functions

 CMS_2011_S8884919 ()
 

Private Member Functions

void analyze (const Event &)
 
void finalize ()
 
void init ()
 

Private Attributes

vector< double > _etabins
 
AIDA::IProfile1D * _h_dmpt_dNch_eta24
 
vector< AIDA::IHistogram1D * > _h_dNch_dn
 
AIDA::IHistogram1D * _h_dNch_dn_pt500_eta24
 
AIDA::IHistogram1D * _h_KNO_eta05
 
AIDA::IHistogram1D * _h_KNO_eta24
 
vector< int > _nch_in_Evt
 
vector< int > _nch_in_Evt_pt500
 
double _Nevt_after_cuts
 
double _sumpt
 
int nch_max
 

Detailed Description

Definition at line 13 of file CMS_2011_S8884919.cc.

Constructor & Destructor Documentation

Rivet::CMS_2011_S8884919::CMS_2011_S8884919 ( )
inline

Definition at line 16 of file CMS_2011_S8884919.cc.

16  : Analysis("CMS_2011_S8884919") {
17  setBeams(PROTON, PROTON);
18  setNeedsCrossSection(false);
19  }

Member Function Documentation

void Rivet::CMS_2011_S8884919::analyze ( const Event event)
private

Definition at line 194 of file CMS_2011_S8884919.cc.

References eta(), event(), L1TEmulatorMonitor_cff::p, dqm::qstatus::WARNING, and CommonMethods::weight().

194  {
195  const double weight = event.weight();
196 
197  //charge particles
198  const ChargedFinalState& charged = applyProjection<ChargedFinalState>(event, "CFS");
199 
200  //This cut is not needed
201  /*if (charged.particles().size()<1) {
202  vetoEvent;
203  }*/
204 
205 
207 
208  //resetting the multiplicity for the event to 0;
209  _nch_in_Evt.assign(_etabins.size() , 0);
210  _nch_in_Evt_pt500.assign(_etabins.size() , 0);
211  _sumpt = 0;
212 
213  //std::cout << charged.size() << std::endl;
214 
215  //Loop over particles in event
216  foreach (const Particle& p, charged.particles()) {
217 
218  //selecting only charged hadrons
219  if(! PID::isHadron(p.pdgId())) continue;
220 
221  double pT = p.momentum().pT();
222  double eta = p.momentum().eta();
223 
224  _sumpt+=pT;
225 
226  //cout << "eta : " << eta << " pT : " << pT << endl;
227 
228  for (int ietabin=_etabins.size()-1; ietabin >= 0 ; --ietabin){
229  //cout << " etabin : " << _etabins[ietabin] << " res : " << (fabs(eta) <= _etabins[ietabin]) << endl;
230  if (fabs(eta) <= _etabins[ietabin]){
231  ++(_nch_in_Evt[ietabin]);
232 
233  if(pT>0.5)
234  ++(_nch_in_Evt_pt500[ietabin]);
235  }
236  //break loop to go faster
237  else
238  break;
239 
240  }
241 
242  }
243 
244  //filling mutliplicity dependent histogramms
245  for (unsigned ietabin=0; ietabin < _etabins.size(); ietabin++){
246  _h_dNch_dn[ietabin]->fill(_nch_in_Evt[ietabin] , weight);
247  }
248 
249  //Do only if eta bins are the needed ones
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);
252 
253  _h_dNch_dn_pt500_eta24->fill(_nch_in_Evt_pt500[4] , weight);
254 
255  /*if( _nch_in_Evt[4] < nch_max ){
256  (_v_dNch_dn_binning1_eta05[_nch_in_Evt[0]])+=weight;
257  (_v_dNch_dn_binning1_eta24[_nch_in_Evt[0]])+=weight;
258  }*/
259 
260  }
261  else
262  getLog() << Log::WARNING << "You changed the number of eta bins, but forgot to propagate it everywhere !! " << endl;
263 
264  }
AIDA::IHistogram1D * _h_dNch_dn_pt500_eta24
static const int WARNING
T eta() const
vector< AIDA::IHistogram1D * > _h_dNch_dn
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
void Rivet::CMS_2011_S8884919::finalize ( void  )
private

Definition at line 267 of file CMS_2011_S8884919.cc.

267  {
268  getLog() << Log::INFO << "Number of events after event selection: " << _Nevt_after_cuts << endl;
269 
270  /*makeMoments(_v_dNch_dn_binning1_eta05 , _moments_eta05);
271  makeMoments(_v_dNch_dn_binning1_eta24 , _moments_eta24);
272 
273  for(int m = 0 ; m < _moments_eta05.n ; ++m){
274  _h_cq_eta05->fill(m , _moments_eta05.cq[m]);
275  _h_cq_eta24->fill(m , _moments_eta24.cq[m]);
276  }*/
277 
278  for (unsigned ietabin=0; ietabin < _etabins.size(); ietabin++){
279  normalize(_h_dNch_dn[ietabin]);
280  }
281  normalize(_h_dNch_dn_pt500_eta24);
282  }
AIDA::IHistogram1D * _h_dNch_dn_pt500_eta24
vector< AIDA::IHistogram1D * > _h_dNch_dn
void Rivet::CMS_2011_S8884919::init ( void  )
private

Definition at line 130 of file CMS_2011_S8884919.cc.

References matplotRender::t.

130  {
131  ChargedFinalState cfs(-2.4, 2.4, 0.0*GeV);
132  addProjection(cfs, "CFS");
133  addProjection(Beam(), "Beam");
134 
135  nch_max = 400;
136  _Nevt_after_cuts = 0;
137 
138  //eta bins
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() );
141  ostringstream t("");
142 
143  if(fuzzyEquals(sqrtS(), 900, 1E-3)){
144 
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}$") );
148  }
149 
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}$");
151 
152  //_h_cq_eta05 = bookHistogram1D( 17 , 1, 1 , "$|\\eta| <$ 0.5 , $\\sqrt(s)$ = 0.9 TeV" , "q" , "$C_{q}$");
153  //_h_cq_eta24 = bookHistogram1D( 17 , 1, 2 , "$|\\eta| <$ 2.4 , $\\sqrt(s)$ = 0.9 TeV" , "q" , "$C_{q}$");
154 
155  _h_dmpt_dNch_eta24 = bookProfile1D( 23 , 1, 1 , "$|\\eta| <$ 2.4 , $\\sqrt(s)$ = 0.9 TeV" , "n" , "$< p_{T}> [ GeV/c ]$");
156 
157  }
158 
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}$") );
163  }
164 
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}$");
166 
167  //_h_cq_eta05 = bookHistogram1D( 18 , 1, 1 , "$|\\eta| <$ 0.5 , $\\sqrt(s)$ = 2.36 TeV" , "q" , "$C_{q}$");
168  //_h_cq_eta24 = bookHistogram1D( 18 , 1, 2 , "$|\\eta| <$ 2.4 , $\\sqrt(s)$ = 2.36 TeV" , "q" , "$C_{q}$");
169 
170  _h_dmpt_dNch_eta24 = bookProfile1D( 24 , 1, 1 , "$|\\eta| <$ 2.4 , $\\sqrt(s)$ = 2.36 TeV" , "n" , "$< p_{T}> [ GeV/c ]$");
171  }
172 
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}$") );
177  }
178 
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}$");
180 
181  //_h_cq_eta05 = bookHistogram1D( 19 , 1, 1 , "$|\\eta| <$ 0.5 , $\\sqrt(s)$ = 7 TeV" , "q" , "$C_{q}$");
182  //_h_cq_eta24 = bookHistogram1D( 19 , 1, 2 , "$|\\eta| <$ 2.4 , $\\sqrt(s)$ = 7 TeV" , "q" , "$C_{q}$");
183 
184  _h_dmpt_dNch_eta24 = bookProfile1D( 25 , 1, 1 , "$|\\eta| <$2.4 , $\\sqrt(s)$ = 7 TeV" , "n" , "$< p_{T}> [ GeV/c ]$");
185 
186  }
187 
188  //_v_dNch_dn_binning1_eta05.assign(nch_max+1,0);
189  //_v_dNch_dn_binning1_eta24.assign(nch_max+1,0);
190 
191  }
AIDA::IHistogram1D * _h_dNch_dn_pt500_eta24
vector< AIDA::IHistogram1D * > _h_dNch_dn
AIDA::IProfile1D * _h_dmpt_dNch_eta24

Member Data Documentation

vector<double> Rivet::CMS_2011_S8884919::_etabins
private

Definition at line 55 of file CMS_2011_S8884919.cc.

AIDA::IProfile1D* Rivet::CMS_2011_S8884919::_h_dmpt_dNch_eta24
private

Definition at line 49 of file CMS_2011_S8884919.cc.

vector<AIDA::IHistogram1D*> Rivet::CMS_2011_S8884919::_h_dNch_dn
private

Definition at line 39 of file CMS_2011_S8884919.cc.

AIDA::IHistogram1D* Rivet::CMS_2011_S8884919::_h_dNch_dn_pt500_eta24
private

Definition at line 44 of file CMS_2011_S8884919.cc.

AIDA::IHistogram1D* Rivet::CMS_2011_S8884919::_h_KNO_eta05
private

Definition at line 51 of file CMS_2011_S8884919.cc.

AIDA::IHistogram1D* Rivet::CMS_2011_S8884919::_h_KNO_eta24
private

Definition at line 52 of file CMS_2011_S8884919.cc.

vector<int> Rivet::CMS_2011_S8884919::_nch_in_Evt
private

Definition at line 56 of file CMS_2011_S8884919.cc.

vector<int> Rivet::CMS_2011_S8884919::_nch_in_Evt_pt500
private

Definition at line 57 of file CMS_2011_S8884919.cc.

double Rivet::CMS_2011_S8884919::_Nevt_after_cuts
private

Definition at line 54 of file CMS_2011_S8884919.cc.

double Rivet::CMS_2011_S8884919::_sumpt
private

Definition at line 58 of file CMS_2011_S8884919.cc.

int Rivet::CMS_2011_S8884919::nch_max
private

Definition at line 59 of file CMS_2011_S8884919.cc.