CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
TestGeometry Class Reference

#include <TestGeometry.h>

+ Inheritance diagram for TestGeometry:

Public Member Functions

 TestGeometry (const std::string &name, ISvcLocator *pSvcLocator)
 
 ~TestGeometry ()
 
StatusCode initialize ()
 
StatusCode execute ()
 
StatusCode finalize ()
 

Detailed Description

Definition at line 29 of file TestGeometry.h.

Constructor & Destructor Documentation

◆ TestGeometry()

TestGeometry::TestGeometry ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 44 of file TestGeometry.cxx.

44 :
45 Algorithm(name,pSvcLocator){
46
47 declareProperty("LUTfile", lutfile = "/bes3fs/cgemCosmic/data/CGEM_cosmic_look_up_table_from_17_to_17.root");
48
49}

◆ ~TestGeometry()

TestGeometry::~TestGeometry ( )

Definition at line 51 of file TestGeometry.cxx.

51{}

Member Function Documentation

◆ execute()

StatusCode TestGeometry::execute ( )

Definition at line 104 of file TestGeometry.cxx.

104 {
105 MsgStream log(msgSvc(), name());
106 cout << "->TestGeometry::execute" << endl;
107 cout << "geomtry service pointer " << m_geomSvc << endl;
108 return StatusCode::SUCCESS;
109}
IMessageSvc * msgSvc()

◆ finalize()

StatusCode TestGeometry::finalize ( )

Definition at line 113 of file TestGeometry.cxx.

113 {
114 MsgStream log(msgSvc(),name());
115 log << MSG::INFO << "TestGeometry finalize()" << endreq;
116
117 return StatusCode::SUCCESS;
118}

◆ initialize()

StatusCode TestGeometry::initialize ( )

Definition at line 53 of file TestGeometry.cxx.

53 {
54 MsgStream log(msgSvc(), name());
55
56 cout << "TestGeometry initialize" << endl;
57 StatusCode sc = service("CgemGeomSvc", m_geomSvc);
58 if(sc != StatusCode::SUCCESS) {
59 log << MSG::ERROR << "can not use CgemGeomSvc" << endreq;
60 return StatusCode::FAILURE;
61 }
62
63 // LUT
64 lutreader = new CgemLUTReader(lutfile);
65 lutreader->ReadLUT();
66
67 const int nlayer = 3;
68 const int nsheet[nlayer] = {1, 2, 2};
69 const int nview = 2;
70
71 for(int ilayer = 0; ilayer < nlayer; ilayer++) {
72 for(int isheet = 0; isheet < nsheet[ilayer]; isheet++) {
73 for(int iview=0; iview < nview; iview++) {
74
75 CgemGeoReadoutPlane* anode = m_geomSvc->getReadoutPlane(ilayer, isheet);
76 int layerid = anode->getLayerId();
77 int sheetid = anode->getSheetId();
78 int nxstrip = anode->getNXstrips();
79 int nvstrip = anode->getNVstrips();
80
81 int nstrip = nxstrip;
82 if(iview==1) nstrip = nvstrip;
83
84 for(int istrip=0; istrip < nstrip; istrip++) {
85 const Identifier ident = CgemID::strip_id(layerid, sheetid, iview, istrip);
86 bool isxstrip = CgemID::is_xstrip(ident);
87 int stripid = CgemID::strip(ident);
88 double length = anode->getLength();
89 if(isxstrip==false) length = anode->getVStripLength(stripid);
90
91 cout << layerid << " " << sheetid << " " << iview << " " << stripid << " " << length << endl;
92
93
94 }
95 }
96 }
97 }
98
99
100 return StatusCode::SUCCESS;
101}
double length
double getVStripLength(int V_ID) const
static int strip(const Identifier &id)
Definition: CgemID.cxx:83
static bool is_xstrip(const Identifier &id)
Definition: CgemID.cxx:64
static Identifier strip_id(int f_layer, int f_sheet, int f_strip_type, int f_strip)
Definition: CgemID.cxx:89
virtual CgemGeoReadoutPlane * getReadoutPlane(int iLayer, int iSheet) const =0

The documentation for this class was generated from the following files: