]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
geometry 12 + 24 && recent media properties
authoralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 25 Jan 2005 08:27:39 +0000 (08:27 +0000)
committeralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 25 Jan 2005 08:27:39 +0000 (08:27 +0000)
START/AliSTARTDigitizer.cxx
START/AliSTARTdigit.cxx
START/AliSTARThit.cxx
START/AliSTARThit.h
START/AliSTARTv1.cxx

index 66327acfa228b0048918a701516b461e179421ef..4c66a32656e7a2204520d5670dcaa2d5a76a9ad7 100644 (file)
@@ -66,8 +66,8 @@ AliSTARTDigitizer::AliSTARTDigitizer(AliRunDigitizer* manager)
   fHits = 0;
   fdigits = 0;
 
-  ftimeTDC = new TArrayI(24); 
-  fADC = new TArrayI(24); 
+  ftimeTDC = new TArrayI(36); 
+  fADC = new TArrayI(36); 
 
   TFile* file = TFile::Open("$ALICE_ROOT/START/PMTefficiency.root");
   fEff = (TH1F*) file->Get("hEff")->Clone();
@@ -125,12 +125,12 @@ void AliSTARTDigitizer::Exec(Option_t* /*option*/)
   //
   Int_t hit, nhits;
   Float_t meanTime;
-  Int_t countE[24];
+  Int_t countE[36];
   Int_t volume,pmt,tr,sumRight;
   Int_t  bestRightTDC,bestLeftTDC;
-  Float_t time[24]={24*0};
-  Float_t besttime[24]={24*0};
-  Float_t timeGaus[37]={24*0};
+  Float_t time[36]={36*0};
+  Float_t besttime[36]={36*0};
+  Float_t timeGaus[36]={36*0};
   Float_t channelWidth=25.; //ps
   
   AliSTARThit  *startHit;
@@ -152,7 +152,7 @@ void AliSTARTDigitizer::Exec(Option_t* /*option*/)
     Float_t besttimeleft=9999.;
     Float_t timeDiff;
     sumRight=0;
-    for (Int_t i0=0; i0<24; i0++)
+    for (Int_t i0=0; i0<36; i0++)
       {
        time[i0]=9999;  besttime[i0]=9999;      countE[i0]=0;
       }
@@ -188,15 +188,18 @@ void AliSTARTDigitizer::Exec(Option_t* /*option*/)
          }
          pmt=startHit->Pmt();
          Int_t numpmt=pmt-1;
-         Float_t e=startHit->Etot();
+         Double_t e=startHit->Etot();
+         //      cout<<"AliSTARTDigitizer::Exec >> e "<<e<<" time "<< startHit->Time()<<endl;
          volume = startHit->Volume();
-         if(RegisterPhotoE(e)) countE[numpmt]++;
-         besttime[numpmt] = startHit->Time();
-         if(besttime[numpmt]<time[numpmt])
-           {
-             time[numpmt]=besttime[numpmt];
-           }
          
+          if(e>0 && RegisterPhotoE(e)) {
+            countE[numpmt]++;
+            besttime[numpmt] = startHit->Time();
+            if(besttime[numpmt]<time[numpmt])
+              {
+                time[numpmt]=besttime[numpmt];
+              }
+          }
        } //hits loop
     } //track loop
     
@@ -206,7 +209,8 @@ void AliSTARTDigitizer::Exec(Option_t* /*option*/)
        timeGaus[ipmt]=gRandom->Gaus(time[ipmt],0.025);
        if(timeGaus[ipmt]<besttimeleft) besttimeleft=timeGaus[ipmt]; //timeleft
       }
