#include <memory>
#include <string>
#include <iostream>
#include <map>
#include <algorithm>
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/Framework/interface/Selector.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "DataFormats/Common/interface/Ref.h"
#include "DataFormats/JetReco/interface/Jet.h"
#include "DataFormats/TrackReco/interface/Track.h"
#include "DataFormats/JetReco/interface/CaloJetCollection.h"
#include "DataFormats/JetReco/interface/GenJet.h"
#include "CLHEP/Vector/LorentzVector.h"
#include "TFile.h"
#include "TH1.h"
#include "TH2.h"
Go to the source code of this file.
Classes | |
class | DijetRatio |
Description: <one line="" class="" summary>="">. More... | |
Functions | |
void | hInit (TH1F *hJet[], char *name) |
template<class R> | |
void | histoFill (TH1F *jetHisto[], Handle< R > jetsRec, double eta1, double eta2, double eta3, double eta4) |
void hInit | ( | TH1F * | hJet[], | |
char * | name | |||
) | [inline] |
Definition at line 55 of file DijetRatio.h.
References i, k, and indexGen::title.
Referenced by DijetRatio::beginJob().
00055 { 00056 int const binSize = 133; 00057 float massBin[binSize+1] = {0.,6.75021,26.7502,34.7215,43.9963,54.6599,66.8013,80.5137,95.8941,113.044,132.071,153.087,176.208,201.558,229.267,259.469,292.306,327.929,366.493,408.164,453.112,501.52,553.576,609.481,669.442,733.679,802.422,875.911,954.4,1038.15,1127.45,1222.58,1323.84,1431.57,1546.09,1667.76,1796.95,1934.03,2079.43,2233.55,2396.86,2569.81,2752.89,2946.61,3151.52,3368.16,3597.14,3839.07,4094.59,4364.38,4649.15,4949.65,5266.64,5600.94,5953.41,6324.94,6716.47,7128.96,7563.46,8021.03,8502.79,9009.92,9543.66,10105.3,10696.2,11317.7,11971.4,12658.7,13381.4,14141,14939.5,15778.5,16660.2,17586.5,18559.5,19581.5,20654.8,21781.9,22965.3,24207.7,25511.8,26880.7,28317.4,29825,31407,33066.9,34808.2,36635,38551.1,40560.8,42668.6,44878.9,47196.7,49626.9,52174.9,54846.1,57646.3,60581.7,63658.4,66883.1,70262.6,73804.4,77515.8,81404.8,85479.7,89749.2,94222.2,98908.4,103817,108960,114346,119989,125898,132087,138569,145358,152466,159910,167705,175868,184414,193362,202730,212538,222806,233556,244810,256590,268921,281829,295340,309481,324283,339775}; 00058 00059 const int histoSize = 10; 00060 char title[histoSize][50]; 00061 for (int i =0; i < histoSize; i++){ 00062 char buff[50]; 00063 sprintf(buff, "%s%d", name,i); 00064 for (int k =0; k < 50; k++) 00065 title[i][k] = buff[k]; 00066 } 00067 // (jetEta1 > eta2 && jetEta1 < eta3), (jetEta2 > eta2 && jetEta2 < eta3 ) 00068 hJet[0] = new TH1F(title[0], "DiJet Mass", binSize, massBin); 00069 00070 // (jetEta1 > eta1 && jetEta1 < eta4), (jetEta2 > eta1 && jetEta2 < eta4 ) 00071 hJet[1] = new TH1F(title[1], "DiJet Mass", binSize, massBin); 00072 00073 // (jetEta1 > eta3 && jetEta1 < eta4), (jetEta2 > eta3 && jetEta2 < eta4 ) 00074 hJet[2] = new TH1F(title[2], "DiJet Mass", binSize, massBin); 00075 00076 // (jetEta1 > eta1 && jetEta1 < eta2), (jetEta2 > eta1 && jetEta2 < eta2 ) 00077 hJet[3] = new TH1F(title[3], "DiJet Mass", binSize, massBin); 00078 00079 // (jetEta1 > eta3 && jetEta1 < eta4), (jetEta2 > eta1 && jetEta2 < eta2 ) 00080 hJet[4] = new TH1F(title[4], "DiJet Mass", binSize, massBin); 00081 00082 // (jetEta1 > eta1 && jetEta1 < eta2), (jetEta3 > eta2 && jetEta2 < eta4 ) 00083 hJet[5] = new TH1F(title[5], "DiJet Mass", binSize, massBin); 00084 00085 // (jetEta1 > eta3 && jetEta1 < eta4), (jetEta2 > eta3 && jetEta2 < eta4 ) 00086 hJet[6] = new TH1F(title[6], "DiJet Mass", binSize, massBin); 00087 00088 hJet[7] = new TH1F(title[7], "1^{st} Leading Jet #eta", 120, -6., 6.); 00089 hJet[8] = new TH1F(title[8], "2^{nd} Leading Jet #eta", 120, -6., 6.); 00090 hJet[9] = new TH1F(title[9], "No. of generated events", 10, 0.,10.); 00091 00092 return ; 00093 }
void histoFill | ( | TH1F * | jetHisto[], | |
Handle< R > | jetsRec, | |||
double | eta1, | |||
double | eta2, | |||
double | eta3, | |||
double | eta4 | |||
) | [inline] |
Definition at line 97 of file DijetRatio.h.
References funct::abs(), e1, e2, v, v1, and v2.
Referenced by DijetRatio::analyze().
00098 { 00099 //For no. of events 00100 jetHisto[9]->Fill(1.); 00101 00102 if ((*jetsRec).size() >=2){ 00103 double px1 = (*jetsRec)[0].px(); 00104 double py1 = (*jetsRec)[0].py(); 00105 double pz1 = (*jetsRec)[0].pz(); 00106 double e1 = (*jetsRec)[0].energy(); 00107 double jetEta1 = (*jetsRec)[0].eta(); 00108 jetHisto[7]->Fill(jetEta1); 00109 00110 double px2 = (*jetsRec)[1].px(); 00111 double py2 = (*jetsRec)[1].py(); 00112 double pz2 = (*jetsRec)[1].pz(); 00113 double e2 = (*jetsRec)[1].energy(); 00114 double jetEta2 = (*jetsRec)[1].eta(); 00115 jetHisto[8]->Fill(jetEta2); 00116 00117 CLHEP::HepLorentzVector v1(px1,py1,pz1,e1); 00118 CLHEP::HepLorentzVector v2(px2,py2,pz2,e2); 00119 CLHEP::HepLorentzVector v(0.,0.,0.,0.); 00120 v = v1 + v2; 00121 float mass = v.m(); 00122 00123 if (jetEta1 > eta2 && jetEta1 < eta3) 00124 if (jetEta2 > eta2 && jetEta2 < eta3) 00125 jetHisto[0]->Fill(mass); 00126 00127 if (jetEta1 > eta1 && jetEta1 < eta4) 00128 if (jetEta2 > eta1 && jetEta2 < eta4) 00129 jetHisto[1]->Fill(mass); 00130 00131 if (jetEta1 > eta3 && jetEta1 < eta4) 00132 if (jetEta2 > eta3 && jetEta2 < eta4) 00133 jetHisto[2]->Fill(mass); 00134 00135 if (jetEta1 > eta1 && jetEta1 < eta2) 00136 if (jetEta2 > eta1 && jetEta2 < eta2) 00137 jetHisto[3]->Fill(mass); 00138 00139 if (jetEta1 > eta3 && jetEta1 < eta4) 00140 if (jetEta2 > eta1 && jetEta2 < eta2) 00141 jetHisto[4]->Fill(mass); 00142 00143 if (jetEta1 > eta1 && jetEta1 < eta2) 00144 if (jetEta2 > eta3 && jetEta2 < eta4) 00145 jetHisto[5]->Fill(mass); 00146 00147 if (abs(jetEta1) > eta3 && abs(jetEta1) < eta4) 00148 if (abs(jetEta2) > eta3 && abs(jetEta2) < eta4) 00149 jetHisto[6]->Fill(mass); 00150 00151 00152 }//(*jetsRec).size() >=2 00153 }//histoFill