]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Properly initialise class and respect coding conventiosn
authoralibrary <alibrary@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 19 Sep 2003 16:08:11 +0000 (16:08 +0000)
committeralibrary <alibrary@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 19 Sep 2003 16:08:11 +0000 (16:08 +0000)
RICH/AliRICH.cxx
RICH/AliRICHChamber.cxx
RICH/AliRICHChamber.h
RICH/AliRICHConst.h
RICH/AliRICHDisplay.cxx
RICH/AliRICHParam.cxx
RICH/AliRICHParam.h
RICH/AliRICHPoints.cxx
RICH/AliRICHv0.cxx

index d9a31a076125d83c75896875a9d72c179e5585a3..702b9879c0710cf695a14dc9fd9ba24c41b5b385 100644 (file)
@@ -1128,7 +1128,7 @@ void AliRICH::CreateGeometry()
   Float_t par[3];
     
 //External aluminium box 
-  par[0]=68.8*cm;par[1]=13*cm;par[2]=70.86*cm;//Original Settings
+  par[0]=68.8*kcm;par[1]=13*kcm;par[2]=70.86*kcm;//Original Settings
   gMC->Gsvolu("RICH", "BOX ", idtmed[1009], par, 3);
 //Air 
   par[0]=66.3;   par[1] = 13; par[2] = 68.35; //Original Settings
@@ -1360,7 +1360,7 @@ void AliRICH::GenerateFeedbacks(Float_t eloss)
 //Determine number of feedback photons
   TLorentzVector x4;
   gMC->TrackPosition(x4);//This sould return the current track position
-  Float_t charge=Param()->TotalCharge(gMC->TrackPid(),eloss,5*cm);//??? Totsl Charge
+  Float_t charge=Param()->TotalCharge(gMC->TrackPid(),eloss,5*kcm);//??? Totsl Charge
   Int_t iNphotons=gMC->GetRandom()->Poisson(Param()->AlphaFeedback()*charge);    
   Info("GenerateFeedbacks","N photons=%i",iNphotons);
 //Generate photons
index 181cee75c18cb73e9936bae947cff1faea1792f0..b33671662ab6514284fd50b7a5e168bf1b7921fa 100644 (file)
@@ -14,7 +14,7 @@
  **************************************************************************/
 
 #include "AliRICHChamber.h"
-#include "AliRICHConst.h" //for r2d
+#include "AliRICHConst.h" //for kR2d
 #include "AliRICHParam.h"
 #include <TRandom.h>
 #include <TRotMatrix.h>
@@ -79,9 +79,9 @@ AliRICHChamber::AliRICHChamber(Int_t iModuleN,AliRICHParam *pParam)
       Fatal("named ctor","Wrong chamber number %i, check muster class ctor",iModuleN);
   }//switch(iModuleN)
   RotateZ(pParam->AngleRot());//apply common rotation  
-  fpRotMatrix=new TRotMatrix("rot"+fName,"rot"+fName, Rot().ThetaX()*r2d, Rot().PhiX()*r2d,
-                                                      Rot().ThetaY()*r2d, Rot().PhiY()*r2d,
-                                                      Rot().ThetaZ()*r2d, Rot().PhiZ()*r2d);
+  fpRotMatrix=new TRotMatrix("rot"+fName,"rot"+fName, Rot().ThetaX()*kR2d, Rot().PhiX()*kR2d,
+                                                      Rot().ThetaY()*kR2d, Rot().PhiY()*kR2d,
+                                                      Rot().ThetaZ()*kR2d, Rot().PhiZ()*kR2d);
   fpParam=pParam;
 }
 //______________________________________________________________________________
index 5ff645435d994130f540eb824f446ed3dbcb12c7..45ed2ebe05ec1a956192c78d1f9c6d10750d2e46 100644 (file)
@@ -38,14 +38,14 @@ public:
   const char* RotMatrixName()      const{return "rot"+fName;}
   TRotation   Rot()                     {return fRot;}
   Double_t    Rho()                const{return fCenterV3.Mag();} 
