LCOV - code coverage report
Current view: top level - FMD/FMDrec - AliFMDOfflineTrigger.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 47 2.1 %
Date: 2016-06-14 17:26:59 Functions: 1 8 12.5 %

          Line data    Source code
       1             : /**************************************************************************
       2             :  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       3             :  *                                                                        *
       4             :  * Author: The ALICE Off-line Project.                                    *
       5             :  * Contributors are mentioned in the code where appropriate.              *
       6             :  *                                                                        *
       7             :  * Permission to use, copy, modify and distribute this software and its   *
       8             :  * documentation strictly for non-commercial purposes is hereby granted   *
       9             :  * without fee, provided that the above copyright notice appears in all   *
      10             :  * copies and that both the copyright notice and this permission notice   *
      11             :  * appear in the supporting documentation. The authors make no claims     *
      12             :  * about the suitability of this software for any purpose. It is          *
      13             :  * provided "as is" without express or implied warranty.                  *
      14             :  **************************************************************************/
      15             : //____________________________________________________________________
      16             : //                                                                          
      17             : // This class implements the FMD offline trigger as requested for 
      18             : // ALICE first physics.
      19             : // 
      20             : // 
      21             : // 
      22             : //
      23             : #include "AliFMDOfflineTrigger.h"     
      24             : #include <iostream>
      25             : #include "AliESDFMD.h"
      26             : 
      27             : //____________________________________________________________________
      28          12 : ClassImp(AliFMDOfflineTrigger)
      29             : #if 0
      30             :   ; // This is here to keep Emacs for indenting the next line
      31             : #endif
      32             : 
      33             : //____________________________________________________________________
      34           0 : AliFMDOfflineTrigger::AliFMDOfflineTrigger() : 
      35           0 :   fLowCut(0.2),
      36           0 :   fHitCut(0.5)
      37           0 : {
      38             :   // CTOR 
      39             : 
      40           0 : }
      41             : 
      42             : //____________________________________________________________________
      43             : AliFMDOfflineTrigger::AliFMDOfflineTrigger(const AliFMDOfflineTrigger& o)
      44           0 :   : TObject(o),
      45           0 :     fLowCut(o.fLowCut),
      46           0 :     fHitCut(o.fHitCut)
      47           0 : {
      48             :   
      49             :   // Copy Ctor 
      50           0 : }
      51             : 
      52             : //____________________________________________________________________
      53             : AliFMDOfflineTrigger&
      54             : AliFMDOfflineTrigger::operator=(const AliFMDOfflineTrigger& /*o*/)
      55             : {
      56             :   // Assignment operator 
      57           0 :   return (*this);
      58             : }
      59             : //_____________________________________________________________________
      60             : Bool_t AliFMDOfflineTrigger::ASideHasHit(AliESDFMD* fmd) {
      61             : 
      62             :   Float_t totalMult = 0;
      63           0 :   for(UShort_t det=1;det<=2;det++) {
      64           0 :     Int_t nRings = (det == 1 ? 1 : 2);
      65           0 :     for (UShort_t ir = 0; ir < nRings; ir++) {
      66           0 :       Char_t   ring = (ir == 0 ? 'I' : 'O');
      67           0 :       UShort_t nsec = (ir == 0 ? 20  : 40);
      68           0 :       UShort_t nstr = (ir == 0 ? 512 : 256);
      69           0 :       for(UShort_t sec =0; sec < nsec;  sec++)  {
      70           0 :         for(UShort_t strip = 0; strip < nstr; strip++) {
      71           0 :           Float_t mult = fmd->Multiplicity(det,ring,sec,strip);
      72           0 :           if(mult == AliESDFMD::kInvalidMult) continue;
      73             :           
      74           0 :           if(mult > fLowCut)
      75           0 :             totalMult = totalMult + mult;
      76             :           else
      77             :             {
      78           0 :               if( totalMult > fHitCut) {
      79           0 :                 return kTRUE;
      80             :               }
      81             :               else totalMult = 0 ;
      82             :             }
      83           0 :         }
      84             :       }
      85           0 :     }
      86           0 :   }
      87           0 :   return kFALSE;
      88             :   
      89           0 : }
      90             : //_____________________________________________________________________
      91             : Bool_t AliFMDOfflineTrigger::CSideHasHit(AliESDFMD* fmd) {
      92             :   
      93             :   Float_t totalMult = 0;
      94             :   UShort_t det = 3;
      95             :   Int_t nRings = 2;
      96           0 :   for (UShort_t ir = 0; ir < nRings; ir++) {
      97           0 :     Char_t   ring = (ir == 0 ? 'I' : 'O');
      98           0 :     UShort_t nsec = (ir == 0 ? 20  : 40);
      99           0 :     UShort_t nstr = (ir == 0 ? 512 : 256);
     100           0 :     for(UShort_t sec =0; sec < nsec;  sec++)  {
     101           0 :       for(UShort_t strip = 0; strip < nstr; strip++) {
     102           0 :         Float_t mult = fmd->Multiplicity(det,ring,sec,strip);
     103           0 :         if(mult == AliESDFMD::kInvalidMult) continue;
     104             :         
     105           0 :         if(mult > fLowCut)
     106           0 :           totalMult = totalMult + mult;
     107             :         else
     108             :           {
     109           0 :             if( totalMult > fHitCut) {
     110           0 :               return kTRUE;
     111             :             }
     112             :             else totalMult = 0 ;
     113             :           }
     114           0 :       }
     115             :     }
     116           0 :   }
     117             :  
     118           0 :   return kFALSE;
     119           0 : }
     120             : //____________________________________________________________________
     121             : //
     122             : // EOF
     123             : //

Generated by: LCOV version 1.11