CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
MyPFRootEventManager Class Reference

#include <MyPFRootEventManager.h>

Inheritance diagram for MyPFRootEventManager:
PFRootEventManager

Public Member Functions

 MyPFRootEventManager (const char *file)
 
bool processEntry (int entry)
 process one entry (pass the TTree entry) More...
 
void write ()
 
 ~MyPFRootEventManager ()
 
- Public Member Functions inherited from PFRootEventManager
const reco::PFBlockCollectionblocks () const
 
int chargeValue (const int &pdgId) const
 
const reco::PFSimParticleclosestParticle (reco::PFTrajectoryPoint::LayerType layer, double eta, double phi, double &peta, double &pphi, double &pe) const
 find the closest PFSimParticle to a point (eta,phi) in a given detector More...
 
void clustering ()
 read data from testbeam tree More...
 
void connect (const char *infilename="")
 open the root file and connect to the tree More...
 
bool countChargedAndPhotons () const
 
bool eventAccepted () const
 returns true if the event is accepted(have a look at the function implementation) More...
 
int eventNumber ()
 
int eventToEntry (int run, int lumi, int event) const
 
std::string expand (const std::string &oldString) const
 
void fillClusterMask (std::vector< bool > &mask, const reco::PFClusterCollection &clusters) const
 cluster mask set to true for rechits inside TCutG More...
 
void fillOutEventWithBlocks (const reco::PFBlockCollection &blocks)
 fills outEvent with blocks More...
 
void fillOutEventWithCaloTowers (const CaloTowerCollection &cts)
 fills outEvent with calo towers More...
 
void fillOutEventWithClusters (const reco::PFClusterCollection &clusters)
 fills OutEvent with clusters More...
 
void fillOutEventWithPFCandidates (const reco::PFCandidateCollection &pfCandidates)
 fills OutEvent with candidates More...
 
void fillOutEventWithSimParticles (const reco::PFSimParticleCollection &ptcs)
 fills OutEvent with sim particles More...
 
void fillPhotonMask (std::vector< bool > &mask, const reco::PhotonCollection &photons) const
 photon mask set to true for photons inside TCutG More...
 
void fillRecHitMask (std::vector< bool > &mask, const reco::PFRecHitCollection &rechits) const
 rechit mask set to true for rechits inside TCutG More...
 
void fillTrackMask (std::vector< bool > &mask, const reco::PFRecTrackCollection &tracks) const
 track mask set to true for rechits inside TCutG More...
 
void fillTrackMask (std::vector< bool > &mask, const reco::GsfPFRecTrackCollection &tracks) const
 
std::string getGenParticleName (int partId, std::string &latexStringName) const
 get name of genParticle More...
 
bool highPtJet (double ptMin) const
 returns true if there is at least one jet with pT>pTmin More...
 
bool highPtPFCandidate (double ptMin, reco::PFCandidate::ParticleType type=reco::PFCandidate::X) const
 returns true if there is a PFCandidate of a given type over a given pT More...
 
void initializeEventInformation ()
 
bool isHadronicTau () const
 study the sim event to check if the tau decay is hadronic More...
 
void mcTruthMatching (std::ostream &out, const reco::PFCandidateCollection &candidates, std::vector< std::list< simMatch > > &candSimMatchTrack, std::vector< std::list< simMatch > > &candSimMatchEcal) const
 
void particleFlow ()
 performs particle flow More...
 
void pfCandCompare (int)
 compare particle flow More...
 
 PFRootEventManager ()
 default constructor More...
 
 PFRootEventManager (const char *file)
 
void PreprocessRecHits (reco::PFRecHitCollection &rechits, bool findNeighbours)
 preprocess a rechit vector from a given rechit branch More...
 
void PreprocessRecTracks (reco::PFRecTrackCollection &rectracks)
 preprocess a rectrack vector from a given rectrack branch More...
 
void PreprocessRecTracks (reco::GsfPFRecTrackCollection &rectracks)
 
void print (std::ostream &out=std::cout, int maxNLines=-1) const
 print information More...
 
void printCluster (const reco::PFCluster &cluster, std::ostream &out=std::cout) const
 
void printClusters (const reco::PFClusterCollection &clusters, std::ostream &out=std::cout) const
 print clusters More...
 
void printGenParticles (std::ostream &out=std::cout, int maxNLines=-1) const
 print the HepMC truth More...
 
void printMCCalib (std::ofstream &out) const
 print calibration information More...
 
void printRecHit (const reco::PFRecHit &rh, unsigned index, const char *seed=" ", std::ostream &out=std::cout) const
 
