ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitProd/TreeFiller/interface/FillerMCParticles.h
Revision: 1.5
Committed: Fri Mar 6 14:40:10 2009 UTC (16 years, 2 months ago) by bendavid
Content type: text/plain
Branch: MAIN
Changes since 1.4: +7 -5 lines
Log Message:
Unified FillerMCParticles to handle both hepmc and aod genparticle candidates, configured with switch

File Contents

# User Rev Content
1 bendavid 1.1 //--------------------------------------------------------------------------------------------------
2 bendavid 1.5 // $Id: FillerMCParticles.h,v 1.4 2008/09/10 03:30:23 loizides Exp $
3 bendavid 1.1 //
4     // FillerMCParticles
5     //
6 bendavid 1.5 // Imlementation of a filler to fill HepMC particles OR the aod GenParticle candidates (gen)
7     // AND SimTracks (sim) with association map to TrackingParticles (for hit-based MC truth matching)
8 loizides 1.2 // into mithep::MCParticles. Gen and Sim particle information is thus merged into a single
9     // collection.
10 bendavid 1.1 //
11     // Authors: C.Loizides, J.Bendavid
12     //--------------------------------------------------------------------------------------------------
13    
14 loizides 1.4 #ifndef MITPROD_TREEFILLER_FILLERMCPARTICLES_H
15     #define MITPROD_TREEFILLER_FILLERMCPARTICLES_H
16 bendavid 1.1
17 bendavid 1.3 #include <map>
18 bendavid 1.1 #include "FWCore/ParameterSet/interface/ParameterSet.h"
19     #include "MitAna/DataUtil/interface/TreeWriter.h"
20     #include "MitAna/DataTree/interface/Collections.h"
21     #include "MitProd/TreeFiller/interface/BaseFiller.h"
22     #include "MitProd/TreeFiller/interface/AssociationMaps.h"
23 bendavid 1.3 #include "SimDataFormats/Track/interface/SimTrackContainer.h"
24 bendavid 1.1
25     namespace mithep
26     {
27     class FillerMCParticles : public BaseFiller
28     {
29     public:
30     FillerMCParticles(const edm::ParameterSet &cfg, const char *name, bool active=1);
31     ~FillerMCParticles();
32    
33     void BookDataBlock(TreeWriter &tws);
34     void FillDataBlock(const edm::Event &e, const edm::EventSetup &es);
35     void ResolveLinks (const edm::Event &e, const edm::EventSetup &es);
36    
37     private:
38 loizides 1.2 Bool_t genActive_; //=true if generated particles are filled
39 bendavid 1.5 Bool_t useAodGen_; //=true to use aod GenParticles instead of HepMC
40 loizides 1.2 Bool_t simActive_; //=true if simulated particles are filled
41 bendavid 1.3 Bool_t trackingActive_; //=true if simulated TrackingParticles are mapped
42 loizides 1.2 std::string genEdmName_; //edm name of generated particles
43     std::string simEdmName_; //edm name of simulated particles
44 bendavid 1.3 std::string trackingEdmName_; //edm name of simulated TrackingParticles
45 loizides 1.2 std::string genMapName_; //name of exported map wrt generated particles
46     std::string simMapName_; //name of exported map wrt simulated particles
47 bendavid 1.3 std::string trackingMapName_; //name of exported map wrt simulated TrackingParticles
48 loizides 1.2 std::string mitName_; //name of MCParticles branch in OAK
49     mithep::MCParticleArr *mcParticles_; //array of MCParticles
50 bendavid 1.5 mithep::GenParticleBarcodeMap *genMap_; //map wrt generated particles
51     mithep::AODGenParticleMap *aodGenMap_; //map wrt generated particles
52     mithep::SimTrackTidMap *simMap_; //map of SimTracks to G4 track ids
53 bendavid 1.3 mithep::TrackingParticleMap *trackingMap_; //map wrt simulated TrackingParticles
54 bendavid 1.1 };
55     }
56     #endif