17 if (pName.find(
'.') == 0)
24 fs->
file().SetCompressionAlgorithm(compressionAlgo);
25 fs->
file().SetCompressionLevel(compressionLevel);
27 LibTree =
new TTree(
"HFSimHits",
"HFSimHits");
38 desc.
add<
int>(
"Nbins", 16);
39 desc.
add<
int>(
"Nshowers", 10000);
40 desc.
add<
int>(
"BufSize", 1);
41 desc.
add<
int>(
"SplitLevel", 2);
42 desc.
add<
int>(
"CompressionAlgo", 4);
43 desc.
add<
int>(
"CompressionLevel", 4);
44 descriptions.
add(
"hcalForwardLibWriterParameters", desc);
49 std::vector<double> en;
50 double momBin[16] = {2, 3, 5, 7, 10, 15, 20, 30, 50, 75, 100, 150, 250, 350, 500, 1000};
53 en.push_back(momBin[
i]);
61 for (
int i = 0; i <
n; ++
i) {
67 TFile*
theFile =
new TFile(fn.c_str(),
"READ");
68 TTree*
theTree = (TTree*)gDirectory->Get(
"g4SimHits/CherenkovPhotons");
71 const int size = 10000;
73 edm::LogError(
"HcalForwardLibWriter") <<
"Too big Nshowers number";
81 float lambda[
size] = {0.};
82 int fiberId[
size] = {0};
85 theTree->SetBranchAddress(
"nphot", &nphot);
86 theTree->SetBranchAddress(
"x", &x);
87 theTree->SetBranchAddress(
"y", &y);
88 theTree->SetBranchAddress(
"z", &z);
89 theTree->SetBranchAddress(
"t", &t);
90 theTree->SetBranchAddress(
"lambda", &lambda);
91 theTree->SetBranchAddress(
"fiberId", &fiberId);
92 theTree->SetBranchAddress(
"primZ", &primZ);
93 int nentries = int(theTree->GetEntries());
97 for (
int iev = 0;
iev < nentries;
iev++) {
98 nbytes += theTree->GetEntry(
iev);
104 if (particle ==
"electron") {
109 float nphot_long = 0;
110 float nphot_short = 0;
112 for (
int iph = 0; iph < nphot; ++iph) {
113 if (fiberId[iph] == 1) {
122 if (particle ==
"electron") {
123 emColl.push_back(aPhoton);
130 if (particle ==
"electron") {
165 while (!
input.eof()) {
166 input >> theFileName >> thePID >> mom;
169 aFile.
name = theFileName;
177 input.ignore(999,
'\n');
math::XYZPointF Point
point in the space
#define DEFINE_FWK_MODULE(type)
Log< level::Error, false > LogError
static std::string const input
ParameterDescriptionBase * add(U const &iLabel, T const &value)
TFile & file() const
return opened TFile
HcalForwardLibWriter(const edm::ParameterSet &)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
T getParameter(std::string const &) const
HitContainer const *__restrict__ TkSoA const *__restrict__ Quality const *__restrict__ CAHitNtupletGeneratorKernelsGPU::HitToTuple const *__restrict__ int32_t int32_t int iev
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void analyze(const edm::Event &, const edm::EventSetup &) override
std::vector< FileHandle > theFileHandle
HFShowerPhotonCollection hadColl
tuple size
Write out results.
HFShowerPhotonCollection emColl