ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/Morgan/interface/ParticleTreeDrawer.h
Revision: 1.4
Committed: Wed Jun 10 11:17:05 2009 UTC (15 years, 10 months ago) by lethuill
Content type: text/plain
Branch: MAIN
CVS Tags: all_3_3_2_01, all_3_2_5_02, all_3_2_5_01, all_2_2_9_03, all_2_2_9_02, all_2_2_9_01, HEAD
Branch point for: CMSSW_2_2_X_br
Changes since 1.3: +22 -20 lines
Log Message:
Better protection against missing collection / Cleaning data format selection / Last iteration for migration to PAT of Photons

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/ParameterSet/interface/ParameterSet.h"
8 mlethuil 1.1 #include "FWCore/ParameterSet/interface/InputTag.h"
9     #include "FWCore/Framework/interface/ESHandle.h"
10 lethuill 1.2 #include "FWCore/Utilities/interface/EDMException.h"
11     #include "FWCore/Framework/interface/Event.h"
12     #include "FWCore/Framework/interface/EventSetup.h"
13    
14 mlethuil 1.1 #include "SimGeneral/HepPDTRecord/interface/ParticleDataTable.h"
15 lethuill 1.2 #include "DataFormats/Common/interface/View.h"
16     #include "DataFormats/Candidate/interface/Candidate.h"
17 mlethuil 1.1 #include "DataFormats/Candidate/interface/CandidateFwd.h"
18 lethuill 1.3 //#include "DataFormats/HepMCCandidate/interface/GenParticleCandidate.h"
19 lethuill 1.2
20     #include <iostream>
21     #include <algorithm>
22 mlethuil 1.1
23 lethuill 1.4
24     class ParticleTreeDrawer
25     {
26    
27     public:
28     ParticleTreeDrawer(const edm::ParameterSet & config, const edm::ParameterSet & producersNames);
29     bool analyze( const edm::Event &, const edm::EventSetup & );
30    
31     private:
32     bool allowMissingCollection_;
33     edm::InputTag src_;
34     edm::ESHandle<ParticleDataTable> pdt_;
35     bool printP4_, printPtEtaPhi_, printVertex_, printStatus_, printIndex_;
36     typedef std::vector<int> vint;
37     vint status_;
38     std::vector<const reco::Candidate *> cands_;
39    
40     void printDecay( const reco::Candidate &, const std::string & pre ) const;
41     //void printP4( const reco::Candidate & ) const;
42     void printInfo( const reco::Candidate & ) const;
43     bool accept( const reco::Candidate & ) const;
44     bool hasValidDaughters( const reco::Candidate & ) const;
45 lethuill 1.2
46 mlethuil 1.1 };
47    
48     #endif