/*
$Log$
+Revision 1.4 2000/06/26 14:02:38 morsch
+Add class AliMUONConstants with MUON specific constants using static memeber data and access methods.
+
+Revision 1.3 2000/06/22 14:10:05 morsch
+HP scope problems corrected (PH)
+
+Revision 1.2 2000/06/15 07:58:49 morsch
+Code from MUON-dev joined
+
Revision 1.1.2.14 2000/06/14 14:37:25 morsch
Initialization of TriggerCircuit added (PC)
#include "AliMUONChamber.h"
#include "AliMUONHit.h"
#include "AliMUONPadHit.h"
+#include "AliMUONConstants.h"
ClassImp(AliMUONv1)
//
printf("\n\n\n Start Init for version 1 - CPC chamber type\n\n\n");
-
- for (Int_t i=0; i<kNCH; i++) {
+ Int_t i;
+ for (i=0; i<AliMUONConstants::NCh(); i++) {
( (AliMUONChamber*) (*fChambers)[i])->Init();
}
//cp
printf("\n\n\n Start Init for Trigger Circuits\n\n\n");
- for (Int_t i=0; i<kNTriggerCircuit; i++) {
+ for (i=0; i<AliMUONConstants::NTriggerCircuit(); i++) {
( (AliMUONTriggerCircuit*) (*fTriggerCircuits)[i])->Init(i);
}
printf(" Finished Init for Trigger Circuits\n\n\n");
static Float_t eloss, eloss2, xhit, yhit, tof, tlength;
const Float_t kBig=1.e10;
-
// modifs perso
static Float_t hits[15];
idvol=-1;
id=gMC->CurrentVolID(copy);
- for (Int_t i=1; i<=kNCH; i++) {
+ for (Int_t i=1; i<=AliMUONConstants::NCh(); i++) {
if(id==((AliMUONChamber*)(*fChambers)[i-1])->GetGid()){
vol[0]=i;
idvol=i-1;
eloss += destep;
tlength += step;
- Float_t x0,y0;
+ Float_t x0,y0,z0;
+ Float_t localPos[3];
+ Float_t globalPos[3] = {pos[0], pos[1], pos[2]};
+
+ gMC->Gmtod(globalPos,localPos,1);
+
if(idvol<10) {
// tracking chambers
x0 = 0.5*(xhit+pos[0]);
y0 = 0.5*(yhit+pos[1]);
+ z0 = localPos[2];
} else {
// trigger chambers
x0=xhit;
y0=yhit;
+ z0=0.;
}
- if (eloss >0) MakePadHits(x0,y0,eloss,tof,idvol);
+ if (eloss >0) MakePadHits(x0,y0,z0,eloss,tof,idvol);
hits[6]=tlength;
{
((AliMUONChamber*) (*fChambers)[idvol])
->SigGenInit(pos[0], pos[1], pos[2]);
+
+ Float_t localPos[3];
+ Float_t globalPos[3] = {pos[0], pos[1], pos[2]};
+ gMC->Gmtod(globalPos,localPos,1);
+
+
// printf("\n-> MakePadHits, reason special %d",ipart);
if (eloss > 0 && idvol < 10)
- MakePadHits(0.5*(xhit+pos[0]),0.5*(yhit+pos[1]),eloss,tof,idvol);
+ MakePadHits(0.5*(xhit+pos[0]),0.5*(yhit+pos[1]),localPos[2],eloss,tof,idvol);
xhit = pos[0];
yhit = pos[1];
eloss = destep;