Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:30:07

0001 #ifndef SimGeneral_PileupInformation_h
0002 #define SimGeneral_PileupInformation_h
0003 
0004 #include <map>
0005 
0006 #include "DataFormats/Common/interface/Handle.h"
0007 
0008 #include "FWCore/Framework/interface/stream/EDProducer.h"
0009 #include "FWCore/Framework/interface/Event.h"
0010 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0011 
0012 //#include "CommonTools/RecoAlgos/interface/TrackingParticleSelector.h"
0013 
0014 #include "SimDataFormats/CrossingFrame/interface/CrossingFrame.h"
0015 #include "SimDataFormats/CrossingFrame/interface/MixCollection.h"
0016 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
0017 #include "SimDataFormats/Track/interface/SimTrack.h"
0018 #include "SimDataFormats/Vertex/interface/SimVertex.h"
0019 #include "SimDataFormats/TrackingAnalysis/interface/TrackingParticleFwd.h"
0020 #include "SimDataFormats/TrackingAnalysis/interface/TrackingVertexContainer.h"
0021 #include "SimDataFormats/TrackingHit/interface/PSimHit.h"
0022 #include "SimDataFormats/PileupSummaryInfo/interface/PileupSummaryInfo.h"
0023 #include "SimDataFormats/PileupSummaryInfo/interface/PileupMixingContent.h"
0024 #include "SimDataFormats/PileupSummaryInfo/interface/PileupVertexContent.h"
0025 
0026 #include "SimGeneral/TrackingAnalysis/interface/EncodedTruthId.h"
0027 
0028 class PileupInformation : public edm::stream::EDProducer<> {
0029 public:
0030   explicit PileupInformation(const edm::ParameterSet &);
0031 
0032 private:
0033   void produce(edm::Event &, const edm::EventSetup &) override;
0034 
0035   edm::ParameterSet conf_;
0036 
0037   typedef std::map<EncodedEventId, unsigned int> EncodedEventIdToIndex;
0038   typedef std::map<int, int> myindex;
0039   myindex event_index_;
0040 
0041   std::vector<float> zpositions;
0042   std::vector<float> sumpT_lowpT;
0043   std::vector<float> sumpT_highpT;
0044   std::vector<int> ntrks_lowpT;
0045   std::vector<int> ntrks_highpT;
0046 
0047   double distanceCut_;
0048   double volumeRadius_;
0049   double volumeZ_;
0050   double pTcut_1_;
0051   double pTcut_2_;
0052   bool isPreMixed_;
0053 
0054   edm::EDGetTokenT<TrackingParticleCollection> trackingTruthT_;
0055   edm::EDGetTokenT<TrackingVertexCollection> trackingTruthV_;
0056   edm::EDGetTokenT<PileupMixingContent> PileupInfoLabel_;
0057   edm::EDGetTokenT<int> bunchSpacingToken_;
0058   edm::EDGetTokenT<std::vector<PileupSummaryInfo> > pileupSummaryToken_;
0059   edm::EDGetTokenT<PileupVertexContent> PileupVtxLabel_;
0060 
0061   bool LookAtTrackingTruth_;
0062 
0063   bool saveVtxTimes_;
0064 
0065   std::string MessageCategory_;
0066   //std::string simHitLabel_;
0067   //std::unique_ptr<MixCollection<SimTrack> >   simTracks_;
0068   //std::unique_ptr<MixCollection<SimVertex> >  simVertexes_;
0069 };
0070 
0071 #endif