Fork me on GitHub

source: svn/trunk/Utilities/frog/Prim_PartialSphere.h@ 584

Last change on this file since 584 was 583, checked in by cp3-support, 13 years ago

FROG 3.0

File size: 1.3 KB
Line 
1#ifndef _FROG_Prim_PARTIALSPHERE_H__
2#define _FROG_Prim_PARTIALSPHERE_H__
3
4#include "Base.h"
5
6namespace FROG{
7
8class Prim_PartialSphere : public BaseColl_Id {
9public :
10 float Radius;
11 float PosX; float PosY; float PosZ;
12 float Phi1; float Phi2;
13 float Theta1; float Theta2;
14 unsigned short NPhi; unsigned short NTheta; float ROT;
15
16 virtual unsigned int chunkId(){ return 41031;}
17 virtual bool isCompactible(){ return true; }
18
19 Prim_PartialSphere(){}
20 Prim_PartialSphere(
21 unsigned int detId, float radius,
22 float posX, float posY, float posZ,
23 float phi1, float phi2,
24 float theta1, float theta2,
25 unsigned short nPhi=10, unsigned short nTheta=5, float rot=0) :
26 BaseColl_Id(detId),
27 Radius(radius),
28 PosX(posX), PosY(posY), PosZ(posZ),
29 Phi1(phi1), Phi2(phi2),
30 Theta1(theta1), Theta2(theta2),
31 NPhi(nPhi), NTheta(nTheta), ROT(rot){}
32
33 virtual ByteBuffer writeData(){
34 ByteBuffer toReturn(44);
35 toReturn.putUInt(detId_);
36 toReturn.putFloat(Radius);
37 toReturn.putFloat(PosX);
38 toReturn.putFloat(PosY);
39 toReturn.putFloat(PosZ);
40 toReturn.putFloat(Phi1);
41 toReturn.putFloat(Phi2);
42 toReturn.putFloat(Theta1);
43 toReturn.putFloat(Theta2);
44 toReturn.putUShort(NPhi);
45 toReturn.putUShort(NTheta);
46 toReturn.putFloat(ROT);
47 return toReturn;
48 }
49};
50
51}//FROG Namespace
52#endif
Note: See TracBrowser for help on using the repository browser.