4 |
|
// class ParticleTreeDrawer |
5 |
|
// Adapted from Luca Lista's plugin |
6 |
|
// |
7 |
< |
#include "FWCore/Framework/interface/EDAnalyzer.h" |
7 |
> |
//#include "FWCore/Framework/interface/EDAnalyzer.h" |
8 |
> |
#include "FWCore/ParameterSet/interface/ParameterSet.h" |
9 |
|
#include "FWCore/ParameterSet/interface/InputTag.h" |
10 |
|
#include "FWCore/Framework/interface/ESHandle.h" |
11 |
+ |
#include "FWCore/Utilities/interface/EDMException.h" |
12 |
+ |
#include "FWCore/Framework/interface/Event.h" |
13 |
+ |
#include "FWCore/Framework/interface/EventSetup.h" |
14 |
+ |
|
15 |
|
#include "SimGeneral/HepPDTRecord/interface/ParticleDataTable.h" |
16 |
+ |
#include "DataFormats/Common/interface/View.h" |
17 |
+ |
#include "DataFormats/Candidate/interface/Candidate.h" |
18 |
|
#include "DataFormats/Candidate/interface/CandidateFwd.h" |
19 |
+ |
#include "DataFormats/HepMCCandidate/interface/GenParticleCandidate.h" |
20 |
+ |
|
21 |
+ |
#include <iostream> |
22 |
+ |
#include <algorithm> |
23 |
|
|
24 |
< |
class ParticleTreeDrawer : public edm::EDAnalyzer { |
24 |
> |
//class ParticleTreeDrawer : public edm::EDAnalyzer { |
25 |
> |
class ParticleTreeDrawer { |
26 |
|
public: |
27 |
< |
ParticleTreeDrawer(); |
27 |
> |
ParticleTreeDrawer(const edm::ParameterSet & cfg, const edm::ParameterSet & producers); |
28 |
|
void analyze( const edm::Event &, const edm::EventSetup & ); |
17 |
– |
void setPrintOptions( bool printP4, bool printPtEtaPhi, bool printVertex, bool printStatus ) |
18 |
– |
{ printP4_ = printP4; printPtEtaPhi_ = printPtEtaPhi; printVertex_ = printVertex; printStatus_ = printStatus; }; |
29 |
|
|
30 |
|
private: |
31 |
|
edm::InputTag src_; |
32 |
|
edm::ESHandle<ParticleDataTable> pdt_; |
33 |
+ |
bool printP4_, printPtEtaPhi_, printVertex_, printStatus_, printIndex_; |
34 |
+ |
typedef std::vector<int> vint; |
35 |
+ |
vint status_; |
36 |
+ |
std::vector<const reco::Candidate *> cands_; |
37 |
|
|
24 |
– |
bool printP4_, printPtEtaPhi_, printVertex_, printStatus_; |
38 |
|
void printDecay( const reco::Candidate &, const std::string & pre ) const; |
39 |
< |
void printP4( const reco::Candidate & ) const; |
39 |
> |
//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 |
|
}; |
45 |
|
|
46 |
|
#endif |