Move to gRandom
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 3 Dec 2008 09:36:18 +0000 (09:36 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 3 Dec 2008 09:36:18 +0000 (09:36 +0000)
TRD/MakeTRDFullMisAlignment.C
TRD/MakeTRDResMisAlignment.C

index 4e1748a..dd8ed5a 100644 (file)
@@ -85,7 +85,6 @@ void MakeTRDFullMisAlignment(){
   Double_t dx,dy,dz,rx,ry,rz;
 
   Int_t j=0;
-  TRandom *ran = new TRandom(4357);
   UShort_t volid;
   const char *symname;
 
@@ -95,9 +94,9 @@ void MakeTRDFullMisAlignment(){
     dx = AliMathBase::TruncatedGaus(0.0,smdx,cutSmdx); 
     dy = AliMathBase::TruncatedGaus(0.0,smdy,cutSmdy); 
     dz = AliMathBase::TruncatedGaus(0.0,smdz,cutSmdz); 
-    rx = ran->Rndm() * 2.0*smrx - smrx;
-    ry = ran->Rndm() * 2.0*smry - smry;
-    rz = ran->Rndm() * 2.0*smrz - smrz;
+    rx = gRandom->Rndm() * 2.0*smrx - smrx;
+    ry = gRandom->Rndm() * 2.0*smry - smry;
+    rz = gRandom->Rndm() * 2.0*smrz - smrz;
     if( (TString(gSystem->Getenv("REALSETUP")) == TString("kTRUE")) && !sActive[iSect] ) continue;
     new((*array)[j++]) AliAlignObjParams(sm_symname.Data(),0,dx,dy,dz,rx,ry,rz,kFALSE);
   }
@@ -123,9 +122,9 @@ void MakeTRDFullMisAlignment(){
         dx = AliMathBase::TruncatedGaus(0.0,chdx,cutChdx); 
         dy = AliMathBase::TruncatedGaus(0.0,chdy,cutChdy); 
         dz = AliMathBase::TruncatedGaus(0.0,chdz,cutChdz); 
-        rx = ran->Rndm() * 2.0*chrx - chrx;
-        ry = ran->Rndm() * 2.0*chry - chry;
-        rz = ran->Rndm() * 2.0*chrz - chrz;
+        rx = gRandom->Rndm() * 2.0*chrx - chrx;
+        ry = gRandom->Rndm() * 2.0*chry - chry;
+        rz = gRandom->Rndm() * 2.0*chrz - chrz;
         chId++;
         if ((iSect==13 || iSect==14 || iSect==15) && iCh==2) continue;
         volid = AliGeomManager::LayerToVolUID(iLayer,chId);
index d7a85ca..201edeb 100644 (file)
@@ -50,7 +50,6 @@ void MakeTRDResMisAlignment(){
   Double_t dx=0.,dy=0.,dz=0.,rx=0.,ry=0.,rz=0.;
 
   Int_t j=0;
-  TRandom *ran = new TRandom(4357);
   UShort_t volid;
   const char* symname; 
 
@@ -71,9 +70,9 @@ void MakeTRDResMisAlignment(){
         dx = AliMathBase::TruncatedGaus(0.0,chdx,cutChdx); 
         dy = AliMathBase::TruncatedGaus(0.0,chdy,cutChdy); 
         dz = AliMathBase::TruncatedGaus(0.0,chdz,cutChdz); 
-        rx = ran->Rndm() * 2.0*chrx - chrx;
-        ry = ran->Rndm() * 2.0*chry - chry;
-        rz = ran->Rndm() * 2.0*chrz - chrz;
+        rx = gRandom->Rndm() * 2.0*chrx - chrx;
+        ry = gRandom->Rndm() * 2.0*chry - chry;
+        rz = gRandom->Rndm() * 2.0*chrz - chrz;
         chId++;
         if ((iSect==13 || iSect==14 || iSect==15) && iCh==2) continue;
         volid = AliGeomManager::LayerToVolUID(iLayer,chId);