1 |
querten |
1.1 |
// SimEvent.h: interface for the SimEvent class.
|
2 |
|
|
//
|
3 |
|
|
//////////////////////////////////////////////////////////////////////
|
4 |
|
|
|
5 |
|
|
#ifndef _MYSIMEVENT_H__
|
6 |
|
|
#define _MYSIMEVENT_H__
|
7 |
|
|
|
8 |
querten |
1.3 |
#define _CRT_SECURE_NO_DEPRECATE 1
|
9 |
querten |
1.1 |
|
10 |
querten |
1.3 |
#include <iostream>
|
11 |
querten |
1.1 |
#include <vector>
|
12 |
querten |
1.2 |
#include "Chunk.h"
|
13 |
querten |
1.1 |
|
14 |
|
|
struct MyPSimHit {float x; float y; float z; float dEdX; int ProcessType;};
|
15 |
|
|
struct MyPCaloHit {float x; float y; float z; float E; int ProcessType;};
|
16 |
|
|
struct MySimVertex{float x; float y; float z; int parentTrack_id;};
|
17 |
|
|
struct MySimTrack {int track_id;float Px;float Py; float Pz; float E;int Type;int parent_vertex;float charge;};
|
18 |
|
|
|
19 |
|
|
struct MyRecoHit {float x; float y; float z; int DetId; int Charge;};
|
20 |
querten |
1.2 |
struct MyRecoTrack {std::vector<MyRecoHit> Hits;};
|
21 |
querten |
1.1 |
|
22 |
querten |
1.3 |
struct MyCaloHit {float E; float t; int DetId;};
|
23 |
|
|
|
24 |
querten |
1.1 |
|
25 |
|
|
class MySimEvent
|
26 |
|
|
{
|
27 |
|
|
public:
|
28 |
|
|
MySimEvent();
|
29 |
|
|
virtual ~MySimEvent();
|
30 |
|
|
|
31 |
querten |
1.2 |
// int LoadEvent(FILE* f);
|
32 |
|
|
void LoadEvent(FILE* pFile, stChunk* ParentChunk);
|
33 |
|
|
void SaveEvent(stChunkToSave* ParentChunk);
|
34 |
querten |
1.1 |
|
35 |
querten |
1.2 |
// int LoadChunk (FILE* f, stChunk* chunk);
|
36 |
|
|
// int Chunk_size();
|
37 |
querten |
1.1 |
|
38 |
querten |
1.2 |
// void ReadChunk (FILE* pFile, stChunk* pChunk);
|
39 |
|
|
// void WriteChunk(FILE* pFile, stChunkToSave* pChunk);
|
40 |
querten |
1.1 |
|
41 |
|
|
std::vector<MyPSimHit> MyPSimHitCollection;
|
42 |
|
|
std::vector<MyPCaloHit> MyPCaloHitCollection;
|
43 |
|
|
std::vector<MySimVertex> MySimVertexCollection;
|
44 |
|
|
std::vector<MySimTrack> MySimTrackCollection;
|
45 |
|
|
|
46 |
querten |
1.2 |
std::vector<MyRecoTrack> MyRecoTrackCollection;
|
47 |
querten |
1.3 |
|
48 |
|
|
std::vector<MyCaloHit> MyEcalCaloHitCollection;
|
49 |
|
|
std::vector<MyCaloHit> MyHcalCaloHitCollection;
|
50 |
querten |
1.1 |
};
|
51 |
|
|
|
52 |
|
|
class MySimEvents
|
53 |
|
|
{
|
54 |
|
|
public:
|
55 |
|
|
MySimEvents();
|
56 |
|
|
virtual ~MySimEvents();
|
57 |
|
|
|
58 |
|
|
void Load(char* path);
|
59 |
|
|
void Save(char* path);
|
60 |
|
|
void NextEvent();
|
61 |
|
|
void PreviousEvent();
|
62 |
|
|
MySimEvent* GetEvent();
|
63 |
|
|
|
64 |
|
|
std::vector<MySimEvent*> Events;
|
65 |
|
|
int Current_Event;
|
66 |
|
|
};
|
67 |
|
|
|
68 |
|
|
#endif
|