1 |
#ifndef ParticleTreeDrawer_h
|
2 |
#define ParticleTreeDrawer_h
|
3 |
//
|
4 |
// class ParticleTreeDrawer
|
5 |
// Adapted from Luca Lista's plugin
|
6 |
//
|
7 |
#include "FWCore/ParameterSet/interface/ParameterSet.h"
|
8 |
#include "FWCore/ParameterSet/interface/InputTag.h"
|
9 |
#include "FWCore/Framework/interface/ESHandle.h"
|
10 |
#include "FWCore/Utilities/interface/EDMException.h"
|
11 |
#include "FWCore/Framework/interface/Event.h"
|
12 |
#include "FWCore/Framework/interface/EventSetup.h"
|
13 |
|
14 |
#include "SimGeneral/HepPDTRecord/interface/ParticleDataTable.h"
|
15 |
#include "DataFormats/Common/interface/View.h"
|
16 |
#include "DataFormats/Candidate/interface/Candidate.h"
|
17 |
#include "DataFormats/Candidate/interface/CandidateFwd.h"
|
18 |
//#include "DataFormats/HepMCCandidate/interface/GenParticleCandidate.h"
|
19 |
|
20 |
#include <iostream>
|
21 |
#include <algorithm>
|
22 |
|
23 |
|
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 |
|
46 |
};
|
47 |
|
48 |
#endif
|