FCCAnalyses
Loading...
Searching...
No Matches
CaloNtupleizer.h
Go to the documentation of this file.
1
2#ifndef CALONTUPLEIZER_ANALYZERS_H
3#define CALONTUPLEIZER_ANALYZERS_H
4
5#include <cmath>
6#include <vector>
7
8#include "ROOT/RVec.hxx"
9#include "edm4hep/CalorimeterHitData.h"
10#include "edm4hep/SimCalorimeterHitData.h"
11#include "edm4hep/ClusterData.h"
12#include "edm4hep/MCParticleData.h"
13
14#include "TVector3.h"
15#include "TLorentzVector.h"
16
17namespace FCCAnalyses{
18
19namespace CaloNtupleizer{
20
21void loadGeometry(std::string xmlGeometryPath, std::string readoutName);
22
24struct sel_layers {
25public:
26 sel_layers(int arg_min=0, int arg_max=10);
27 ROOT::VecOps::RVec<edm4hep::CalorimeterHitData> operator()(const ROOT::VecOps::RVec<edm4hep::CalorimeterHitData>& in);
28
29private:
30 int _min;//> min layer
31 int _max;//> max layer
32};
33
34
35// SIM calo hits (single cells)
36ROOT::VecOps::RVec<float> getSimCellID (const ROOT::VecOps::RVec<edm4hep::SimCalorimeterHitData>& in);
37ROOT::VecOps::RVec<float> getSimCaloHit_r (const ROOT::VecOps::RVec<edm4hep::SimCalorimeterHitData>& in);
38ROOT::VecOps::RVec<float> getSimCaloHit_x (const ROOT::VecOps::RVec<edm4hep::SimCalorimeterHitData>& in);
39ROOT::VecOps::RVec<float> getSimCaloHit_y (const ROOT::VecOps::RVec<edm4hep::SimCalorimeterHitData>& in);
40ROOT::VecOps::RVec<float> getSimCaloHit_z (const ROOT::VecOps::RVec<edm4hep::SimCalorimeterHitData>& in);
41ROOT::VecOps::RVec<float> getSimCaloHit_phi (const ROOT::VecOps::RVec<edm4hep::SimCalorimeterHitData>& in);
42ROOT::VecOps::RVec<float> getSimCaloHit_theta (const ROOT::VecOps::RVec<edm4hep::SimCalorimeterHitData>& in);
43ROOT::VecOps::RVec<float> getSimCaloHit_eta (const ROOT::VecOps::RVec<edm4hep::SimCalorimeterHitData>& in);
44ROOT::VecOps::RVec<int> getSimCaloHit_depth (const ROOT::VecOps::RVec<edm4hep::SimCalorimeterHitData>& in,const int decodingVal);
45ROOT::VecOps::RVec<float> getSimCaloHit_energy (const ROOT::VecOps::RVec<edm4hep::SimCalorimeterHitData>& in);
46ROOT::VecOps::RVec<TVector3> getSimCaloHit_positionVector3 (const ROOT::VecOps::RVec<edm4hep::SimCalorimeterHitData>& in);
47
48
49// calo hits (single cells)
50ROOT::VecOps::RVec<float> getCaloHit_x (const ROOT::VecOps::RVec<edm4hep::CalorimeterHitData>& in);
51ROOT::VecOps::RVec<float> getCaloHit_y (const ROOT::VecOps::RVec<edm4hep::CalorimeterHitData>& in);
52ROOT::VecOps::RVec<float> getCaloHit_z (const ROOT::VecOps::RVec<edm4hep::CalorimeterHitData>& in);
53ROOT::VecOps::RVec<float> getCaloHit_phi (const ROOT::VecOps::RVec<edm4hep::CalorimeterHitData>& in);
54ROOT::VecOps::RVec<int>
55getCaloHit_phiIdx(const ROOT::VecOps::RVec<edm4hep::CalorimeterHitData> &in);
56ROOT::VecOps::RVec<int>
57getCaloHit_moduleIdx(const ROOT::VecOps::RVec<edm4hep::CalorimeterHitData> &in);
58ROOT::VecOps::RVec<float> getCaloHit_theta (const ROOT::VecOps::RVec<edm4hep::CalorimeterHitData>& in);
59ROOT::VecOps::RVec<int>
60getCaloHit_thetaIdx(const ROOT::VecOps::RVec<edm4hep::CalorimeterHitData> &in);
61ROOT::VecOps::RVec<float> getCaloHit_eta (const ROOT::VecOps::RVec<edm4hep::CalorimeterHitData>& in);
62ROOT::VecOps::RVec<int>
63getCaloHit_etaIdx(const ROOT::VecOps::RVec<edm4hep::CalorimeterHitData> &in);
64ROOT::VecOps::RVec<int> getCaloHit_layer (const ROOT::VecOps::RVec<edm4hep::CalorimeterHitData>& in);
65ROOT::VecOps::RVec<float> getCaloHit_energy (const ROOT::VecOps::RVec<edm4hep::CalorimeterHitData>& in);
66ROOT::VecOps::RVec<TVector3> getCaloHit_positionVector3 (const ROOT::VecOps::RVec<edm4hep::CalorimeterHitData>& in);
67
68// calo clusters
69ROOT::VecOps::RVec<float> getCaloCluster_x (const ROOT::VecOps::RVec<edm4hep::ClusterData>& in);
70ROOT::VecOps::RVec<float> getCaloCluster_y (const ROOT::VecOps::RVec<edm4hep::ClusterData>& in);
71ROOT::VecOps::RVec<float> getCaloCluster_z (const ROOT::VecOps::RVec<edm4hep::ClusterData>& in);
72ROOT::VecOps::RVec<float> getCaloCluster_phi (const ROOT::VecOps::RVec<edm4hep::ClusterData>& in);
73ROOT::VecOps::RVec<float> getCaloCluster_theta (const ROOT::VecOps::RVec<edm4hep::ClusterData>& in);
74ROOT::VecOps::RVec<float> getCaloCluster_eta (const ROOT::VecOps::RVec<edm4hep::ClusterData>& in);
75ROOT::VecOps::RVec<float> getCaloCluster_energy (const ROOT::VecOps::RVec<edm4hep::ClusterData>& in);
76ROOT::VecOps::RVec<TVector3> getCaloCluster_positionVector3 (const ROOT::VecOps::RVec<edm4hep::ClusterData>& in);
77ROOT::VecOps::RVec<int> getCaloCluster_firstCell (const ROOT::VecOps::RVec<edm4hep::ClusterData>& in);
78ROOT::VecOps::RVec<int> getCaloCluster_lastCell (const ROOT::VecOps::RVec<edm4hep::ClusterData>& in);
79ROOT::VecOps::RVec<std::vector<float>> getCaloCluster_energyInLayers (const ROOT::VecOps::RVec<edm4hep::ClusterData>& in, const ROOT::VecOps::RVec<edm4hep::CalorimeterHitData>& cells, const int nLayers=12);
80
81// SimParticleSecondary
82ROOT::VecOps::RVec<float> getSimParticleSecondaries_x (const ROOT::VecOps::RVec<edm4hep::MCParticleData>& in);
83ROOT::VecOps::RVec<float> getSimParticleSecondaries_y (const ROOT::VecOps::RVec<edm4hep::MCParticleData>& in);
84ROOT::VecOps::RVec<float> getSimParticleSecondaries_z (const ROOT::VecOps::RVec<edm4hep::MCParticleData>& in);
85ROOT::VecOps::RVec<float> getSimParticleSecondaries_z (const ROOT::VecOps::RVec<edm4hep::MCParticleData>& in);
86ROOT::VecOps::RVec<float> getSimParticleSecondaries_phi (const ROOT::VecOps::RVec<edm4hep::MCParticleData>& in);
87ROOT::VecOps::RVec<float> getSimParticleSecondaries_theta (const ROOT::VecOps::RVec<edm4hep::MCParticleData>& in);
88ROOT::VecOps::RVec<float> getSimParticleSecondaries_eta (const ROOT::VecOps::RVec<edm4hep::MCParticleData>& in);
89ROOT::VecOps::RVec<float> getSimParticleSecondaries_energy (const ROOT::VecOps::RVec<edm4hep::MCParticleData>& in);
90ROOT::VecOps::RVec<float> getSimParticleSecondaries_PDG (const ROOT::VecOps::RVec<edm4hep::MCParticleData>& in);
91
92struct getFloatAt {
93 size_t m_pos;
94 getFloatAt(size_t pos);
95 ROOT::RVecF operator()(const ROOT::VecOps::RVec<std::vector<float>>& in);
96};
97
98
99}//end NS CaloNtupleizer
100
101}//end NS FCCAnalyses
102#endif
ROOT::VecOps::RVec< int > getCaloCluster_firstCell(const ROOT::VecOps::RVec< edm4hep::ClusterData > &in)
Definition CaloNtupleizer.cc:328
ROOT::VecOps::RVec< float > getSimCaloHit_eta(const ROOT::VecOps::RVec< edm4hep::SimCalorimeterHitData > &in)
Definition CaloNtupleizer.cc:89
ROOT::VecOps::RVec< float > getSimCaloHit_r(const ROOT::VecOps::RVec< edm4hep::SimCalorimeterHitData > &in)
Definition CaloNtupleizer.cc:37
ROOT::VecOps::RVec< float > getCaloHit_eta(const ROOT::VecOps::RVec< edm4hep::CalorimeterHitData > &in)
Definition CaloNtupleizer.cc:208
ROOT::VecOps::RVec< float > getCaloCluster_energy(const ROOT::VecOps::RVec< edm4hep::ClusterData > &in)
Definition CaloNtupleizer.cc:310
ROOT::VecOps::RVec< TVector3 > getCaloHit_positionVector3(const ROOT::VecOps::RVec< edm4hep::CalorimeterHitData > &in)
Definition CaloNtupleizer.cc:245
ROOT::VecOps::RVec< float > getCaloCluster_y(const ROOT::VecOps::RVec< edm4hep::ClusterData > &in)
Definition CaloNtupleizer.cc:264
ROOT::VecOps::RVec< float > getSimParticleSecondaries_theta(const ROOT::VecOps::RVec< edm4hep::MCParticleData > &in)
Definition CaloNtupleizer.cc:413
ROOT::VecOps::RVec< float > getCaloCluster_z(const ROOT::VecOps::RVec< edm4hep::ClusterData > &in)
Definition CaloNtupleizer.cc:272
ROOT::VecOps::RVec< float > getSimParticleSecondaries_y(const ROOT::VecOps::RVec< edm4hep::MCParticleData > &in)
Definition CaloNtupleizer.cc:376
ROOT::VecOps::RVec< float > getSimCellID(const ROOT::VecOps::RVec< edm4hep::SimCalorimeterHitData > &in)
Definition CaloNtupleizer.cc:99
ROOT::VecOps::RVec< float > getSimParticleSecondaries_phi(const ROOT::VecOps::RVec< edm4hep::MCParticleData > &in)
Definition CaloNtupleizer.cc:402
ROOT::VecOps::RVec< int > getCaloHit_phiIdx(const ROOT::VecOps::RVec< edm4hep::CalorimeterHitData > &in)
Definition CaloNtupleizer.cc:169
ROOT::VecOps::RVec< float > getSimCaloHit_z(const ROOT::VecOps::RVec< edm4hep::SimCalorimeterHitData > &in)
Definition CaloNtupleizer.cc:61
ROOT::VecOps::RVec< int > getCaloHit_moduleIdx(const ROOT::VecOps::RVec< edm4hep::CalorimeterHitData > &in)
Definition CaloNtupleizer.cc:178
ROOT::VecOps::RVec< float > getCaloHit_x(const ROOT::VecOps::RVec< edm4hep::CalorimeterHitData > &in)
Definition CaloNtupleizer.cc:134
ROOT::VecOps::RVec< float > getCaloCluster_theta(const ROOT::VecOps::RVec< edm4hep::ClusterData > &in)
Definition CaloNtupleizer.cc:290
ROOT::VecOps::RVec< float > getSimCaloHit_phi(const ROOT::VecOps::RVec< edm4hep::SimCalorimeterHitData > &in)
Definition CaloNtupleizer.cc:69
ROOT::VecOps::RVec< float > getCaloHit_energy(const ROOT::VecOps::RVec< edm4hep::CalorimeterHitData > &in)
Definition CaloNtupleizer.cc:228
ROOT::VecOps::RVec< int > getCaloHit_thetaIdx(const ROOT::VecOps::RVec< edm4hep::CalorimeterHitData > &in)
Definition CaloNtupleizer.cc:189
ROOT::VecOps::RVec< float > getSimCaloHit_theta(const ROOT::VecOps::RVec< edm4hep::SimCalorimeterHitData > &in)
Definition CaloNtupleizer.cc:79
ROOT::VecOps::RVec< float > getCaloHit_y(const ROOT::VecOps::RVec< edm4hep::CalorimeterHitData > &in)
Definition CaloNtupleizer.cc:142
ROOT::VecOps::RVec< int > getSimCaloHit_depth(const ROOT::VecOps::RVec< edm4hep::SimCalorimeterHitData > &in, const int decodingVal)
Definition CaloNtupleizer.cc:115
ROOT::VecOps::RVec< TVector3 > getSimCaloHit_positionVector3(const ROOT::VecOps::RVec< edm4hep::SimCalorimeterHitData > &in)
Definition CaloNtupleizer.cc:123
ROOT::VecOps::RVec< float > getSimCaloHit_energy(const ROOT::VecOps::RVec< edm4hep::SimCalorimeterHitData > &in)
Definition CaloNtupleizer.cc:107
ROOT::VecOps::RVec< int > getCaloHit_layer(const ROOT::VecOps::RVec< edm4hep::CalorimeterHitData > &in)
Definition CaloNtupleizer.cc:236
ROOT::VecOps::RVec< float > getCaloHit_phi(const ROOT::VecOps::RVec< edm4hep::CalorimeterHitData > &in)
Definition CaloNtupleizer.cc:158
ROOT::VecOps::RVec< TVector3 > getCaloCluster_positionVector3(const ROOT::VecOps::RVec< edm4hep::ClusterData > &in)
Definition CaloNtupleizer.cc:318
ROOT::VecOps::RVec< int > getCaloHit_etaIdx(const ROOT::VecOps::RVec< edm4hep::CalorimeterHitData > &in)
Definition CaloNtupleizer.cc:219
ROOT::VecOps::RVec< float > getSimCaloHit_x(const ROOT::VecOps::RVec< edm4hep::SimCalorimeterHitData > &in)
Definition CaloNtupleizer.cc:45
ROOT::VecOps::RVec< float > getCaloCluster_x(const ROOT::VecOps::RVec< edm4hep::ClusterData > &in)
Definition CaloNtupleizer.cc:256
ROOT::VecOps::RVec< float > getCaloHit_theta(const ROOT::VecOps::RVec< edm4hep::CalorimeterHitData > &in)
Definition CaloNtupleizer.cc:198
ROOT::VecOps::RVec< float > getSimCaloHit_y(const ROOT::VecOps::RVec< edm4hep::SimCalorimeterHitData > &in)
Definition CaloNtupleizer.cc:53
ROOT::VecOps::RVec< float > getCaloCluster_eta(const ROOT::VecOps::RVec< edm4hep::ClusterData > &in)
Definition CaloNtupleizer.cc:300
ROOT::VecOps::RVec< std::vector< float > > getCaloCluster_energyInLayers(const ROOT::VecOps::RVec< edm4hep::ClusterData > &in, const ROOT::VecOps::RVec< edm4hep::CalorimeterHitData > &cells, const int nLayers=12)
Definition CaloNtupleizer.cc:345
ROOT::VecOps::RVec< float > getCaloCluster_phi(const ROOT::VecOps::RVec< edm4hep::ClusterData > &in)
Definition CaloNtupleizer.cc:280
ROOT::VecOps::RVec< float > getSimParticleSecondaries_eta(const ROOT::VecOps::RVec< edm4hep::MCParticleData > &in)
Definition CaloNtupleizer.cc:423
ROOT::VecOps::RVec< int > getCaloCluster_lastCell(const ROOT::VecOps::RVec< edm4hep::ClusterData > &in)
Definition CaloNtupleizer.cc:336
ROOT::VecOps::RVec< float > getCaloHit_z(const ROOT::VecOps::RVec< edm4hep::CalorimeterHitData > &in)
Definition CaloNtupleizer.cc:150
ROOT::VecOps::RVec< float > getSimParticleSecondaries_z(const ROOT::VecOps::RVec< edm4hep::MCParticleData > &in)
Definition CaloNtupleizer.cc:385
ROOT::VecOps::RVec< float > getSimParticleSecondaries_PDG(const ROOT::VecOps::RVec< edm4hep::MCParticleData > &in)
Definition CaloNtupleizer.cc:394
ROOT::VecOps::RVec< float > getSimParticleSecondaries_energy(const ROOT::VecOps::RVec< edm4hep::MCParticleData > &in)
Definition CaloNtupleizer.cc:433
void loadGeometry(std::string xmlGeometryPath, std::string readoutName)
Definition CaloNtupleizer.cc:16
ROOT::VecOps::RVec< float > getSimParticleSecondaries_x(const ROOT::VecOps::RVec< edm4hep::MCParticleData > &in)
Definition CaloNtupleizer.cc:367
FCC analyzers collection.
Definition Algorithms.h:15
Definition CaloNtupleizer.h:92
ROOT::RVecF operator()(const ROOT::VecOps::RVec< std::vector< float > > &in)
Definition CaloNtupleizer.cc:444
size_t m_pos
Definition CaloNtupleizer.h:93
getFloatAt(size_t pos)
Definition CaloNtupleizer.cc:443
select layers
Definition CaloNtupleizer.h:24
sel_layers(int arg_min=0, int arg_max=10)
Definition CaloNtupleizer.cc:25
ROOT::VecOps::RVec< edm4hep::CalorimeterHitData > operator()(const ROOT::VecOps::RVec< edm4hep::CalorimeterHitData > &in)
Definition CaloNtupleizer.cc:26
int _max
Definition CaloNtupleizer.h:31
int _min
Definition CaloNtupleizer.h:30