void printRecHits (const reco::PFRecHitCollection &rechits, const PFClusterAlgo &clusterAlgo, std::ostream &out=std::cout) const
 print rechits More...
 
virtual bool processEvent (int run, int lumi, int event)
 process one event (pass the CMS event number) More...
 
void readCMSSWJets ()
 
bool readFromSimulation (int entry)
 read data from simulation tree More...
 
void readOptions (const char *file, bool refresh=true, bool reconnect=false)
 
virtual void readSpecificOptions (const char *file)
 
void reconstructCaloJets ()
 reconstruct calo jets More...
 
void reconstructFWLiteJets (const reco::CandidatePtrVector &Candidates, std::vector< ProtoJet > &output)
 used by the reconstruct*Jets functions More...
 
void reconstructGenJets ()
 reconstruct gen jets More...
 
void reconstructPFJets ()
 reconstruct pf jets More...
 
void reset ()
 reset before next event More...
 
void setRecHitNeigbours (reco::PFRecHit &rh, const std::map< unsigned, unsigned > &detId2index)
 
edm::InputTag stringToTag (const std::vector< std::string > &tagname)
 returns an InputTag from a vector of strings More...
 
double tauBenchmark (const reco::PFCandidateCollection &candidates)
 COLIN need to get rid of this mess. More...
 
bool trackInsideGCut (const reco::PFTrack &track) const
 is PFTrack inside cut G ? yes if at least one trajectory point is inside. More...
 
TTree * tree ()
 get tree More...
 
virtual ~PFRootEventManager ()
 destructor More...
 

Additional Inherited Members

- Public Types inherited from PFRootEventManager
typedef std::map< int, int > EventToEntry
 
typedef std::map< int,
EventToEntry
LumisMap
 
typedef std::map< int, LumisMapRunsMap
 
enum  Verbosity { SHUTUP = 0, VERBOSE }
 
enum  View_t {
  XY = 0, RZ = 1, EPE = 2, EPH = 3,
  NViews = 4
}
 viewport definition More...
 
- Public Attributes inherited from PFRootEventManager
std::ofstream * calibFile_
 
boost::shared_ptr
< PFEnergyCalibration
calibration_
 
std::vector< ProtoJetcaloJets_
 calo Jets More...
 
std::vector< reco::CaloJetcaloJetsCMSSW_
 
edm::Handle< std::vector
< reco::CaloJet > > 
caloJetsHandle_
 CMSSW calo Jets. More...
 
edm::InputTag caloJetsTag_
 
reco::CaloMETCollection caloMets_
 Calo MET. More...
 
reco::CaloMETCollection caloMetsCMSSW_
 
edm::Handle
< reco::CaloMETCollection
caloMetsHandle_
 CMSSW Calo MET. More...
 
edm::InputTag caloMetsTag_
 
CaloTowerCollection caloTowers_
 
edm::Handle< CaloTowerCollectioncaloTowersHandle_
 input collection of calotowers More...
 
reco::CandidatePtrVector caloTowersPtrs_
 
edm::InputTag caloTowersTag_
 
PFClusterAlgo clusterAlgoECAL_
 
PFClusterAlgo clusterAlgoHCAL_
 clustering algorithm for HCAL More...
 
PFClusterAlgo clusterAlgoHFEM_
 clustering algorithm for HF, electro-magnetic layer More...
 
PFClusterAlgo clusterAlgoHFHAD_
 clustering algorithm for HF, hadronic layer More...
 
PFClusterAlgo clusterAlgoHO_
 clustering algorithm for HO More...
 
PFClusterAlgo clusterAlgoPS_
 clustering algorithm for PS More...
 
boost::shared_ptr
< pftools::PFClusterCalibration
clusterCalibration_
 
std::auto_ptr
< reco::PFClusterCollection
clustersECAL_
 
edm::Handle
< reco::PFClusterCollection
clustersECALHandle_
 clusters ECAL More...
 
edm::InputTag clustersECALTag_
 
std::auto_ptr
< reco::PFClusterCollection
clustersHCAL_
 
edm::Handle
< reco::PFClusterCollection
clustersHCALHandle_
 clusters HCAL More...
 
edm::InputTag clustersHCALTag_
 
std::auto_ptr
< reco::PFClusterCollection
clustersHFEM_
 
edm::Handle
< reco::PFClusterCollection
clustersHFEMHandle_
 clusters HCAL More...
 
edm::InputTag clustersHFEMTag_
 
std::auto_ptr
< reco::PFClusterCollection
clustersHFHAD_
 
edm::Handle
< reco::PFClusterCollection
clustersHFHADHandle_
 clusters HCAL More...
 
