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
NTupplizer.h
Go to the documentation of this file.
1#ifndef __NTUPPLIZER_H__
2#define __NTUPPLIZER_H__
3
4//-----------------//
5// C++ StdLib //
6//-----------------//
7#include <iostream>
8#include <string>
9
10//----------//
11// ROOT //
12//----------//
13#include "TClonesArray.h"
14
15//-----------//
16// hpstr //
17//-----------//
18#include "Processor.h"
19#include "BaseSelector.h"
20#include "Track.h"
21#include "Event.h"
22#include "TrackHistos.h"
23#include "TrackerHit.h"
24#include "Particle.h"
25#include "CalCluster.h"
26#include "MCParticle.h"
27#include "RawSvtHit.h"
28#include "ModuleMapper.h"
29
30
31#include "Processor.h"
32#include "TClonesArray.h"
33#include "TBranch.h"
34#include "TTree.h"
35#include "TFile.h"
36#include "TF1.h"
37#include "TGraphErrors.h"
38#include "TAxis.h"
39#include "TROOT.h"
40#include "TPad.h"
41#include "TCanvas.h"
42#include "TLegend.h"
43
44
45
46// Forward declarations
47class TTree;
48
53class NTupplizer : public Processor {
54
55 public:
63 NTupplizer(const std::string& name, Process& process);
64
66 ~NTupplizer();
67
73 virtual void configure(const ParameterSet& parameters);
74
80 virtual bool process(IEvent* ievent);
81
88 virtual void initialize(TTree* tree);
89
94 virtual void finalize();
95
96 virtual void WriteRoot();
97
98 virtual float str_to_float(std::string word);
99
100 private:
101
102 TTree* tree_;
103
104 TH1F* Tracks_;
105 TH1F* Track_Lambda[12][14];
106 TH1F* Track_Phi[12][14];
107 TH1F* Track_D0[12];
108 TH1F* Track_PHI[12];
109 TH1F* Track_OMEGA[12];
111 TH1F* Track_Z0[12];
112 TH1F* Track_CHI2[12];
113 TH1F* Track_NDF[12];
114 TH1F* Track_TIME[12];
115 TH1F* Track_POSX[12];
116 TH1F* Track_POSY[12];
117 TH1F* Track_POSZ[12];
118 TH1F* Track_MOMX[12];
119 TH1F* Track_MOMY[12];
120 TH1F* Track_MOMZ[12];
121
122 std::ofstream csvFile_{nullptr};
124
125 int counter_{0};
126 int counter2_{0};
127 std::string baselineFile_;
128 std::string timeProfiles_;
131 std::vector<Track*>* tracks_{};
132 TBranch* btracks_{nullptr};
133
134 std::vector<Particle*>* fsps_{};
135 TBranch* bfsps_{nullptr};
136
137 std::vector<CalCluster*>* eclusters_{};
138 TBranch* beclusters_{nullptr};
139
140 std::vector<TrackerHit*>* sclusters_{};
141 TBranch* bsclusters_{nullptr};
142
143
144 float times1_[2][4][512][3];
145 float times2_[8][4][640][3];
146 float baseErr1_[2][4][512][12];
147 float baseErr2_[8][4][640][12];
148
149 TBranch* bevH_;
151
152 std::vector<MCParticle*>* mcpart_{};
153 TBranch* bmcpart_{nullptr};
154
155 //std::vector<Track*>* trtracks_{};
156 //TBranch* btrtracks_{nullptr}; //!< description
157
158 std::string trkCollName_{"KalmanFullTracks"};
159 std::string fspCollName_{"FinalStateParticles_KF"};
160 std::string eclusCollName_{"RecoEcalClusters"};
161 std::string mcCollName_{"MCParticle"};
162 std::string sclusCollName_{"SiClusters"};
163 //std::string num_{"0"};
164
165 //std::string truthtrkCollName_{"Truth_KFTracks"};
166
167 int readout_{0};
168
169 int debug_{0};
170
171};
172
173#endif
Class defining methods used to access event information and data collections.
Class used to encapsulate information about a mc particle.
Class used to encapsulate information about a particle.
Base classes for all user event processing components to extend.
Class used to encapsulate raw svt hit information.
Class used to encapsulate track information.
Class used to encapsulate tracker hit information.
Definition IEvent.h:7
Insert description here. more details.
Definition NTupplizer.h:53
TBranch * bfsps_
Definition NTupplizer.h:135
TH1F * Track_Phi[12][14]
Definition NTupplizer.h:106
TH1F * Track_OMEGA[12]
Definition NTupplizer.h:109
int debug_
debug level
Definition NTupplizer.h:169
float times1_[2][4][512][3]
Definition NTupplizer.h:144
std::string trkCollName_
Track Collection name.
Definition NTupplizer.h:158
std::string timeProfiles_
Definition NTupplizer.h:128
float baseErr2_[8][4][640][12]
Definition NTupplizer.h:147
std::vector< TrackerHit * > * sclusters_
Definition NTupplizer.h:140
virtual void configure(const ParameterSet &parameters)
Configure the Ana Processor.
TH1F * Track_POSX[12]
Definition NTupplizer.h:115
virtual void finalize()
Callback for the Processor to take any necessary action when the processing of events finishes.
TH1F * Track_Lambda[12][14]
Definition NTupplizer.h:105
std::string baselineFile_
Definition NTupplizer.h:127
TH1F * Track_POSY[12]
Definition NTupplizer.h:116
TH1F * Track_D0[12]
Definition NTupplizer.h:107
TH1F * Track_TANLAMBDA[12]
Definition NTupplizer.h:110
std::vector< Particle * > * fsps_
Definition NTupplizer.h:134
virtual void initialize(TTree *tree)
Callback for the Processor to take any necessary action when the processing of events starts.
virtual void WriteRoot()
TH1F * Track_POSZ[12]
Definition NTupplizer.h:117
std::string fspCollName_
Definition NTupplizer.h:159
TTree * tree_
Definition NTupplizer.h:102
std::string mcCollName_
Definition NTupplizer.h:161
std::string sclusCollName_
Definition NTupplizer.h:162
float baseErr1_[2][4][512][12]
Definition NTupplizer.h:146
TH1F * Tracks_
Definition NTupplizer.h:104
TBranch * bsclusters_
Definition NTupplizer.h:141
std::ofstream csvFile_
Definition NTupplizer.h:122
TH1F * Track_NDF[12]
Definition NTupplizer.h:113
TH1F * Track_MOMY[12]
Definition NTupplizer.h:119
virtual float str_to_float(std::string word)
std::string eclusCollName_
description
Definition NTupplizer.h:160
TBranch * bevH_
Definition NTupplizer.h:149
TH1F * Track_MOMX[12]
Definition NTupplizer.h:118
TH1F * Track_MOMZ[12]
Definition NTupplizer.h:120
TBranch * beclusters_
Definition NTupplizer.h:138
TBranch * btracks_
description
Definition NTupplizer.h:132
std::vector< MCParticle * > * mcpart_
Definition NTupplizer.h:152
TH1F * Track_CHI2[12]
Definition NTupplizer.h:112
std::vector< CalCluster * > * eclusters_
Definition NTupplizer.h:137
TH1F * Track_Z0[12]
Definition NTupplizer.h:111
ModuleMapper * mmapper_
Definition NTupplizer.h:129
TH1F * Track_PHI[12]
Definition NTupplizer.h:108
TH1F * Track_TIME[12]
Definition NTupplizer.h:114
EventHeader * evH_
Definition NTupplizer.h:150
std::vector< Track * > * tracks_
Definition NTupplizer.h:131
float times2_[8][4][640][3]
Definition NTupplizer.h:145
TBranch * bmcpart_
Definition NTupplizer.h:153
description
Base class for all event processing components.
Definition Processor.h:34
virtual bool process()
Process the histograms and generate analysis output.
Definition Processor.h:95