Removing the tasks from the digitization (Ruben)
[u/mrichter/AliRoot.git] / ITS / UPGRADE / AliITSupgrade.h
CommitLineData
1d9af2d5 1#ifndef ALIITSUPGRADE_H
2#define ALIITSUPGRADE_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7/* $Id$ */
8
9//========================================================================
10//
11// Geometry of the Inner Tracking System Upgrade based on TGeo
12//
13//
14// Authors: A. Mastroserio
15// C. Terrevoli
16// annalisa.mastroserio@cern.ch
17// cristina.terrevoli@ba.infn.it
18//
19//========================================================================
20
21//
22//ITS class for new geometry based on TGeo
23//
24
25#include "AliITS.h" //base class
1d9af2d5 26#include "AliITSupgradeDigitizer.h"
27#include <TArrayS.h>
0ac80088 28
1d9af2d5 29class TGeoVolume;
30class TGeoVolumeAssembly;
31class TArrayD;
32class TClonesArray;
33class TObjArray;
34class AiITShit;
a19b4e8c 35class AliITSsegmentationUpgrade;
36
1d9af2d5 37class AliITSupgrade : public AliITS //TObject-TNamed-AliModule-AliDetector-AliITS-AliITSupgrade
38{
39 public:
387f1a9e 40 AliITSupgrade(); //default ctor
ebaa7604 41 AliITSupgrade(const char *name, const char *title, Bool_t isBeamPipe=kFALSE); //ctor for standard ITS
1d9af2d5 42 AliITSupgrade(const char *name, const char *title, TArrayD widths, TArrayD radii,TArrayD halfLengths, TArrayD radiiCu, TArrayD widthsCu, TArrayS copper,Bool_t bp, Double_t radiusBP, Double_t widthPB, Double_t halfLengthsBP); //ctor
43 virtual ~AliITSupgrade(); //dtor
84ab81bf 44 Int_t IsVersion() const {return 110;}// same as ITSv11Hybrid to comply with the AliITSInitGeom cases
45
1d9af2d5 46
47 //framework part+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
48 void AddAlignableVolumes() const; //from AliModule invoked from AliMC
49 void CreateMaterials (); //from AliModule invoked from AliMC
50 void CreateGeometry (); //from AliModule invoked from AliMC
1d9af2d5 51 void StepManager (); //from AliModule invoked from AliMC::Stepping()
52 void Hits2SDigits();
53 void MakeBranch (Option_t *opt=""); //from AliModule invokde from AliRun::Tree2Tree() to make requested ITSupgrade branch
54 void SetTreeAddress ( ); //from AliModule invoked from AliRun::GetEvent(), AliLoader::SetTAddrInDet()
55
56 //create containers++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
57 void HitCreate() {if(fHits)return; fHits=new TClonesArray("AliITShit"); fNhits=0; }//create hits list
58
9b615954 59 TObjArray* SDigitsList() const{return fSdigits;} //get digits list for all layers
1d9af2d5 60 TClonesArray* SDigitsList(Int_t layer) const{return fSdigits ? (TClonesArray *)fSdigits->At(layer):0;}//get sdigits list for a layer
61 void SDigitsCreate() {if (fSdigits) return;
62 fSdigits=new TObjArray(fNlayers);
63 for(Int_t i=0;i<fNlayers;i++)fSdigits->AddAt(new TClonesArray("AliITSDigitUpgrade"),i);}//create digits list
64 void SDigitsReset () {if(fSdigits) for(int i=0;i<fNlayers;i++)fSdigits->At(i)->Clear(); }//clean sdigits list
65
66
67
a19b4e8c 68 TObjArray* DigitsList() const{return fDigitArray;}//get digits list for all layers
69 TClonesArray* DigitsList(Int_t layer) const{return fDigitArray ? (TClonesArray *)fDigitArray->At(layer):0;}//get digits list for chamber
70 void DigitsCreate() {if (fDigitArray) return;
71 fDigitArray=new TObjArray(fNlayers);
72 for(Int_t i=0;i<fNlayers;i++)fDigitArray->AddAt(new TClonesArray("AliITSDigitUpgrade"),i);}//create digits list
73 void DigitsReset () {if(fDigitArray)for(int i=0;i<fNlayers;i++)fDigitArray->At(i)->Clear(); }//clean digits list
1d9af2d5 74
f21fc003 75 AliDigitizer* CreateDigitizer (AliDigitizationInput *m) const {return new AliITSupgradeDigitizer(m);} //from AliModule invoked from AliSimulation::RunDigitization()
1d9af2d5 76
a19b4e8c 77 void Hit2SumDig(TClonesArray *hits,const TObjArray *pSDig, Int_t *nSdigit);
1d9af2d5 78
79 enum EMedia {kAir=0,kSi=1,kBe=2, kCu=3}; //media ids used in CreateMaterials
80
81
82 // Geometry/segmentation creation part
83 TGeoVolumeAssembly * CreateVol();
0ac80088 84 TGeoVolumeAssembly * CreateVol(Bool_t cil);
85
1d9af2d5 86 void SetFullSegmentation(TArrayD xsize, TArrayD zsize);
87
387f1a9e 88 void SetRadius(Double_t r, Int_t lay) {fRadii.AddAt(r,lay);}
89 void SetWidth(Double_t w, Int_t lay) {fWidths.AddAt(w,lay);}
90 void SetRadiusCu(Double_t rCu, Int_t lay) {fRadiiCu.AddAt(rCu,lay);}
91 void SetWidthCu(Double_t wCu, Int_t lay) {fWidthsCu.AddAt(wCu,lay);}
92 void SetSegmentationX(Double_t x, Int_t lay);
93 void SetSegmentationZ(Double_t z, Int_t lay);
0ac80088 94 void SetNSectors(Int_t nsect) {fNSectors=nsect;}
1d9af2d5 95 void StepHistory();
387f1a9e 96 void PrintSummary();
1d9af2d5 97
98 protected:
a19b4e8c 99 TArrayD fWidths; // thicknesses of silicon cylinders
100 TArrayD fRadii; // radii of silicon cylinders
101 Int_t fNSectors; // number of sectors
102 TArrayD fRadiiCu; // radii of copper cylinders
103 TArrayD fWidthsCu; // thicknesses of copper cylinders
104 TArrayS fCopper; // check to set the copper cylinder
105 Bool_t fBeampipe; // boolean to set beam pipe vol in geometry
106 Double_t fRadiusBP; // beam pipe radius
107 Double_t fWidthBP; // thickness of the beam pipe
108 Double_t fHalfLengthBP; // 1/2 beam pipe cyclinder length
109 Int_t fNlayers; // # of layers
110 TArrayD fHalfLength; // 1/2 silicon and copper cylinder lengths
111 TObjArray *fSdigits; //![fNlayers] list of sdigits
112 TObjArray *fDigitArray; //![fNlayers] list of digits per layer
113 AliITSsegmentationUpgrade *fSegmentation; //virtual segmentation class
1d9af2d5 114
115 private:
116 AliITSupgrade(const AliITSupgrade& u); //dummy copy constructor
117 AliITSupgrade &operator=(const AliITSupgrade& u); //dummy assignment operator
118
119 ClassDef(AliITSupgrade,2) //ITS Upgrade full version for simulation
120
121 };
122
123#endif
124