]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Some bugs fixed
authoralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 20 Sep 2005 06:08:09 +0000 (06:08 +0000)
committeralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 20 Sep 2005 06:08:09 +0000 (06:08 +0000)
FMD/AliFMDMap.h
FMD/AliFMDMultNaiive.cxx
FMD/AliFMDMultPoisson.cxx

index 91fb4e610549b7a793a689c78dca9f4399abd576..042c897d7b076b4d325b0b28e387843ead5aee9f 100644 (file)
@@ -19,7 +19,7 @@ public:
   enum { 
     kMaxDetectors = 3, 
     kMaxRings     = 2, 
-    kMaxSectors   = 20, 
+    kMaxSectors   = 40, 
     kMaxStrips    = 512
   };
   AliFMDMap(size_t maxDet = kMaxDetectors, 
index 0d6496d7a4b133f6a7237675aa9748c7ae73eddf..f1357b9630d60d3864b3ad991d51f9b3871b0cf5 100644 (file)
@@ -141,7 +141,7 @@ AliFMDMultNaiive::Adc2Energy(AliFMDDigit* /* digit */,
   // 
   // is constant and the same for all strips. 
   Double_t theta = 2 * TMath::Tan(TMath::Exp(-eta));
-  Double_t edep  = TMath::Cos(theta) * fGain * count;
+  Double_t edep  = TMath::Abs(TMath::Cos(theta)) * fGain * count;
   return edep;
 }
 
index dcefd8f992316ddd1cd4a45bb2a7715a7454b06a..fe11a98f29e0fccc2c6c5500ad75c7240e10e5a1 100644 (file)
@@ -144,8 +144,8 @@ AliFMDMultPoisson::PostEvent()
        UShort_t minSector = UShort_t(minPhi / 360) * r->GetNSectors();
        UShort_t maxSector = UShort_t(maxPhi / 360) * r->GetNSectors();
        
-       AliDebug(10, Form(" Now in phi range %f, %f (sectors %d,%d)",
-                         minPhi, maxPhi, minSector, maxSector));
+       //      AliDebug(10, Form(" Now in phi range %f, %f (sectors %d,%d)",
+       //                minPhi, maxPhi, minSector, maxSector));
        // Loop over relevant eta values 
        for (Int_t e = nEta; e >= 0; --e) {
          Float_t  maxEta   = etaIn  - sign * e * fDeltaEta;
@@ -156,14 +156,17 @@ AliFMDMultPoisson::PostEvent()
          Float_t  theta2   = 2 * TMath::ATan(TMath::Exp(-maxEta));
          Float_t  minR     = TMath::Abs(realZ * TMath::Tan(theta2));
          Float_t  maxR     = TMath::Abs(realZ * TMath::Tan(theta1));
-         UShort_t minStrip = UShort_t((etaIn - maxEta) * stripEta + 0.5);
-         UShort_t maxStrip = UShort_t((etaIn - minEta) * stripEta + 0.5);
+         //UShort_t minStrip = UShort_t((etaIn - maxEta) * stripEta + 0.5);
+         // UShort_t maxStrip = UShort_t((etaIn - minEta) * stripEta + 0.5);
+
+         UShort_t minStrip = UShort_t(r->GetNStrips() -(etaIn - minEta) * stripEta + 0.5);
+         UShort_t maxStrip = UShort_t(r->GetNStrips() -(etaIn - maxEta) * stripEta + 0.5);
 
          AliDebug(10, Form("  Now in eta range %f, %f (strips %d, %d)\n"
-                           "    [radii %f, %f, thetas %f, %f, sign %d]", 
-                           minEta, maxEta, minStrip, maxStrip, 
+                           "    [radii %f, %f, thetas %f, %f, sign %d]", 
+                           minEta, maxEta, minStrip, maxStrip,
                            minR, maxR, theta1, theta2, sign));
-
+         
          // Count number of empty strips
          Int_t   emptyStrips = 0;
          for (Int_t sector = minSector; sector < maxSector; sector++) 
@@ -173,11 +176,7 @@ AliFMDMultPoisson::PostEvent()
          
          // The total number of strips 
          Float_t nTotal = (maxSector - minSector) * (maxStrip - minStrip);
-         
          // Log ratio of empty to total number of strips 
-         AliDebug(10, Form("Lambda= %d / %d = %f", 
-                           emptyStrips, nTotal, 
-                           Float_t(emptyStrips) / nTotal));
          
          Double_t lambda = (emptyStrips > 0 ? 
                             - TMath::Log(Double_t(emptyStrips) / nTotal) :
@@ -185,6 +184,9 @@ AliFMDMultPoisson::PostEvent()
 
          // The reconstructed number of particles is then given by 
          Int_t reconstructed = Int_t(lambda * nTotal + 0.5);
+         AliDebug(10, Form("Lambda= %d / %f = %f particles %d", 
+                           emptyStrips, nTotal, 
+                           Float_t(emptyStrips) / nTotal , reconstructed));
            
          // Add a AliFMDMultRegion to the reconstruction tree. 
          AliFMDMultRegion* m = new((*fMult)[fNMult])