Updated to use its own rec. point object.
authorjbarbosa <jbarbosa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 1 Nov 2000 15:37:18 +0000 (15:37 +0000)
committerjbarbosa <jbarbosa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 1 Nov 2000 15:37:18 +0000 (15:37 +0000)
RICH/AliRICHDetect.cxx
RICH/AliRICHPatRec.cxx

index 8836c99ecfd5cf6027790940ec2cc9aee43c34c3..b8e675e9f641d5e02313e5785ce9ff31b2a16c4a 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
   $Log$
+  Revision 1.6  2000/10/02 21:28:12  fca
+  Removal of useless dependecies via forward declarations
+
   Revision 1.5  2000/06/30 16:30:28  dibari
   Disabled writing to rechits.
 
@@ -124,8 +127,9 @@ void AliRICHDetect::Detect()
   
   //printf("Area de uma elipse com teta 0 e Omega 45:%f",Area(0,45));
     
+  Int_t track;
        
-  for (Int_t track=0; track<ntracks;track++) {
+  for (track=0; track<ntracks;track++) {
     gAlice->ResetHits();
     gAlice->TreeH()->GetEvent(track);
     TClonesArray *pHits  = pRICH->Hits();
@@ -317,7 +321,8 @@ void AliRICHDetect::Detect()
     //printf ("track %d, theta %f, phi %f, omega %f\n\n\n",track,rechit[0],rechit[1],rechit[2]);
     
     // fill rechits
-    //pRICH->AddRecHit(nch-1,rechit);
+    pRICH->AddRecHit3D(nch-1,rechit);
+    printf("Chamber:%d",nch);
   }                    
   //printf("\n\n\n\n");
   gAlice->TreeR()->Fill();
@@ -325,12 +330,12 @@ void AliRICHDetect::Detect()
   //Stat_t ndig=TR->GetEntries();
   TClonesArray *fRec;
   for (i=0;i<kNCH;i++) {
-    fRec=pRICH->RecHitsAddress(i);
+    fRec=pRICH->RecHitsAddress3D(i);
     int ndig=fRec->GetEntriesFast();
     printf ("Chamber %d, rings %d\n",i,ndig);
   }
   //printf("Number of rec. hits: %d",ndig);
-  pRICH->ResetRecHits();
+  pRICH->ResetRecHits3D();
   //char hname[30];
   //sprintf(hname,"TreeR%d",track);
   //gAlice->TreeR()->Write(hname);
index 633595e7e6130df7f2ffbd415ec702167ef2beba..45c060057a9d5b5db4695bd4aaf706ed60a65c81 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
   $Log$
+  Revision 1.7  2000/10/03 21:44:09  morsch
+  Use AliSegmentation and AliHit abstract base classes.
+
   Revision 1.6  2000/10/02 21:28:12  fca
   Removal of useless dependecies via forward declarations
 
@@ -40,7 +43,7 @@
 #include "AliRICHPadHit.h"
 #include "AliRICHDigit.h"
 #include "AliRICHRawCluster.h"
-#include "AliRICHRecHit.h"
+#include "AliRICHRecHit1D.h"
 #include "AliRun.h"
 #include "AliDetector.h"
 #include "AliRICH.h"
@@ -168,18 +171,18 @@ void AliRICHPatRec::PatRec()
 
     //printf("Center coordinates:%f %f\n",rechit[3],rechit[4]);
     
-    pRICH->AddRecHit(ich,rechit,fEtaPhotons,padsUsedX,padsUsedY);
+    pRICH->AddRecHit1D(ich,rechit,fEtaPhotons,padsUsedX,padsUsedY);
     
   }    
 
   gAlice->TreeR()->Fill();
   TClonesArray *fRec;
   for (i=0;i<kNCH;i++) {
-    fRec=pRICH->RecHitsAddress(i);
+    fRec=pRICH->RecHitsAddress1D(i);
     int ndig=fRec->GetEntriesFast();
     printf ("Chamber %d, rings %d\n",i,ndig);
   }
-  pRICH->ResetRecHits();
+  pRICH->ResetRecHits1D();
   
 }     
 
@@ -199,7 +202,7 @@ Int_t AliRICHPatRec::TrackParam(Int_t itr, Int_t &ich)
   Float_t part;
   Float_t pX, pY, pZ;
 
-  printf("Calling TrackParam\n");
+  //printf("Calling TrackParam\n");
 
     gAlice->ResetHits();
     TTree *treeH = gAlice->TreeH();
@@ -419,7 +422,10 @@ void AliRICHPatRec::BackgroundEstimation()
     funBkg = tan(etaStepAvg)*TMath::Power((1.+TMath::Power(tan(etaStepAvg),2)),
                                  5.52)-7.803 + 22.02*tan(etaStepAvg);
     */
-    thetaSig = asin(nfreon/ngas*sin(etaStepAvg));
+    
+    //printf("etaStepAvg: %f, etaStepMax: %f, etaStepMin: %f", etaStepAvg,etaStepMax,etaStepMin);
+
+    thetaSig = TMath::ASin(nfreon/ngas*TMath::Sin(etaStepAvg));
     funBkg = tan(thetaSig)*(1.+TMath::Power(tan(thetaSig),2))*nfreon
        /ngas*cos(etaStepAvg)/cos(thetaSig);
     areaBkg += stepEta*funBkg;