edm::InputTag clustersHFHADTag_
 
std::auto_ptr
< reco::PFClusterCollection
clustersHO_
 
edm::Handle
< reco::PFClusterCollection
clustersHOHandle_
 clusters HO More...
 
edm::InputTag clustersHOTag_
 
std::auto_ptr
< reco::PFClusterCollection
clustersPS_
 
edm::Handle
< reco::PFClusterCollection
clustersPSHandle_
 clusters PS More...
 
edm::InputTag clustersPSTag_
 
reco::GsfPFRecTrackCollection convBremGsfrecTracks_
 
edm::Handle
< reco::GsfPFRecTrackCollection
convBremGsfrecTracksHandle_
 reconstructed secondary GSF tracks More...
 
edm::InputTag convBremGsfrecTracksTag_
 
reco::PFConversionCollection conversion_
 
edm::Handle
< reco::PFConversionCollection
conversionHandle_
 conversions More...
 
edm::InputTag conversionTag_
 
std::vector< reco::CaloJetcorrcaloJetsCMSSW_
 
edm::Handle< std::vector
< reco::CaloJet > > 
corrcaloJetsHandle_
 CMSSW corrected calo Jets. More...
 
edm::InputTag corrcaloJetsTag_
 
bool debug_
 debug printouts for this PFRootEventManager on/off More...
 
double DeltaMETcut
 
double DeltaPhicut
 
reco::PFRecTrackCollection displacedRecTracks_
 
edm::Handle
< reco::PFRecTrackCollection
displacedRecTracksHandle_
 
edm::InputTag displacedRecTracksTag_
 
bool doClustering_
 
bool doCompare_
 comparison with pf CMSSW More...
 
bool doJets_
 jets on/off More...
 
bool doMet_
 MET on/off. More...
 
bool doParticleFlow_
 particle flow on/off More...
 
bool doPFCandidateBenchmark_
 
bool doPFDQM_
 
bool doPFJetBenchmark_
 PFJet benchmark on/off. More...
 
bool doPFMETBenchmark_
 PFMET benchmark on/off. More...
 
bool doTauBenchmark_
 tau benchmark on/off More...
 
TFile * dqmFile_
 
reco::SuperClusterCollection ebsc_
 superclusters More...
 
reco::SuperClusterCollection eesc_
 
edm::Handle
< reco::GsfElectronCollection
egammaElectronHandle_
 
reco::GsfElectronCollection egammaElectrons_
 
edm::InputTag egammaElectronsTag_
 
fwlite::ChainEventev_
 NEW: input event. More...
 
edm::EventAuxiliaryeventAuxiliary_
 event auxiliary information More...
 
TBranch * eventAuxiliaryBranch_
 
bool fastsim_
 Fastsim or fullsim. More...
 
TFile * file_
 input file More...
 
bool filterHadronicTaus_
 
unsigned filterNParticles_
 
std::vector< int > filterTaus_
 
bool findRecHitNeighbours_
 find rechit neighbours ? More...
 
reco::GenJetCollection genJets_
 gen Jets More...
 
reco::GenJetCollection genJetsCMSSW_
 
edm::Handle
< reco::GenJetCollection
genJetsHandle_
 CMSSW gen Jets. More...
 
edm::InputTag genJetsTag_
 
reco::GenParticleCollection genParticlesCMSSW_
 
reco::GenParticleRefVector genParticlesforJets_
 
edm::Handle
< reco::GenParticleRefVector
genParticlesforJetsHandle_
 input collection of gen particles More...
 
reco::CandidatePtrVector genParticlesforJetsPtrs_
 
edm::InputTag genParticlesforJetsTag_
 
edm::Handle
< reco::GenParticleCollection
genParticlesforMETHandle_
 CMSSW GenParticles. More...
 
edm::InputTag genParticlesforMETTag_
 
reco::GsfPFRecTrackCollection gsfrecTracks_
 
edm::Handle
< reco::GsfPFRecTrackCollection
gsfrecTracksHandle_
 reconstructed GSF tracks More...
 
edm::InputTag gsfrecTracksTag_
 
TH1F * h_deltaETvisible_MCEHT_
 output histo dET ( EHT - MC) More...
 
TH1F * h_deltaETvisible_MCPF_
 output histo dET ( PF - MC) More...
 
int iEvent_
 current event More...
 
std::vector< std::string > inFileNames_
 input file names More...
 
bool JECinCaloMet_
 propagate the Jet Energy Corrections to the caloMET on/off More...
 
PFJetAlgorithm jetAlgo_
 
int jetAlgoType_
 jet algo type More...
 
