Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
RecoParticleFlow
PFRootEvent
src
MyPFRootEventManager.cc
Go to the documentation of this file.
1
#include "
RecoParticleFlow/PFRootEvent/interface/MyPFRootEventManager.h
"
2
3
#include <TFile.h>
4
5
#include <iostream>
6
7
using namespace
std;
8
9
10
MyPFRootEventManager::MyPFRootEventManager
(
const
char
*
file
)
11
:
PFRootEventManager
(file) {
12
13
// book histos here
14
15
// you can add your own options to the option file,
16
// following the model of PFRootEventManager::readOptions
17
}
18
19
20
MyPFRootEventManager::~MyPFRootEventManager
() {
21
// delete histos here
22
}
23
24
25
bool
MyPFRootEventManager::processEntry
(
int
entry) {
26
if
( !
PFRootEventManager::processEntry
(entry) )
27
return
false
;
// event not accepted
28
29
// fill histos here
30
31
cout
<<
"true particles: "
<<endl;
32
33
for
(
unsigned
i
=0;
i
<
trueParticles_
.size();
i
++) {
34
const
reco::PFSimParticle
& ptc =
trueParticles_
[
i
];
35
36
cout
<<ptc<<endl;
37
}
38
39
40
// cout<<"particle flow blocks : "<<endl;
41
42
// for(unsigned i=0; i<allPFBs_.size(); i++) {
43
// const PFBlock& block = allPFBs_[i];
44
45
// cout<<block<<endl;
46
// }
47
48
// clusters can be accessed here, or through the pflow blocks
49
for
(
unsigned
i
=0;
i
<
clustersECAL_
->size();
i
++) {
50
;
51
}
52
53
54
55
return
false
;
56
}
57
58
59
60
61
void
MyPFRootEventManager::write
() {
62
// write histos here
63
outFile_
->cd();
64
}
65
i
int i
Definition:
DBlmapReader.cc:9
MyPFRootEventManager.h
mergeVDriftHistosByStation.file
tuple file
Definition:
mergeVDriftHistosByStation.py:54
PFRootEventManager::clustersECAL_
std::auto_ptr< reco::PFClusterCollection > clustersECAL_
Definition:
PFRootEventManager.h:488
PFRootEventManager::trueParticles_
reco::PFSimParticleCollection trueParticles_
Definition:
PFRootEventManager.h:591
MyPFRootEventManager::processEntry
bool processEntry(int entry)
process one entry (pass the TTree entry)
Definition:
MyPFRootEventManager.cc:25
MyPFRootEventManager::write
void write()
Definition:
MyPFRootEventManager.cc:61
PFRootEventManager::outFile_
TFile * outFile_
output file
Definition:
PFRootEventManager.h:693
MyPFRootEventManager::~MyPFRootEventManager
~MyPFRootEventManager()
Definition:
MyPFRootEventManager.cc:20
PFRootEventManager::processEntry
virtual bool processEntry(int entry)
process one entry (pass the TTree entry)
Definition:
PFRootEventManager.cc:1951
reco::PFSimParticle
true particle for particle flow
Definition:
PFSimParticle.h:19
gather_cfg.cout
tuple cout
Definition:
gather_cfg.py:121
PFRootEventManager
ROOT interface to particle flow package.
Definition:
PFRootEventManager.h:190
MyPFRootEventManager::MyPFRootEventManager
MyPFRootEventManager(const char *file)
Definition:
MyPFRootEventManager.cc:10
Generated for CMSSW Reference Manual by
1.8.5