//__________________________________________________________________________________________________
Float_t AbsoCH4(Float_t x)
-{
-
- //KLOSCH,SCH4(9),WL(9),EM(9),ALENGTH(31)
- Float_t sch4[9] = {.12,.16,.23,.38,.86,2.8,7.9,28.,80.}; //MB X 10^22
- //Float_t wl[9] = {153.,152.,151.,150.,149.,148.,147.,146.,145};
- Float_t em[9] = {8.1,8.158,8.212,8.267,8.322,8.378,8.435,8.493,8.55};
- const Float_t kLosch=2.686763E19; // LOSCHMIDT NUMBER IN CM-3
- const Float_t kIgas1=100, kIgas2=0, kOxy=10., kWater=5., kPressure=750.,kTemperature=283.;
- Float_t pn=kPressure/760.;
- Float_t tn=kTemperature/273.16;
-
-
-// ------- METHANE CROSS SECTION -----------------
-// ASTROPH. J. 214, L47 (1978)
-
- Float_t sm=0;
- if (x<7.75){
- sm=.06e-22;
- }else if(x>=7.75 && x<=8.1){
- Float_t c0=-1.655279e-1;
- Float_t c1=6.307392e-2;
- Float_t c2=-8.011441e-3;
- Float_t c3=3.392126e-4;
- sm=(c0+c1*x+c2*x*x+c3*x*x*x)*1.e-18;
- }else if (x>8.1){
+{//Evaluate the absorbtion lenght of CH4
+ Float_t sch4[9] = {.12,.16,.23,.38,.86,2.8,7.9,28.,80.}; //MB X 10^22
+ Float_t em[9] = {8.1,8.158,8.212,8.267,8.322,8.378,8.435,8.493,8.55};
+ const Float_t kLoschmidt=2.686763e19; // LOSCHMIDT NUMBER IN CM-3
+ const Float_t kPressure=750.,kTemperature=283.;
+ const Float_t pn=kPressure/760.;
+ const Float_t tn=kTemperature/273.16;
+ const Float_t c0=-1.655279e-1;
+ const Float_t c1=6.307392e-2;
+ const Float_t c2=-8.011441e-3;
+ const Float_t c3=3.392126e-4;
+
+ Float_t crossSection=0;
+ if (x<7.75)
+ crossSection=.06e-22;
+ else if(x>=7.75 && x<=8.1){ //------ METHANE CROSS SECTION cm-2 ASTROPH. J. 214, L47 (1978)
+ crossSection=(c0+c1*x+c2*x*x+c3*x*x*x)*1.e-18;
+ }else if (x> 8.1){
Int_t j=0;
while (x<=em[j] || x>=em[j+1]){
j++;
Float_t a=(sch4[j+1]-sch4[j])/(em[j+1]-em[j]);
- sm=(sch4[j]+a*(x-em[j]))*1e-22;
+ crossSection=(sch4[j]+a*(x-em[j]))*1e-22;
}
- }//if
- Float_t dm=(kIgas1/100.)*(1.-((kOxy+kWater)/1.e6))*kLosch*pn/tn;
- return 1./sm/dm;
+ }//if
+
+ Float_t density=kLoschmidt*pn/tn; //CH4 molecular density 1/cm-3
+ return 1./(density*crossSection);
}//AbsoCH4()
//__________________________________________________________________________________________________
Float_t Fresnel(Float_t ene,Float_t pdoti, Bool_t pola)
r*cos(theta));
delete p;
-}//void PrintGeo()
-
-
-
+}//PrintGeo()
//__________________________________________________________________________________________________
-void TestGain()
+void TestResponse()
{
- AliRICHParam *pParam=new AliRICHParam;
- AliRICHResponse *pRes=new AliRICHResponse;
-
- TLegend *pLegend=new TLegend(0.6,0.3,0.85,0.5);
- TH1F *pH0=new TH1F("pH1","Gain",100,0,600);
- TH1F *pH10=new TH1F("pH10","Gain",100,0,600);
- TH1F *pH20=new TH1F("pH20","Gain",100,0,600);
- TH1F *pH30=new TH1F("pH30","Gain",100,0,600);
- TH1F *pHold=new TH1F("pHold","Mip Charge",100,0,2000);
- for(int i=0;i<1000;i++){
- pH0 ->Fill(pParam->Gain(0));
- pH10->Fill(pParam->Gain(10));
- pH20->Fill(pParam->Gain(20));
- pH30->Fill(pParam->Gain(30));
- pHold->Fill(pRes->IntPH(30));
+ TCanvas *pC=new TCanvas("c","Amplification test",900,800);
+ pC->Divide(1,2);
+ pC->cd(1);
+ TF1 *pF1=new TF1("f1","9e-6*pow(x,4)+2e-7*pow(x,3)-0.0316*pow(x,2)-3e-4*x+25.367",-70,70);
+ pF1->Draw();
+
+ pC->cd(2);
+
+ const Int_t nPoints=8;
+ THStack *pStack=new THStack("stack","photons");
+ TLegend *pLeg=new TLegend(0.6,0.2,0.9,0.5,"legend");
+ TH1F *apH[nPoints];
+
+ Double_t starty=AliRICHParam::DeadZone()/2;
+ Double_t deltay=AliRICHParam::SectorSizeY()/nPoints;
+
+ for(int i=0;i<nPoints;i++){
+ apH[i]=new TH1F(Form("h%i",i),"Qdc for Photon;QDC;Counts",1000,0,1000); apH[i]->SetLineColor(i);
+ pStack->Add(apH[i]);
+ pLeg->AddEntry(apH[i],Form("@(0,%5.2f->%5.2f)",starty+i*deltay,starty+i*deltay-AliRICHParam::SectorSizeY()/2));
}
- pH0->Draw();
- pH10->Draw("same");
- pH20->Draw("same");
- pH30->Draw("same");
- pHold->Draw("same");
- pLegend->AddEntry(pH0,"y=0");
- pLegend->AddEntry(pH10,"y=10");pH10->SetLineColor(kRed);
- pLegend->AddEntry(pH20,"y=20");pH20->SetLineColor(kBlue);
- pLegend->AddEntry(pH30,"y=30");pH30->SetLineColor(kGreen);
- pLegend->AddEntry(pHold,"res");pHold->SetLineColor(kMagenta);
- pLegend->Draw();
-}//void TestGain()
-//__________________________________________________________________________________________________
-void TestMipCharge()
-{
- AliRICHParam *pParam=new AliRICHParam;
- AliRICHResponse *pRes=new AliRICHResponse;
-
- TLegend *pLegend=new TLegend(0.6,0.3,0.85,0.5);
- TH1F *pH0= new TH1F("pH1", "Mip Charge",100,0,500);
- TH1F *pH10=new TH1F("pH10","Mip Charge",100,0,500);
- TH1F *pH20=new TH1F("pH20","Mip Charge",100,0,500);
- TH1F *pH30=new TH1F("pH30","Mip Charge",100,0,500);
- TH1F *pHold=new TH1F("pHold","Mip Charge",100,0,500);
- for(int i=0;i<1000;i++){
- pH0 ->Fill(pParam->TotalCharge(kPiPlus,0.5e-9,0));
- pH10->Fill(pParam->TotalCharge(kPiPlus,0.5e-9,10));
- pH20->Fill(pParam->TotalCharge(kPiPlus,0.5e-9,20));
- pH30->Fill(pParam->TotalCharge(kPiPlus,0.5e-9,30));
- pHold->Fill(pRes->IntPH(0.5e-9,-30));
+
+
+ TVector3 x3(0,0,0);
+ Int_t sector=10;
+// AliRICHParam::ResetWireSag();
+ for(Int_t i=0;i<10000;i++){//events loop
+ for(int j=0;j<nPoints;j++){
+ x3.SetY(starty-j*deltay);
+ apH[j]->Fill(AliRICHParam::Loc2TotQdc(x3,400e-9,500000,sector));
+ }
}
- pH0->Draw();
- pH10->Draw("same");
- pH20->Draw("same");
- pH30->Draw("same");
- pHold->Draw("same");
- pLegend->AddEntry(pH0,"y=0");
- pLegend->AddEntry(pH10,"y=10");pH10->SetLineColor(kRed);
- pLegend->AddEntry(pH20,"y=20");pH20->SetLineColor(kBlue);
- pLegend->AddEntry(pH30,"y=30");pH30->SetLineColor(kGreen);
- pLegend->AddEntry(pHold,"res");pHold->SetLineColor(kMagenta);
- pLegend->Draw();
-}//void TestGain()
+ pStack->Draw("nostack");
+ pLeg->Draw();
+}//TestResponse()
//__________________________________________________________________________________________________
void TestDigitsOLD()
{
TControlBar *pMenu = new TControlBar("vertical","RICH test");
pMenu->AddButton("Test segmentation", "TestSeg()", "Test AliRICHParam segmentation methods");
pMenu->AddButton("Test transform", "TestTransform()", "Test ALiRICHChamber methods");
- pMenu->AddButton("Test gain", "TestGain()", "Test AliRICHParam response methods");
- pMenu->AddButton("Test MIP charge", "TestMipCharge()", "Test AliRICHParam::TotalCharge() method");
+ pMenu->AddButton("Test response", "TestResponse()", "Test AliRICHParam response methods");
pMenu->AddButton("Test sdigits", "TestSD()", "Create test set of sdigits");
pMenu->AddButton("Test digits OLD", "TestDigitsOLD()", "Create test set of OLD digits");
pMenu->AddButton("Test clusters", "TestC()", "Create test set of clusters");