Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:32:11

0001 #ifndef MBUEandQCDVALIDATION_H
0002 #define MBUEandQCDVALIDATION_H
0003 
0004 /*class MBUEandQCDValidation
0005  *  
0006  *  Class to fill Event Generator dqm monitor elements; works on HepMCProduct
0007  *
0008  *
0009  */
0010 
0011 // framework & common header files
0012 #include "FWCore/Framework/interface/Event.h"
0013 #include "FWCore/Framework/interface/EventSetup.h"
0014 #include "FWCore/Framework/interface/Run.h"
0015 
0016 #include "DataFormats/Common/interface/Handle.h"
0017 #include "FWCore/Framework/interface/ESHandle.h"
0018 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0019 #include "FWCore/Utilities/interface/InputTag.h"
0020 
0021 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0022 
0023 //DQM services
0024 #include "DQMServices/Core/interface/DQMStore.h"
0025 #include "FWCore/ServiceRegistry/interface/Service.h"
0026 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0027 
0028 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
0029 #include "DataFormats/JetReco/interface/GenJetCollection.h"
0030 
0031 #include "SimGeneral/HepPDTRecord/interface/ParticleDataTable.h"
0032 #include "Validation/EventGenerator/interface/CaloCellManager.h"
0033 #include "Validation/EventGenerator/interface/WeightManager.h"
0034 
0035 #include <vector>
0036 
0037 class MBUEandQCDValidation : public DQMEDAnalyzer {
0038 public:
0039   explicit MBUEandQCDValidation(const edm::ParameterSet&);
0040   ~MBUEandQCDValidation() override;
0041 
0042   void analyze(const edm::Event&, const edm::EventSetup&) override;
0043   void bookHistograms(DQMStore::IBooker& i, edm::Run const&, edm::EventSetup const&) override;
0044   void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c) override;
0045 
0046 private:
0047   WeightManager wmanager_;
0048   edm::InputTag hepmcCollection_;
0049   edm::InputTag genchjetCollection_;
0050   edm::InputTag genjetCollection_;
0051 
0052   unsigned int verbosity_;
0053 
0054   /// PDT table
0055   edm::ESHandle<HepPDT::ParticleDataTable> fPDGTable;
0056   edm::ESGetToken<HepPDT::ParticleDataTable, edm::DefaultRecord> fPDGTableToken;
0057 
0058   ///  status 1 GenParticle collection
0059   std::vector<const HepMC::GenParticle*> hepmcGPCollection;
0060   std::vector<double> hepmcCharge;
0061 
0062   /// manager of calorimetric cell structure
0063   CaloCellManager* theCalo;
0064 
0065   unsigned int getHFbin(double eta);
0066 
0067   bool isCharged(unsigned int i);
0068   bool isNeutral(unsigned int i);
0069   bool isNeutrino(unsigned int i);
0070 
0071   std::vector<double> eneInCell;
0072 
0073   MonitorElement* nEvt;
0074 
0075   MonitorElement* nNoFwdTrig;
0076   MonitorElement* nSaFwdTrig;
0077 
0078   MonitorElement* nbquark;
0079   MonitorElement* ncandbquark;
0080   MonitorElement* ncnobquark;
0081 
0082   ///QCD-09-010 analysis
0083   MonitorElement* nEvt1;
0084   MonitorElement* dNchdpt1;
0085   MonitorElement* dNchdeta1;
0086 
0087   //QCD-10-001 analysis
0088   MonitorElement* nEvt2;
0089   MonitorElement* leadTrackpt;
0090   MonitorElement* leadTracketa;
0091   MonitorElement* dNchdeta2;
0092   MonitorElement* dNchdpt2;
0093   MonitorElement* nCha;
0094   MonitorElement* dNchdSpt;
0095   MonitorElement* dNchdphi;
0096   MonitorElement* dSptdphi;
0097   MonitorElement* nChaDenLpt;
0098   MonitorElement* sptDenLpt;
0099 
0100   //Charged jets
0101   MonitorElement* nChj;
0102   MonitorElement* dNchjdeta;
0103   MonitorElement* dNchjdpt;
0104   MonitorElement* leadChjpt;
0105   MonitorElement* leadChjeta;
0106   MonitorElement* pt1pt2optotch;
0107 
0108   //Identified particles multiplicities
0109   MonitorElement* nPPbar;
0110   MonitorElement* nKpm;
0111   MonitorElement* nK0s;
0112   MonitorElement* nL0;
0113   MonitorElement* nNNbar;
0114   MonitorElement* nGamma;
0115   MonitorElement* nXim;
0116   MonitorElement* nOmega;
0117 
0118   //Identified particles momentum specturm
0119   MonitorElement* pPPbar;
0120   MonitorElement* pKpm;
0121   MonitorElement* pK0s;
0122   MonitorElement* pL0;
0123   MonitorElement* pNNbar;
0124   MonitorElement* pGamma;
0125   MonitorElement* pXim;
0126   MonitorElement* pOmega;
0127 
0128   MonitorElement* elePt;
0129   MonitorElement* muoPt;
0130 
0131   //Jets no neutrino
0132   MonitorElement* nDijet;
0133   MonitorElement* nj;
0134   MonitorElement* dNjdeta;
0135   MonitorElement* dNjdpt;
0136   MonitorElement* pt1pt2optot;
0137   MonitorElement* pt1pt2balance;
0138   MonitorElement* pt1pt2Dphi;
0139   MonitorElement* pt1pt2InvM;
0140   MonitorElement* pt3Frac;
0141   MonitorElement* sumJEt;
0142   MonitorElement* missEtosumJEt;
0143   MonitorElement* sumPt;
0144   MonitorElement* sumChPt;
0145 
0146   //Forward energy flow
0147   MonitorElement* nHFflow;
0148   MonitorElement* dEdetaHFmb;
0149   MonitorElement* dEdetaHFdj;
0150 
0151   MonitorElement* nHFSD;
0152   MonitorElement* EmpzHFm;
0153   MonitorElement* ntHFm;
0154   MonitorElement* eneHFmSel;
0155 
0156   // Jet Multiplicity Analysis
0157   MonitorElement* _JM25njets;
0158   MonitorElement* _JM25ht;
0159   MonitorElement* _JM25pt1;
0160   MonitorElement* _JM25pt2;
0161   MonitorElement* _JM25pt3;
0162   MonitorElement* _JM25pt4;
0163   MonitorElement* _JM80njets;
0164   MonitorElement* _JM80ht;
0165   MonitorElement* _JM80pt1;
0166   MonitorElement* _JM80pt2;
0167   MonitorElement* _JM80pt3;
0168   MonitorElement* _JM80pt4;
0169 
0170   //differential jet rates
0171   MonitorElement *djr10, *djr21, *djr32, *djr43;
0172 
0173   // SumET hiostograms
0174   MonitorElement* _sumEt;
0175   MonitorElement* _sumEt1;
0176   MonitorElement* _sumEt2;
0177   MonitorElement* _sumEt3;
0178   MonitorElement* _sumEt4;
0179   MonitorElement* _sumEt5;
0180 
0181   const static unsigned int nphiBin;
0182   const static unsigned int initSize;
0183 
0184   edm::EDGetTokenT<edm::HepMCProduct> hepmcCollectionToken_;
0185   edm::EDGetTokenT<reco::GenJetCollection> genchjetCollectionToken_;
0186   edm::EDGetTokenT<reco::GenJetCollection> genjetCollectionToken_;
0187 };
0188 
0189 #endif