Double_t Z() const{return fCenterV3.Z();}
TVector3 L2G(TVector3 x3) const{x3.Transform(fRot);x3+=fCenterV3;return x3;}
TVector3 G2L(TVector3 x3) const{x3-=fCenterV3;x3.Transform(fRot.Inverse()); return x3;}
+ inline TVector3 Global2Local(TVector3 x3, Bool_t isVector=kFALSE) const;
+ TVector3 Global2Local(TLorentzVector x4,Bool_t isVector=kFALSE) const{return Global2Local(x4.Vect(),isVector);}
TVector3 L2G(Double_t x,Double_t y,Double_t z) const{return L2G(TVector3(x,y,z));}
TVector3 G2L(TLorentzVector x4) const{return G2L(x4.Vect());}
Float_t G2Ly(TLorentzVector x4) const{TVector3 x3=G2L(x4.Vect()); return x3.Z();}
TVector3 G2L(Double_t x,Double_t y,Double_t z) const{return G2L(TVector3(x,y,z));}
Float_t G2Lx(Double_t x,Double_t y,Double_t z) const{TVector3 x3=G2L(x,y,z); return x3.X();}
Float_t G2Ly(Double_t x,Double_t y,Double_t z) const{TVector3 x3=G2L(x,y,z); return x3.Z();}
- TVector3 L2Gvector(TVector3 x3) const{x3.Transform(fRot);return x3;}
- TVector3 G2Lvector(TVector3 x3) const{x3.Transform(fRot.Inverse()); return x3;}
-// TLorentzVector L2G(TLorentzVector v4) const{v4.Transform(fRot.Inverse());v4+=fCenterV3;return v4;}???
void Print(Option_t *sOption)const;//virtual
void LocaltoGlobal(Float_t pos[3],Float_t Localpos[3]);//Transformation from local to global coordinates, chamber-dependant
fCenterV3.SetXYZ(x,y,z);
fX=x;fY=y;fZ=z;
}
+
+TVector3 AliRICHChamber::Global2Local(TVector3 x3,Bool_t isVector)const
+{
+ if(!isVector) x3-=fCenterV3;
+ x3.Transform(fRot.Inverse());
+ Double_t tmp=x3.Y(); x3.SetY(-x3.Z()); x3.SetZ(tmp);
+ return x3;
+}
#endif //AliRICHChamber_h
ClassImp(AliRICHParam)
+Float_t AliRICHParam::fgAngleRot=-60;
+
// RICH main parameters manipulator
//__________________________________________________________________________________________________
AliRICHParam::AliRICHParam():
fCurrentPadX(0),fCurrentPadY(0),fCurrentWire(0),
fSizeZ(0),
-fAngleRot(0),fAngleYZ(0),fAngleXY(0),
-fOffset(0),
fProximityGapThickness(0),
fQuartzLength(0),
fQuartzWidth(0),
fVoltage(0)
{//defines the default parameters
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*kcm+1.267*kcm); //1.267???????cm distance from IP to the center of module
+
ProximityGapThickness(0.4*kcm);
QuartzLength (133*kcm);
QuartzWidth (127.9*kcm);
#include <TObject.h>
#include "AliRICHConst.h"
+
+
class AliRICHParam :public TObject
{
public:
Float_t SizeX() const{return fSizeX;}
Float_t SizeY() const{return fSizeY;}
Float_t SizeZ() const{return fSizeZ;}
- 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*kD2r;}
- Float_t AngleXY() const{return fAngleXY*kD2r;}
- void AngleRot(Float_t angle) { fAngleRot=angle;}
- Float_t AngleRot() const{return fAngleRot*kD2r;}
- static Float_t GapThickness() {return 8.0;}
+ static Float_t Offset() {return 490+1.267;}
+ static Float_t AngleYZ() {return 19.5*TMath::DegToRad();}
+ static Float_t AngleXY() {return 20*TMath::DegToRad();}
+ static void AngleRot(Float_t angle) { fgAngleRot=angle;}
+ static Float_t AngleRot() {return fgAngleRot*kD2r;}
+ static Float_t GapThickness() {return 8.0;}
void ProximityGapThickness(Float_t a) { fProximityGapThickness=a;}
Float_t ProximityGapThickness() const{return fProximityGapThickness;}
void QuartzLength(Float_t a) { fQuartzLength=a;}
Int_t fCurrentWire; //???
Float_t fSizeX; Float_t fSizeY; Float_t fSizeZ; //chamber outer size, cm
- Float_t fAngleRot; //azimuthal rotation XY plane, deg
- Float_t fAngleYZ; //angle between chambers YZ plane, deg
- Float_t fAngleXY; //angle between chambers XY plane, deg
- Float_t fOffset; //chambers offset from IP, cm
+ static Float_t fgAngleRot; //azimuthal rotation XY plane, deg
Float_t fProximityGapThickness; //proximity gap thickness, cm
Float_t fQuartzLength; Float_t fQuartzWidth; //quartz window size, cm
Float_t fOuterFreonLength; Float_t fOuterFreonWidth; //freon box outer size, cm
Float_t glo[3],loc[3];
glo[0]=x4.X();glo[1]=x4.Y();glo[2]=x4.Z();
gMC->Gmtod(glo,loc,1);
- Info("","glo(%+8.3f,%+8.3f,%+8.3f) r=%7.2f theta=%7.2f phi=%7.2f",
+ Info("","glo(%+8.3f,%+8.3f,%+8.3f) r=%8.3f theta=%8.3f phi=%8.3f",
glo[0],glo[1],glo[2],x4.Rho(),x4.Theta()*kR2d,x4.Phi()*kR2d);
Info("","loc(%+8.3f,%+8.3f,%8.3f) by gMC->Gmtod()", loc[0],loc[1],loc[2]);
if(gMC->VolId("CSI ")==gMC->CurrentVolID(copy0)){
gMC->CurrentVolOffID(2,iChamber);
TVector3 x3=C(iChamber)->G2L(x4);
Info("","loc(%+8.3f,%+8.3f,%8.3f) by G2L", x3.X(),x3.Y(),x3.Z());
+ x3=C(iChamber)->Global2Local(x4);
+ Info("","loc(%+8.3f,%+8.3f,%8.3f) by Global2Local", x3.X(),x3.Y(),x3.Z());
}
Info("","end of current step\n");
}//AliRICHv0::StepManager()
-Int_t iRICH = 3;//0-1-3
+const static Int_t iRICH = 0;//0-1-3
+const static Bool_t IsRichUp=kTRUE;
+const static Int_t kEventsPerFile=50;
-enum EGenTypes {kGun1,kGun7,kPP7};
-
-static EGenTypes kGen=kGun1;
-static Int_t kEventsPerFile=50;
+enum EGenTypes {kGun0,kGun1,kGun7,kPP7};
+const static EGenTypes kGen=kGun0;
Int_t iPIPE = 0;//central before RICH
Int_t iITS = 0;
int n,pid,chamber;
double p;
Geant3(); File(); Decayer(); Field(); Other();
-
+
+
+ if(IsRichUp) AliRICHParam::AngleRot(0);
AliRICH *pRICH;
switch(iRICH){
case 0:
gRICH=new AliRICHv3("RICH","old parametrised RICH with rotation");
break;
}
-
switch(kGen){
case kPP7: Pythia7(pid=kPiPlus,p=4); break;
case kGun7: Gun7(pid=kPiPlus,p=4); break;
case kGun1: Gun1(n=1,pid=kPiPlus,p=4,chamber=4); break;
+ case kGun0: Gun1(n=1,pid=kNeutron,p=4,chamber=4); break;
default: Fatal("Config","No generator"); break;
}
::Info("kir","Stop.");
void Gun1(Int_t iNprim,Int_t iPID,Double_t p,Int_t iChamber)
{
- ::Info("kir-Gun1","%i primaries of %i PID with p=%f GeV",iNprim,iPID,p);
+ Double_t theta=gRICH->C(iChamber)->ThetaD();
+ Double_t phi =gRICH->C(iChamber)->PhiD();
+ theta-=2;
+ ::Info("kir-Gun1","%i primarie(s) of %i PID with p=%f GeV at (%f,%f)",iNprim,iPID,p,theta,phi);
AliGenFixed *pGen=new AliGenFixed(iNprim);
pGen->SetMomentum(p);
- pGen->SetPhiRange(gRICH->C(iChamber)->PhiD());
- pGen->SetThetaRange(gRICH->C(iChamber)->ThetaD()+2);
+ pGen->SetPhiRange(phi);
+ pGen->SetThetaRange(theta);
pGen->SetOrigin(0,0,0);
pGen->SetPart(iPID);
pGen->Init();