LCOV - code coverage report
Current view: top level - ITS/ITSbase - AliITSDetTypeRec.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 15 19 78.9 %
Date: 2016-06-14 17:26:59 Functions: 15 21 71.4 %

          Line data    Source code
       1             : #ifndef ALIITSDETTYPEREC_H
       2             : #define ALIITSDETTYPEREC_H
       3             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       4             :  * See cxx source for full Copyright notice                               */
       5             : 
       6             : /*
       7             : $Id$ 
       8             : */
       9             : 
      10             : ////////////////////////////////////////////////////////////////////////
      11             : // This class contains all of the "external" information needed to do //
      12             : // detector specific reconstruction for the ITS.                      //
      13             : ////////////////////////////////////////////////////////////////////////
      14             : #include <TObject.h>
      15             : #include <TClonesArray.h>
      16             : #include <TBits.h>
      17             : 
      18             : class TObjArray;
      19             : class TTree;
      20             : class TBranch;
      21             : class AliITSgeom;
      22             : class AliITSsegmentation;
      23             : class AliITSCalibration;
      24             : class AliITSCalibrationSSD;
      25             : class AliITSresponseSDD;
      26             : class AliITSClusterFinder;
      27             : class AliITSRecPoint;
      28             : class AliRawReader;
      29             : class AliITSGainSSDv2;
      30             : class AliITSBadChannelsSSDv2;
      31             : class AliITSDDLModuleMapSDD;
      32             : class AliITSNoiseSSDv2;
      33             : class AliITSTriggerConditions;
      34             : class AliITSFOSignalsSPD;
      35             : class AliITSRecPointContainer;
      36             : class AliITSReconstructor;
      37             : 
      38             : class AliITSDetTypeRec : public TObject {
      39             :   public:
      40             :     AliITSDetTypeRec(); // Default constructor
      41             :  
      42             :     virtual ~AliITSDetTypeRec(); // Proper Destructor
      43             : 
      44       70376 :     virtual AliITSgeom* GetITSgeom() const { return fITSgeom; }
      45           4 :     virtual void SetITSgeom(AliITSgeom* const geom) { fITSgeom = geom; }
      46             :     virtual void SetDefaults();
      47             :     virtual void SetDefaultClusterFindersV2(Bool_t rawdata=kFALSE,Bool_t fastSDD=kFALSE);
      48             :     virtual void MakeBranch(TTree *tree,Option_t *opt);
      49             :     virtual void SetTreeAddressD(TTree* const treeD);
      50             : 
      51             :     virtual void SetSegmentationModel(Int_t dettype, AliITSsegmentation *seg);
      52             :     virtual void SetCalibrationModel(Int_t iMod, AliITSCalibration *cal);
      53             :     virtual void SetSPDDeadModel(Int_t iMod, AliITSCalibration *cal);
      54             :     virtual void SetSPDSparseDeadModel(Int_t iMod, AliITSCalibration *cal);
      55             :     virtual void SetReconstructionModel(Int_t dettype, AliITSClusterFinder *rec);
      56             :     virtual Bool_t GetCalibration();
      57             :     virtual AliITSsegmentation* GetSegmentationModel(Int_t dettype) const;
      58             :     virtual AliITSCalibration* GetCalibrationModel(Int_t iMod) const;
      59             :     virtual AliITSCalibration* GetSPDDeadModel(Int_t iMod) const;
      60             :     virtual AliITSCalibration* GetSPDSparseDeadModel(Int_t iMod) const;
      61             :     virtual AliITSTriggerConditions* GetTriggerConditions() const;
      62             :     virtual AliITSClusterFinder* GetReconstructionModel(Int_t dettype) const;
      63           8 :     virtual AliITSDDLModuleMapSDD* GetDDLModuleMapSDD() const { return fDDLMapSDD;}
      64         460 :     virtual AliITSresponseSDD* GetResponseSDD() const { return fRespSDD;}
      65             :     virtual Float_t GetAverageGainSDD() const {
      66        3858 :       if(fAveGainSDD>0.) return fAveGainSDD;
      67           0 :       else return 1.;
      68        1286 :     }
      69             : 
      70             :     virtual void SetDigitClassName(Int_t i,const Char_t *digit) 
      71          12 :       {fkDigClassName[i]=digit;}
      72             :     
      73             :     virtual void SetLoadOnlySPDCalib(Bool_t opt=kFALSE)
      74           0 :       {fLoadOnlySPDCalib=opt;}
      75             : 
      76          24 :     const Char_t* GetDigitClassName(Int_t i) const {return fkDigClassName[i];}
      77             :     
      78           0 :     TObjArray* GetDigits() const {return fDigits;} 
      79       30754 :     TClonesArray *DigitsAddress(Int_t id) const {return ((TClonesArray*)(*fDigits)[id]);}
      80             : 
      81        1920 :         AliITSFOSignalsSPD* GetFOSignals() const {return fFOSignals;}
      82             :     
      83             :     TBranch* MakeBranchInTree(TTree* const tree, const char* name, const char *classname, void* address,Int_t size, Int_t splitlevel);
      84             : 
      85             :     virtual void ResetDigits();
      86             :     virtual void ResetDigits(Int_t branch);
      87             : 
      88             :     void MakeBranchR(TTree *treeR,Option_t *opt=" ");
      89             :     void SetTreeAddressR(TTree* const treeR);
      90             :     void AddRecPoint(const AliITSRecPoint &p);
      91           0 :     void MakeBranchRF(TTree *treeR){MakeBranchR(treeR,"Fast");}
      92             :     void DigitsToRecPoints(TTree *treeD,TTree *treeR,Int_t lastEntry,Option_t *det, Int_t optCluFind=0);
      93             :     void DigitsToRecPoints(AliRawReader* rawReader,TTree *treeR,Option_t *det="All");
      94             :     void DigitsToRecPoints(AliRawReader* rawReader,Option_t *opt);
      95             : 
      96             :     void   SetFastOrFiredMapOnline(UInt_t eq, UInt_t hs, UInt_t chip);
      97         296 :     void   SetFastOrFiredMap(UInt_t chipKey){fFastOrFiredMap.SetBitNumber(chipKey);} 
      98          16 :     TBits  GetFastOrFiredMap() const {return fFastOrFiredMap;}
      99             :     TBits  GetFiredChipMap() const; // (using SPD RecPoints)
     100             :     TBits  GetFiredChipMap(TTree *treeR) const; // (using SPD RecPoints)
     101          16 :     void   ResetFastOrFiredMap(){fFastOrFiredMap.ResetAllBits();}
     102             :     void   RemoveFastOrFiredInActive(); // (using Trigger Conditions)
     103             :     void   RemoveFastOrFiredFromDead(TBits firedchipmap); // (using SPD RecPoints)
     104             :    
     105             :     
     106             :   private:
     107             :     // private methods
     108             :     AliITSDetTypeRec(const AliITSDetTypeRec& rec);
     109             :     AliITSDetTypeRec& operator=(const AliITSDetTypeRec &source);
     110             :  
     111             :     //conversion of the old SSD calibration objects tothe new ones
     112             :     void ReadOldSSDNoise(const TObjArray *array, 
     113             :                          AliITSNoiseSSDv2 *noiseSSD);
     114             :     void ReadOldSSDBadChannels(const TObjArray *array, 
     115             :                                AliITSBadChannelsSSDv2 *badChannelsSSD);
     116             :     void ReadOldSSDGain(const TObjArray *array, 
     117             :                         AliITSGainSSDv2 *gainSSD);
     118             :     virtual Bool_t GetCalibrationSPD(Bool_t cacheStatus);
     119             :     virtual Bool_t GetCalibrationSDD(Bool_t cacheStatus);
     120             :     virtual Bool_t GetCalibrationSSD(Bool_t cacheStatus);
     121       35168 :     void ResetRecPoints(){if(fRecPoints) fRecPoints->Clear();fNRecPoints = 0;};
     122             : 
     123             :     //    virtual void SetLoader(AliITSLoader* loader) {fLoader=loader;}
     124             :     static const Int_t fgkNdettypes;          // number of det. types
     125             :     static const Int_t fgkDefaultNModulesSPD; // Total numbers of SPD modules by default
     126             :     static const Int_t fgkDefaultNModulesSDD; // Total numbers of SDD modules by default
     127             :     static const Int_t fgkDefaultNModulesSSD; // Total numbers of SSD modules by default
     128             :     Int_t *fNMod;     // numbers of modules from different types
     129             : 
     130             :     AliITSgeom   *fITSgeom;       //! ITS geometry
     131             : 
     132             :     TObjArray    *fReconstruction;//! [NDet]
     133             :     TObjArray    *fSegmentation;  //! [NDet]
     134             :     TObjArray    *fCalibration;   //! [NMod]
     135             :     AliITSCalibrationSSD* fSSDCalibration;  //! SSD calibration object
     136             :     TObjArray    *fSPDDead;       //! [fgkDefaultNModulesSPD]
     137             :     TObjArray    *fSPDSparseDead;       //! [fgkDefaultNModulesSPD]
     138             :     AliITSTriggerConditions *fTriggerConditions; //! PIT conditions object
     139             :     TObjArray    *fDigits;        //! [NMod][NDigits]
     140             :     AliITSFOSignalsSPD *fFOSignals; //! Fast-Or signals (used when reconstructing from digits)
     141             :     AliITSDDLModuleMapSDD *fDDLMapSDD; //! mapping DDL/module -> SDD module number
     142             :     AliITSresponseSDD *fRespSDD;  //! SDD response parameters 
     143             :     Float_t       fAveGainSDD;    //! Average gain of SDD good anodes
     144             :     const Char_t*       fkDigClassName[3];     //! String with digit class name.
     145             : 
     146             : 
     147             :     TClonesArray *fRecPoints;  //! List of reconstructed points
     148             :     Int_t         fNRecPoints; // Number of rec points
     149             : 
     150             :     Bool_t fFirstcall;         //! flag
     151             :     Bool_t fLoadOnlySPDCalib;  //! flag for loading calibrations only fr SPD
     152             : 
     153             :     TBits fFastOrFiredMap;     //! Map of FastOr fired chips (after processing of raw signals)
     154             : 
     155         146 :     ClassDef(AliITSDetTypeRec,20) // ITS Reconstruction structure
     156             : };
     157             : 
     158             : #endif
     159             : 

Generated by: LCOV version 1.11