From 2eb55fab5a69eb5a71bade2fbdbab5d4438bda6f Mon Sep 17 00:00:00 2001 From: morsch Date: Sat, 17 Mar 2001 10:07:20 +0000 Subject: [PATCH] Correct inconsistent variable name / method name / comments. --- MUON/AliMUONHit.cxx | 38 ++++++++++---------- MUON/AliMUONHit.h | 12 +++---- MUON/AliMUONv0.cxx | 17 +++++---- MUON/AliMUONv1.cxx | 85 +++++++++++++++++++++------------------------ 4 files changed, 73 insertions(+), 79 deletions(-) diff --git a/MUON/AliMUONHit.cxx b/MUON/AliMUONHit.cxx index c11d67a01b4..e660a0d5fb1 100644 --- a/MUON/AliMUONHit.cxx +++ b/MUON/AliMUONHit.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.2 2000/06/15 07:58:48 morsch +Code from MUON-dev joined + Revision 1.1.2.1 2000/06/09 22:02:14 morsch Was before in DataStructures.cxx @@ -28,25 +31,22 @@ ClassImp(AliMUONHit) AliHit(shunt, track) { // Constructor - fChamber=vol[0]; - fParticle=hits[0]; - fX=hits[1]; - fY=hits[2]; - fZ=hits[3]; - fTheta=hits[4]; - fPhi=hits[5]; - fTlength=hits[6]; - fEloss=hits[7]; - fPHfirst=(Int_t) hits[8]; - fPHlast=(Int_t) hits[9]; - - // modifs perso - fPTot=hits[10]; - fCxHit=hits[11]; - fCyHit=hits[12]; - fCzHit=hits[13]; - fAge=hits[14]; - + fChamber = vol[0]; + fParticle = hits[0]; + fX = hits[1]; + fY = hits[2]; + fZ = hits[3]; + fTheta = hits[4]; + fPhi = hits[5]; + fTlength = hits[6]; + fEloss = hits[7]; + fPHfirst = (Int_t) hits[8]; + fPHlast = (Int_t) hits[9]; + fPTot = hits[10]; + fPx = hits[11]; + fPy = hits[12]; + fPz = hits[13]; + fAge = hits[14]; } diff --git a/MUON/AliMUONHit.h b/MUON/AliMUONHit.h index 0fb1a90c39f..d761dd37bb7 100644 --- a/MUON/AliMUONHit.h +++ b/MUON/AliMUONHit.h @@ -24,9 +24,9 @@ class AliMUONHit : public AliHit { Int_t PHfirst() {return fPHfirst;} Int_t PHlast() {return fPHlast;} Float_t Momentum() {return fPTot;} - Float_t Cx() {return fCxHit;} - Float_t Cy() {return fCyHit;} - Float_t Cz() {return fCzHit;} + Float_t Px() {return fPx;} + Float_t Py() {return fPy;} + Float_t Pz() {return fPz;} private: Int_t fChamber; // Chamber number Float_t fParticle; // Geant3 particle type @@ -39,9 +39,9 @@ class AliMUONHit : public AliHit { Int_t fPHlast; // last padhit Float_t fPTot; // hit local momentum P - Float_t fCxHit; // Px/P - Float_t fCyHit; // Py/P - Float_t fCzHit; // Pz/P + Float_t fPx; // Px + Float_t fPy; // Py + Float_t fPz; // Pz ClassDef(AliMUONHit,1) //Hit object for MUON }; diff --git a/MUON/AliMUONv0.cxx b/MUON/AliMUONv0.cxx index f66b1f4946f..35210be7993 100644 --- a/MUON/AliMUONv0.cxx +++ b/MUON/AliMUONv0.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.16 2001/01/27 08:50:50 morsch +Call non default constructors of segmentation classes. + Revision 1.15 2001/01/17 20:57:45 hristov Unused variable removed @@ -692,15 +695,11 @@ void AliMUONv0::StepManager() hits[5] = phi; // phi angle of incidence hits[8] = -1; // first padhit hits[9] = -1; // last pad hit - - // modifs personel - hits[10] = mom[3]; // hit Energy - hits[11] = mom[0]; // Px - hits[12] = mom[1]; // Py - hits[13] = mom[2]; // Pz - hits[14] = gMC->TrackTime(); - - // fin modifs perso + hits[10] = mom[3]; // hit Energy + hits[11] = mom[0]; // Px + hits[12] = mom[1]; // Py + hits[13] = mom[2]; // Pz + hits[14] = gMC->TrackTime(); // time of flight new(lhits[fNhits++]) AliMUONHit(fIshunt,gAlice->CurrentTrack(),vol,hits); diff --git a/MUON/AliMUONv1.cxx b/MUON/AliMUONv1.cxx index 10412f9c0c1..71145092225 100644 --- a/MUON/AliMUONv1.cxx +++ b/MUON/AliMUONv1.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.25 2001/03/16 15:32:06 morsch +Corrections of overlap with beam shield and dipole (A. de Falco) + Revision 1.24 2001/03/14 17:22:15 pcrochet Geometry of the trigger chambers : a vertical gap of has been introduced around x=0 according fig.3.27 of the TDR (P.Dupieux) @@ -2017,15 +2020,12 @@ void AliMUONv1::StepManager() Float_t destep, step; static Float_t eloss, eloss2, xhit, yhit, zhit, tof, tlength; - const Float_t kBig=1.e10; - // modifs perso + const Float_t kBig = 1.e10; static Float_t hits[15]; TClonesArray &lhits = *fHits; // - // Set maximum step size for gas - // numed=gMC->GetMedium(); // // Only charged tracks if( !(gMC->TrackCharge()) ) return; @@ -2035,10 +2035,10 @@ void AliMUONv1::StepManager() idvol=-1; id=gMC->CurrentVolID(copy); - for (Int_t i=1; i<=AliMUONConstants::NCh(); i++) { + for (Int_t i = 1; i <= AliMUONConstants::NCh(); i++) { if(id==((AliMUONChamber*)(*fChambers)[i-1])->GetGid()){ - vol[0]=i; - idvol=i-1; + vol[0] = i; + idvol = i-1; } } if (idvol == -1) return; @@ -2048,8 +2048,6 @@ void AliMUONv1::StepManager() gMC->TrackMomentum(mom); ipart = gMC->TrackPid(); - //Int_t ipart1 = gMC->IdFromPDG(ipart); - //printf("ich, ipart %d %d \n",vol[0],ipart1); // // momentum loss and steplength in last step @@ -2063,45 +2061,41 @@ void AliMUONv1::StepManager() Double_t tc = mom[0]*mom[0]+mom[1]*mom[1]; Double_t rt = TMath::Sqrt(tc); Double_t pmom = TMath::Sqrt(tc+mom[2]*mom[2]); - Double_t tx=mom[0]/pmom; - Double_t ty=mom[1]/pmom; - Double_t tz=mom[2]/pmom; - Double_t s=((AliMUONChamber*)(*fChambers)[idvol]) + Double_t tx = mom[0]/pmom; + Double_t ty = mom[1]/pmom; + Double_t tz = mom[2]/pmom; + Double_t s = ((AliMUONChamber*)(*fChambers)[idvol]) ->ResponseModel() ->Pitch()/tz; theta = Float_t(TMath::ATan2(rt,Double_t(mom[2])))*kRaddeg; phi = Float_t(TMath::ATan2(Double_t(mom[1]),Double_t(mom[0])))*kRaddeg; hits[0] = Float_t(ipart); // Geant3 particle type - hits[1] = pos[0]+s*tx; // X-position for hit - hits[2] = pos[1]+s*ty; // Y-position for hit - hits[3] = pos[2]+s*tz; // Z-position for hit + hits[1] = pos[0]+s*tx; // X-position for hit + hits[2] = pos[1]+s*ty; // Y-position for hit + hits[3] = pos[2]+s*tz; // Z-position for hit hits[4] = theta; // theta angle of incidence hits[5] = phi; // phi angle of incidence - hits[8] = (Float_t) fNPadHits; // first padhit + hits[8] = (Float_t) fNPadHits; // first padhit hits[9] = -1; // last pad hit - - // modifs perso - hits[10] = mom[3]; // hit momentum P - hits[11] = mom[0]; // Px/P - hits[12] = mom[1]; // Py/P - hits[13] = mom[2]; // Pz/P - // fin modifs perso + hits[10] = mom[3]; // hit momentum P + hits[11] = mom[0]; // Px + hits[12] = mom[1]; // Py + hits[13] = mom[2]; // Pz tof=gMC->TrackTime(); - hits[14] = tof; // Time of flight - // phi angle of incidence - tlength = 0; - eloss = 0; - eloss2 = 0; - xhit = pos[0]; - yhit = pos[1]; - zhit = pos[2]; + hits[14] = tof; // Time of flight + tlength = 0; + eloss = 0; + eloss2 = 0; + xhit = pos[0]; + yhit = pos[1]; + zhit = pos[2]; Chamber(idvol).ChargeCorrelationInit(); // Only if not trigger chamber - if(idvolGmtod(globalPos,localPos,1); - if(idvol0) MakePadHits(x0,y0,z0,eloss,tof,idvol); - hits[6]=tlength; - hits[7]=eloss2; + hits[6] = tlength; // track length + hits[7] = eloss2; // de/dx energy loss + if (fNPadHits > (Int_t)hits[8]) { - hits[8]= hits[8]+1; - hits[9]= (Float_t) fNPadHits; + hits[8] = hits[8]+1; + hits[9] = (Float_t) fNPadHits; } - +// +// new hit + new(lhits[fNhits++]) - AliMUONHit(fIshunt,gAlice->CurrentTrack(),vol,hits); + AliMUONHit(fIshunt, gAlice->CurrentTrack(), vol,hits); eloss = 0; // // Check additional signal generation conditions -- 2.43.0