]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSDetType.cxx
Correct material budget for tracks stopped at TRD (S.Arcelli)
[u/mrichter/AliRoot.git] / ITS / AliITSDetType.cxx
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 /* $Id$ */
17
18 ////////////////////////////////////////////////////////////////////////
19 // This Class owns the classes needed to to detector simulations and
20 // reconstruction. This includes the detector segmentation classes,
21 // the detector responce classes, the detector simulatin classes, and
22 // the detector reconstruction (clustering) classes for all of the ITS
23 // detectors.
24 ////////////////////////////////////////////////////////////////////////
25 #include "AliITSDetType.h"
26 #include "AliITSClusterFinder.h"
27 #include "AliITSsimulation.h"
28
29
30 ClassImp(AliITSDetType)  
31
32 //______________________________________________________________________
33 AliITSDetType::AliITSDetType():
34 TObject(),
35 fDetType(kND),
36 fResponse(0),
37 fSegmentation(0),
38 fSimulation(0),
39 fReconst(0),
40 fDigClassName(""),
41 fClustClassName(""){
42     // Default constructor.
43     // Inputs:
44     //   none.
45     // Output:
46     //   none.
47     // Return:
48     //   A default constructed AliITSDetType class.
49 }
50 //______________________________________________________________________
51 AliITSDetType::AliITSDetType(AliITSDetector det,AliITSresponse *res,
52                              AliITSsegmentation *seg,AliITSsimulation *sim,
53                              AliITSClusterFinder *cf,
54                              const Char_t *DigClassName,
55                              const Char_t *ClustClassName):
56 TObject(),
57 fDetType(det),
58 fResponse(res),
59 fSegmentation(seg),
60 fSimulation(sim),
61 fReconst(cf),
62 fDigClassName(DigClassName),
63 fClustClassName(ClustClassName){
64     // Standard constructor
65     // Inputs:
66     //   AliITSDetector       det  Detector type
67     //   AliITSresponse      *res  response class to use
68     //   AliITSsegmentation  *seg  Segmentation class to use
69     //   AliITSsimulation    *sim  Simulation class to use
70     //   AliITSClusterFinder *cf   Cluster Finder/Reconstruction class to use
71     //   const Char_t        DigClassName   Name of the digit class to be used
72     //   const Char_t        ClustClassName Name of the cluster class to be 
73     //                                      used
74     // Output:
75     //   none.
76     // Return:
77     //   A Standard constructed AliITSDetType class.
78 }
79 //----------------------------------------------------------------------
80 AliITSDetType::~AliITSDetType(){
81     // destructor
82     // Inputs:
83     //   none.
84     // Output:
85     //   none.
86     // Return:
87     //   none.
88
89     if(fSegmentation!=0) delete fSegmentation; fSegmentation = 0;
90     if(fResponse!=0)     delete fResponse;     fResponse     = 0;
91     if(fSimulation!=0)   delete fSimulation;   fSimulation   = 0;
92     if(fReconst!=0)      delete fReconst;      fReconst      = 0;
93 }
94 //______________________________________________________________________
95 AliITSDetType::AliITSDetType(const AliITSDetType &source) : TObject(source){
96     //     Copy Constructor
97     // Inputs:
98     //   const AliITSDetType &source  class to copy from.
99     // Output:
100     //   none.
101     // Return:
102     //   none.
103
104     if(&source == this) return;
105     this->fDetType        = source.fDetType;
106     this->fReconst        = source.fReconst;
107     this->fSimulation     = source.fSimulation;
108     this->fResponse       = source.fResponse;
109     this->fSegmentation   = source.fSegmentation;
110     this->fDigClassName   = source.fDigClassName;
111     this->fClustClassName = source.fClustClassName;
112     return;
113 }
114 //______________________________________________________________________
115 AliITSDetType& AliITSDetType::operator=(const AliITSDetType &source){
116     //    Assignment operator
117     // Inputs:
118     //   const AliITSDetType &source  class to copy from.
119     // Output:
120     //   none.
121     // Return:
122     //   a new AliITSDetType class with the same values as in source.
123
124     if(&source == this) return *this;
125     this->fDetType        = source.fDetType;
126     this->fReconst        = source.fReconst;
127     this->fSimulation     = source.fSimulation;
128     this->fResponse       = source.fResponse;
129     this->fSegmentation   = source.fSegmentation;
130     this->fDigClassName   = source.fDigClassName;
131     this->fClustClassName = source.fClustClassName;
132     return *this;  
133 }