1 | #ifndef _FROG_Prim_CYLINDER_H__
|
---|
2 | #define _FROG_Prim_CYLINDER_H__
|
---|
3 |
|
---|
4 | #include "Base.h"
|
---|
5 |
|
---|
6 | namespace FROG{
|
---|
7 |
|
---|
8 | class Prim_Cylinder : public BaseColl_Id {
|
---|
9 | public :
|
---|
10 | float Radius;
|
---|
11 | float PosX; float PosY; float PosZ;
|
---|
12 | float LengthX; float LengthY; float LengthZ;
|
---|
13 | unsigned short NPhi;unsigned char Endcap;
|
---|
14 |
|
---|
15 | virtual unsigned int chunkId(){ return 41040;}
|
---|
16 | virtual bool isCompactible(){ return true; }
|
---|
17 |
|
---|
18 | Prim_Cylinder(){}
|
---|
19 | Prim_Cylinder(
|
---|
20 | unsigned int detId, float radius,
|
---|
21 | float posX, float posY, float posZ,
|
---|
22 | float lengthX, float lengthY, float lengthZ,
|
---|
23 | unsigned short nPhi=10, unsigned char endcap=0) :
|
---|
24 | BaseColl_Id(detId),
|
---|
25 | Radius(radius),
|
---|
26 | PosX(posX), PosY(posY), PosZ(posZ),
|
---|
27 | LengthX(lengthX), LengthY(lengthY), LengthZ(lengthZ),
|
---|
28 | NPhi(nPhi), Endcap(endcap){}
|
---|
29 |
|
---|
30 | virtual ByteBuffer writeData(){
|
---|
31 | ByteBuffer toReturn(36);
|
---|
32 | toReturn.putUInt(detId_);
|
---|
33 | toReturn.putFloat(Radius);
|
---|
34 | toReturn.putFloat(PosX);
|
---|
35 | toReturn.putFloat(PosY);
|
---|
36 | toReturn.putFloat(PosZ);
|
---|
37 | toReturn.putFloat(LengthX);
|
---|
38 | toReturn.putFloat(LengthY);
|
---|
39 | toReturn.putFloat(LengthZ);
|
---|
40 | toReturn.putUShort(NPhi);
|
---|
41 | toReturn.putByte(Endcap);
|
---|
42 | return toReturn;
|
---|
43 | }
|
---|
44 | };
|
---|
45 |
|
---|
46 | }//FROG Namespace
|
---|
47 | #endif
|
---|