LCOV - code coverage report
Current view: top level - ITS/ITSsim - AliITSmodule.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 6 16 37.5 %
Date: 2016-06-14 17:26:59 Functions: 5 17 29.4 %

          Line data    Source code
       1             : #ifndef ALIITSMODULE_H
       2             : #define ALIITSMODULE_H
       3             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       4             :  * See cxx source for full Copyright notice                               */
       5             : 
       6             : /* $Id$ */
       7             : ///////////////////////////////////////////////////////////////////////
       8             : //                                                                   //
       9             : //  Class AliITSmodule                                               //
      10             : //  is a superclass for AliITSmoduleSSD, SPD and SDD.                //
      11             : //  The main function of modules is to simulate DIGITS from          //
      12             : //  GEANT HITS and produce POINTS from DIGITS                        //
      13             : //  It also make fast simulation without use of DIGITS               //
      14             : //                                                                   //
      15             : //  created by: A.Boucham, W.Peryt, S.Radomski, P.Skowronski         //
      16             : //              R.Barbera, B. Batynia, B. Nilsen                     //
      17             : //  ver. 1.0    CERN, 16.09.1999                                     //
      18             : //                                                                   //
      19             : ///////////////////////////////////////////////////////////////////////
      20             : 
      21             : #include <TObject.h>
      22             : #include <TObjArray.h>
      23             : #include <TArrayI.h>  // used in inline functions GetHitTrackIndex,GetHitHitIndex, and GetHitTrackAndHitIndex.
      24             : 
      25             : class AliITS;
      26             : class AliITShit;
      27             : 
      28             : 
      29             : class AliITSmodule:public TObject{
      30             : 
      31             : 
      32             :  public:
      33             :     //________________________________________________________________
      34             :     //
      35             :     // Constructors and deconstructor
      36             :     //________________________________________________________________
      37             :     // 
      38             :     AliITSmodule();             // default constructor
      39             :     AliITSmodule(Int_t index);  //index in TObjectArray in ITS object
      40             :     virtual ~AliITSmodule();
      41             : 
      42             :     //________________________________________________________________
      43             :     //
      44             :     // Position managenent (id's getters)
      45             :     //________________________________________________________________
      46             :     //
      47             : 
      48             :     Int_t GetIndex()  const { 
      49             :       // get index
      50     1058798 :       return fIndex;
      51             :     }
      52             :     void  GetID(Int_t &lay,Int_t &lad,Int_t &det);
      53             :     Int_t GetLayer() {
      54             :       // get layer
      55         930 :       Int_t i,j,k;GetID(i,j,k);return i;
      56         310 :     }
      57             :     Int_t GetLadder(){
      58             :       // get ladder
      59           0 :       Int_t i,j,k;GetID(i,j,k);return j;
      60           0 :     }
      61             :     Int_t GetDet(){
      62             :       // get det
      63           0 :       Int_t i,j,k;GetID(i,j,k);return k;
      64           0 :     }
      65             :     //________________________________________________________________
      66             :     //
      67             :     // Hits management
      68             :     //________________________________________________________________
      69             :     //
      70             :     Int_t GetNhits()   const { 
      71             :       // get num of hits
      72           0 :       return fHitsM->GetEntriesFast();
      73             :     }
      74             :     AliITS *GetITS() const { 
      75             :       // get ITS
      76           0 :       return fITS;
      77             :     }
      78             :     TObjArray *GetHits() const { 
      79             :       // get hits
      80       35364 :       return fHitsM; 
      81             :     }
      82             :     AliITShit *GetHit(Int_t i) { 
      83             :     // returns pointer to array (TClonesArray) of pointers to hits
      84        2228 :       return (AliITShit*)fHitsM->At(i);
      85             :     }
      86             :     // Adds pointer of hit belonging to this module
      87             :     // and returns number of hits in this module
      88             :     Int_t  AddHit(AliITShit *hit,Int_t TrackIndex,Int_t HitIndex);
      89             :     Int_t GetHitTrackIndex(Int_t i) {// get hit track index
      90           0 :         return fTrackIndex->At(i);}
      91             :     Int_t GetHitHitIndex(Int_t i) { 
      92             :         // return the hit index number in TreeH for the given sorted hit in
      93             :         // the module.
      94           0 :         return fHitIndex->At(i);}
      95             :     void GetHitTrackAndHitIndex(Int_t i,Int_t &TrackIndex,Int_t &HitIndex) {
      96             :     // return the hit index number for the given hit. Hits are kept on
      97             :     // file according to their track index and hit index numbers.
      98           0 :       TrackIndex = fTrackIndex->At(i);HitIndex = fHitIndex->At(i);}
      99             :     // Computes mean global location from hits that make up a track passing
     100             :     // through a volume.
     101             :     Bool_t MedianHitG(AliITShit *h1,AliITShit *h2,
     102             :                       Float_t &x,Float_t &y,Float_t &z);
     103             :     void MedianHitG(Int_t index, Float_t hitx1,Float_t hity1,Float_t hitz1, 
     104             :                     Float_t hitx2,Float_t hity2,Float_t hitz2, Float_t &xMg, 
     105             :                     Float_t &yMg, Float_t &zMg);
     106             :     // Computes mean local location from hits that make up a track passing
     107             :     // through a volume.
     108             :     Bool_t MedianHitL(AliITShit *h1,AliITShit *h2,
     109             :                       Float_t &x,Float_t &y,Float_t &z) const;
     110             :     void MedianHitL(Int_t,AliITShit *,AliITShit *,Float_t &,Float_t &,
     111           0 :                     Float_t &){};
     112             :     Double_t PathLength(const AliITShit *itsHit1,const AliITShit *itsHit2);
     113             :     // returns both the track and hit index numbers for the given hit. Hits
     114             :     // are kept on file according to their track index and hit index numbers.
     115             :     void MedianHit(Int_t index, Float_t xg,Float_t yg,Float_t zg,
     116             :                    Int_t status,Float_t &xMg, Float_t &yMg, Float_t &zMg,
     117             :                                    Int_t &flag);
     118             :     void PathLength(Float_t x,Float_t y,Float_t z,Int_t status,
     119             :                     Int_t &nseg,Float_t &x1,Float_t &y1,Float_t &z1,
     120             :                     Float_t &dx1,Float_t &dy1, Float_t &dz1,Int_t &flag) const;
     121             :     Bool_t LineSegmentL(Int_t hindex,Double_t &a,Double_t &b, 
     122             :                         Double_t &c,Double_t &d,Double_t &e,Double_t &f,
     123             :                         Double_t &de);
     124             :     Bool_t LineSegmentL(Int_t hindex,Double_t &a,Double_t &b,
     125             :                         Double_t &c,Double_t &d,Double_t &e,Double_t &f,
     126             :                         Double_t &de,Int_t &track);
     127             :     // if returns kTRUE; gives the parameterization of the line segment
     128             :     // from this step. x=a+b*t, y=c+d*t, and z=e+f*t for 0.0t<=1.0 and the
     129             :     // energy lost during this step all in the local detector coordinates.
     130             :     // if returns kFALSE; this is a begining step and no energy loss has
     131             :     // occured. This step is used to set up the next steps. Do not use
     132             :     // this parameterization.
     133             :     Bool_t LineSegmentG(Int_t hindex,Double_t &a,Double_t &b,
     134             :                         Double_t &c,Double_t &d,Double_t &e,Double_t &f,
     135             :                         Double_t &de);
     136             :     Bool_t LineSegmentG(Int_t hindex,Double_t &a,Double_t &b,
     137             :                         Double_t &c,Double_t &d,Double_t &e,Double_t &f,
     138             :                         Double_t &de,Int_t &track);
     139             :     // if returns kTRUE; gives the parameterization of the line segment
     140             :     // from this step. x=a+b*t, y=c+d*t, and z=e+f*t for 0.0t<=1.0 and the
     141             :     // energy lost during this step all in the global detector coordinates.
     142             :     // if returns kFALSE; this is a begining step and no energy loss has
     143             :     // occured. This step is used to set up the next steps. Do not use
     144             :     // this parameterization.
     145             : 
     146             :  protected:
     147             :     AliITSmodule(const AliITSmodule &source); 
     148             :     AliITSmodule& operator=(const AliITSmodule &source); 
     149             :     //________________________________________________________________
     150             :     //
     151             :     // Data members
     152             :     //________________________________________________________________
     153             :     //
     154             :     AliITS       *fITS;       // Pointer to ITS detector
     155             :     Int_t         fIndex;      //Index of this module in ITSmodules TObjectArray
     156             :     TObjArray    *fHitsM;     // Pointer to list of hits on this module
     157             :     TArrayI      *fTrackIndex; // track index
     158             :     TArrayI      *fHitIndex; // hit index
     159             : 
     160         116 :     ClassDef(AliITSmodule,0) // Copy the hits into a more useful order
     161             :         // Version set to zero so that we do not write out this class.
     162             : };
     163             : 
     164             : #endif
     165             : 
     166             : 
     167             : 

Generated by: LCOV version 1.11