]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONv0.cxx
Global transformation correction (ivana)
[u/mrichter/AliRoot.git] / MUON / AliMUONv0.cxx
index 5c66c7dbab934e6968a04bb5bc452ee5bb793580..05468bf2165b228facdcef366832edc7e51b72b1 100644 (file)
@@ -24,7 +24,7 @@
 
 #include "AliConst.h" 
 #include "AliMUONChamber.h"
-#include "AliMUONChamberGeometry.h"
+#include "AliMUONGeometryModule.h"
 #include "AliMUONConstants.h"
 #include "AliMUONFactory.h"
 #include "AliMUONHit.h"
@@ -32,6 +32,7 @@
 #include "AliMagF.h"
 #include "AliRun.h"
 #include "AliMC.h"
+#include "AliLog.h"
 
 ClassImp(AliMUONv0)
  
@@ -111,23 +112,29 @@ void AliMUONv0::CreateGeometry()
 void AliMUONv0::CreateMaterials()
 {
 // Creates materials for coarse geometry
-    AliMaterial(15, "AIR$      ", 14.61,  7.3, .001205, 30423.24, 67500);
-    AliMaterial( 9, "ALUMINIUM$", 26.98, 13. , 2.7, 8.9, 37.2);
-
-    Float_t epsil  = .001; // Tracking precision, 
-    Float_t stemax = -1.;  // Maximum displacement for multiple scat 
-    Float_t tmaxfd = -20.; // Maximum angle due to field deflection 
-    Float_t deemax = -.3;  // Maximum fractional energy loss, DLS 
-    Float_t stmin  = -.8;
-    Int_t isxfld   = gAlice->Field()->Integ();
-    Float_t sxmgmx = gAlice->Field()->Max();
-
-    //
-    //    Air 
-    AliMedium(1, "AIR_CH_US         ", 15, 1, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
-    AliMedium(4, "ALU_CH_US         ",  9, 0, isxfld, sxmgmx, tmaxfd, fMaxStepAlu, 
+// Air
+  Float_t aAir[4]={12.0107,14.0067,15.9994,39.948};
+  Float_t zAir[4]={6.,7.,8.,18.};
+  Float_t wAir[4]={0.000124,0.755267,0.231781,0.012827};
+  Float_t dAir = 1.20479E-3;
+  AliMixture(15, "AIR$      ", aAir,  zAir, dAir,4, wAir);
+  //  AliMaterial(15, "AIR$      ", 14.61,  7.3, .001205, 30423.24, 67500);
+  AliMaterial( 9, "ALUMINIUM$", 26.98, 13. , 2.7, 8.9, 37.2);
+
+  Float_t epsil  = .001; // Tracking precision, 
+  Float_t stemax = -1.;  // Maximum displacement for multiple scat 
+  Float_t tmaxfd = -20.; // Maximum angle due to field deflection 
+  Float_t deemax = -.3;  // Maximum fractional energy loss, DLS 
+  Float_t stmin  = -.8;
+  Int_t isxfld   = gAlice->Field()->Integ();
+  Float_t sxmgmx = gAlice->Field()->Max();
+  
+  //
+  //    Air 
+  AliMedium(1, "AIR_CH_US         ", 15, 1, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
+  AliMedium(4, "ALU_CH_US         ",  9, 0, isxfld, sxmgmx, tmaxfd, fMaxStepAlu, 
            fMaxDestepAlu, epsil, stmin);
-
+  
 }
 
 void AliMUONv0::Init()
@@ -136,7 +143,7 @@ void AliMUONv0::Init()
    // Initialize Tracking Chambers
    //
     char vName[8];
-    printf("\n\n\n Start Init for version 0 - CPC chamber type\n\n\n");
+    AliInfo("\n\n\n Start Init for version 0 - CPC chamber type\n\n\n");
     for (Int_t i=0; i<AliMUONConstants::NCh(); i++) {
 // Initialise chamber
        ((AliMUONChamber*) (*fChambers)[i])->Init();
@@ -154,72 +161,6 @@ void AliMUONv0::Init()
     }
 }
 
-void AliMUONv0::StepManager()
-{
-//
-// Step manager for hit density simulations
-  Int_t          copy, id;
-  static Int_t   idvol;
-  static Int_t   vol[2];
-  Int_t          ipart;
-  TLorentzVector pos;
-  TLorentzVector mom;
-  Float_t        theta,phi;
-  
-  //  modifs perso
-  static Float_t hits[15];
-
-  TClonesArray &lhits = *fHits;
-  //
-  // Only gas gap inside chamber
-  // Tag chambers and record hits when track enters 
-  idvol=-1;
-  id=gMC->CurrentVolID(copy);
-  
-    for (Int_t i=1; i<=AliMUONConstants::NCh(); i++) {
-      //if(id==((AliMUONChamber*)(*fChambers)[i-1])->GetGid()){ 
-      if ( ((AliMUONChamber*)(*fChambers)[i-1])->IsSensId(id) ) {
-         vol[0]=i; 
-         idvol=i-1;
-      }
-    }
-    if (idvol == -1) return;
-  //
-  // Get current particle id (ipart), track position (pos)  and momentum (mom) 
-  gMC->TrackPosition(pos);
-  gMC->TrackMomentum(mom);
-
-  ipart  = gMC->TrackPid();
-  //
-  // record hits when track enters ...
-  if( !(gMC->TrackCharge()) ) return; 
-  if( gMC->IsTrackEntering()) {
-//      printf("\n Particle entering %f %f %f", pos[0], pos[1], pos[2] );
-      
-      Double_t tc = mom[0]*mom[0]+mom[1]*mom[1];
-      Double_t rt = TMath::Sqrt(tc);
-      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];                     // X-position for hit
-      hits[2] = pos[1];                     // Y-position for hit
-      hits[3] = pos[2];                     // Z-position for hit
-      hits[4] = theta;                      // theta angle of incidence
-      hits[5] = phi;                        // phi angle of incidence 
-      hits[8] = -1;                         // first padhit
-      hits[9] = -1;                         // last pad hit
-      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->GetMCApp()->GetCurrentTrackNumber(),vol,hits);
-
-  }
-//  if( gMC->IsTrackExiting()) gMC->StopTrack(); 
-}
-