* about the suitability of this software for any purpose. It is *
* provided "as is" without express or implied warranty. *
**************************************************************************/
-/*
-$Log$
-Revision 1.11 2001/05/14 14:01:04 morsch
-AliPMDv0 coarse geometry and AliPMDv1 detailed simulation, completely revised versions by Tapan Nayak.
-*/
+
+/* $Id$ */
//
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
////
-#include "AliPMDv0.h"
-#include "AliRun.h"
-#include "AliMC.h"
+#include "Riostream.h"
+
+#include <TVirtualMC.h>
+
#include "AliConst.h"
#include "AliMagF.h"
-#include "iostream.h"
+#include "AliPMDv0.h"
+#include "AliRun.h"
static Int_t kdet, ncell_sm, ncell_hole;
static Float_t zdist, zdist1;
// --- place inner hex inside outer hex
- gMC->Gsposp("ECAR", 1, "ECCU", 0., 0., 0., 0, "ONLY", hexd2, 10);
+ gMC->Gspos("ECAR", 1, "ECCU", 0., 0., 0., 0, "ONLY");
// Rhombus shaped supermodules (defined by PARA)
}
for (i = 1; i <= ncell_sm; ++i) {
number = i+(j-1)*ncell_sm;
- gMC->Gsposp("ECCU", number, "EHC1", xb,yb,zb, ihrotm, "ONLY", hexd1,10);
+ gMC->Gspos("ECCU", number, "EHC1", xb,yb,zb, ihrotm, "ONLY");
xb += (hexd1[6]*2.);
}
xrow = xrow+1;
}
for (i = 1; i <= ncell_sm; ++i) {
number = i+(j-1)*ncell_sm;
- gMC->Gsposp("ECCU", number, "EHC2", xb,yb,zb, ihrotm, "ONLY", hexd1,10);
+ gMC->Gspos("ECCU", number, "EHC2", xb,yb,zb, ihrotm, "ONLY");
xb += (hexd1[6]*2.);
}
xrow = xrow+1;
}
for (i = 1; i <= (ncell_sm - ncell_hole); ++i) {
number = i+(j-1)*(ncell_sm - ncell_hole);
- gMC->Gsposp("ECCU", number, "EHC3", xb,yb,zb, ihrotm, "ONLY", hexd1,10);
+ gMC->Gspos("ECCU", number, "EHC3", xb,yb,zb, ihrotm, "ONLY");
xb += (hexd1[6]*2.);
}
xrow = xrow+1;
Int_t irotate[3] = {0, jhrot12, jhrot13};
num_mod=0;
- for (j=0; j<3; ++j)
- {
- gMC->Gsposp("EALM", j+1, "EPMD", xalm[j],yalm[j], 0., irotate[j], "ONLY", Al_rod, 3);
- x2=xemm2*TMath::Cos(theta[j]) - yemm2*TMath::Sin(theta[j]);
- y2=xemm2*TMath::Sin(theta[j]) + yemm2*TMath::Cos(theta[j]);
-
- gMC->Gsposp("EMM2", j+1, "EPMD", x2,y2, 0., irotate[j], "ONLY", dpara_emm2, 6);
+ for (j=0; j<3; ++j) {
+ gMC->Gspos("EALM", j+1, "EPMD", xalm[j],yalm[j], 0., irotate[j], "ONLY");
+ x2=xemm2*TMath::Cos(theta[j]) - yemm2*TMath::Sin(theta[j]);
+ y2=xemm2*TMath::Sin(theta[j]) + yemm2*TMath::Cos(theta[j]);
- x3=xemm3*TMath::Cos(theta[j]) - yemm3*TMath::Sin(theta[j]);
- y3=xemm3*TMath::Sin(theta[j]) + yemm3*TMath::Cos(theta[j]);
+ gMC->Gspos("EMM2", j+1, "EPMD", x2,y2, 0., irotate[j], "ONLY");
- gMC->Gsposp("EMM3", j+4, "EPMD", x3,y3, 0., irotate[j], "ONLY", dpara_emm3, 6);
+ x3=xemm3*TMath::Cos(theta[j]) - yemm3*TMath::Sin(theta[j]);
+ y3=xemm3*TMath::Sin(theta[j]) + yemm3*TMath::Cos(theta[j]);
- for (i=1; i<9; ++i)
- {
- xpos[i]=xmod[j] + xsup[i]*TMath::Cos(theta[j]) - ysup[i]*TMath::Sin(theta[j]);
- ypos[i]=ymod[j] + xsup[i]*TMath::Sin(theta[j]) + ysup[i]*TMath::Cos(theta[j]);
+ gMC->Gspos("EMM3", j+4, "EPMD", x3,y3, 0., irotate[j], "ONLY");
- printf("%f %f \n", xpos[i], ypos[i]);
+ for (i=1; i<9; ++i) {
+ xpos[i]=xmod[j] + xsup[i]*TMath::Cos(theta[j]) - ysup[i]*TMath::Sin(theta[j]);
+ ypos[i]=ymod[j] + xsup[i]*TMath::Sin(theta[j]) + ysup[i]*TMath::Cos(theta[j]);
+ if(fDebug)
+ printf("%s: %f %f \n", ClassName(), xpos[i], ypos[i]);
- num_mod = num_mod+1;
+ num_mod = num_mod+1;
- printf("\nNum_mod %d\n",num_mod);
+ if(fDebug)
+ printf("\n%s: Num_mod %d\n",ClassName(),num_mod);
- gMC->Gsposp("EMM1", num_mod + 6, "EPMD", xpos[i],ypos[i], 0., irotate[j], "ONLY", dpara_emm1, 6);
+ gMC->Gspos("EMM1", num_mod + 6, "EPMD", xpos[i],ypos[i], 0., irotate[j], "ONLY");
- }
- }
+ }
+ }
// place EHOL in the centre of EPMD
// define gas-mixtures
- char namate[21];
+ char namate[21]="";
gMC->Gfmate((*fIdmate)[3], namate, a, z, d, radl, absl, buf, nbuf);
ag[1] = a;
zg[1] = z;
Int_t i;
kdet=1;
//
- printf("\n");
- for(i=0;i<35;i++) printf("*");
- printf(" PMD_INIT ");
- for(i=0;i<35;i++) printf("*");
- printf("\n");
- printf(" PMD simulation package (v0) initialised\n");
- printf(" parameters of pmd\n");
- printf("%10.2f %10.2f %10.2f %10.2f\n", cell_radius,cell_wall,cell_depth,zdist1 );
-
- for(i=0;i<80;i++) printf("*");
- printf("\n");
-
+ if(fDebug) {
+ printf("\n%s: ",ClassName());
+ for(i=0;i<35;i++) printf("*");
+ printf(" PMD_INIT ");
+ for(i=0;i<35;i++) printf("*");
+ printf("\n%s: ",ClassName());
+ printf(" PMD simulation package (v0) initialised\n");
+ printf("%s: parameters of pmd\n", ClassName());
+ printf("%s: %10.2f %10.2f %10.2f \
+ %10.2f\n",ClassName(),cell_radius,cell_wall,cell_depth,zdist1 );
+ printf("%s: ",ClassName());
+ for(i=0;i<80;i++) printf("*");
+ printf("\n");
+ }
Int_t *idtmed = fIdtmed->GetArray()-599;
fMedSens=idtmed[605-1];
}
gMC->Gdtom(center,hits,1);
hits[3] = destep*1e9; //Number in eV
- AddHit(gAlice->CurrentTrack(), vol, hits);
+ AddHit(gAlice->GetCurrentTrackNumber(), vol, hits);
}
}
+