LCOV - code coverage report
Current view: top level - STEER/STEERBase - AliLHCTagCuts.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 65 1.5 %
Date: 2016-06-14 17:26:59 Functions: 1 8 12.5 %

          Line data    Source code
       1             : /**************************************************************************
       2             :  * Author: Panos Christakoglou.                                           *
       3             :  * Contributors are mentioned in the code where appropriate.              *
       4             :  *                                                                        *
       5             :  * Permission to use, copy, modify and distribute this software and its   *
       6             :  * documentation strictly for non-commercial purposes is hereby granted   *
       7             :  * without fee, provided that the above copyright notice appears in all   *
       8             :  * copies and that both the copyright notice and this permission notice   *
       9             :  * appear in the supporting documentation. The authors make no claims     *
      10             :  * about the suitability of this software for any purpose. It is          *
      11             :  * provided "as is" without express or implied warranty.                  *
      12             :  **************************************************************************/
      13             : 
      14             : /* $Id$ */
      15             : 
      16             : //-----------------------------------------------------------------
      17             : //                   AliLHCTagCuts class
      18             : //   This is the class to deal with the LHC tag level cuts
      19             : //   Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch
      20             : //-----------------------------------------------------------------
      21             : 
      22             : class AliLog;
      23             : 
      24             : #include "AliLHCTag.h"
      25             : #include "AliLHCTagCuts.h"
      26             : 
      27         176 : ClassImp(AliLHCTagCuts)
      28             : 
      29             : 
      30             : //___________________________________________________________________________
      31             : AliLHCTagCuts::AliLHCTagCuts() :
      32           0 :   TObject(),
      33           0 :   fLHCState(0),
      34           0 :   fLHCStateFlag(kFALSE),
      35           0 :   fLHCLuminosityMin(0),
      36           0 :   fLHCLuminosityMax(0),
      37           0 :   fLHCLuminosityFlag(kFALSE),
      38           0 :   fNBunchesRange(), 
      39           0 :   fNBunchesFlag(kFALSE),     
      40           0 :   fFillingScheme(""),        
      41           0 :   fFillingSchemeFlag(kFALSE),          
      42           0 :   fFillNoRange(),       
      43           0 :   fFillNoFlag(kFALSE),           
      44           0 :   fBeamEnergyRange(),   
      45           0 :   fBeamEnergyFlag(kFALSE),       
      46           0 :   fBunchIntensityRange(),
      47           0 :   fBunchIntensityFlag(kFALSE)  
      48           0 : {
      49             :   //Default constructor which calls the Reset method.
      50           0 :   Reset();
      51           0 : }
      52             : 
      53             : //___________________________________________________________________________
      54           0 : AliLHCTagCuts::~AliLHCTagCuts() {  
      55             :   //Defaut destructor.
      56           0 : }
      57             : 
      58             : //___________________________________________________________________________
      59             : void AliLHCTagCuts::Reset() {
      60             :   //Sets dummy values to every private member.
      61           0 :   fLHCState = "init";
      62           0 :   fLHCStateFlag = kFALSE;
      63           0 :   fLHCLuminosityMin = -1.0;
      64           0 :   fLHCLuminosityMax = 0.0;
      65           0 :   fLHCLuminosityFlag = kFALSE;
      66           0 :   fNBunchesRange[0] = 0; 
      67           0 :   fNBunchesRange[1] = 10000; 
      68           0 :   fNBunchesFlag = kFALSE;
      69           0 :   fFillingScheme = "";        
      70           0 :   fFillingSchemeFlag = kFALSE;          
      71           0 :   fFillNoRange[0] = 0;       
      72           0 :   fFillNoRange[1] = 10000000;       
      73           0 :   fFillNoFlag = kFALSE;           
      74           0 :   fBeamEnergyRange[0] = 0.0;
      75           0 :   fBeamEnergyRange[1] = 10000;   
      76           0 :   fBeamEnergyFlag = kFALSE;       
      77           0 :   fBunchIntensityRange[0] = 0.0;
      78           0 :   fBunchIntensityRange[1] = 1e30;
      79           0 :   fBunchIntensityFlag = kFALSE;  
      80           0 : }
      81             : 
      82             : //___________________________________________________________________________
      83             : Bool_t AliLHCTagCuts::IsAccepted(AliLHCTag *lhcTag) const {
      84             :   //Returns true if the event is accepted otherwise false.
      85           0 :   if(fLHCStateFlag)
      86           0 :     if((lhcTag->GetLHCState() != fLHCState))
      87           0 :       return kFALSE;
      88           0 :   if(fLHCLuminosityFlag)
      89           0 :     if((lhcTag->GetLuminosity() < fLHCLuminosityMin)||(lhcTag->GetLuminosity() > fLHCLuminosityMax))
      90           0 :       return kFALSE;
      91           0 :   if (fNBunchesFlag) 
      92           0 :     if ((lhcTag->GetNBunches() < fNBunchesRange[0]) || (lhcTag->GetNBunches() > fNBunchesRange[1]))
      93           0 :       return kFALSE;
      94           0 :   if (fFillingSchemeFlag) 
      95           0 :     if (!(lhcTag->GetFillingScheme().Contains(fFillingScheme)))
      96           0 :       return kFALSE;
      97           0 :   if (fFillNoFlag) 
      98           0 :     if ((lhcTag->GetFillNo() < fFillNoRange[0]) || (lhcTag->GetFillNo() > fFillNoRange[1]))
      99           0 :       return kFALSE;
     100           0 :   if (fBeamEnergyFlag) 
     101           0 :     if ((lhcTag->GetBeamEnergy() < fBeamEnergyRange[0]) || (lhcTag->GetBeamEnergy() > fBeamEnergyRange[1]))
     102           0 :       return kFALSE;
     103           0 :   if (fBunchIntensityFlag) 
     104           0 :     if ((lhcTag->GetBunchIntensity() < fBunchIntensityRange[0]) || (lhcTag->GetBunchIntensity() > fBunchIntensityRange[1]))
     105           0 :       return kFALSE;
     106             : 
     107           0 :   return kTRUE;
     108           0 : }

Generated by: LCOV version 1.11