Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:30:37

0001 // -*- C++ -*-
0002 //
0003 // Package:    TestMixedSource
0004 // Class:      TestMixedSource
0005 //
0006 /**\class TestMixedSource TestMixedSource.cc TestMixed/TestMixedSource/src/TestMixedSource.cc
0007 
0008  Description: <one line class summary>
0009 
0010  Implementation:
0011      <Notes on implementation>
0012 */
0013 //
0014 // Original Author:  Emilia Lubenova Becheva
0015 //         Created:  Wed May 20 16:46:58 CEST 2009
0016 //
0017 //
0018 
0019 #ifndef TestMixedSource_h
0020 #define TestMixedSource_h
0021 
0022 // system include files
0023 #include <memory>
0024 
0025 // user include files
0026 #include "FWCore/Framework/interface/Frameworkfwd.h"
0027 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0028 
0029 #include "FWCore/Framework/interface/Event.h"
0030 #include "FWCore/Framework/interface/MakerMacros.h"
0031 
0032 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0033 
0034 #include "TH1I.h"
0035 #include "TFile.h"
0036 
0037 #include <iostream>
0038 #include <fstream>
0039 
0040 #include "SimDataFormats/CrossingFrame/interface/CrossingFrame.h"
0041 #include "SimDataFormats/TrackingHit/interface/PSimHit.h"
0042 #include "SimDataFormats/CaloHit/interface/PCaloHit.h"
0043 #include "SimDataFormats/Track/interface/SimTrack.h"
0044 #include "SimDataFormats/Vertex/interface/SimVertex.h"
0045 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
0046 
0047 //
0048 // class decleration
0049 //
0050 namespace edm {
0051   class TestMixedSource : public edm::one::EDAnalyzer<> {
0052   public:
0053     explicit TestMixedSource(const edm::ParameterSet &);
0054     ~TestMixedSource() override;
0055 
0056   private:
0057     void beginJob() override;
0058     void analyze(const edm::Event &, const edm::EventSetup &) override;
0059     void endJob() override;
0060 
0061     // ----------member data ---------------------------
0062     std::ofstream outputFile;
0063     std::string fileName_;
0064     int bunchcr_;
0065     int minbunch_;
0066     int maxbunch_;
0067     TH1I *histTrack_bunchPileups_;
0068     TH1I *histTrack_bunchSignal_;
0069     TH1I *histVertex_bunch_;
0070     TH1I *histPCaloHit_bunch_;
0071     TH1I *histPSimHit_bunchSignal_TrackerHitsTECHighTof_;
0072     TH1I *histPSimHit_bunchPileups_TrackerHitsTECHighTof_;
0073     TH1I *tofhist_;
0074     TH1I *tofhist_sig_;
0075     TH1I *histPSimHit_bunchSignal_MuonCSCHits_;
0076     TH1I *histPSimHit_bunchPileups_MuonCSCHits_;
0077     TH1I *histHepMCProduct_bunch_;
0078     TFile *histFile_;
0079 
0080     edm::EDGetTokenT<CrossingFrame<PSimHit>> TrackerToken0_;
0081     edm::EDGetTokenT<CrossingFrame<PSimHit>> MuonToken_;
0082 
0083     edm::EDGetTokenT<CrossingFrame<PCaloHit>> CaloToken1_;
0084 
0085     edm::EDGetTokenT<CrossingFrame<SimTrack>> SimTrackToken_;
0086     edm::EDGetTokenT<CrossingFrame<SimVertex>> SimVertexToken_;
0087     edm::EDGetTokenT<CrossingFrame<edm::HepMCProduct>> HepMCToken_;
0088   };
0089 }  // namespace edm
0090 #endif