FWLiteJetProducer jetMaker_
 wrapper to official jet algorithms More...
 
bool jetsDebug_
 debug printouts for jet algo on/off More...
 
RunsMap mapEventToEntry_
 
edm::HepMCProduct MCTruth_
 
edm::Handle< edm::HepMCProductMCTruthHandle_
 MC truth. More...
 
edm::InputTag MCTruthTag_
 
double MET1cut
 PFMET Benchmark. More...
 
std::auto_ptr< METManagermetManager_
 
reco::MuonCollection muons_
 
edm::Handle< reco::MuonCollectionmuonsHandle_
 muons More...
 
edm::InputTag muonsTag_
 
IOoptions_
 options file parser More...
 
EventColinoutEvent_
 
TFile * outFile_
 output file More...
 
std::string outFileName_
 output filename More...
 
TTree * outTree_
 output tree More...
 
PFAlgo pfAlgo_
 particle flow algorithm More...
 
PFBlockAlgo pfBlockAlgo_
 algorithm for building the particle flow blocks More...
 
std::auto_ptr
< reco::PFBlockCollection
pfBlocks_
 reconstructed pfblocks More...
 
reco::PFCandidateCollection pfCandCMSSW_
 
std::auto_ptr
< reco::PFCandidateElectronExtraCollection
pfCandidateElectronExtras_
 PFCandidateElectronExtra. More...
 
edm::Handle
< reco::PFCandidateCollection
pfCandidateHandle_
 CMSSW PF candidates. More...
 
PFCandidateManager pfCandidateManager_
 
std::auto_ptr
< reco::PFCandidateCollection
pfCandidates_
 reconstructed pfCandidates More...
 
reco::CandidatePtrVector pfCandidatesPtrs_
 
edm::InputTag pfCandidateTag_
 
PFJetBenchmark PFJetBenchmark_
 PFJet Benchmark. More...
 
PFJetMonitor pfJetMonitor_
 
reco::PFJetCollection pfJets_
 PF Jets. More...
 
reco::PFJetCollection pfJetsCMSSW_
 
edm::Handle
< reco::PFJetCollection
pfJetsHandle_
 CMSSW PF Jets. More...
 
edm::InputTag pfJetsTag_
 
PFMETMonitor pfMETMonitor_
 
reco::PFMETCollection pfMets_
 PF MET. More...
 
reco::PFMETCollection pfMetsCMSSW_
 
edm::Handle
< reco::PFMETCollection
pfMetsHandle_
 CMSSW PF MET. More...
 
edm::InputTag pfMetsTag_
 
reco::PFDisplacedTrackerVertexCollection pfNuclearTrackerVertex_
 
edm::Handle
< reco::PFDisplacedTrackerVertexCollection
pfNuclearTrackerVertexHandle_
 PFDisplacedVertex. More...
 
edm::InputTag pfNuclearTrackerVertexTag_
 
edm::Handle
< reco::PhotonCollection
photonHandle_
 photons More...
 
reco::PhotonCollection photons_
 
edm::InputTag photonTag_
 
reco::VertexCollection primaryVertices_
 
edm::Handle
< reco::VertexCollection
primaryVerticesHandle_
 reconstructed primary vertices More...
 
edm::InputTag primaryVerticesTag_
 
bool printClusters_
 print clusters yes/no More...
 
double printClustersEMin_
 
bool printGenParticles_
 print MC truth yes/no More...
 
double printGenParticlesPtMin_
 
bool printMCTruthMatching_
 
bool printPFBlocks_
 print PFBlocks yes/no More...
 
bool printPFCandidates_
 print PFCandidates yes/no More...
 
double printPFCandidatesPtMin_
 
bool printPFJets_
 print PFJets yes/no More...
 
double printPFJetsPtMin_
 
bool printRecHits_
 print rechits yes/no More...
 
double printRecHitsEMin_
 
bool printSimParticles_
 print true particles yes/no More...
 
double printSimParticlesPtMin_
 
reco::PFRecHitCollection rechitsCLEANED_
 
std::vector< edm::Handle
< reco::PFRecHitCollection > > 
rechitsCLEANEDHandles_
 
std::vector< edm::InputTagrechitsCLEANEDTags_
 
std::vector
< reco::PFRecHitCollection
rechitsCLEANEDV_
 rechits HF CLEANED More...
 
reco::PFRecHitCollection rechitsECAL_
 
edm::Handle
< reco::PFRecHitCollection
rechitsECALHandle_
 rechits ECAL More...
 
edm::InputTag rechitsECALTag_
 
reco::PFRecHitCollection rechitsHCAL_
 