-  Double_t    ThetaD()             const{return fCenterV3.Theta()*r2d;}    
-  Double_t    PhiD()               const{return fCenterV3.Phi()*r2d;}    
-  Double_t    ThetaXd()            const{return fRot.ThetaX()*r2d;}    
-  Double_t    PhiXd()              const{return fRot.PhiX()*r2d;}    
-  Double_t    ThetaYd()            const{return fRot.ThetaY()*r2d;}    
-  Double_t    PhiYd()              const{return fRot.PhiY()*r2d;}    
-  Double_t    ThetaZd()            const{return fRot.ThetaZ()*r2d;}    
-  Double_t    PhiZd()              const{return fRot.PhiZ()*r2d;}    
+  Double_t    ThetaD()             const{return fCenterV3.Theta()*kR2d;}    
+  Double_t    PhiD()               const{return fCenterV3.Phi()*kR2d;}    
+  Double_t    ThetaXd()            const{return fRot.ThetaX()*kR2d;}    
+  Double_t    PhiXd()              const{return fRot.PhiX()*kR2d;}    
+  Double_t    ThetaYd()            const{return fRot.ThetaY()*kR2d;}    
+  Double_t    PhiYd()              const{return fRot.PhiY()*kR2d;}    
+  Double_t    ThetaZd()            const{return fRot.ThetaZ()*kR2d;}    
+  Double_t    PhiZd()              const{return fRot.PhiZ()*kR2d;}    
   void        RotateX(Double_t a)       {fRot.RotateX(a);fCenterV3.RotateX(a);}
   void        RotateY(Double_t a)       {fRot.RotateY(a);fCenterV3.RotateY(a);}
   void        RotateZ(Double_t a)       {fRot.RotateZ(a);fCenterV3.RotateZ(a);}
index c0aa862c8335c195f398b4e1f169df5786adfb23..307a7b3a12d0caa82e2feba20fa2404dcb77e7d3 100644 (file)
@@ -1,22 +1,22 @@
 #ifndef AliRICHConst_h
 #define AliRICHConst_h
 #include <TMath.h>
-const Double_t d2r=TMath::Pi()/180;
-const Double_t r2d=57.2957795130823229;
-const Double_t deg=TMath::Pi()/180;
-const Double_t rad=1;
-const Double_t cm=1;
-const Double_t mm=0.1;
-const Double_t m=100;
-const Double_t nm=1e-7;
-const Double_t fm=1e-13;
-const Double_t fermi=1e-13;
-const Int_t    kBad=-101;        //useful const to mark initial (uninitalised) values
+static const Double_t kD2r=TMath::Pi()/180;
+static const Double_t kR2d=57.2957795130823229;
+static const Double_t kDeg=TMath::Pi()/180;
+static const Double_t kRad=1;
+static const Double_t kcm=1;
+static const Double_t kmm=0.1;
+static const Double_t km=100;
+static const Double_t knm=1e-7;
+static const Double_t kfm=1e-13;
+static const Double_t kfermi=1e-13;
+static const Int_t    kBad=-101;        //useful static const to mark initial (uninitalised) values
 
 
-const int kNCH=7;                //number of RICH chambers 
-const Float_t adc_satm  = 4096;  //dynamic range (10 bits)
-const Int_t kMaxNeighbours = 24; //max number of neighbours
-const Int_t kCerenkov=50000050;  //??? go to something more general like TPDGCode
-const Int_t kFeedback=50000051;  //??? go to something more general like TPDGCode
+static const int kNCH=7;                //number of RICH chambers 
+static const Float_t kadc_satm  = 4096;  //dynamic range (10 bits)
+static const Int_t kMaxNeighbours = 24; //max number of neighbours
+static const Int_t kCerenkov=50000050;  //??? go to something more general like TPDGCode
+static const Int_t kFeedback=50000051;  //??? go to something more general like TPDGCode
 #endif
