hpstr
The Heavy Photon Search Toolkit for Reconstruction (hpstr) provides an interface to physics data from the HPS experiment saved in the LCIO format and converts it into an ROOT based format.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
RecoHitAnaProcessor.cxx
Go to the documentation of this file.
1
7#include <iostream>
8
9RecoHitAnaProcessor::RecoHitAnaProcessor(const std::string& name, Process& process) : Processor(name,process){}
10//TODO CHECK THIS DESTRUCTOR
12
13
15 std::cout << "Configuring RecoHitAnaProcessor" << std::endl;
16 try
17 {
18 debug_ = parameters.getInteger("debug");
19 anaName_ = parameters.getString("anaName");
20 trkColl_ = parameters.getString("trkColl");
21 trkrHitColl_ = parameters.getString("trkrHitColl");
22 ecalHitColl_ = parameters.getString("ecalHitColl");
23 ecalClusColl_ = parameters.getString("ecalClusColl");
24 histCfgFilename_ = parameters.getString("histCfg");
25 }
26 catch (std::runtime_error& error)
27 {
28 std::cout << error.what() << std::endl;
29 }
30
31}
32
34 tree_= tree;
35 // init histos
36 histos = new RecoHitAnaHistos(anaName_.c_str());
39
40 // init TTree
41 tree_->SetBranchAddress(trkrHitColl_.c_str() , &trkrHits_ , &btrkrHits_ );
42 tree_->SetBranchAddress(trkColl_.c_str() , &tracks_ , &btracks_ );
43 tree_->SetBranchAddress(ecalHitColl_.c_str() , &ecalHits_ , &becalHits_ );
44 tree_->SetBranchAddress(ecalClusColl_.c_str() , &ecalClusters_, &becalClusters_);
45
46}
47
57
59
61 delete histos;
62 histos = nullptr;
63}
64
#define DECLARE_PROCESSOR(CLASS)
Macro which allows the framework to construct a producer given its name during configuration.
Definition Processor.h:139
virtual void DefineHistos()
Definition of histograms from json config.
virtual void loadHistoConfig(const std::string histoConfigFile)
load histogram config
virtual void saveHistos(TFile *outF=nullptr, std::string folder="")
save histograms
Definition IEvent.h:7
description
Base class for all event processing components.
Definition Processor.h:34
TFile * outF_
Definition Processor.h:125
virtual bool process()
Process the histograms and generate analysis output.
Definition Processor.h:95
void FillEcalClusters(std::vector< CalCluster * > *ecalClusters, float weight=1.)
description
void FillEcalHits(std::vector< CalHit * > *ecalHits, float weight=1.)
description
void FillTrackerHits(std::vector< TrackerHit * > *trkrHits, float weight=1.)
description
void FillTracks(std::vector< Track * > *tracks, float weight=1.)
description
Insert description here. more details.
TBranch * becalClusters_
description
RecoHitAnaHistos * histos
std::string trkrHitColl_
description
std::string ecalHitColl_
description
RecoHitAnaProcessor(const std::string &name, Process &process)
Constructor.
std::vector< CalCluster * > * ecalClusters_
description
std::string anaName_
description
virtual void configure(const ParameterSet &parameters)
description
virtual void finalize()
description
virtual void initialize(TTree *tree)
description
std::vector< CalHit * > * ecalHits_
description
TBranch * becalHits_
description
TBranch * btrkrHits_
description
std::string histCfgFilename_
description
TBranch * btracks_
description
std::string trkColl_
description
std::vector< TrackerHit * > * trkrHits_
description
std::string ecalClusColl_
description
std::vector< Track * > * tracks_
description