test
CMS 3D CMS Logo

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

Public Member Functions

void analyze (const Event &event) override
 
 CMS_2011_I930319 ()
 Constructor. More...
 
void finalize () override
 
void init () override
 

Public Attributes

double evcounter_dijet
 
double evcounter_mb
 

Private Attributes

AIDA::IHistogram1D * _hist_dijet_09
 
AIDA::IHistogram1D * _hist_dijet_7
 
AIDA::IHistogram1D * _hist_mb_09
 
AIDA::IHistogram1D * _hist_mb_7
 

Detailed Description

Definition at line 14 of file CMS_2011_I930319.cc.

Constructor & Destructor Documentation

Rivet::CMS_2011_I930319::CMS_2011_I930319 ( )
inline

Constructor.

Definition at line 21 of file CMS_2011_I930319.cc.

22  : Analysis("CMS_2011_I930319")
23 
24  {
25  setBeams(PROTON,PROTON);
26  }

Member Function Documentation

void Rivet::CMS_2011_I930319::analyze ( const Event event)
inlineoverride

Definition at line 65 of file CMS_2011_I930319.cc.

References _hist_dijet_09, _hist_dijet_7, _hist_mb_09, _hist_mb_7, Particle::E(), evcounter_dijet, evcounter_mb, event(), lumiContext::fill, GeV, METSkim_cff::Jets, fwrapper::jets, AlCaHLTBitMon_ParallelJobs::p, PI, and histoStyle::weight.

