CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MyPFRootEventManager.cc
Go to the documentation of this file.
2 
3 #include <TFile.h>
4 
5 #include <iostream>
6 
7 using namespace std;
8 
9 
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 
21  // delete histos here
22 }
23 
24 
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 
62  // write histos here
63  outFile_->cd();
64 }
65 
int i
Definition: DBlmapReader.cc:9
std::auto_ptr< reco::PFClusterCollection > clustersECAL_
reco::PFSimParticleCollection trueParticles_
bool processEntry(int entry)
process one entry (pass the TTree entry)
TFile * outFile_
output file
std::pair< std::string, MonitorElement * > entry
Definition: ME_MAP.h:8
virtual bool processEntry(int entry)
process one entry (pass the TTree entry)
true particle for particle flow
Definition: PFSimParticle.h:19
tuple cout
Definition: gather_cfg.py:121
ROOT interface to particle flow package.
MyPFRootEventManager(const char *file)