index c29de86862bbed6f1405298edd938a063e45df9a..eff774d3a7eb27d4e9cbff58c077408a16a65669 100644 (file)
@@ -417,7 +417,7 @@ void AliRICHDisplay::DisplayColorScale()
        ylow = y1 + hs*(Float_t(i));
        yup  = y1 + hs*(Float_t(i+1));
        color = 701+i;
-       Double_t logscale=Double_t(i+1)*(TMath::Log(adc_satm)/22);
+       Double_t logscale=Double_t(i+1)*(TMath::Log(kadc_satm)/22);
        Int_t scale=(Int_t)TMath::Exp(logscale);
        sprintf(label,"%d",scale);
        box = new TBox(xlow, ylow, xup, yup);
@@ -971,7 +971,7 @@ void AliRICHDisplay::LoadDigits()
           fPoints->AddAt(points,counter);
           counter++;
           Int_t charge=mdig->Signal();
-          Int_t index=Int_t(TMath::Log(charge)/(TMath::Log(adc_satm)/22));
+          Int_t index=Int_t(TMath::Log(charge)/(TMath::Log(kadc_satm)/22));
           Int_t color=701+index;
           if (color>722) color=722;
           points->SetMarkerColor(color);
index ab46189ab5e2a7972ac5e51598ee3f163f3ef71e..f6ee39d3aeb3be6b0f4f7c999afb30260a54e6b4 100644 (file)
@@ -7,28 +7,73 @@ ClassImp(AliRICHParam)
 
 // RICH main parameters manipulator
 //__________________________________________________________________________________________________