65  {
66  const double weight = event.weight();
67 
68  // Skip if the event is empty
69  const FinalState& fsv = applyProjection<FinalState>(event, "fsv");
70  if (fsv.empty()) vetoEvent;
71 
72 
73 
74  // Veto diffraction according to defined hadron level.
75  double count_chrg_forward = 0;
76  double count_chrg_backward = 0;
77  const FinalState& fschrgdv = applyProjection<FinalState>(event, "fschrgdv");
78 
79  foreach (const Particle& p, fschrgdv.particles()) {
80  if( 3.9 < p.momentum().pseudorapidity() &&
81  p.momentum().pseudorapidity() < 4.4){count_chrg_forward++;}
82  if(-4.4 < p.momentum().pseudorapidity() &&
83  p.momentum().pseudorapidity() < -3.9){count_chrg_backward++;}
84 
85  }
86 
87  if(count_chrg_forward*count_chrg_backward==0) {
88  vetoEvent;
89  }
90 
91  const FastJets& jetpro = applyProjection<FastJets>(event, "Jets");
92  const Jets& jets = jetpro.jetsByPt(7.0*GeV);
93 
94 
95  // ============================== MINIMUM BIAS EVENTS
96 
97  //loop over particles to calculate the energy
99  foreach (const Particle& p, fsv.particles()) {
100 
101  if(fuzzyEquals(sqrtS()/GeV, 900, 1E-3)) {_hist_mb_09 ->
102  fill(fabs(p.momentum().pseudorapidity()), weight * p.momentum().E()/GeV );}
103 
104  if(fuzzyEquals(sqrtS()/GeV, 7000, 1E-3)) {_hist_mb_7 ->
105  fill(fabs(p.momentum().pseudorapidity()), weight * p.momentum().E()/GeV );}
106 
107  }
108 
109 
110  // ============================== DIJET EVENTS
111 
112  if(jets.size()>1){
113 
114  signed int index_1 = -1; //for the jet with the 1.highest pT
115  signed int index_2 = -1; //for the jet with the 2.highest pT
116 
117  double tempmax_1 = -100;
118  double tempmax_2 = -100;
119 
120  //jet with the 1.highest pt
121  for(signed int ijets = 0; ijets < (int)jets.size(); ijets++){
122  if(tempmax_1 == -100 || tempmax_1 < jets[ijets].momentum().pT()/GeV)
123  {
124  tempmax_1 = jets[ijets].momentum().pT()/GeV;
125  index_1 = ijets;
126  }
127  }
128 
129 
130  //jet with the 2. highest pt
131  for(signed int ijets = 0; ijets < (int)jets.size(); ijets++){
132  if(tempmax_2 == -100 || tempmax_2 < jets[ijets].momentum().pT()/GeV){
133  if(jets[ijets].momentum().pT()/GeV < tempmax_1){
134  tempmax_2 = jets[ijets].momentum().pT()/GeV;
135  index_2 = ijets;
136  }
137  }
138  }
139 
140 
141  if(index_1 != -1 && index_2 != -1){
142 
143  double diffphi = jets[index_2].momentum().phi() - jets[index_1].momentum().phi();
144  if(diffphi < -PI){ diffphi += 2.0*PI; }
145  if(diffphi > PI){ diffphi -= 2.0*PI; }
146  diffphi = fabs(diffphi);
147 
148 
149  // *******
150  // 900 GeV
151  // *******
152 
153  if(fuzzyEquals(sqrtS()/GeV, 900, 1E-3)){
154 
155  //pt cut
156  if(jets[index_1].momentum().pT()/GeV > 8.0 && jets[index_2].momentum().pT()/GeV >8.0){
157 
158  //eta cut for the central jets
159  if(fabs(jets[index_1].momentum().pseudorapidity()) < 2.5 &&
160  fabs(jets[index_2].momentum().pseudorapidity()) < 2.5){
161 
162  //back to back condition of the jets
163  if(fabs(diffphi-PI) < 1.0){
165 
166  // E-flow
167  foreach (const Particle& p, fsv.particles()){
169  fill(fabs(p.momentum().pseudorapidity()), weight*p.momentum().E()/GeV);
170 
171  }//foreach particle
172  }//if(dphi)
173  }// else (eta cut central region)
174  }//pt cut
175  }// energy
176 
177 
178 
179  // ********
180  // 7000 GeV
181  // ********
182 
183  if(fuzzyEquals(sqrtS()/GeV, 7000, 1E-3)){
184 
185  //pt cut
186  if(jets[index_1].momentum().pT()/GeV > 20.0 && jets[index_2].momentum().pT()/GeV > 20.0){
187 
188  //eta cut for the central jets
189  if(fabs(jets[index_1].momentum().pseudorapidity()) < 2.5 &&
190  fabs(jets[index_2].momentum().pseudorapidity()) < 2.5){
191 
192  //back to back condition of the jets
193  if(fabs(diffphi-PI) < 1.0){
195 
196  //E-flow
197  foreach (const Particle& p, fsv.particles()){
198  _hist_dijet_7->
199  fill(fabs(p.momentum().pseudorapidity()), weight*p.momentum().E()/GeV);
200 
201  }//foreach particle
202  }//if(dphi)
203  }// else (eta cut central region)
204  }//pt cut
205  }// energy
206 
207  }// if index
208  }// analysis
209  }
const double GeV
Definition: MathUtil.h:16
string fill
Definition: lumiContext.py:319
#define PI
AIDA::IHistogram1D * _hist_dijet_7
AIDA::IHistogram1D * _hist_mb_09
AIDA::IHistogram1D * _hist_dijet_09
vector< PseudoJet > jets
tuple Jets
Definition: METSkim_cff.py:17
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::IHistogram1D * _hist_mb_7
int weight
Definition: histoStyle.py:50
double E() const
Definition: Particle.h:65
void Rivet::CMS_2011_I930319::finalize ( void  )
inlineoverride

Definition at line 212 of file CMS_2011_I930319.cc.

References _hist_dijet_09, _hist_dijet_7, _hist_mb_09, _hist_mb_7, evcounter_dijet, evcounter_mb, GeV, dtDQMClient_cfg::INFO, and pileupReCalc_HLTpaths::scale.

