/*
$Log$
+Revision 1.10 1999/11/01 20:41:57 fca
+Added protections against using the wrong version of FRAME
+
Revision 1.9 1999/10/15 15:35:19 fca
New version for frame1099 with and without holes
// //
///////////////////////////////////////////////////////////////////////////////
+#include <iostream.h>
+
#include "AliTOF.h"
-#include <TNode.h>
-#include <TTUBE.h>
-#include <TBRIK.h>
+#include "TNode.h"
+#include "TBRIK.h"
#include "AliRun.h"
#include "AliConst.h"
}
//_____________________________________________________________________________
-void AliTOF::AddHit(Int_t track, Int_t *vol, Float_t *hits)
+void AliTOF::AddHit(Int_t track, Int_t sector, Int_t plate, Int_t pad_x,Int_t pad_z, Float_t *hits)
{
//
// Add a TOF hit
//
TClonesArray &lhits = *fHits;
- new(lhits[fNhits++]) AliTOFhit(fIshunt,track,vol,hits);
+ new(lhits[fNhits++]) AliTOFhit(fIshunt,track,sector,plate,pad_x,pad_z,hits);
}
+
//_____________________________________________________________________________
void AliTOF::BuildGeometry()
{
ClassImp(AliTOFhit)
//___________________________________________
-AliTOFhit::AliTOFhit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits):
+AliTOFhit::AliTOFhit(Int_t shunt, Int_t track, Int_t sector, Int_t plate, Int_t pad_x, Int_t pad_z, Float_t *hits):
AliHit(shunt, track)
{
//
// Store a TOF hit
//
- Int_t i;
- for (i=0;i<3;i++) fVolume[i] = vol[i];
+
+ fSector=sector;
+ fPlate=plate;
+ fPad_x=pad_x;
+ fPad_z=pad_z;
//
// Position
fX=hits[0];
AliTOF();
AliTOF(const char *name, const char *title);
virtual ~AliTOF() {}
- virtual void AddHit(Int_t, Int_t*, Float_t*);
+ virtual void AddHit(Int_t, Int_t, Int_t, Int_t, Int_t, Float_t*);
virtual void BuildGeometry();
virtual void CreateGeometry();
virtual void CreateMaterials();
class AliTOFhit : public AliHit {
public:
- Int_t fVolume[3]; //array of volumes
+ Int_t fSector; // number of sector
+ Int_t fPlate; // number of plate
+ Int_t fPad_x; // number of pad along x
+ Int_t fPad_z; // number of pad along z
Float_t fPx; // px in TOF
Float_t fPy; // py in TOF
Float_t fPz; // pz in TOF
public:
AliTOFhit() {}
- AliTOFhit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits);
+ AliTOFhit(Int_t shunt, Int_t track, Int_t sector, Int_t plate, Int_t pad_x, Int_t pad_z, Float_t *hits);
virtual ~AliTOFhit() {}
ClassDef(AliTOFhit,1) // Hits for Time Of Flight
/*
$Log$
+Revision 1.13 1999/11/01 20:41:57 fca
+Added protections against using the wrong version of FRAME
+
Revision 1.12 1999/10/22 08:04:14 fca
Correct improper use of negative parameters
// //
///////////////////////////////////////////////////////////////////////////////
+#include <iostream.h>
#include <stdlib.h>
#include "AliTOFv0.h"
Float_t zSenStrip;
zSenStrip = StripWidth-2*DeadBound;//cm
- par[0] = xFLT*0.5;
+ par[0] = xFLT/2;
par[1] = yPad/2;
par[2] = StripWidth/2.;
gMC->Gsvolu("FSTR","BOX",idtmed[514],par,3);
// Freon for non-sesitive boundaries
- par[0] = xFLT*0.5;
+ par[0] = xFLT/2;
par[1] = 0.110/2;
par[2] = -1;
gMC->Gsvolu("FNSF","BOX",idtmed[512],par,3);
gMC->Gspos("FGRL",2,"FSTR",0.,-ycoor,0.,0,"ONLY");
// Freon sensitive layer
- par[0] = xFLT*0.5;
+ par[0] = -1;
par[1] = 0.110/2.;
par[2] = zSenStrip/2.;
gMC->Gsvolu("FCFC","BOX",idtmed[513],par,3);
gMC->Gsdvn("FLZ","FCFC", nz, 3);
gMC->Gsdvn("FLX","FLZ" , nx, 1);
-
//// Positioning the Strips (FSTR) in the FLT volumes /////
+
// 3 (Central) Plate
Float_t t = zFLT1+zFLT2+zFLT3/2.+7.*2.5;//Half Width of Barrel
Float_t zpos = 0;
do{
ang = atan(zcoor/t);
- ang = ang*kRaddeg;
- AliMatrix (idrotm[nrot], 90., 0.,90.-ang,90.,-ang,90.);
- AliMatrix (idrotm[nrot+1],90.,180.,90.+ang,90., ang,90.);
+ ang = ang * kRaddeg;
+ AliMatrix (idrotm[nrot], 90., 0.,90.-ang,90.,-ang, 90.);
+ AliMatrix (idrotm[nrot+1],90.,180.,90.+ang,90.,ang, 90.);
ycoor = -14.5+ Space; //2 cm over front plate
ycoor += (1-(UpDown+1)/2)*Gap;
gMC->Gspos("FSTR",j ,"FLT3",0.,ycoor, zcoor,idrotm[nrot], "ONLY");
gMC->Gspos("FSTR",j+1,"FLT3",0.,ycoor,-zcoor,idrotm[nrot+1],"ONLY");
- ang = ang/kRaddeg;
+ ang = ang / kRaddeg;
zcoor=zcoor-(zSenStrip/2)/TMath::Cos(ang)+UpDown*Gap*TMath::Tan(ang)-(zSenStrip/2)/TMath::Cos(ang);
UpDown*= -1; // Alternate strips
do {
ang = atan(zpos/sqrt(2*t*t-zpos*zpos));
- ang = ang*kRaddeg;
- AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang,270.);
+ ang = ang * kRaddeg;
+ AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
ycoor = -29./2.+ Space ; //2 cm over front plate
ycoor += (1-(UpDown+1)/2)*Gap;
zcoor = zpos+(zFLT3/2.+7+zFLT2/2); // Moves to the system of the centre of the modulus FLT2
gMC->Gspos("FSTR",i, "FLT2", 0., ycoor, zcoor,idrotm[nrot], "ONLY");
- ang = ang/kRaddeg;
+ ang = ang / kRaddeg;
zpos = zpos - (zSenStrip/2)/TMath::Cos(ang)+UpDown*Gap*TMath::Tan(ang)-(zSenStrip/2)/TMath::Cos(ang);
last = StripWidth*TMath::Cos(ang)/2;
UpDown*=-1;
do {
ang = atan(zpos/sqrt(2*t*t-zpos*zpos));
- ang = ang*kRaddeg;
- AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang,270.);
+ ang = ang * kRaddeg;
+ AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.);
i++;
zcoor = zpos+(zFLT1/2+zFLT2+zFLT3/2+7.*2.);
gMC->Gspos("FSTR",i, "FLT1", 0., ycoor, zcoor,idrotm[nrot], "ONLY");
- ang = ang /kRaddeg;
+ ang = ang / kRaddeg;
zpos = zpos - zSenStrip/TMath::Cos(ang);
last = StripWidth*TMath::Cos(ang)/2.;
} while (zpos>-t+7.+last);
// Procedure called at each step in the Time Of Flight
//
TLorentzVector mom, pos;
- Float_t hits[8];
- Int_t vol[3];
- Int_t copy, id, i;
+ Float_t hits[8],rho,phi,phid,z;
+ Int_t sector, plate, pad_x, pad_z, strip;
+ Int_t copy, pad_z_id, pad_x_id, strip_id, i;
Int_t *idtmed = fIdtmed->GetArray()-499;
- if(gMC->GetMedium()==idtmed[514-1] &&
+
+
+ if(gMC->GetMedium()==idtmed[513] &&
gMC->IsTrackEntering() && gMC->TrackCharge()
- && gMC->CurrentVolID(copy)==fIdSens) {
+ && gMC->CurrentVolID(copy)==fIdSens)
+ {
TClonesArray &lhits = *fHits;
- //
- // Record only charged tracks at entrance
- gMC->CurrentVolOffID(1,copy);
- vol[2]=copy;
- gMC->CurrentVolOffID(3,copy);
- vol[1]=copy;
- id=gMC->CurrentVolOffID(8,copy);
- vol[0]=copy;
- if(id==fIdFTO3) {
- vol[0]+=22;
- id=gMC->CurrentVolOffID(5,copy);
- if(id==fIdFLT3) vol[1]+=6;
- } else if (id==fIdFTO2) {
- vol[0]+=20;
- id=gMC->CurrentVolOffID(5,copy);
- if(id==fIdFLT2) vol[1]+=8;
- } else {
- id=gMC->CurrentVolOffID(5,copy);
- if(id==fIdFLT1) vol[1]+=14;
- }
+
+ //_________getting information about hit volumes_____________
+
+ pad_z_id=gMC->CurrentVolOffID(2,copy);
+ pad_z=copy;
+
+ pad_x_id=gMC->CurrentVolOffID(1,copy);
+ pad_x=copy;
+
+ strip_id=gMC->CurrentVolOffID(5,copy);
+ strip=copy;
+
+ pad_z = (strip-1)*2+pad_z;
+
gMC->TrackPosition(pos);
gMC->TrackMomentum(mom);
- //
+
+ rho = sqrt(pos[0]*pos[0]+pos[1]*pos[1]);
+ phi = TMath::ACos(pos[0]/rho);
+ Float_t as = TMath::ASin(pos[1]/rho);
+ if (as<0) phi = 2*3.141592654-phi;
+
+ z = pos[2];
+
+ if (z<= 62. && z>=-62.) plate = 3;
+ if (z<= 216. && z>62.) plate = 4;
+ if (z>=-216. && z<-62.) plate = 2;
+ if (z>216.) plate = 5;
+ if (z<-216.) plate = 1;
+
+ phid = phi*kRaddeg;
+ sector = Int_t (phid/20.);
+ sector++;
+
Double_t ptot=mom.Rho();
Double_t norm=1/ptot;
for(i=0;i<3;++i) {
}
hits[6]=ptot;
hits[7]=pos[3];
- new(lhits[fNhits++]) AliTOFhit(fIshunt,gAlice->CurrentTrack(),vol,hits);
+ new(lhits[fNhits++]) AliTOFhit(fIshunt,gAlice->CurrentTrack(),sector, plate, pad_x, pad_z, hits);
}
}
+
virtual void StepManager();
virtual void DrawModule();
- ClassDef(AliTOFv0,1) //Time Of Flight version 1
+ ClassDef(AliTOFv0,1) //Time Of Flight version 0
};
#endif
/*
$Log$
+Revision 1.13 1999/11/01 20:41:57 fca
+Added protections against using the wrong version of FRAME
+
Revision 1.12 1999/10/22 08:04:14 fca
Correct improper use of negative parameters
// //
///////////////////////////////////////////////////////////////////////////////
+#include <iostream.h>
#include <stdlib.h>
#include "AliTOFv1.h"
// Procedure called at each step in the Time Of Flight
//
TLorentzVector mom, pos;
- Float_t hits[8];
- Int_t vol[3];
- Int_t copy, id, i;
+ Float_t hits[8],rho,phi,phid,z;
+ Int_t sector, plate, pad_x, pad_z, strip;
+ Int_t copy, pad_z_id, pad_x_id, strip_id, i;
Int_t *idtmed = fIdtmed->GetArray()-499;
- if(gMC->GetMedium()==idtmed[514-1] &&
+
+
+ if(gMC->GetMedium()==idtmed[513] &&
gMC->IsTrackEntering() && gMC->TrackCharge()
- && gMC->CurrentVolID(copy)==fIdSens) {
+ && gMC->CurrentVolID(copy)==fIdSens)
+ {
TClonesArray &lhits = *fHits;
- //
- // Record only charged tracks at entrance
- gMC->CurrentVolOffID(1,copy);
- vol[2]=copy;
- gMC->CurrentVolOffID(3,copy);
- vol[1]=copy;
- id=gMC->CurrentVolOffID(8,copy);
- vol[0]=copy;
- if(id==fIdFTO3) {
- vol[0]+=22;
- id=gMC->CurrentVolOffID(5,copy);
- if(id==fIdFLT3) vol[1]+=6;
- } else if (id==fIdFTO2) {
- vol[0]+=20;
- id=gMC->CurrentVolOffID(5,copy);
- if(id==fIdFLT2) vol[1]+=8;
- } else {
- id=gMC->CurrentVolOffID(5,copy);
- if(id==fIdFLT1) vol[1]+=14;
- }
+
+ //_________getting information about hit volumes_____________
+
+ pad_z_id=gMC->CurrentVolOffID(2,copy);
+ pad_z=copy;
+
+ pad_x_id=gMC->CurrentVolOffID(1,copy);
+ pad_x=copy;
+
+ strip_id=gMC->CurrentVolOffID(5,copy);
+ strip=copy;
+
+ pad_z = (strip-1)*2+pad_z;
+
gMC->TrackPosition(pos);
gMC->TrackMomentum(mom);
- //
+
+ rho = sqrt(pos[0]*pos[0]+pos[1]*pos[1]);
+ phi = TMath::ACos(pos[0]/rho);
+ Float_t as = TMath::ASin(pos[1]/rho);
+ if (as<0) phi = 2*3.141592654-phi;
+
+ z = pos[2];
+
+ if (z<=62. && z>=-62) plate = 3;
+ if (z<=216. && z>62.) plate = 4;
+ if (z>=-216. && z<-62.) plate = 2;
+ if (z>216.) plate = 5;
+ if (z<-216.) plate = 1;
+
+ phid = phi*kRaddeg;
+ sector = Int_t (phid/20.);
+ sector++;
+
Double_t ptot=mom.Rho();
Double_t norm=1/ptot;
for(i=0;i<3;++i) {
}
hits[6]=ptot;
hits[7]=pos[3];
- new(lhits[fNhits++]) AliTOFhit(fIshunt,gAlice->CurrentTrack(),vol,hits);
+ new(lhits[fNhits++]) AliTOFhit(fIshunt,gAlice->CurrentTrack(),sector, plate, pad_x, pad_z, hits);
}
}
+
/*
$Log$
+Revision 1.13 1999/11/01 20:41:57 fca
+Added protections against using the wrong version of FRAME
+
Revision 1.12 1999/10/22 08:04:14 fca
Correct improper use of negative parameters
// //
///////////////////////////////////////////////////////////////////////////////
+#include <iostream.h>
#include <stdlib.h>
#include "AliTOFv2.h"
// Procedure called at each step in the Time Of Flight
//
TLorentzVector mom, pos;
- Float_t hits[8];
- Int_t vol[3];
- Int_t copy, id, i;
+ Float_t hits[8],rho,phi,phid,z;
+ Int_t sector, plate, pad_x, pad_z, strip;
+ Int_t copy, pad_z_id, pad_x_id, strip_id, i;
Int_t *idtmed = fIdtmed->GetArray()-499;
- if(gMC->GetMedium()==idtmed[514-1] &&
+
+
+ if(gMC->GetMedium()==idtmed[513] &&
gMC->IsTrackEntering() && gMC->TrackCharge()
- && gMC->CurrentVolID(copy)==fIdSens) {
+ && gMC->CurrentVolID(copy)==fIdSens)
+ {
TClonesArray &lhits = *fHits;
- //
- // Record only charged tracks at entrance
- gMC->CurrentVolOffID(1,copy);
- vol[2]=copy;
- gMC->CurrentVolOffID(3,copy);
- vol[1]=copy;
- id=gMC->CurrentVolOffID(8,copy);
- vol[0]=copy;
- if(id==fIdFTO3) {
- vol[0]+=22;
- id=gMC->CurrentVolOffID(5,copy);
- if(id==fIdFLT3) vol[1]+=6;
- } else if (id==fIdFTO2) {
- vol[0]+=20;
- id=gMC->CurrentVolOffID(5,copy);
- if(id==fIdFLT2) vol[1]+=8;
- } else {
- id=gMC->CurrentVolOffID(5,copy);
- if(id==fIdFLT1) vol[1]+=14;
- }
+
+ //_________getting information about hit volumes_____________
+
+ pad_z_id=gMC->CurrentVolOffID(2,copy);
+ pad_z=copy;
+
+ pad_x_id=gMC->CurrentVolOffID(1,copy);
+ pad_x=copy;
+
+ strip_id=gMC->CurrentVolOffID(5,copy);
+ strip=copy;
+
+ pad_z = (strip-1)*2+pad_z;
+
gMC->TrackPosition(pos);
gMC->TrackMomentum(mom);
- //
+
+ rho = sqrt(pos[0]*pos[0]+pos[1]*pos[1]);
+ phi = TMath::ACos(pos[0]/rho);
+ Float_t as = TMath::ASin(pos[1]/rho);
+ if (as<0) phi = 2*3.141592654-phi;
+
+ z = pos[2];
+
+ if (z<=62. && z>=-62) plate = 3;
+ if (z<=216. && z>62.) plate = 4;
+ if (z>=-216. && z<-62.) plate = 2;
+ if (z>216.) plate = 5;
+ if (z<-216.) plate = 1;
+
+ phid = phi*kRaddeg;
+ sector = Int_t (phid/20.);
+ sector++;
+
Double_t ptot=mom.Rho();
Double_t norm=1/ptot;
for(i=0;i<3;++i) {
}
hits[6]=ptot;
hits[7]=pos[3];
- new(lhits[fNhits++]) AliTOFhit(fIshunt,gAlice->CurrentTrack(),vol,hits);
+ new(lhits[fNhits++]) AliTOFhit(fIshunt,gAlice->CurrentTrack(),sector, plate, pad_x, pad_z, hits);
}
}
+
/*
$Log$
+Revision 1.13 1999/11/02 11:26:39 fca
+added stdlib.h for exit
+
Revision 1.12 1999/11/01 20:41:57 fca
Added protections against using the wrong version of FRAME
// //
///////////////////////////////////////////////////////////////////////////////
+#include <iostream.h>
#include <stdlib.h>
#include "AliTOFv3.h"
// Procedure called at each step in the Time Of Flight
//
TLorentzVector mom, pos;
- Float_t hits[8];
- Int_t vol[3];
- Int_t copy, id, i;
+ Float_t hits[8],rho,phi,phid,z;
+ Int_t sector, plate, pad_x, pad_z, strip;
+ Int_t copy, pad_z_id, pad_x_id, strip_id, i;
Int_t *idtmed = fIdtmed->GetArray()-499;
- if(gMC->GetMedium()==idtmed[514-1] &&
+
+
+ if(gMC->GetMedium()==idtmed[513] &&
gMC->IsTrackEntering() && gMC->TrackCharge()
- && gMC->CurrentVolID(copy)==fIdSens) {
+ && gMC->CurrentVolID(copy)==fIdSens)
+ {
TClonesArray &lhits = *fHits;
- //
- // Record only charged tracks at entrance
- gMC->CurrentVolOffID(1,copy);
- vol[2]=copy;
- gMC->CurrentVolOffID(3,copy);
- vol[1]=copy;
- id=gMC->CurrentVolOffID(8,copy);
- vol[0]=copy;
- if(id==fIdFTO3) {
- vol[0]+=22;
- id=gMC->CurrentVolOffID(5,copy);
- if(id==fIdFLT3) vol[1]+=6;
- } else if (id==fIdFTO2) {
- vol[0]+=20;
- id=gMC->CurrentVolOffID(5,copy);
- if(id==fIdFLT2) vol[1]+=8;
- } else {
- id=gMC->CurrentVolOffID(5,copy);
- if(id==fIdFLT1) vol[1]+=14;
- }
+
+ //_________getting information about hit volumes_____________
+
+ pad_z_id=gMC->CurrentVolOffID(2,copy);
+ pad_z=copy;
+
+ pad_x_id=gMC->CurrentVolOffID(1,copy);
+ pad_x=copy;
+
+ strip_id=gMC->CurrentVolOffID(5,copy);
+ strip=copy;
+
+ pad_z = (strip-1)*2+pad_z;
+
gMC->TrackPosition(pos);
gMC->TrackMomentum(mom);
- //
+
+ rho = sqrt(pos[0]*pos[0]+pos[1]*pos[1]);
+ phi = TMath::ACos(pos[0]/rho);
+ Float_t as = TMath::ASin(pos[1]/rho);
+ if (as<0) phi = 2*3.141592654-phi;
+
+ z = pos[2];
+
+ if (z<=62. && z>=-62) plate = 3;
+ if (z<=216. && z>62.) plate = 4;
+ if (z>=-216. && z<-62.) plate = 2;
+ if (z>216.) plate = 5;
+ if (z<-216.) plate = 1;
+
+ phid = phi*kRaddeg;
+ sector = Int_t (phid/20.);
+ sector++;
+
Double_t ptot=mom.Rho();
Double_t norm=1/ptot;
for(i=0;i<3;++i) {
}
hits[6]=ptot;
hits[7]=pos[3];
- new(lhits[fNhits++]) AliTOFhit(fIshunt,gAlice->CurrentTrack(),vol,hits);
+ new(lhits[fNhits++]) AliTOFhit(fIshunt,gAlice->CurrentTrack(),sector, plate, pad_x, pad_z, hits);
}
}
/*
$Log$
+Revision 1.3 1999/11/01 20:41:57 fca
+Added protections against using the wrong version of FRAME
+
Revision 1.2 1999/10/16 19:22:18 fca
Corrected Rotation Matrix and CVS log
// //
///////////////////////////////////////////////////////////////////////////////
+#include <iostream.h>
#include <stdlib.h>
#include "AliTOFv4.h"
// Procedure called at each step in the Time Of Flight
//
TLorentzVector mom, pos;
- Float_t hits[8];
- Int_t vol[3];
- Int_t copy, id, i;
+ Float_t hits[8],rho,z,phi,phid;
+ Int_t sector, plate, pad_x, pad_z;
+ Int_t copy, pad_x_id, pad_z_id, i;
Int_t *idtmed = fIdtmed->GetArray()-499;
if(gMC->GetMedium()==idtmed[514-1] &&
gMC->IsTrackEntering() && gMC->TrackCharge()
&& gMC->CurrentVolID(copy)==fIdSens) {
TClonesArray &lhits = *fHits;
- //
- // Record only charged tracks at entrance
- gMC->CurrentVolOffID(1,copy);
- vol[2]=copy;
- gMC->CurrentVolOffID(3,copy);
- vol[1]=copy;
- id=gMC->CurrentVolOffID(8,copy);
- vol[0]=copy;
- if(id==fIdFTO3) {
- vol[0]+=22;
- id=gMC->CurrentVolOffID(5,copy);
- if(id==fIdFLT3) vol[1]+=6;
- } else if (id==fIdFTO2) {
- vol[0]+=20;
- id=gMC->CurrentVolOffID(5,copy);
- if(id==fIdFLT2) vol[1]+=8;
- } else {
- id=gMC->CurrentVolOffID(5,copy);
- if(id==fIdFLT1) vol[1]+=14;
- }
- gMC->TrackPosition(pos);
- gMC->TrackMomentum(mom);
- //
+
+
+ //_________getting information about hit volumes_____________
+
+ pad_z_id=gMC->CurrentVolOffID(3,copy);
+ pad_z=copy;
+
+ pad_x_id=gMC->CurrentVolOffID(2,copy);
+ pad_x=copy;
+
+ gMC->TrackPosition(pos);
+ gMC->TrackMomentum(mom);
+
+ rho = sqrt(pos[0]*pos[0]+pos[1]*pos[1]);
+ phi = TMath::ACos(pos[0]/rho);
+ Float_t as = TMath::ASin(pos[1]/rho);
+ if (as<0) phi = 2*3.141592654-phi;
+
+ z = pos[2];
+
+ if (z<=62. && z>=-62) plate = 3;
+ if (z<=216. && z>62.) plate = 4;
+ if (z>=-216. && z<-62.) plate = 2;
+ if (z>216.) plate = 5;
+ if (z<-216.) plate = 1;
+
+ phid = phi*kRaddeg;
+ sector = Int_t (phid/20.);
+ sector++;
+
Double_t ptot=mom.Rho();
Double_t norm=1/ptot;
for(i=0;i<3;++i) {
}
hits[6]=ptot;
hits[7]=pos[3];
- new(lhits[fNhits++]) AliTOFhit(fIshunt,gAlice->CurrentTrack(),vol,hits);
+ new(lhits[fNhits++]) AliTOFhit(fIshunt,gAlice->CurrentTrack(),sector,plate,pad_x,pad_z,hits);
}
}
-
/*
$Log$
+Revision 1.3 1999/11/01 20:41:58 fca
+Added protections against using the wrong version of FRAME
+
Revision 1.2 1999/10/16 19:21:57 fca
Corrected Rotation Matrix and CVS logAliTOFv4.cxx
// //
///////////////////////////////////////////////////////////////////////////////
+#include <iostream.h>
#include <stdlib.h>
#include "AliTOFv5.h"
// Procedure called at each step in the Time Of Flight
//
TLorentzVector mom, pos;
- Float_t hits[8];
- Int_t vol[3];
- Int_t copy, id, i;
+ Float_t hits[8],rho,z,phi,phid;
+ Int_t sector, plate, pad_x, pad_z;
+ Int_t copy, pad_x_id, pad_z_id, i;
Int_t *idtmed = fIdtmed->GetArray()-499;
if(gMC->GetMedium()==idtmed[514-1] &&
gMC->IsTrackEntering() && gMC->TrackCharge()
&& gMC->CurrentVolID(copy)==fIdSens) {
TClonesArray &lhits = *fHits;
- //
- // Record only charged tracks at entrance
- gMC->CurrentVolOffID(1,copy);
- vol[2]=copy;
- gMC->CurrentVolOffID(3,copy);
- vol[1]=copy;
- id=gMC->CurrentVolOffID(8,copy);
- vol[0]=copy;
- if(id==fIdFTO3) {
- vol[0]+=22;
- id=gMC->CurrentVolOffID(5,copy);
- if(id==fIdFLT3) vol[1]+=6;
- } else if (id==fIdFTO2) {
- vol[0]+=20;
- id=gMC->CurrentVolOffID(5,copy);
- if(id==fIdFLT2) vol[1]+=8;
- } else {
- id=gMC->CurrentVolOffID(5,copy);
- if(id==fIdFLT1) vol[1]+=14;
- }
- gMC->TrackPosition(pos);
- gMC->TrackMomentum(mom);
- //
+
+
+ //_________getting information about hit volumes_____________
+
+ pad_z_id=gMC->CurrentVolOffID(3,copy);
+ pad_z=copy;
+
+ pad_x_id=gMC->CurrentVolOffID(2,copy);
+ pad_x=copy;
+
+ gMC->TrackPosition(pos);
+ gMC->TrackMomentum(mom);
+
+ rho = sqrt(pos[0]*pos[0]+pos[1]*pos[1]);
+ phi = TMath::ACos(pos[0]/rho);
+ Float_t as = TMath::ASin(pos[1]/rho);
+ if (as<0) phi = 2*3.141592654-phi;
+
+ z = pos[2];
+
+ if (z<=62. && z>=-62) plate = 3;
+ if (z<=216. && z>62.) plate = 4;
+ if (z>=-216. && z<-62.) plate = 2;
+ if (z>216.) plate = 5;
+ if (z<-216.) plate = 1;
+
+ phid = phi*kRaddeg;
+ sector = Int_t (phid/20.);
+ sector++;
+
Double_t ptot=mom.Rho();
Double_t norm=1/ptot;
for(i=0;i<3;++i) {
}
hits[6]=ptot;
hits[7]=pos[3];
- new(lhits[fNhits++]) AliTOFhit(fIshunt,gAlice->CurrentTrack(),vol,hits);
+ new(lhits[fNhits++]) AliTOFhit(fIshunt,gAlice->CurrentTrack(),sector,plate,pad_x,pad_z,hits);
}
}
-
/*
$Log$
+Revision 1.3 1999/11/01 20:41:58 fca
+Added protections against using the wrong version of FRAME
+
Revision 1.2 1999/10/16 19:21:57 fca
Corrected Rotation Matrix and CVS logAliTOFv4.cxx
// //
///////////////////////////////////////////////////////////////////////////////
+#include <iostream.h>
#include <stdlib.h>
#include "AliTOFv6.h"
// Procedure called at each step in the Time Of Flight
//
TLorentzVector mom, pos;
- Float_t hits[8];
- Int_t vol[3];
- Int_t copy, id, i;
+ Float_t hits[8],rho,z,phi,phid;
+ Int_t sector, plate, pad_x, pad_z;
+ Int_t copy, pad_x_id, pad_z_id, i;
Int_t *idtmed = fIdtmed->GetArray()-499;
if(gMC->GetMedium()==idtmed[514-1] &&
gMC->IsTrackEntering() && gMC->TrackCharge()
&& gMC->CurrentVolID(copy)==fIdSens) {
TClonesArray &lhits = *fHits;
- //
- // Record only charged tracks at entrance
- gMC->CurrentVolOffID(1,copy);
- vol[2]=copy;
- gMC->CurrentVolOffID(3,copy);
- vol[1]=copy;
- id=gMC->CurrentVolOffID(8,copy);
- vol[0]=copy;
- if(id==fIdFTO3) {
- vol[0]+=22;
- id=gMC->CurrentVolOffID(5,copy);
- if(id==fIdFLT3) vol[1]+=6;
- } else if (id==fIdFTO2) {
- vol[0]+=20;
- id=gMC->CurrentVolOffID(5,copy);
- if(id==fIdFLT2) vol[1]+=8;
- } else {
- id=gMC->CurrentVolOffID(5,copy);
- if(id==fIdFLT1) vol[1]+=14;
- }
- gMC->TrackPosition(pos);
- gMC->TrackMomentum(mom);
- //
+
+
+ //_________getting information about hit volumes_____________
+
+ pad_z_id=gMC->CurrentVolOffID(3,copy);
+ pad_z=copy;
+
+ pad_x_id=gMC->CurrentVolOffID(2,copy);
+ pad_x=copy;
+
+ gMC->TrackPosition(pos);
+ gMC->TrackMomentum(mom);
+
+ rho = sqrt(pos[0]*pos[0]+pos[1]*pos[1]);
+ phi = TMath::ACos(pos[0]/rho);
+ Float_t as = TMath::ASin(pos[1]/rho);
+ if (as<0) phi = 2*3.141592654-phi;
+
+ z = pos[2];
+
+ if (z<=62. && z>=-62) plate = 3;
+ if (z<=216. && z>62.) plate = 4;
+ if (z>=-216. && z<-62.) plate = 2;
+ if (z>216.) plate = 5;
+ if (z<-216.) plate = 1;
+
+ phid = phi*kRaddeg;
+ sector = Int_t (phid/20.);
+ sector++;
+
Double_t ptot=mom.Rho();
Double_t norm=1/ptot;
for(i=0;i<3;++i) {
}
hits[6]=ptot;
hits[7]=pos[3];
- new(lhits[fNhits++]) AliTOFhit(fIshunt,gAlice->CurrentTrack(),vol,hits);
+ new(lhits[fNhits++]) AliTOFhit(fIshunt,gAlice->CurrentTrack(),sector,plate,pad_x,pad_z,hits);
}
}
-