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
//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
**************************************************************************/
#include "AliRICHChamber.h"
-#include "AliRICHConst.h" //for r2d
+#include "AliRICHConst.h" //for kR2d
#include "AliRICHParam.h"
#include <TRandom.h>
#include <TRotMatrix.h>
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;
}
//______________________________________________________________________________
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);}
#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
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);
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);
// 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);
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;}
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);
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()
//__________________________________________________________________________________________________