Fork me on GitHub

source: svn/trunk/Utilities/frog/Prim_Tube.h@ 1063

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

FROG 3.0

File size: 1.3 KB
RevLine 
[583]1#ifndef _FROG_Prim_TUBE_H__
2#define _FROG_Prim_TUBE_H__
3
4#include "Base.h"
5
6namespace FROG{
7
8class Prim_Tube : public BaseColl_Id {
9public :
10 float RadiusIn; float RadiusOut;
11 float PosX; float PosY; float PosZ;
12 float LengthX; float LengthY; float LengthZ;
13 unsigned short NPhi; unsigned char Endcap;
14 float Phi0;
15
16 virtual unsigned int chunkId(){ return 41041;}
17 virtual bool isCompactible(){ return true; }
18
19 Prim_Tube(){}
20 Prim_Tube(
21 unsigned int detId, float radiusIn,float radiusOut,
22 float posX, float posY, float posZ,
23 float lengthX, float lengthY, float lengthZ,
24 unsigned short nPhi=10, unsigned char endcap=0, float phi0=0) :
25 BaseColl_Id(detId),
26 RadiusIn(radiusIn), RadiusOut(radiusOut),
27 PosX(posX), PosY(posY), PosZ(posZ),
28 LengthX(lengthX), LengthY(lengthY), LengthZ(lengthZ),
29 NPhi(nPhi), Endcap(endcap), Phi0(phi0){}
30
31 virtual ByteBuffer writeData(){
32 ByteBuffer toReturn(44);
33 toReturn.putUInt(detId_);
34 toReturn.putFloat(RadiusIn);
35 toReturn.putFloat(RadiusOut);
36 toReturn.putFloat(PosX);
37 toReturn.putFloat(PosY);
38 toReturn.putFloat(PosZ);
39 toReturn.putFloat(LengthX);
40 toReturn.putFloat(LengthY);
41 toReturn.putFloat(LengthZ);
42 toReturn.putUShort(NPhi);
43 toReturn.putUShort(Endcap);
44 toReturn.putFloat(Phi0);
45 return toReturn;
46 }
47};
48
49}//FROG Namespace
50#endif
Note: See TracBrowser for help on using the repository browser.