Adding the AliAnalysisGUI class which is the main class that controls the GUI.
[u/mrichter/AliRoot.git] / ITS / AliITSDetTypeSim.h
CommitLineData
3b9df642 1#ifndef ALIITSDETTYPESIM_H
2#define ALIITSDETTYPESIM_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
7d62fb64 10/////////////////////////////////////////////////////////////////////////
11// * This class contains all of the "external" information needed to do//
12// * detector specific simulations for the ITS. //
13/////////////////////////////////////////////////////////////////////////
14
3b9df642 15#include <TObject.h>
16#include <TObjArray.h>
17#include <TClonesArray.h>
fe20e72f 18#include "AliITSCalibration.h"
023ae34b 19#include "AliITSLoader.h"
fe20e72f 20#include "AliITSgeom.h"
3b9df642 21
8ba39da9 22class TTree;
23class AliCDBMetaData;
7d62fb64 24class AliITSdigit;
25class AliITSmodule;
26class AliITSpListItem;
3b9df642 27class AliITSsimulation;
28class AliITSsegmentation;
681e8104 29class AliITSresponse;
3b9df642 30
31class AliITSDetTypeSim : public TObject {
7d62fb64 32 public:
33
34 AliITSDetTypeSim();
35 virtual ~AliITSDetTypeSim();
36 AliITSDetTypeSim(const AliITSDetTypeSim &source);
37 AliITSDetTypeSim& operator=(const AliITSDetTypeSim &source);
023ae34b 38 AliITSgeom *GetITSgeom() const {
39 if(fLoader)return ((AliITSLoader*)fLoader)->GetITSgeom();
40 else return 0;}
41 void SetITSgeom(AliITSgeom *geom);
7d62fb64 42
43 virtual void SetSimulationModel(Int_t dettype,AliITSsimulation *sim);
44 virtual AliITSsimulation* GetSimulationModel(Int_t dettype);
45 virtual AliITSsimulation* GetSimulationModelByModule(Int_t module);
46
47 virtual void SetSegmentationModel(Int_t dettype,AliITSsegmentation *seg);
48 virtual AliITSsegmentation* GetSegmentationModel(Int_t dettype);
49 virtual AliITSsegmentation* GetSegmentationModelByModule(Int_t module);
50
fcf95fc7 51 virtual void SetCalibrationModel(Int_t iMod,AliITSCalibration *resp);
52 virtual AliITSCalibration* GetCalibrationModel(Int_t iMod);
023ae34b 53 virtual AliITSresponse* GetResponse(Int_t dettype) {
54 return GetCalibrationModel(
55 GetITSgeom()->GetStartDet(dettype))->GetResponse();}
fcf95fc7 56 TObjArray* GetCalibrationArray() const {return fCalibration;}
7d62fb64 57 TObjArray* GetSegmentation() const {return fSegmentation;}
fcf95fc7 58 void ResetCalibrationArray();
7d62fb64 59 void ResetSegmentation();
60
023ae34b 61 virtual void SetLoader(AliITSLoader* loader);
62 AliITSLoader* GetLoader() const {return fLoader;}
7d62fb64 63
64 virtual void SetDefaults();
65 virtual void SetDefaultSimulation();
8ba39da9 66 virtual void SetRunNumber(Int_t rn=0){fRunNumber = rn;}
67 virtual Int_t GetRunNumber() const {return fRunNumber;}
7d62fb64 68 virtual void SetTreeAddressS(TTree* treeS, Char_t* name);
69 virtual void SetTreeAddressD(TTree* treeD, Char_t* name);
70
71 virtual void SetSDigits(TClonesArray* sdigits) {fSDigits=sdigits;}
72 virtual void SetDigits(TObjArray* digits) {fDigits=digits;}
73 TClonesArray* GetSDigits() const {return fSDigits;}
74 TObjArray* GetDigits() const {return fDigits;}
75 Int_t* GetNDigitArray() const {return fNDigits;}
023ae34b 76 TClonesArray *DigitsAddress(Int_t id) const {
77 return ((TClonesArray*)(*fDigits)[id]);}
3b9df642 78 virtual void ResetSDigits(){fNSDigits=0;if(fSDigits!=0) fSDigits->Clear();}
7d62fb64 79 virtual void ResetDigits();
80 virtual void ResetDigits(Int_t branch);
81 virtual void SDigitsToDigits(Option_t *opt,Char_t* name);
82
83 virtual void AddSumDigit(AliITSpListItem &sdig);
84 virtual void AddRealDigit(Int_t branch, Int_t *digits);
8ba39da9 85 virtual void AddSimDigit(Int_t branch, AliITSdigit *d);
86 virtual void AddSimDigit(Int_t branch,Float_t phys,Int_t* digits,
87 Int_t* tracks,Int_t *hits,Float_t* trkcharges);
023ae34b 88 virtual void SetDigitClassName(Int_t i, Char_t* name) {
89 fDigClassName[i]=name;}
7d62fb64 90 Char_t* GetDigitClassName(Int_t i) const {return fDigClassName[i];}
8ba39da9 91 void StoreCalibration(Int_t firstRun, Int_t lastRun, AliCDBMetaData &md);
92
93 protected:
fcf95fc7 94 virtual void CreateCalibrationArray();
8ba39da9 95 virtual Bool_t GetCalibration();
7d62fb64 96
97 private:
1964ae5f 98 void SetDefaultSegmentation(Int_t idet); // creates def segm.
8ba39da9 99 static const Int_t fgkNdettypes; // number of different det. types
100 static const Int_t fgkDefaultNModulesSPD; // Total numbers of SPD modules by default
101 static const Int_t fgkDefaultNModulesSDD; // Total numbers of SDD modules by default
102 static const Int_t fgkDefaultNModulesSSD; // Total numbers of SSD modules by default
103 Int_t fNMod[3]; // numbers of modules from different types
104
7d62fb64 105 TObjArray *fSimulation; //! [NDet]
106 TObjArray *fSegmentation; //! [NDet]
fcf95fc7 107 TObjArray *fCalibration; //! [NMod]
7d62fb64 108 TObjArray *fPreProcess; //! [] e.g. Fill fHitModule with hits
109 TObjArray *fPostProcess; //! [] e.g. Wright Raw data
3b9df642 110 Int_t fNSDigits; //! number of SDigits
111 TClonesArray *fSDigits; //! [NMod][NSDigits]
7d62fb64 112 Int_t* fNDigits; //! [NDet] number of Digits for det.
023ae34b 113 Int_t fRunNumber; //! run number (to access DB)
114 TObjArray *fDigits; //! [NMod][NDigits]
7d62fb64 115 TString fHitClassName; //! String with Hit class name
116 TString fSDigClassName;//! String with SDigit class name.
117 Char_t* fDigClassName[3]; //! String with digit class name.
023ae34b 118 AliITSLoader* fLoader; //! loader
119 Bool_t fFirstcall; //! flag
7d62fb64 120
023ae34b 121 ClassDef(AliITSDetTypeSim,5) // ITS Simulation structure
7d62fb64 122
123};
3b9df642 124
3b9df642 125#endif