ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/Morgan/interface/ParticleTreeDrawer.h
Revision: 1.2
Committed: Wed Nov 19 19:03:16 2008 UTC (16 years, 5 months ago) by lethuill
Content type: text/plain
Branch: MAIN
CVS Tags: pat_2_1_12_02, pat_2_1_12_01, Common-2008_11_24, Common-2008_11_19
Changes since 1.1: +24 -7 lines
Log Message:
First skeleton for common code

File Contents

# User Rev Content
1 mlethuil 1.1 #ifndef ParticleTreeDrawer_h
2     #define ParticleTreeDrawer_h
3     //
4     // class ParticleTreeDrawer
5     // Adapted from Luca Lista's plugin
6     //
7 lethuill 1.2 //#include "FWCore/Framework/interface/EDAnalyzer.h"
8     #include "FWCore/ParameterSet/interface/ParameterSet.h"
9 mlethuil 1.1 #include "FWCore/ParameterSet/interface/InputTag.h"
10     #include "FWCore/Framework/interface/ESHandle.h"
11 lethuill 1.2 #include "FWCore/Utilities/interface/EDMException.h"
12     #include "FWCore/Framework/interface/Event.h"
13     #include "FWCore/Framework/interface/EventSetup.h"
14    
15 mlethuil 1.1 #include "SimGeneral/HepPDTRecord/interface/ParticleDataTable.h"
16 lethuill 1.2 #include "DataFormats/Common/interface/View.h"
17     #include "DataFormats/Candidate/interface/Candidate.h"
18 mlethuil 1.1 #include "DataFormats/Candidate/interface/CandidateFwd.h"
19 lethuill 1.2 #include "DataFormats/HepMCCandidate/interface/GenParticleCandidate.h"
20    
21     #include <iostream>
22     #include <algorithm>
23 mlethuil 1.1
24 lethuill 1.2 //class ParticleTreeDrawer : public edm::EDAnalyzer {
25     class ParticleTreeDrawer {
26 mlethuil 1.1 public:
27 lethuill 1.2 ParticleTreeDrawer(const edm::ParameterSet & cfg, const edm::ParameterSet & producers);
28 mlethuil 1.1 void analyze( const edm::Event &, const edm::EventSetup & );
29    
30     private:
31     edm::InputTag src_;
32     edm::ESHandle<ParticleDataTable> pdt_;
33 lethuill 1.2 bool printP4_, printPtEtaPhi_, printVertex_, printStatus_, printIndex_;
34     typedef std::vector<int> vint;
35     vint status_;
36     std::vector<const reco::Candidate *> cands_;
37 mlethuil 1.1
38     void printDecay( const reco::Candidate &, const std::string & pre ) const;
39 lethuill 1.2 //void printP4( const reco::Candidate & ) const;
40     void printInfo( const reco::Candidate & ) const;
41     bool accept( const reco::Candidate & ) const;
42     bool hasValidDaughters( const reco::Candidate & ) const;
43    
44 mlethuil 1.1 };
45    
46     #endif