-    for ( Int_t ipmt=12; ipmt<24; ipmt++)
+    //    for ( Int_t ipmt=12; ipmt<36; ipmt++)
+    for ( Int_t ipmt=12; ipmt<36; ipmt++)
       {
        timeGaus[ipmt]=gRandom->Gaus(time[ipmt],0.025);
        if(timeGaus[ipmt]<besttimeright)  besttimeright=timeGaus[ipmt]; //timeright
@@ -224,7 +228,7 @@ void AliSTARTDigitizer::Exec(Option_t* /*option*/)
     Float_t ds=(c*(besttimeright-besttimeleftR)-(350.-69.7))/2;
     AliDebug(2,Form(" timediff in ns %f  z= %f real point%f",timeDiff,timeDiff*c,ds));
 
+  
     // Time to TDC signal
     Int_t iTimeAv=Int_t (meanTime*1000/channelWidth); 
     // time  channel numbres 
@@ -235,7 +239,7 @@ void AliSTARTDigitizer::Exec(Option_t* /*option*/)
     
     //ADC features
   
-    for (Int_t i=0; i<24; i++)
+    for (Int_t i=0; i<36; i++)
       {
 
        //  fill TDC
@@ -261,13 +265,14 @@ void AliSTARTDigitizer::Exec(Option_t* /*option*/)
 
 
 //------------------------------------------------------------------------
-Bool_t AliSTARTDigitizer::RegisterPhotoE(Float_t e)
+Bool_t AliSTARTDigitizer::RegisterPhotoE(Double_t energy)
 {
 
   
   //  Float_t hc=197.326960*1.e6; //mev*nm
-  Float_t hc=1.973*1.e-6; //gev*nm
-  Float_t lambda=hc/e;
+  Double_t hc=1.973*1.e-6; //gev*nm
+  //  cout<<"AliSTARTDigitizer::RegisterPhotoE >> energy "<<energy<<endl;
+  Float_t lambda=hc/energy;
   Int_t bin=  fEff->GetXaxis()->FindBin(lambda);
   Float_t eff=fEff->GetBinContent(bin);
   Double_t  p = gRandom->Rndm();
index c2ef8c1d197699d9c9ce1f968303c3b659a3d742..b32a2453f6a9f0aaa4e69258f9e984132951a9ef 100644 (file)
@@ -43,8 +43,8 @@ ClassImp(AliSTARTdigit)
   fTimeBestLeft=9999;
   fSumADCRight=0;
 
-  fTime = new TArrayI(24);  
-  fADC  = new TArrayI(24);  
+  fTime = new TArrayI(36);  
+  fADC  = new TArrayI(36);  
 }
 //-----------------------------------
 AliSTARTdigit::~AliSTARTdigit() {
@@ -56,10 +56,10 @@ AliSTARTdigit::~AliSTARTdigit() {
 void AliSTARTdigit::SetTime (TArrayI &o)
 {
   ////////////////////////////////////////
-  fTime = new TArrayI(24);  
+  fTime = new TArrayI(36);  
 
   Int_t i;
-  for (i=0; i<24; i++)
+  for (i=0; i<36; i++)
     {
       Int_t buf=o.At(i);
       fTime->AddAt(buf,i);
@@ -70,7 +70,7 @@ void AliSTARTdigit::GetTime (TArrayI &o)
 {
   //
   Int_t i;
-  for (i=0; i<24; i++)
+  for (i=0; i<36; i++)
     {
       o[i]=fTime->At(i);
     }
@@ -80,7 +80,7 @@ void AliSTARTdigit::GetADC (TArrayI &o)
 {
   //
   Int_t i;
-  for (i=0; i<24; i++)
+  for (i=0; i<36; i++)
     {
       o[i]=fADC->At(i);
     }
@@ -89,10 +89,10 @@ void AliSTARTdigit::GetADC (TArrayI &o)
 void AliSTARTdigit::SetADC (TArrayI &o)
 {
   //
-  fADC  = new TArrayI(24);  
+  fADC  = new TArrayI(36);  
   Int_t i;
   //  Float_t fProcessKoef=1; // for pb 0.001
-  for (i=0; i<24; i++)
+  for (i=0; i<36; i++)
     {
       Int_t buf=(o.At(i));
       fADC->AddAt(buf,i);
index 534fe0014381b70d75d33fbaf38520bb2eccb1f5..092e4586f1fe85e477e2252400d2bd556660d5ab 100644 (file)
@@ -77,7 +77,7 @@ AliSTARThit::AliSTARThit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits):
    fX=hits[0];
    fY=hits[1];
    fZ=hits[2];
-   fEtot=hits[3];
+   fEtot=Double_t (hits[3]);
    fParticle=Int_t (hits[4]);
    fTime=hits[5];
 }
index 139ecf99da6827b9ff007df60cebee32b02b2e77..a9aec349b25527a1e7a0e2857451693e915d826f 100644 (file)
@@ -18,18 +18,18 @@ public:
   Int_t Volume() const {return fVolume;}
   Int_t Pmt() const {return fPmt;}
   Float_t Particle() const {return fParticle;} 
-  Float_t Etot() const {return fEtot;}
+  Double_t Etot() const {return fEtot;}
   Float_t Time() const {return fTime;}
 
 private:
   Int_t      fVolume;   //T0 arm mark
   Int_t      fPmt;      //PMT number in the arm  
   Int_t      fParticle; //Primary particle ID
-  Float_t    fEtot;     //Energy of primary particle at the entrance to radiator 
+  Double_t    fEtot;     //Energy of primary particle at the entrance to radiator 
   Float_t    fTime;     //Primary particle TOF 
  
   
-   ClassDef(AliSTARThit,1)  //Hits for detector START
+   ClassDef(AliSTARThit,2)  //Hits for detector START
 };
 
 
index 4ac1455ea5c751be75eb1633eccee29e6b86952b..2f6bb25c0983b404c15a88bc95e2a464b6d29f7f 100755 (executable)
@@ -87,13 +87,13 @@ void AliSTARTv1::CreateGeometry()
   Float_t pinstart[3]={0.,1.6,6.5};
   Float_t ppmt[3]={0.,1.5,3.5};
 
-  Float_t preg[3]={0.,0.875,0.005}; //dobavil bogdanov
+  Float_t preg[3]={0., 1.0, 0.005}; //photcathode dobavil bogdanov
 
   Float_t pdivider[3]={0.,1.2,1.75};
   Float_t pdiv2[3]={0.,1.2,1.25};
   Float_t pdiv1[3]={0.6,1.2,0.5};
-  //  Float_t ptop[3]={0.,1.3,1.5};
-  Float_t ptop[3]={0.,1.0,1.5};
+  //  Float_t ptop[3]={0.,1.0,1.5};
+  Float_t ptop[3]={0., 1.0, 1.5};
   Float_t pbot[3]={0.6,1.2,0.1};
   Float_t pglass[3]={1.2,1.3,2.};
   Float_t pcer[3]={0.9,1.1,0.09};
@@ -108,7 +108,7 @@ void AliSTARTv1::CreateGeometry()
   Float_t psupport1[3] = {4.51,4.6,4.0};//C kozhuh vnutri
   Float_t psupport2[3] = {9.4,9.5,4.0};// snaruzhi  C
   Float_t psupport3[3] = {4.51,9.5,0.05};//kryshki  C
-   Float_t psupport5[3] = {1.44,1.5,6.5}; // stakanchik dlai feu  C
+  Float_t psupport5[3] = {1.44,1.5,6.5}; // stakanchik dlai feu  C
   Float_t psupport6[3] = {0,1.5,0.05}; //kryshechka stakanchika  Al
   Float_t psupport7[3] = {1.5,1.6,0.6}; //kolechko snaruzhu stakanchika Al
   // Mother Volume katushka dlia krepezha vokrug truby k Absorbru
@@ -217,6 +217,7 @@ void AliSTARTv1::CreateGeometry()
        
 // first ring: 12 units of Scintillator+PMT+divider
   Float_t  theta  = (180 / TMath::Pi()) * TMath::ATan(6.5 / zdetRight);
+  printf(" theta %f", theta);
   Float_t angle  = 2 * TMath::Pi() / 12;
   Float_t phi[3];
     
@@ -238,12 +239,12 @@ void AliSTARTv1::CreateGeometry()
        z=-pstart[2]+pinstart[2]+0.2;
        gMC->Gspos ("0INS", is + 1, "0STR", x, y, z, idrotm[902 + is], "ONLY");
        gMC->Gspos ("0INS", is + 13, "0STL", x, y, z, 0, "ONLY");
-       /*      
-       x = 9 * TMath::Sin(angle/2+is * angle);
-       y = 9 * TMath::Cos(angle/2+is * angle);
+                       
+       x = 9. * TMath::Sin(angle/2+is * angle);
+       y = 9. * TMath::Cos(angle/2+is * angle);
 
        gMC->Gspos ("0INS", is + 25, "0STL", x, y, z, 0, "ONLY");
-       */      
+                       
       }        
    
       
@@ -528,31 +529,39 @@ void AliSTARTv1::CreateMaterials()
 
 // Definition Cherenkov parameters
    int i;
-   const Int_t kNbins=30;
+   //   const Int_t kNbins=30;
+   const Int_t kNbins=27;
    
-   Float_t aPckov[kNbins]; 
+   //  Float_t aPckov[kNbins]; 
    Float_t aRindexSiO2[kNbins], rindexAir[kNbins], efficAll[kNbins], absorAir[kNbins];
+       
+   // quartz 20mm
+   Float_t aAbsSiO2[kNbins]={28.3, 27.7, 27.3, 26.7, 26.4, 
+                            25.9, 25.3, 24.9, 24.5, 23.7, 23.2,
+                            22.8, 22.4, 21.8, 21.3, 22.8, 
+                            22.1, 21.7, 21.2, 20.5, 19.9, 
+                            19.3, 18.7, 18.0, 17.1, 16.3, 15.3   };
    
-   Float_t aAbsSiO2[kNbins]={//New values from A.DiMauro 28.10.03 total 31
-     34.4338, 30.5424, 30.2584, 31.4928, 31.7868, 17.8397, 9.3410, 6.4492, 6.1128, 5.8128,
-     5.5589,  5.2877,  5.0162,  4.7999,  4.5734,  4.2135, 3.7471, 2.6033, 1.5223, 0.9658,
-     0.4242,  0.2500,  0.1426,  0.0863,  0.0793,  0.0724, 0.0655, 0.0587, 0.0001, 0.0001};
-   
-
//  Float_t aAbsSiO2[kNbins]={30*2000.};
+   Float_t aPckov[kNbins]  ={4.02, 4.11, 4.19, 4.29, 4.38,
+                            4.48, 4.58, 4.69, 4.81, 4.93, 
+                            5.05, 5.19, 5.33, 5.48, 5.63,
+                            5.8,  5.97, 6.16, 6.36, 6.57, 
+                            6.8,  7.04, 7.3,  7.58, 7.89, 8.22, 8.57};  
+    
  //   Float_t aAbsSiO2[kNbins];
   for(i=0;i<kNbins;i++)
     {
-      aPckov[i]=(0.1*i+5.5)*1e-9;//Photons energy bins 5.5 eV - 8.5 eV step 0.1 eV   
+      //      aPckov[i]=(0.1*i+5.5)*1e-9;//Photons energy bins 5.5 eV - 8.5 eV step 0.1 eV   
+      aPckov[i]=aPckov[i]*1e-9;//Photons energy bins 4 eV - 8.5 eV step 0.1 eV   
       aRindexSiO2[i]=1.458; //refractive index for qwarts
       rindexAir[i]=1.;
       efficAll[i]=1.;
-      
+      //  aAbsSiO2[i]=28.5; //quartz 30mm
       absorAir[i]=1.e-5;
     }
  
    gMC->SetCerenkov (idtmed[kOpGlass], kNbins, aPckov, aAbsSiO2, efficAll, aRindexSiO2 );
-   gMC->SetCerenkov (idtmed[kOpAir], kNbins , aPckov, absorAir, efficAll, 
-rindexAir);
+   gMC->SetCerenkov (idtmed[kOpAir], kNbins , aPckov, absorAir, efficAll, rindexAir);
    if(fDebug) cout<<ClassName()<<": ++++++++++++++Medium set++++++++++"<<endl;
 
 }
@@ -626,11 +635,12 @@ void AliSTARTv1::StepManager()
          vol[1]=copy;
          gMC->CurrentVolOffID(3,copy1);
          vol[0]=copy1;
-         
          gMC->TrackPosition(pos);
          hits[0] = pos[0];
          hits[1] = pos[1];
          hits[2] = pos[2];
+         //      printf(" pmt %i ", vol[1]);
+         //  printf(" x %f y %f z %f \n", pos[0],pos[1],pos[2]);
          if(pos[2]<0) vol[0]=2;
          if(pos[2]>=0) vol[0]=1;
          
@@ -639,7 +649,7 @@ void AliSTARTv1::StepManager()
          Int_t iPart= gMC->TrackPid();
          Int_t partID=gMC->IdFromPDG(iPart);
          hits[4]=partID;
-         //     if (partID!=50) cout<<partID<<endl;
+         //    if (partID!=50) cout<<partID<<endl;
          Float_t ttime=gMC->TrackTime();
          hits[5]=ttime*1e9;
        }