10 #include "Rivet/Analysis.hh"
11 #include "Rivet/RivetAIDA.hh"
12 #include "Rivet/Projections/ChargedFinalState.hh"
13 #include "Rivet/Projections/Beam.hh"
35 setBeams(PROTON, PROTON);
36 setNeedsCrossSection(
false);
41 ChargedFinalState cfs(-2.4, 2.4, 0.1*
GeV);
42 addProjection(cfs,
"CFS");
43 addProjection(Beam(),
"Beam");
48 file =
new TFile(
"CMS_2010_S8808686.root",
"recreate");
50 for (
int ibin = 0; ibin < 16; ibin++) {
54 sprintf(hname,
"S_DeltaPhi_%i",ibin+1);
57 sprintf(hname,
"B_DeltaPhi_%i",ibin+1);
60 sprintf(hname,
"R_DeltaPhi_%i",ibin+1);
63 sprintf(hname,
"S_3D_Nptbin_%i",ibin+1);
66 sprintf(hname,
"B_3D_Nptbin_%i",ibin+1);
69 sprintf(hname,
"R_3D_Nptbin_%i",ibin+1);
72 sprintf(hname,
"mult_%i",ibin+1);
103 const double _ptbinslimits[5] = {0.1,1.0,2.0,3.0,4.0};
104 const unsigned int _Nbinslimits[5] = {1, 35, 90, 110, 9999};
107 const ChargedFinalState& charged = applyProjection<ChargedFinalState>(
event,
"CFS");
108 const ParticleVector ChrgParticles = charged.particles();
110 if (ChrgParticles.size() <= 1) vetoEvent;
115 unsigned int Nparts_01pt=0;
116 unsigned int Nparts_04pt=0;
117 unsigned int Nparts_1pt3=0;
118 unsigned int Nparts_ptbin[4]={0};
119 foreach (
const Particle&
p, charged.particles()) {
120 double pT = p.momentum().pT();
121 if (pT>0.1){Nparts_01pt++;}
122 if (pT>0.4){Nparts_04pt++;}
123 for (
int iPtbin = 0; iPtbin < 4; iPtbin++) {
124 if (pT > _ptbinslimits[iPtbin] && pT < _ptbinslimits[iPtbin+1]){
125 Nparts_ptbin[iPtbin]++;
129 Nparts_1pt3 = Nparts_ptbin[1] + Nparts_ptbin[2];
133 for (
int iNbin = 0; iNbin < 4; iNbin++) {
134 if(Nparts_04pt > _Nbinslimits[iNbin] && Nparts_04pt < _Nbinslimits[iNbin+1]) {
136 for (
int iPtbin = 0; iPtbin < 4; iPtbin++) {
152 unsigned int oldNpartsMB_01pt=0;
153 unsigned int oldNpartsMB_1pt3=0;
155 double pT = p.momentum().pT();
156 if (pT>0.1){oldNpartsMB_01pt++;}
157 if (pT>1.0 && pT<3.0){oldNpartsMB_1pt3++;}
161 ParticleVector oldpartvecNBin;
168 unsigned int oldNparts_01pt=0;
169 unsigned int oldNparts_1pt3=0;
170 unsigned int oldNparts_ptbin[4]={0};
171 foreach (
const Particle& p, oldpartvecNBin) {
172 double pT = p.momentum().pT();
173 if(pT>0.1) oldNparts_01pt++;
174 for (
int iPtbin = 0; iPtbin < 4; iPtbin++) {
175 if (pT > _ptbinslimits[iPtbin] && pT <= _ptbinslimits[iPtbin+1]){
176 oldNparts_ptbin[iPtbin]++;
180 oldNparts_1pt3 = oldNparts_ptbin[1] + oldNparts_ptbin[2];
183 if(oldpartvecNBin.size() > _Nbinslimits[Nbin] &&
_oldpartvecMB.size() > 1 ) {
187 for (
unsigned int ip1 = 0; ip1 < ChrgParticles.size(); ip1++) {
190 double pT1 = p1.momentum().pT();
191 double eta1 = p1.momentum().eta();
192 double phi1 = p1.momentum().phi();
198 for (
unsigned int ip2 = ip1+1; ip2 < ChrgParticles.size(); ip2++) {
201 double pT2 = p2.momentum().pT();
202 double eta2 = p2.momentum().eta();
203 double phi2 = p2.momentum().phi();
205 double deta = fabs(eta1-eta2);
206 double dphi = phi1-phi2;
208 if(dphi>
PI) dphi=dphi-2*
PI;
209 if(dphi<-PI) dphi=dphi+2*
PI;
212 for (
int iPtbin = 0; iPtbin < 4; iPtbin++) {
213 if (pT1 > _ptbinslimits[iPtbin] && pT1 < _ptbinslimits[iPtbin+1] && pT2 > _ptbinslimits[iPtbin] && pT2 < _ptbinslimits[iPtbin+1]){
214 int ibin = iPtbin + Nbin*4;
215 _h_S_3D_Nptbins[ibin]->Fill(fabs(deta),fabs(dphi),1.0/4.0/Nparts_ptbin[iPtbin]);
216 _h_S_3D_Nptbins[ibin]->Fill(-fabs(deta),fabs(dphi),1.0/4.0/Nparts_ptbin[iPtbin]);
217 _h_S_3D_Nptbins[ibin]->Fill(fabs(deta),-fabs(dphi),1.0/4.0/Nparts_ptbin[iPtbin]);
218 _h_S_3D_Nptbins[ibin]->Fill(-fabs(deta),-fabs(dphi),1.0/4.0/Nparts_ptbin[iPtbin]);
219 _h_S_3D_Nptbins[ibin]->Fill(fabs(deta),2*PI-fabs(dphi),1.0/4.0/Nparts_ptbin[iPtbin]);
220 _h_S_3D_Nptbins[ibin]->Fill(-fabs(deta),2*PI-fabs(dphi),1.0/4.0/Nparts_ptbin[iPtbin]);
222 if(deta > 2.0 && deta < 4.8){
231 if (pT1 >= 0.1 && pT2 >= 0.1){
240 if(Nparts_04pt>=110){
251 if (pT1 >= 1 && pT1 <= 3 && pT2 >= 1 && pT2 <= 3){
259 if(Nparts_04pt>=110){
282 for (
unsigned int ip2 = 0; ip2 <
_oldpartvecMB.size(); ip2++) {
285 double pT2 = p2.momentum().pT();
286 double eta2 = p2.momentum().eta();
287 double phi2 = p2.momentum().phi();
289 double deta = fabs(eta1-eta2);
290 double dphi = phi1-phi2;
292 if(dphi>
PI) dphi=dphi-2*
PI;
293 if(dphi<-PI) dphi=dphi+2*
PI;
297 if (pT1 >= 0.1 && pT2 >= 0.1){
298 double pweight=1.0/(Nparts_01pt*oldNpartsMB_01pt);
308 if (pT1 >= 1 && pT1 <= 3 && pT2 >= 1 && pT2 <= 3){
309 double pweight=1.0/(Nparts_1pt3*oldNpartsMB_1pt3);
326 if (oldpartvecNBin.size() > 100 && Nbin==3){
329 for (
unsigned int ip2 = 0; ip2 < oldpartvecNBin.size(); ip2++) {
332 double pT2 = p2.momentum().pT();
333 double eta2 = p2.momentum().eta();
334 double phi2 = p2.momentum().phi();
336 double deta = fabs(eta1-eta2);
337 double dphi = phi1-phi2;
339 if(dphi>
PI) dphi=dphi-2*
PI;
340 if(dphi<-PI) dphi=dphi+2*
PI;
344 if (pT1 >= 0.1 && pT2 >= 0.1){
346 double pweight=1.0/(Nparts_01pt*oldNparts_01pt);
355 if (pT1 >= 1 && pT1 <= 3 && pT2 >= 1 && pT2 <= 3){
357 double pweight=1.0/(Nparts_1pt3*oldNparts_1pt3);
376 if (oldpartvecNBin.size() > _Nbinslimits[Nbin]){
379 for (
unsigned int ip2 = 0; ip2 < oldpartvecNBin.size(); ip2++) {
382 double pT2 = p2.momentum().pT();
383 double eta2 = p2.momentum().eta();
384 double phi2 = p2.momentum().phi();
386 double deta = fabs(eta1-eta2);
387 double dphi = phi1-phi2;
389 if(dphi>
PI) dphi=dphi-2*
PI;
390 if(dphi<-PI) dphi=dphi+2*
PI;
393 for (
int iPtbin = 0; iPtbin < 4; iPtbin++) {
394 if (pT1 > _ptbinslimits[iPtbin] && pT1 < _ptbinslimits[iPtbin+1] && pT2 > _ptbinslimits[iPtbin] && pT2 < _ptbinslimits[iPtbin+1]){
395 int ibin = iPtbin + Nbin*4;
396 double pweight=1.0/(Nparts_ptbin[iPtbin]*oldNparts_ptbin[iPtbin]);
403 if(deta > 2.0 && deta < 4.8){
467 for (
int ibin = 0; ibin < 16; ibin++) {
void analyze(const Event &event) override
ParticleVector _oldpartvec110N
TH2F * _h2_S_dphivsdeta_N110_1pt3
TH2F * _h2_B_dphivsdeta_mb_01pt
TH1F * _h_R_DeltaPhi_Nptbins[16]
TH1F * _h_S_DeltaPhi_Nptbins[16]
ParticleVector _oldpartvec35N90
AnalysisBuilder< CMS_2010_S8808686 > plugin_CMS_2010_S8808686
TH1F * _hMult_Nptbins[16]
TH2F * _h_S_3D_Nptbins[16]
TH2F * _h_B_3D_Nptbins[16]
TH2F * _h2_R_dphivsdeta_mb_01pt
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
TH2F * _h2_R_dphivsdeta_N110_1pt3
TH2F * _h_R_3D_Nptbins[16]
TH2F * _h2_B_dphivsdeta_N110_1pt3
ParticleVector _oldpartvecMB
TH2F * _h2_R_dphivsdeta_mb_1pt3
TH2F * _h2_S_dphivsdeta_mb_1pt3
ParticleVector _oldpartvec90N110
TH2F * _h2_S_dphivsdeta_mb_01pt
ParticleVector _oldpartvec1N35
TH1F * _h_B_DeltaPhi_Nptbins[16]
TH2F * _h2_B_dphivsdeta_mb_1pt3
TH2F * _h2_R_dphivsdeta_N110_01pt
TH2F * _h2_B_dphivsdeta_N110_01pt
TH2F * _h2_S_dphivsdeta_N110_01pt