17 if (pName.find(
'.') == 0)
23 fs->
file().SetCompressionAlgorithm(compressionAlgo);
24 fs->
file().SetCompressionLevel(compressionLevel);
26 LibTree =
new TTree(
"HFSimHits",
"HFSimHits");
38 std::vector<double> en;
39 double momBin[16] = {2, 3, 5, 7, 10, 15, 20, 30, 50, 75, 100, 150, 250, 350, 500, 1000};
42 en.push_back(momBin[
i]);
50 for (
int i = 0; i <
n; ++
i) {
56 TFile*
theFile =
new TFile(fn.c_str(),
"READ");
57 TTree*
theTree = (TTree*)gDirectory->Get(
"g4SimHits/CherenkovPhotons");
60 const int size = 10000;
62 edm::LogError(
"HcalForwardLibWriter") <<
"Too big Nshowers number";
70 float lambda[
size] = {0.};
71 int fiberId[
size] = {0};
74 theTree->SetBranchAddress(
"nphot", &nphot);
75 theTree->SetBranchAddress(
"x", &x);
76 theTree->SetBranchAddress(
"y", &y);
77 theTree->SetBranchAddress(
"z", &z);
78 theTree->SetBranchAddress(
"t", &t);
79 theTree->SetBranchAddress(
"lambda", &lambda);
80 theTree->SetBranchAddress(
"fiberId", &fiberId);
81 theTree->SetBranchAddress(
"primZ", &primZ);
82 int nentries = int(theTree->GetEntries());
86 for (
int iev = 0;
iev < nentries;
iev++) {
87 nbytes += theTree->GetEntry(
iev);
93 if (particle ==
"electron") {
99 float nphot_short = 0;
101 for (
int iph = 0; iph < nphot; ++iph) {
102 if (fiberId[iph] == 1) {
111 if (particle ==
"electron") {
112 emColl.push_back(aPhoton);
119 if (particle ==
"electron") {
153 while (!
input.eof()) {
154 input >> theFileName >> thePID >> mom;
157 aFile.
name = theFileName;
165 input.ignore(999,
'\n');
math::XYZPointF Point
point in the space
#define DEFINE_FWK_MODULE(type)
Log< level::Error, false > LogError
edm::Service< TFileService > fs
static std::string const input
~HcalForwardLibWriter() override
TFile & file() const
return opened TFile
HcalForwardLibWriter(const edm::ParameterSet &)
T getParameter(std::string const &) const
void analyze(const edm::Event &, const edm::EventSetup &) override
std::vector< FileHandle > theFileHandle
HitContainer const *__restrict__ TkSoA const *__restrict__ Quality const *__restrict__ CAHitNtupletGeneratorKernelsGPU::HitToTuple const *__restrict__ int32_t int iev
HFShowerPhotonCollection hadColl
tuple size
Write out results.
HFShowerPhotonCollection emColl