00001 #ifndef RecoExamples_myJetAna_h 00002 #define RecoExamples_myJetAna_h 00003 #include <TH1.h> 00004 #include <TH2.h> 00005 #include <TProfile.h> 00006 #include <TFile.h> 00007 00008 /* \class myJetAna 00009 * 00010 * \author Frank Chlebana 00011 * 00012 * \version 1 00013 * 00014 */ 00015 #include "FWCore/Framework/interface/EDAnalyzer.h" 00016 #include "FWCore/ServiceRegistry/interface/Service.h" 00017 #include "CommonTools/UtilAlgos/interface/TFileService.h" 00018 00019 // class TFile; 00020 00021 /**** 00022 class RBX { 00023 RBX(); 00024 00025 private: 00026 int nTowers; 00027 int ieta; 00028 int iphi; 00029 float energy; 00030 float time; 00031 }; 00032 00033 class RBXCollection { 00034 00035 RBXCollection(); 00036 void addRBX(RBX r) {rbx_.push_back(r)}; 00037 00038 private: 00039 std::vector<RBX> rbx_; 00040 00041 }; 00042 *****/ 00043 00044 00045 class myJetAna : public edm::EDAnalyzer { 00046 00047 public: 00048 myJetAna( const edm::ParameterSet & ); 00049 00050 private: 00051 void beginJob( ); 00052 void analyze ( const edm::Event& , const edm::EventSetup& ); 00053 void endJob(); 00054 00055 std::string CaloJetAlgorithm; 00056 std::string GenJetAlgorithm; 00057 edm::InputTag theTriggerResultsLabel; 00058 std::string JetCorrectionService; 00059 00060 00061 // --- Passed selection cuts 00062 TH1F *h_pt; 00063 TH1F *h_ptTower; 00064 TH1F *h_ptRBX; 00065 TH1F *h_ptHPD; 00066 TH1F *h_et; 00067 TH1F *h_eta; 00068 TH1F *h_phi; 00069 // --- 00070 00071 // --- RecHits 00072 TH1F *HBEneOOT; 00073 TH1F *HEEneOOT; 00074 TH1F *HFEneOOT; 00075 TH1F *HOEneOOT; 00076 00077 TH1F *HBEneOOTTh; 00078 TH1F *HEEneOOTTh; 00079 TH1F *HFEneOOTTh; 00080 TH1F *HOEneOOTTh; 00081 00082 TH1F *HBEneOOTTh1; 00083 TH1F *HEEneOOTTh1; 00084 TH1F *HFEneOOTTh1; 00085 TH1F *HOEneOOTTh1; 00086 00087 00088 TH1F *HBEneTThr; 00089 TH1F *HEEneTThr; 00090 TH1F *HFEneTThr; 00091 00092 TH1F *HBEne; 00093 TH1F *HBEneTh; 00094 TH1F *HBEneTh1; 00095 TH1F *HBEneX; 00096 TH1F *HBEneY; 00097 TH1F *HBTime; 00098 TH1F *HBTimeTh; 00099 TH1F *HBTimeTh1; 00100 TH1F *HBTimeTh2; 00101 TH1F *HBTimeTh3; 00102 TH1F *HBTimeThR; 00103 TH1F *HBTimeTh1R; 00104 TH1F *HBTimeTh2R; 00105 TH1F *HBTimeTh3R; 00106 00107 TH1F *HBTimeFlagged; 00108 TH1F *HBTimeThFlagged; 00109 TH1F *HBTimeTh1Flagged; 00110 TH1F *HBTimeTh2Flagged; 00111 00112 TH1F *HBTimeFlagged2; 00113 TH1F *HBTimeThFlagged2; 00114 TH1F *HBTimeTh1Flagged2; 00115 TH1F *HBTimeTh2Flagged2; 00116 00117 TH1F *HBTimeX; 00118 TH1F *HBTimeY; 00119 TH1F *HEEne; 00120 TH1F *HEEneTh; 00121 TH1F *HEEneTh1; 00122 TH1F *HEEneX; 00123 TH1F *HEEneY; 00124 TH1F *HEposEne; 00125 TH1F *HEnegEne; 00126 TH1F *HETime; 00127 TH1F *HETimeTh; 00128 TH1F *HETimeTh1; 00129 TH1F *HETimeTh2; 00130 TH1F *HETimeTh3; 00131 TH1F *HETimeThR; 00132 TH1F *HETimeTh1R; 00133 TH1F *HETimeTh2R; 00134 TH1F *HETimeTh3R; 00135 00136 TH1F *HETimeFlagged; 00137 TH1F *HETimeThFlagged; 00138 TH1F *HETimeTh1Flagged; 00139 TH1F *HETimeTh2Flagged; 00140 00141 TH1F *HETimeFlagged2; 00142 TH1F *HETimeThFlagged2; 00143 TH1F *HETimeTh1Flagged2; 00144 TH1F *HETimeTh2Flagged2; 00145 00146 TH1F *HETimeX; 00147 TH1F *HETimeY; 00148 TH1F *HEposTime; 00149 TH1F *HEnegTime; 00150 TH1F *HFLSRatio; 00151 TH1F *HFOERatio; 00152 TH1F *HFEnePMT0; 00153 TH1F *HFEnePMT1; 00154 TH1F *HFEnePMT2; 00155 TH1F *HFEne; 00156 TH1F *HFEneFlagged; 00157 TH1F *HFEneFlagged2; 00158 TH1F *HFEneTh; 00159 TH1F *HFEneTh1; 00160 TH1F *HFTimePMT0; 00161 TH1F *HFTimePMT1; 00162 TH1F *HFTimePMT2; 00163 TH1F *HFTime; 00164 TH1F *PMTHits; 00165 TH1F *HFTimeFlagged; 00166 TH1F *HFTimeFlagged2; 00167 TH1F *HFTimeThFlagged2; 00168 TH1F *HFTimeTh1Flagged2; 00169 TH1F *HFTimeTh2Flagged2; 00170 TH1F *HFTimeTh3Flagged2; 00171 TH1F *HFTimeFlagged3; 00172 TH1F *HFTimeThFlagged3; 00173 TH1F *HFTimeTh1Flagged3; 00174 TH1F *HFTimeTh2Flagged3; 00175 TH1F *HFTimeTh3Flagged3; 00176 TH1F *HFTimeTh; 00177 TH1F *HFTimeTh1; 00178 TH1F *HFTimeTh2; 00179 TH1F *HFTimeTh3; 00180 TH1F *HFTimeThR; 00181 TH1F *HFTimeTh1R; 00182 TH1F *HFTimeTh2R; 00183 TH1F *HFTimeTh3R; 00184 TH1F *TrkMultFlagged0; 00185 TH1F *TrkMultFlagged1; 00186 TH1F *TrkMultFlagged2; 00187 TH1F *TrkMultFlagged3; 00188 TH1F *TrkMultFlagged4; 00189 TH1F *TrkMultFlaggedM; 00190 TH1F *HFTimeThFlagged; 00191 TH1F *HFTimeTh2Flagged; 00192 TH1F *HFTimeTh3Flagged; 00193 TH1F *HFTimeThFlaggedR; 00194 TH1F *HFTimeThFlaggedR1; 00195 TH1F *HFTimeThFlaggedR2; 00196 TH1F *HFTimeThFlaggedR3; 00197 TH1F *HFTimeThFlaggedR4; 00198 TH1F *HFTimeThFlaggedRM; 00199 TH1F *HFEneP; 00200 TH1F *HFTimeP; 00201 TH1F *HFTimePMa; 00202 TH1F *HFTimePM; 00203 TH1F *HFEneM; 00204 TH1F *HFTimeM; 00205 TH1F *HFLEne; 00206 TH1F *HFLEneNoS; 00207 TH1F *HFLEneNoSFlagged; 00208 TH1F *HFLEneNoSFlaggedN; 00209 TH1F *HFLTime; 00210 TH1F *HFSEneAll; 00211 TH1F *HFSEneAllF; 00212 TH1F *HFLEneAll; 00213 TH1F *HFLEneAllF; 00214 TH1F *HFSEne; 00215 TH1F *HFSEneNoL; 00216 TH1F *HFSEneNoLFlagged; 00217 TH1F *HFSEneNoLFlaggedN; 00218 TH2F *HFLvsS; 00219 00220 TH2F *HBTvsE; 00221 TH2F *HETvsE; 00222 TH2F *HFTvsE; 00223 TH2F *HFTvsEFlagged; 00224 TH2F *HFTvsEFlagged2; 00225 TH2F *HFTvsEThr; 00226 TH2F *HFTvsEFlaggedThr; 00227 TH2F *HFTvsEFlagged2Thr; 00228 TH2F *HOTvsE; 00229 00230 TH1F *HFSTime; 00231 TH1F *HOEne; 00232 TH1F *HOEneTh; 00233 TH1F *HOEneTh1; 00234 TH1F *HOTime; 00235 TH1F *HOTimeTh; 00236 TH1F *HFEtaFlagged; 00237 TH1F *HFEtaFlaggedL; 00238 TH1F *HFEtaFlaggedLN; 00239 TH1F *HFEtaFlaggedS; 00240 TH1F *HFEtaFlaggedSN; 00241 00242 TProfile *HFEtaNFlagged; 00243 TH2F *HOocc; 00244 TH2F *HBocc; 00245 TH2F *HEocc; 00246 TH2F *HFocc; 00247 TH2F *HFoccTime; 00248 TH2F *HFEtaPhiNFlagged; 00249 TH2F *HFoccFlagged; 00250 TH2F *HFoccFlagged2; 00251 TH2F *HOoccOOT; 00252 TH2F *HBoccOOT; 00253 TH2F *HEoccOOT; 00254 TH2F *HFoccOOT; 00255 TH1F *HOSEne; 00256 TH1F *HOSTime; 00257 TH1F *HOHEne; 00258 TH1F *HOHTime; 00259 TH1F *HOHr0Ene; 00260 TH1F *HOHr0Time; 00261 TH1F *HOHrm1Ene; 00262 TH1F *HOHrm1Time; 00263 TH1F *HOHrm2Ene; 00264 TH1F *HOHrm2Time; 00265 TH1F *HOHrp1Ene; 00266 TH1F *HOHrp1Time; 00267 TH1F *HOHrp2Ene; 00268 TH1F *HOHrp2Time; 00269 TH1F *EBEne; 00270 TH1F *EBEneTh; 00271 TH1F *EBEneX; 00272 TH1F *EBEneY; 00273 TH1F *EBTime; 00274 TH1F *EBTimeTh; 00275 TH1F *EBTimeX; 00276 TH1F *EBTimeY; 00277 TH1F *EEEne; 00278 TH1F *EEEneTh; 00279 TH1F *EEEneX; 00280 TH1F *EEEneY; 00281 TH1F *EEnegEne; 00282 TH1F *EEposEne; 00283 TH1F *EETime; 00284 TH1F *EETimeTh; 00285 TH1F *EETimeX; 00286 TH1F *EETimeY; 00287 TH1F *EEnegTime; 00288 TH1F *EEposTime; 00289 00290 TH2F *fedSize; 00291 TH1F *totFedSize; 00292 00293 TH1F *towerHadEnHB; 00294 TH1F *towerHadEnHE; 00295 TH1F *towerHadEnHF; 00296 TH1F *towerHadEn; 00297 TH1F *towerEmEnHB; 00298 TH1F *towerEmEnHE; 00299 TH1F *towerEmEnHF; 00300 TH1F *towerEmEn; 00301 TH1F *towerOuterEn; 00302 00303 TH1F *towerEmFrac; 00304 00305 TH1F *RBX_et; 00306 TH1F *RBX_hadEnergy; 00307 TH1F *RBX_hcalTime; 00308 TH1F *RBX_nTowers; 00309 TH1F *RBX_N; 00310 00311 TH1F *HPD_et; 00312 TH1F *HPD_hadEnergy; 00313 TH1F *HPD_hcalTime; 00314 TH1F *HPD_nTowers; 00315 TH1F *HPD_N; 00316 00317 // --- from reco calomet 00318 TH1F *HFSumEt; 00319 TH1F *HFMET; 00320 00321 TH1F *SumEt; 00322 TH1F *MET; 00323 TH1F *OERMET; 00324 TH1F *MET_Tower; 00325 TH1F *MET_RBX; 00326 TH1F *MET_HPD; 00327 TH1F *METSig; 00328 TH1F *MEx; 00329 TH1F *MEy; 00330 TH1F *METPhi; 00331 // --- 00332 00333 TH1F *SiClusters; 00334 00335 // --- from reco vertexs 00336 TH1F *h_Vx; 00337 TH1F *h_Vy; 00338 TH1F *h_Vz; 00339 TH1F *h_VNTrks; 00340 // --- 00341 00342 // --- from reco tracks 00343 TH1F *h_Trk_pt; 00344 TH1F *h_Trk_NTrk; 00345 // --- 00346 00347 TH1F *hf_sumTowerAllEx; 00348 TH1F *hf_sumTowerAllEy; 00349 TH1F *hf_TowerJetEt; 00350 00351 TH1F *ETime; 00352 TH1F *HTime; 00353 00354 TH1F *nTowers1; 00355 TH1F *nTowers2; 00356 TH1F *nTowers3; 00357 TH1F *nTowers4; 00358 TH1F *nTowersLeadJetPt1; 00359 TH1F *nTowersLeadJetPt2; 00360 TH1F *nTowersLeadJetPt3; 00361 TH1F *nTowersLeadJetPt4; 00362 00363 TH1F *totEneLeadJetEta1; 00364 TH1F *totEneLeadJetEta2; 00365 TH1F *totEneLeadJetEta3; 00366 TH1F *hadEneLeadJetEta1; 00367 TH1F *hadEneLeadJetEta2; 00368 TH1F *hadEneLeadJetEta3; 00369 TH1F *emEneLeadJetEta1; 00370 TH1F *emEneLeadJetEta2; 00371 TH1F *emEneLeadJetEta3; 00372 00373 TH1F *hadFracEta1; 00374 TH1F *hadFracEta2; 00375 TH1F *hadFracEta3; 00376 00377 TH1F *tMassGen; 00378 00379 TH1F *dijetMass; 00380 00381 TH1F *h_nCalJets; 00382 TH1F *h_nGenJets; 00383 00384 TH1F *caloEtaEt; 00385 TH1F *caloEta; 00386 TH1F *caloPhi; 00387 00388 TH1F *hitEtaEt; 00389 TH1F *hitEta; 00390 TH1F *hitPhi; 00391 00392 TH1F *h_nTowersCal; 00393 TH1F *h_EMFracCal; 00394 TH1F *h_ptCal; 00395 TH1F *h_etaCal; 00396 TH1F *h_phiCal; 00397 00398 TH1F *h_ptGen; 00399 TH1F *h_etaGen; 00400 TH1F *h_phiGen; 00401 00402 TH1F *h_ptGenL; 00403 TH1F *h_etaGenL; 00404 TH1F *h_phiGenL; 00405 00406 TH1F *h_jetEt; 00407 00408 TH1F *h_UnclusteredEt; 00409 TH1F *h_UnclusteredEts; 00410 TH1F *h_TotalUnclusteredEt; 00411 00412 TH1F *h_UnclusteredE; 00413 TH1F *h_TotalUnclusteredE; 00414 00415 TH1F *h_ClusteredE; 00416 TH1F *h_TotalClusteredE; 00417 00418 TH1F *h_jet1Pt; 00419 TH1F *h_jet2Pt; 00420 TH1F *h_jet1Eta; 00421 TH1F *h_jet2Eta; 00422 TH1F *h_jet1PtHLT; 00423 00424 TH1F *jetHOEne; 00425 TH1F *jetEMFraction; 00426 TH1F *NTowers; 00427 00428 TH2F *h_EmEnergy; 00429 TH2F *h_HadEnergy; 00430 00431 TH1F *st_Pt; 00432 TH1F *st_Constituents; 00433 TH1F *st_Energy; 00434 TH1F *st_EmEnergy; 00435 TH1F *st_HadEnergy; 00436 TH1F *st_OuterEnergy; 00437 TH1F *st_Eta; 00438 TH1F *st_Phi; 00439 TH1F *st_iEta; 00440 TH1F *st_iPhi; 00441 TH1F *st_Frac; 00442 00443 TH1F *NPass; 00444 TH1F *NTotal; 00445 TH1F *NTime; 00446 00447 TH1F *HFRecHitEne; 00448 TH1F *HFRecHitEneClean; 00449 TH1F *HFRecHitTime; 00450 00451 TH1F *HFLongShortPhi; 00452 TH1F *HFLongShortEta; 00453 TH1F *HFLongShortEne; 00454 TH1F *HFLongShortTime; 00455 00456 TH1F *HFDigiTimePhi; 00457 TH1F *HFDigiTimeEta; 00458 TH1F *HFDigiTimeEne; 00459 TH1F *HFDigiTimeTime; 00460 00461 TH1F *HFLongShortNHits; 00462 TH1F *HFDigiTimeNHits; 00463 00464 TH2F *HFvsZ; 00465 TH2F *EBvHB; 00466 TH2F *EEvHE; 00467 TH2F *ECALvHCAL; 00468 TH2F *ECALvHCALEta1; 00469 TH2F *ECALvHCALEta2; 00470 TH2F *ECALvHCALEta3; 00471 TProfile *EMF_Phi; 00472 TProfile *EMF_Eta; 00473 TProfile *EMF_PhiX; 00474 TProfile *EMF_EtaX; 00475 00476 TProfile *HFTimeVsiEtaP; 00477 TProfile *HFTimeVsiEtaM; 00478 TProfile *HFTimeVsiEtaP5; 00479 TProfile *HFTimeVsiEtaM5; 00480 TProfile *HFTimeVsiEtaP20; 00481 TProfile *HFTimeVsiEtaM20; 00482 }; 00483 00484 #endif