LCOV - code coverage report
Current view: top level - HMPID/HMPIDbase - AliHMPIDHit.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 11 35 31.4 %
Date: 2016-06-14 17:26:59 Functions: 2 4 50.0 %

          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             : #include "AliHMPIDHit.h"  //class header
      17             : #include <TPDGCode.h>     //Draw() Print()
      18             : #include <TMarker.h>      //Draw()
      19             : #include <TClonesArray.h> //Hit2Sdi()
      20             : #include "AliHMPIDParam.h" 
      21          16 : ClassImp(AliHMPIDHit)
      22             : //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
      23             : void AliHMPIDHit::Draw(Option_t*)
      24             : {
      25             : // Draw option of the hits in the display
      26             :   Int_t iMark;
      27           0 :   switch(Pid()){
      28           0 :     case 50000050:   iMark=4;  break;
      29           0 :     case 50000051:   iMark=27; break;
      30           0 :     default:         iMark=26; break;
      31             :   }    
      32           0 :   TMarker *pMark=new TMarker(fLx,fLy,iMark); pMark->SetMarkerColor(kRed); pMark->Draw();
      33           0 : }//Draw
      34             : //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
      35             : void AliHMPIDHit::Hit2Sdi(TClonesArray *pSdiLst,Int_t iHow)const
      36             : {
      37             : // Adds  sdigits of this hit to the list
      38             : // Arguments: pSdiLst- sigits list where to add new sdgits
      39             : //            iHow- how many pads to check 
      40             : //   Returns: none
      41         588 :   Int_t pc,px,py;
      42         294 :   AliHMPIDParam::Lors2Pad(fLx,fLy,pc,px,py); if(py<0) return; //check if the hit in dead zone. Should never happen during trasport!
      43             : 
      44         294 :   AliHMPIDDigit dig;
      45         294 :   Int_t iSdiCnt=pSdiLst->GetEntries();                       //list of sdigits contains sdigits from previous ivocations of Hit2Sdi, do not override them
      46             : 
      47        2352 :   for(Int_t i=-iHow;i<=iHow;i++){                            //horizontal loop
      48        7056 :     for(Int_t j=-iHow;j<=iHow;j++){                          //vertical loop
      49        2646 :       if(dig.Set(fCh,pc,px+i,py+j,fTrack)) continue;
      50        5232 :       dig.SetQ(fQ*dig.IntMathieson(fLx,fLy));
      51        7875 :       new((*pSdiLst)[iSdiCnt++]) AliHMPIDDigit(dig);
      52             :     }
      53             :   }
      54         588 : }//Hit2Sdi
      55             : //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
      56             : void AliHMPIDHit::Print(Option_t *opt)const
      57             : {
      58             : //Print hit
      59           0 :   const char *sPart=Form("pid=%i",Pid());
      60           0 :   switch(Pid()){
      61           0 :     case kProton:      sPart="p+  ";break;
      62           0 :     case kProtonBar:   sPart="p-  ";break;
      63           0 :     case kKPlus:       sPart="K+  ";break;
      64           0 :     case kKMinus:      sPart="K-  ";break;
      65           0 :     case kPiPlus:      sPart="Pi+ ";break;
      66           0 :     case kPiMinus:     sPart="Pi- ";break;
      67           0 :     case kMuonPlus:    sPart="Mu+ ";break;
      68           0 :     case kMuonMinus:   sPart="Mu- ";break;
      69           0 :     case kElectron:    sPart="e-  ";break;
      70           0 :     case kPositron:    sPart="e+  ";break;
      71           0 :     case 50000050:     sPart="ckov";break;
      72           0 :     case 50000051:     sPart="feed";break;
      73             :   }
      74             : 
      75           0 :   Printf("%sHIT: ch=%i                 (%7.6f,%7.6f), time[nsec]=%f Q=%8.3f TID= %5i, MARS=(%7.2f,%7.2f,%7.2f) %s  %s",
      76           0 :          opt,  Ch(),                    fLx,fLy, fT*TMath::Power(10,9), fQ,     fTrack,         X(),  Y(),  Z(),   sPart, 
      77           0 :                         (AliHMPIDParam::IsInDead(LorsX(),LorsY()))? "IN DEAD ZONE":"");
      78           0 : }//Print
      79             : //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Generated by: LCOV version 1.11