10 if (pName.find(
".") == 0)
14 produces<HFShowerPhotonCollection> (
"emParticles");
15 produces<HFShowerPhotonCollection> (
"hadParticles");
16 produces<HFShowerLibraryEventInfo> (
"EventInfo");
30 float hfShowerLibV = 1.1;
32 std::vector<double> en;
33 double momBin[12] = { 10., 15., 20., 35., 50., 80., 100., 150., 250., 350., 500., 1000. };
34 for (
int i = 0;
i < 12; ++
i)
35 en.push_back(momBin[
i]);
37 *product_evtInfo = evtInfo;
38 iEvent.
put(product_evtInfo,
"EventInfo");
46 for (
int i = 0; i <
n; ++
i) {
50 TFile*
theFile =
new TFile(fn.c_str(),
"READ");
51 TTree* theTree = (TTree*) theFile->FindObjectAny(
"CherenkovPhotons");
59 for (
int kk = 0;
kk < 10000; ++
kk) {
67 theTree->SetBranchAddress(
"nphot", &nphot);
68 theTree->SetBranchAddress(
"x", &x);
69 theTree->SetBranchAddress(
"y", &y);
70 theTree->SetBranchAddress(
"z", &z);
71 theTree->SetBranchAddress(
"t", &t);
72 theTree->SetBranchAddress(
"lambda", &lambda);
73 theTree->SetBranchAddress(
"fiberId", &fiberId);
74 int nentry = int(theTree->GetEntries());
75 if (particle ==
"electron") {
76 for (
int iev = 0; iev < nentry; iev++) {
77 for (
int iph = 0; iph < nphot; ++iph) {
80 emColl.push_back(aPhoton);
84 if (particle ==
"pion") {
93 *product_had = hadColl;
97 iEvent.
put(product_em,
"emParticles");
98 iEvent.
put(product_had,
"hadParticles");
166 std::string theFileName, thePID;
169 while (!
input.eof()) {
170 input >> theFileName >> thePID >> mom;
173 aFile.
name = theFileName;
181 input.ignore(999,
'\n');
T getParameter(std::string const &) const
math::XYZPointF Point
point in the space
#define DEFINE_FWK_MODULE(type)
std::vector< HFShowerPhoton > HFShowerPhotonCollection
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
HcalForwardLibWriter(const edm::ParameterSet &)
std::vector< FileHandle > theFileHandle
virtual void produce(edm::Event &, const edm::EventSetup &)
std::string fullPath() const