ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/FastOpenGlDisplayer/soft/main.h
Revision: 1.11
Committed: Fri Apr 25 15:37:03 2008 UTC (17 years ago) by roberfro
Content type: text/plain
Branch: MAIN
Changes since 1.10: +3 -1 lines
Log Message:
Picking of SimTrack available

File Contents

# User Rev Content
1 querten 1.1
2     // SimEvent.h: interface for the SimEvent class.
3     //
4     //////////////////////////////////////////////////////////////////////
5    
6     #ifndef _MAIN_H__
7     #define _MAIN_H__
8    
9    
10     #ifdef linux
11     #include <GL/gl.h>
12     #include <GL/glu.h>
13     #include "../interface/glut.h"
14     #else
15     #define _CRT_SECURE_NO_DEPRECATE 1
16     #include <windows.h>
17     #include <gl/gl.h>
18     #include <gl/glu.h>
19     #include <gl/glut.h>
20     #pragma comment (lib,"glaux.lib")
21     #pragma comment (lib,"glu32.lib")
22     #pragma comment (lib,"opengl32.lib")
23     #pragma comment (lib,"glut.lib")
24     #pragma comment (lib,"glut32.lib")
25     #endif
26    
27     #include <stdio.h>
28     #include <math.h>
29    
30     #include "../interface/SimEvent.h"
31     #include "../interface/Geometry.h"
32    
33     #include "DrawPrimitive.h"
34     #include "ScreenShot.h"
35     #include "Logo.h"
36     #include "Texture.h"
37     #include "ReadCards.h"
38     #include "FROG_Struct.h"
39    
40     int SAVE_WINDOW_W = 800;
41     int SAVE_WINDOW_H = 600;
42     int SAVE_WINDOW_X = 10;
43     int SAVE_WINDOW_Y = 10;
44    
45     bool FULLSCREEN = false;
46     int WINDOW_WIDTH = 800;
47     int WINDOW_HEIGHT = 600;
48     int SCREENSHOT = 0;
49    
50 querten 1.7 int TEMP_I = 0;
51    
52 querten 1.1 float CAM_R = 700;
53     float CAM_tx = 0.0;
54     float CAM_ty = 0.0;
55    
56     int CMS_TRACKER_RADIUS = 129;
57 querten 1.6 int CMS_TRACKER_LENGTH = 300;
58 querten 1.1
59     int TRACKING_RADIUS = 129;//295;
60 querten 1.6 int TRACKING_LENGTH = 300;//645;
61 querten 1.1
62     float PT_CUTOFF = 1.0;
63 querten 1.7 double EECAL_CUTOFF[3] = {0.2,0.6,0.0001};
64     double EHCAL_CUTOFF[4] = {1.5,1.5,0.5,5.0};
65 querten 1.1
66     bool MouseStates[3];
67    
68     std::vector<GLuint> theSimTracks;
69 querten 1.5 GLuint theGeomMuon[3];
70 querten 1.6 GLuint theGeomMuonInEvent;
71 querten 1.1 GLuint theGeomTracker[6];
72     GLuint theGeomTrackerInEvent;
73     GLuint theGeomEcal[3];
74     GLuint theGeomEcalInEvent;
75     GLuint theGeomHcal[4];
76     GLuint theGeomHcalInEvent;
77    
78     GLuint LogoTexture;
79    
80     double t = 0;
81    
82 querten 1.4 std::string inputVisFile;
83     std::string inputTrackerGeom;
84     std::string inputEcalGeom;
85     std::string inputHcalGeom;
86 querten 1.5 std::string inputMuonGeom;
87 querten 1.1
88     MySimEvent* event;
89     MySimEvents* events;
90    
91     Geometry* geom;
92    
93     char gTracker = 0;
94     char gEcal = 0;
95     char gHcal = 0;
96 querten 1.5 char gMuon = 0;
97 roberfro 1.3 char gSim = 2;
98 querten 1.7 char gReco = 15;
99 querten 1.1
100     int mTrackI = -1;
101 roberfro 1.11 #include "ObjectsInfo.h"
102    
103 querten 1.1 bool mLoading = true;
104     int mLoading_I = 0;
105    
106     int eventNumber = 0;
107    
108     bool mHelpScreen= false;
109     bool mRotate = true;
110     float mDt = 0.005f;
111    
112    
113     GLint Menu_Geom_Tracker = 0;
114     GLint Menu_Geom_Ecal = 0;
115     GLint Menu_Geom_Hcal = 0;
116 querten 1.5 GLint Menu_Geom_Muon = 0;
117 querten 1.1 GLint Menu_Geom = 0;
118     GLint Menu_SimEvent = 0;
119     GLint Menu_RecoEvent = 0;
120     GLint Menu_Main = 0;
121    
122     WidthAndColor WaC_BackGround = {1.0 , 0.0 , 1.0 , 0.0 , 1.0};
123     WidthAndColor WaC_Txt = {1.0 , 0.0 , 1.0 , 1.0 , 1.0};
124     WidthAndColor WaC_CMS_Framework = {1.0 , 1.0 , 0.5 , 1.0 , 0.3};
125     WidthAndColor WaC_LHC_Axis = {3.0 , 1.0 , 0.5 , 1.0 , 0.3};
126     WidthAndColor WaC_Default_SimTrack = {2.0 , 0.0 , 1.0 , 1.0 , 1.0};
127     WidthAndColor WaC_Selected_SimTrack = {2.0 , 1.0 , 1.0 , 0.0 , 1.0};
128    
129 querten 1.8 std::vector<IdAndWidthAndColor*> WaC_SimTracks;
130    
131 roberfro 1.10 ObjectsInfo objInfos;
132 roberfro 1.9
133 querten 1.1 void DrawTrack(MySimTrack* track, MySimVertex* vertex1, MySimVertex* vertex2);
134     void reshape (int w, int h);
135     void display();
136 querten 1.5 void initGeomMuon();
137 querten 1.6 void initGeomMuonInEvent();
138 querten 1.1 void initGeomTracker();
139     void initGeomTrackerInEvent();
140     void initGeomEcal();
141     void initGeomEcalInEvent();
142     void initGeomHcal();
143     void initGeomHcalInEvent();
144 roberfro 1.11 void defineColorForSimTrack(unsigned int i);
145 querten 1.5
146 querten 1.1 void initSimTrack();
147     void init();
148     void menu_callback(int value);
149     void menu_create();
150     void LoadCard(const char* inputCard );
151 roberfro 1.9 void gl_select(int x, int y);
152     void list_hits(GLint hits, GLuint *names);
153 querten 1.1
154 querten 1.2 #endif
155