edm::Handle
< reco::PFRecHitCollection
rechitsHCALHandle_
 rechits HCAL More...
 
edm::InputTag rechitsHCALTag_
 
reco::PFRecHitCollection rechitsHFEM_
 
edm::Handle
< reco::PFRecHitCollection
rechitsHFEMHandle_
 rechits HF EM More...
 
edm::InputTag rechitsHFEMTag_
 
reco::PFRecHitCollection rechitsHFHAD_
 
edm::Handle
< reco::PFRecHitCollection
rechitsHFHADHandle_
 rechits HF HAD More...
 
edm::InputTag rechitsHFHADTag_
 
reco::PFRecHitCollection rechitsHO_
 
edm::Handle
< reco::PFRecHitCollection
rechitsHOHandle_
 rechits HO More...
 
edm::InputTag rechitsHOTag_
 
reco::PFRecHitCollection rechitsPS_
 
edm::Handle
< reco::PFRecHitCollection
rechitsPSHandle_
 rechits PS More...
 
edm::InputTag rechitsPSTag_
 
reco::PFRecTrackCollection recTracks_
 
edm::Handle
< reco::PFRecTrackCollection
recTracksHandle_
 reconstructed tracks More...
 
edm::InputTag recTracksTag_
 
reco::TrackCollection stdTracks_
 
edm::Handle
< reco::TrackCollection
stdTracksHandle_
 standard reconstructed tracks More...
 
edm::InputTag stdTracksTag_
 
bool tauBenchmarkDebug_
 tau benchmark debug More...
 
reco::METCollection tcMets_
 TCMET. More...
 
reco::METCollection tcMetsCMSSW_
 
edm::Handle< reco::METCollectiontcMetsHandle_
 CMSSW TCMET. More...
 
edm::InputTag tcMetsTag_
 
boost::shared_ptr
< PFEnergyCalibrationHF
thepfEnergyCalibrationHF_
 
TTree * tree_
 input tree More...
 
reco::PFSimParticleCollection trueParticles_
 
edm::Handle
< reco::PFSimParticleCollection
trueParticlesHandle_
 true particles More...
 
edm::InputTag trueParticlesTag_
 
bool useAtHLT_
 Use HLT tracking. More...
 
bool useConvBremGsfTracks_
 Use Secondary Gsf Tracks. More...
 
bool useConvBremPFRecTracks_
 Use Conv Brem KF Tracks. More...
 
bool useEGElectrons_
 Use EGElectrons. More...
 
bool useEGPhotons_
 Use EGPhotons. More...
 
bool useHO_
 Use of HO in links with tracks/HCAL and in particle flow reconstruction. More...
 
bool useKDTreeTrackEcalLinker_
 ECAL-track link optimization. More...
 
bool usePFConversions_
 Use of conversions in PFAlgo. More...
 
bool usePFElectrons_
 Use PFElectrons. More...
 
bool usePFNuclearInteractions_
 Use of PFDisplacedVertex in PFAlgo. More...
 
bool usePFV0s_
 Use of V0 in PFAlgo. More...
 
reco::PFV0Collection v0_
 
edm::Handle< reco::PFV0Collectionv0Handle_
 V0. More...
 
edm::InputTag v0Tag_
 
int verbosity_
 verbosity More...
 

Detailed Description

Definition at line 17 of file MyPFRootEventManager.h.

Constructor & Destructor Documentation

MyPFRootEventManager::MyPFRootEventManager ( const char *  file)

Definition at line 10 of file MyPFRootEventManager.cc.

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 }
PFRootEventManager()
default constructor
MyPFRootEventManager::~MyPFRootEventManager ( )

Definition at line 20 of file MyPFRootEventManager.cc.

20  {
21  // delete histos here
22 }

Member Function Documentation

bool MyPFRootEventManager::processEntry ( int  entry)
virtual

process one entry (pass the TTree entry)

Reimplemented from PFRootEventManager.

Definition at line 25 of file MyPFRootEventManager.cc.

References PFRootEventManager::clustersECAL_, gather_cfg::cout, i, PFRootEventManager::processEntry(), and PFRootEventManager::trueParticles_.

25  {
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 }
int i
Definition: DBlmapReader.cc:9
std::auto_ptr< reco::PFClusterCollection > clustersECAL_
reco::PFSimParticleCollection trueParticles_
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
void MyPFRootEventManager::write ( void  )
virtual

Reimplemented from PFRootEventManager.

Definition at line 61 of file MyPFRootEventManager.cc.

References PFRootEventManager::outFile_.

61  {
62  // write histos here
63  outFile_->cd();
64 }
TFile * outFile_
output file