-AliRICHParam::AliRICHParam()
+AliRICHParam::AliRICHParam():
+fNpadX(0),
+fNpadY(0),
+fDeadZone(0),
+fPadSizeX(0),
+fPadSizeY(0),
+fSectorSizeX(0),
+fSectorSizeY(0),
+fWirePitch(0),
+fCurrentPadX(0),
+fCurrentPadY(0),
+fCurrentWire(0),
+fSizeZ(0),
+fAngleRot(0),
+fAngleYZ(0),
+fAngleXY(0),
+fOffset(0),
+fGapThickness(0),
+fProximityGapThickness(0),
+fQuartzLength(0),
+fQuartzWidth(0),
+fQuartzThickness(0),
+fOuterFreonLength(0),
+fOuterFreonWidth(0),
+fInnerFreonLength(0),
+fInnerFreonWidth(0),
+fFreonThickness(0),
+fRadiatorToPads(0),
+fPcSizeX(0),
+fPcSizeY(0),
+fChargeSlope(0),
+fChargeSpreadX(0),
+fChargeSpreadY(0),
+fSigmaIntegration(0),
+fAlphaFeedback(0),
+fEIonisation(0),
+fMaxAdc(0),
+fSqrtKx3(0),
+fKx2(0),
+fKx4(0),
+fSqrtKy3(0),
+fKy2(0),
+fKy4(0),
+fPitch(0),
+fWireSag(0),
+fVoltage(0)
 {//defines the default parameters
   Segmentation         (144,160);           //nx,ny  for the whole chamber
-  DeadZone             (3*cm);              //spacer between PC planes
-  PadSize              (8.4*mm,8.0*mm);     
+  DeadZone             (3*kcm);              //spacer between PC planes
+  PadSize              (8.4*kmm,8.0*kmm);     
   fWirePitch=PadSizeX()/2;
   
-  Size                 (132.6*cm,26*cm,136.7*cm);  //full length, not GEANT half notation
+  Size                 (132.6*kcm,26*kcm,136.7*kcm);  //full length, not GEANT half notation
   AngleRot             (60);                       //rotation of the whole RICH around Z, deg
   Angles               (20,19.5);                  //XY angle, YZ angle  deg  
-  Offset               (490*cm+1.267*cm);          //1.267???????cm distance from IP to the center of module 
-  GapThickness         (8*cm);              
-  ProximityGapThickness(0.4*cm);            
-  QuartzLength         (133*cm);            
-  QuartzWidth          (127.9*cm);          
-  QuartzThickness      (0.5*cm);            
-  OuterFreonLength     (133*cm);            
-  OuterFreonWidth      (41.3*cm);           
-  InnerFreonLength     (133*cm);            
-  InnerFreonWidth      (41.3*cm);           
-  FreonThickness       (1.5*cm);            
-  RadiatorToPads       (80*mm);                 
+  Offset               (490*kcm+1.267*kcm);          //1.267???????cm distance from IP to the center of module 
+  GapThickness         (8*kcm);              
+  ProximityGapThickness(0.4*kcm);            
+  QuartzLength         (133*kcm);            
+  QuartzWidth          (127.9*kcm);          
+  QuartzThickness      (0.5*kcm);            
+  OuterFreonLength     (133*kcm);            
+  OuterFreonWidth      (41.3*kcm);           
+  InnerFreonLength     (133*kcm);            
+  InnerFreonWidth      (41.3*kcm);           
+  FreonThickness       (1.5*kcm);            
+  RadiatorToPads       (80*kmm);                 
   
   ChargeSlope(27.);
   ChargeSpreadX(0.18);ChargeSpreadY(0.18);
index 1e4bb4c45600e248c428afadb17670862e216658..a841ff68dd1fbd9304f1de96b77003094bd9a84d 100644 (file)
@@ -41,10 +41,10 @@ public:
   void    Offset(Float_t offset)             {       fOffset=offset;}  
   Float_t Offset()                      const{return fOffset;}  
   void    Angles(Float_t xy,Float_t yz)      {       fAngleXY=xy;fAngleYZ=yz;} 
-  Float_t AngleYZ()                     const{return fAngleYZ*d2r;} 
-  Float_t AngleXY()                     const{return fAngleXY*d2r;} 
+  Float_t AngleYZ()                     const{return fAngleYZ*kD2r;} 
+  Float_t AngleXY()                     const{return fAngleXY*kD2r;} 
   void    AngleRot(Float_t angle)            {       fAngleRot=angle;}
-  Float_t AngleRot()                    const{return fAngleRot*d2r;}                
+  Float_t AngleRot()                    const{return fAngleRot*kD2r;}                
   void    GapThickness(Float_t a)            {       fGapThickness=a;}    
   Float_t GapThickness()                const{return fGapThickness;}      
   void    ProximityGapThickness(Float_t a)   {       fProximityGapThickness=a;}
index ca75b6ee5cb92193790b9cce6240e9a27e512ed4..d902b392ac03cc5ec417f46350ea21e95abe9cac 100644 (file)
@@ -217,7 +217,7 @@ void AliRICHPoints::ShowRing(Int_t highlight) {
       printf("Digit %d from particle %d belongs to ring %d \n", digit, fTrackIndex, mdig->Track(0));
 
       Int_t charge=mdig->Signal();
-      Int_t index=Int_t(TMath::Log(charge)/(TMath::Log(adc_satm)/22));
+      Int_t index=Int_t(TMath::Log(charge)/(TMath::Log(kadc_satm)/22));
       Int_t color=701+index;
       if (color>722) color=722;
       points->SetMarkerColor(color);
index be2d8442774e9840fc70943cdd34b2e896973409..d71fd2921aa029045d4c62597b8b81f09030ed07 100644 (file)
@@ -71,6 +71,6 @@ void AliRICHv0::StepManager()
   TLorentzVector x4;
   gMC->TrackPosition(x4);
   Info("StepManager","x=%f y=%f z=%f r=%f theta=%f phi=%f\n",
-                      x4.X(),x4.Y(),x4.Z(),x4.Rho(),x4.Theta()*r2d,x4.Phi()*r2d);  
+                      x4.X(),x4.Y(),x4.Z(),x4.Rho(),x4.Theta()*kR2d,x4.Phi()*kR2d);  
 }//AliRICHv0::StepManager()
 //__________________________________________________________________________________________________