Exemple #1
0
void stereo_straw_g1() {

ostringstream fname; 
fname << "stereo_straw_" << numLayers << "_layers_" << Int_t(floor(innerRadius)) << "_x_" << Int_t(floor(outerRadius)) << ".01.geo";
const char* filename = (fname.str()).c_str();

// output file for straw endcap geometry
ofstream* f = new ofstream(filename, ios::out | ios::trunc);                                                                            

//************************* Main procedure START *****************************

Mpdshape* layer =  initDrawLayer(f, TVector3(angleLayers, 0.0, 0.0), TVector3(0, 0, initDist + layerThickness/2.0), 0);
Mpdshape* layerR = initDrawLayer(f, TVector3(angleLayers, 0.0, 0.0), TVector3(0, 0, initDist + layerThickness*1 + layerThickness/2.0), angleStereo);
Mpdshape* layerL = initDrawLayer(f, TVector3(angleLayers, 0.0, 0.0), TVector3(0, 0, initDist + layerThickness*2 + layerThickness/2.0), -angleStereo);
drawLayer(layer, TVector3(angleLayers,0,0), TVector3(0,0,initDist + layerThickness*3 + layerThickness/2.0));

for (Int_t i = 4; i < numLayers; i+=4) {                                                                                                          
    drawLayer(layer, TVector3((i/4.+1)*angleLayers,0,0), TVector3(0,0, initDist + layerThickness/2.0 + i*layerThickness));
    drawLayer(layerR, TVector3((i/4.+1)*angleLayers,0,0), TVector3(0,0, initDist + layerThickness/2.0 + (i+1)*layerThickness));
    drawLayer(layerL, TVector3((i/4.+1)*angleLayers,0,0), TVector3(0,0, initDist + layerThickness/2.0 + (i+2)*layerThickness));
    drawLayer(layer, TVector3((i/4.+1)*angleLayers,0,0), TVector3(0,0, initDist + layerThickness/2.0 + (i+3)*layerThickness));
} 

//*********************** Main procedure END *********************************

delete layerL;
delete layer;
delete layerR;

f->close();
return;

}
Exemple #2
0
bool P011_Draw::init()
{
	if ( !PBase::init() )
	{
		return false;
	}

	initSceneJson("game/json/p011_001_b.json");

	initScrollLayer();

	initDrawLayer();
	
	return true;
}