File indexing completed on 2023-03-17 11:25:28
0001 #include "Utilities/Configuration/interface/Architecture.h"
0002 #include "Muon/MuonNeutrons/interface/AsciiNeutronHitWriter.h"
0003 #include "Muon/MuonNeutrons/interface/AsciiNeutronHitReader.h"
0004 #include "Profound/PersistentTrackingHits/interface/PSimHit.h"
0005 #include "Muon/MuonNeutrons/test/DummySimHit.h"
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 int main() {
0016 AsciiNeutronHitWriter writer("NeutronsME");
0017 int detType = 10;
0018 int nevent = 2;
0019 int hitCount = 0;
0020 for(int event = 1; event <= nevent; ++event) {
0021 vector<PSimHit> hits;
0022 int nhits = event;
0023 for(int i = 0; i < nhits; ++i) {
0024 int layer = i%6 + 1;
0025 ++hitCount;
0026
0027 PSimHit * pSimHit = new PSimHit(LocalPoint(i, hitCount,-0.25), LocalPoint(i, hitCount,0.25),
0028 100., 300., 0.0001, 11, layer, 1, 0., 0.);
0029 DummySimHit * simHit = new DummySimHit(pSimHit, 0., 1);
0030 hits.push_back(writer.makePSimHit(simHit, layer));
0031 }
0032 writer.writeCluster(detType, hits);
0033 }
0034
0035 AsciiNeutronHitReader reader("NeutronsME", 11);
0036 for(int i = 0; i < 3; ++i) {
0037 vector<PSimHit> hits = reader.readNextEvent(detType);
0038 for(int i = 0; i != hits.size(); ++i) {
0039 cout << "OVAL " << hits[i] << endl;
0040 }
0041 }
0042 }
0043
0044
0045