- // Define TGeoMatrix of SM - Jan 19, 2007 (just fro TRD1)
- if(fGeoName.Contains("TRD1")) { // copy code from AliEMCALv0::CreateSmod()
- int nphism = GetNumberOfSuperModules()/2;
- double dphi = (GetArm1PhiMax() - GetArm1PhiMin())/nphism;
- double rpos = (GetEnvelop(0) + GetEnvelop(1))/2.;
- double phi, phiRad, xpos, ypos, zpos;
- for(int i=0; i<nphism; i++){
- phi = GetArm1PhiMin() + dphi*(2*i+1)/2.; // phi= 90, 110, 130, 150, 170, 190
- phiRad = phi*TMath::Pi()/180.;
- xpos = rpos * TMath::Cos(phiRad);
- ypos = rpos * TMath::Sin(phiRad);
- zpos = fParSM[2];
- if(i==5) {
- xpos += (fParSM[1]/2. * TMath::Sin(phiRad));
- ypos -= (fParSM[1]/2. * TMath::Cos(phiRad));
- }
- // pozitive z
- int ind = 2*i;
- TGeoRotation *geoRot0 = new TGeoRotation("geoRot0", 90.0, phi, 90.0, 90.0+phi, 0.0, 0.0);
- fMatrixOfSM[ind] = new TGeoCombiTrans(Form("EmcalSM%2.2i",ind),
- xpos,ypos, zpos, geoRot0);
- // negaive z
- ind++;
- double phiy = 90. + phi + 180.;
- if(phiy>=360.) phiy -= 360.;
- TGeoRotation *geoRot1 = new TGeoRotation("geoRot1", 90.0, phi, 90.0, phiy, 180.0, 0.0);
- fMatrixOfSM[ind] = new TGeoCombiTrans(Form("EmcalSM%2.2i",ind),
- xpos,ypos,-zpos, geoRot1);
- } // for
- }
-