212  {
213 
214  const double norm_dijet = evcounter_dijet*2.0 ; //AK norm factor 2 for the +/- region
215  const double norm_mb = evcounter_mb*2.0 ;
216 
217  if(fuzzyEquals(sqrtS()/GeV, 900, 1E-3)){
218  scale(_hist_mb_09, 1.0/norm_mb);
219  scale(_hist_dijet_09, 1.0/norm_dijet);
220  }
221 
222  if(fuzzyEquals(sqrtS()/GeV, 7000, 1E-3)){
223  scale(_hist_dijet_7, 1.0/norm_dijet);
224  scale(_hist_mb_7, 1.0/norm_mb);
225  }
226 
227  getLog() << Log::INFO << " " << endl;
228  getLog() << Log::INFO << "Number of MB events: " << norm_mb << endl;
229  getLog() << Log::INFO << "Number of di-jet events : " << norm_dijet <<endl;
230 
231  }
const double GeV
Definition: MathUtil.h:16
AIDA::IHistogram1D * _hist_dijet_7
AIDA::IHistogram1D * _hist_mb_09
AIDA::IHistogram1D * _hist_dijet_09
AIDA::IHistogram1D * _hist_mb_7
void Rivet::CMS_2011_I930319::init ( void  )
inlineoverride

Definition at line 33 of file CMS_2011_I930319.cc.

References _hist_dijet_09, _hist_dijet_7, _hist_mb_09, _hist_mb_7, evcounter_dijet, evcounter_mb, GeV, and pat::MUON.

33  {
34  const FinalState fs(-6.0,6.0,0.0*GeV);
35  addProjection(fs, "FS");
36  addProjection(FastJets(fs, FastJets::ANTIKT, 0.5), "Jets");
37 
38  VetoedFinalState fsv(fs);
39  fsv.vetoNeutrinos();
40  fsv.addVetoPairDetail(MUON, 0.0*GeV, 99999.9*GeV);
41  addProjection(fsv, "fsv");
42 
43  // for the MB ND selection
44  const ChargedFinalState fschrgd(-6.0,6.0,0.0*GeV);
45  addProjection(fschrgd, "fschrgd");
46  VetoedFinalState fschrgdv(fschrgd);
47  fschrgdv.vetoNeutrinos();
48  addProjection(fschrgdv, "fschrgdv");
49 
50  evcounter_mb = 0;
51  evcounter_dijet = 0;
52 
53  if(fuzzyEquals(sqrtS()/GeV, 900, 1E-3)){
54  _hist_mb_09 = bookHistogram1D(1,1,1); // energy flow in MB, 0.9 TeV
55  _hist_dijet_09 = bookHistogram1D(2,1,1); // energy flow in dijet events, 0.9 TeV
56  }
57 
58  if(fuzzyEquals(sqrtS()/GeV, 7000, 1E-3)){
59  _hist_mb_7 = bookHistogram1D(3,1,1); // energy flow in MB, 7 TeV
60  _hist_dijet_7 = bookHistogram1D(4,1,1); // energy flow in dijet events, 7 TeV
61  }
62 
63  }
const double GeV
Definition: MathUtil.h:16
AIDA::IHistogram1D * _hist_dijet_7
AIDA::IHistogram1D * _hist_mb_09
AIDA::IHistogram1D * _hist_dijet_09
AIDA::IHistogram1D * _hist_mb_7

Member Data Documentation

AIDA::IHistogram1D* Rivet::CMS_2011_I930319::_hist_dijet_09
private

Definition at line 237 of file CMS_2011_I930319.cc.

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

AIDA::IHistogram1D* Rivet::CMS_2011_I930319::_hist_dijet_7
private

Definition at line 239 of file CMS_2011_I930319.cc.

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

AIDA::IHistogram1D* Rivet::CMS_2011_I930319::_hist_mb_09
private

Definition at line 236 of file CMS_2011_I930319.cc.

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

AIDA::IHistogram1D* Rivet::CMS_2011_I930319::_hist_mb_7
private

Definition at line 238 of file CMS_2011_I930319.cc.

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

double Rivet::CMS_2011_I930319::evcounter_dijet

Definition at line 30 of file CMS_2011_I930319.cc.

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

double Rivet::CMS_2011_I930319::evcounter_mb

Definition at line 29 of file CMS_2011_I930319.cc.

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