- }
- } else if(gn.Contains("TRD")) { // 30-sep-04; 27-jan-05 - as for TRD1 as for TRD2
- // X->Z(0, 0); Y->Y(90, 90); Z->X(90, 0)
- AliEMCALShishKebabTrd1Module *mod=0, *mTmp; // current module
-
- for(int iz=0; iz<g->GetNZ(); iz++) {
- Double_t angle=90., phiOK=0;
- if(gn.Contains("TRD1")) {
- mod = (AliEMCALShishKebabTrd1Module*)fShishKebabModules->At(iz);
- angle = mod->GetThetaInDegree();
- if(!gn.Contains("WSUC")) { // ALICE
- if(iz==0) AliMatrix(idrotm, 0.,0., 90.,90., 90.,0.); // z'(x); y'(y); x'(z)
- else AliMatrix(idrotm, 90.-angle,180., 90.0,90.0, angle, 0.);
- phiOK = mod->GetCenterOfModule().Phi()*180./TMath::Pi();
- // printf(" %2i | angle | %6.3f - %6.3f = %6.3f(eta %5.3f)\n",
- //iz+1, angle, phiOK, angle-phiOK, mod->GetEtaOfCenterOfModule());
- xpos = mod->GetPosXfromR() + g->GetSteelFrontThickness() - smodPar0;
- zpos = mod->GetPosZ() - smodPar2;
-
- int iyMax = g->GetNPhi();
- if(strcmp(mother,"SMOD") && gn.Contains("110DEG")) {
- iyMax /= 2;
- }
- for(int iy=0; iy<iyMax; iy++) { // flat in phi
- ypos = g->GetPhiModuleSize()*(2*iy+1 - iyMax)/2.;
- gMC->Gspos(child, ++nr, mother, xpos, ypos, zpos, idrotm, "ONLY") ;
- //printf(" %2i xpos %7.2f ypos %7.2f zpos %7.2f idrotm %i\n", nr, xpos, ypos, zpos, idrotm);
- AliDebug(3,Form("%3.3i(%2.2i,%2.2i) ", nr,iy+1,iz+1));
- }
- printf("\n");
- } else {
- if(iz==0) AliMatrix(idrotm, 0.,0., 90.,0., 90.,90.); // (x')z; y'(x); z'(y)
- else AliMatrix(idrotm, 90-angle,270., 90.0,0.0, angle,90.);
- phiOK = mod->GetCenterOfModule().Phi()*180./TMath::Pi();
- printf(" %2i | angle -phiOK | %6.3f - %6.3f = %6.3f(eta %5.3f)\n",
- iz+1, angle, phiOK, angle-phiOK, mod->GetEtaOfCenterOfModule());
- zpos = mod->GetPosZ() - smodPar2;
- ypos = mod->GetPosXfromR() - smodPar1;
- printf(" zpos %7.2f ypos %7.2f idrotm %i\n xpos ", zpos, xpos, idrotm);
- for(int ix=0; ix<g->GetNPhi(); ix++) { // flat in phi
- xpos = g->GetPhiModuleSize()*(2*ix+1 - g->GetNPhi())/2.;
- gMC->Gspos(child, ++nr, mother, xpos, ypos, zpos, idrotm, "ONLY") ;
- printf(" %7.2f ", xpos);
- }
- printf("\n");
- }
- } else if(gn.Contains("TRD2")){ // 1-feb-05 - TRD2; curve in phi
- double angEtaRow = 0.;
- double theta1=0.,phi1=0., theta2=0.,phi2=0., theta3=0.,phi3=0.;
- angle=90.;
- if(iz==0) {
- mod = new AliEMCALShishKebabTrd1Module();
- } else {
- mTmp = new AliEMCALShishKebabTrd1Module(*mod);
- mod = mTmp;
- angle = mod->GetThetaInDegree();
- }
-
- fShishKebabModules->Add(mod);
- phiOK = mod->GetCenterOfModule().Phi()*180./TMath::Pi();
- printf(" %i | theta | %6.3f - %6.3f = %6.3f\n", iz+1, angle, phiOK, angle-phiOK);
-
- zpos = mod->GetPosZ() - parTubs[2];
- rpos = parTubs[0] + mod->GetPosXfromR();
-
- angle = mod->GetThetaInDegree();
- Double_t stepAngle = (parTubs[4] - parTubs[3])/g->GetNPhi(); // 11-mar-04
- for(int iy=0; iy<g->GetNPhi(); iy++) {
- angEtaRow = parTubs[3] + stepAngle*(0.5+double(iy));
- // angEtaRow = 0;
- theta1 = 90. + angle; phi1 = angEtaRow; // x' ~-z;
- theta2 = 90.; phi2 = 90. + angEtaRow;// y' ~ y;
- theta3 = angle; phi3 = angEtaRow; // z' ~ x;
- if(phi3 < 0.0) phi3 += 360.;
- AliMatrix(idrotm, theta1,phi1, theta2,phi2, theta3,phi3);
-
- xpos = rpos * TMath::Cos(angEtaRow*TMath::DegToRad());
- ypos = rpos * TMath::Sin(angEtaRow*TMath::DegToRad());
- gMC->Gspos(child, ++nr, "SMOP", xpos, ypos, zpos, idrotm, "ONLY") ;
- // SMON;
- phi1 = 180 + angEtaRow;
- theta3 = 180.-theta3; phi3 = angEtaRow;
- AliMatrix(idrotm, theta1,phi1, theta2,phi2, theta3,phi3);
- gMC->Gspos(child, nr, "SMON", xpos, ypos, -zpos, idrotm, "ONLY") ;
- if(0) {
- printf(" angEtaRow(phi) %7.2f | angle(eta) %7.2f \n", angEtaRow, angle);
- printf("iy=%2i xpos %7.2f ypos %7.2f zpos %7.2f idrotm %i\n", iy, xpos, ypos, zpos, idrotm);
- }
- } // for(int iy=0; iy<g->GetNPhi(); iy++)
- }
- }
- } else {
- xpos = g->GetSteelFrontThickness()/2.;
- for(int iz=0; iz<g->GetNZ(); iz++) {
- zpos = -smodPar2 + g->GetEtaModuleSize()*(2*iz+1)/2.;
- for(int iy=0; iy<g->GetNPhi(); iy++) {
- ypos = g->GetPhiModuleSize()*(2*iy+1 - g->GetNPhi())/2.;
- gMC->Gspos(child, ++nr, mother, xpos, ypos, zpos, 0, "ONLY") ;
- //printf(" %2i xpos %7.2f ypos %7.2f zpos %7.2f \n", nr, xpos, ypos, zpos);
+ //PH printf("\n");
+ } else { //WSUC
+ if(iz==0) AliMatrix(fIdRotm, 0.,0., 90.,0., 90.,90.); // (x')z; y'(x); z'(y)
+ else AliMatrix(fIdRotm, 90-angle,270., 90.0,0.0, angle,90.);
+ phiOK = mod->GetCenterOfModule().Phi()*180./TMath::Pi();
+ printf(" %2i | angle -phiOK | %6.3f - %6.3f = %6.3f(eta %5.3f)\n",
+ iz+1, angle, phiOK, angle-phiOK, mod->GetEtaOfCenterOfModule());
+ zpos = mod->GetPosZ() - fSmodPar2;
+ ypos = mod->GetPosXfromR() - fSmodPar1;
+ printf(" zpos %7.2f ypos %7.2f fIdRotm %i\n xpos ", zpos, xpos, fIdRotm);
+ for(int ix=0; ix<g->GetNPhi(); ix++) { // flat in phi
+ xpos = g->GetPhiModuleSize()*(2*ix+1 - g->GetNPhi())/2.;
+ gMC->Gspos(child, ++nr, mother, xpos, ypos, zpos, fIdRotm, "ONLY") ;
+ printf(" %7.2f ", xpos);