CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/SimGeneral/TrackingAnalysis/interface/TrackingTruthAccumulator.h

Go to the documentation of this file.
00001 #ifndef TrackingAnalysis_TrackingTruthAccumulator_h
00002 #define TrackingAnalysis_TrackingTruthAccumulator_h
00003 
00004 #include "SimGeneral/MixingModule/interface/DigiAccumulatorMixMod.h"
00005 #include "SimGeneral/TrackingAnalysis/interface/TrackingParticleSelector.h"
00006 #include <memory> // required for std::auto_ptr
00007 #include "SimDataFormats/TrackingAnalysis/interface/TrackingParticleFwd.h"
00008 #include "SimDataFormats/TrackingAnalysis/interface/TrackingVertexContainer.h"
00009 
00010 
00011 // Forward declarations
00012 namespace edm
00013 {
00014         class ParameterSet;
00015         class EDProducer;
00016         class Event;
00017         class EventSetup;
00018 }
00019 class PileUpEventPrincipal;
00020 class PSimHit;
00021 
00022 
00023 
00064 class TrackingTruthAccumulator : public DigiAccumulatorMixMod
00065 {
00066 public:
00067         explicit TrackingTruthAccumulator( const edm::ParameterSet& config, edm::EDProducer& mixMod );
00068 private:
00069         virtual void initializeEvent( const edm::Event& event, const edm::EventSetup& setup );
00070         virtual void accumulate( const edm::Event& event, const edm::EventSetup& setup );
00071         virtual void accumulate( const PileUpEventPrincipal& event, const edm::EventSetup& setup );
00072         virtual void finalizeEvent( edm::Event& event, const edm::EventSetup& setup );
00073 
00075         template<class T> void accumulateEvent( const T& event, const edm::EventSetup& setup );
00076 
00078         template<class T> void fillSimHits( std::vector<const PSimHit*>& returnValue, const T& event, const edm::EventSetup& setup );
00079 
00080         const std::string messageCategory_; 
00081 
00082         const double volumeRadius_;
00083         const double volumeZ_;
00084         const bool ignoreTracksOutsideVolume_;
00085 
00088         const unsigned int maximumPreviousBunchCrossing_;
00091         const unsigned int maximumSubsequentBunchCrossing_;
00093         const bool createUnmergedCollection_;
00094         const bool createMergedCollection_;
00096         const bool addAncestors_;
00097 
00099         const bool removeDeadModules_;
00100         const edm::InputTag simTrackLabel_;
00101         const edm::InputTag simVertexLabel_;
00102         edm::ParameterSet simHitCollectionConfig_;
00103         edm::InputTag genParticleLabel_;
00104 
00105         bool selectorFlag_;
00106         TrackingParticleSelector selector_;
00108         bool chargedOnly_;
00110         bool signalOnly_;
00111 
00119         bool allowDifferentProcessTypeForDifferentDetectors_;
00120 public:
00121         // These always go hand in hand, and I need to pass them around in the internal
00122         // functions, so I might as well package them up in a struct.
00123         struct OutputCollections
00124         {
00125                 std::auto_ptr<TrackingParticleCollection> pTrackingParticles;
00126                 std::auto_ptr<TrackingVertexCollection> pTrackingVertices;
00127                 TrackingParticleRefProd refTrackingParticles;
00128                 TrackingVertexRefProd refTrackingVertexes;
00129         };
00130 private:
00131         OutputCollections unmergedOutput_;
00132         OutputCollections mergedOutput_;
00133 };
00134 
00135 #endif // end of "#ifndef TrackingAnalysis_TrackingTruthAccumulator_h"