]>
Commit | Line | Data |
---|---|---|
2012850d | 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 | // Base Class for EMCAL description: | |
ffa6d63b | 20 | // This class contains material definitions |
21 | // for the EMCAL - It does not place the detector in Alice | |
2012850d | 22 | //*-- Author: Yves Schutz (SUBATECH) |
b13bbe81 | 23 | // |
24 | //*-- Additional Contributions: Sahal Yacoob (LBNL/UCT) | |
25 | // | |
2012850d | 26 | ////////////////////////////////////////////////////////////////////////////// |
27 | ||
2012850d | 28 | // --- ROOT system --- |
b13bbe81 | 29 | class TFile; |
88cb7938 | 30 | #include <TFolder.h> |
88cb7938 | 31 | #include <TTree.h> |
32 | #include <TVirtualMC.h> | |
2012850d | 33 | |
05a92d59 | 34 | // --- Standard library --- |
2012850d | 35 | |
05a92d59 | 36 | // --- AliRoot header files --- |
2012850d | 37 | #include "AliMagF.h" |
88cb7938 | 38 | #include "AliEMCAL.h" |
05a92d59 | 39 | #include "AliEMCALGeometry.h" |
88cb7938 | 40 | #include "AliEMCALLoader.h" |
85a5290f | 41 | #include "AliRun.h" |
42 | #include "AliEMCALSDigitizer.h" | |
43 | #include "AliEMCALDigitizer.h" | |
2012850d | 44 | |
45 | ClassImp(AliEMCAL) | |
2012850d | 46 | //____________________________________________________________________________ |
47 | AliEMCAL::AliEMCAL():AliDetector() | |
48 | { | |
05a92d59 | 49 | // Default ctor |
50 | fName="EMCAL"; | |
1d7b3dd6 | 51 | fGeom = 0 ; |
2012850d | 52 | } |
05a92d59 | 53 | |
2012850d | 54 | //____________________________________________________________________________ |
05a92d59 | 55 | AliEMCAL::AliEMCAL(const char* name, const char* title): AliDetector(name,title) |
56 | { | |
57 | // ctor : title is used to identify the layout | |
1fe0f889 | 58 | fGeom = 0; |
2012850d | 59 | } |
05a92d59 | 60 | |
2012850d | 61 | //____________________________________________________________________________ |
05a92d59 | 62 | AliEMCAL::~AliEMCAL() |
63 | { | |
64 | ||
2012850d | 65 | } |
66 | ||
67 | //____________________________________________________________________________ | |
05a92d59 | 68 | void AliEMCAL::CreateMaterials() |
69 | { | |
2012850d | 70 | // Definitions of materials to build EMCAL and associated tracking media. |
71 | // media number in idtmed are 1599 to 1698. | |
72 | ||
73 | // --- Air --- | |
74 | AliMaterial(0, "Air$", 14.61, 7.3, 0.001205, 30420., 67500., 0, 0) ; | |
75 | ||
b13bbe81 | 76 | |
2012850d | 77 | // --- Lead --- |
78 | AliMaterial(1, "Pb$", 207.2, 82, 11.35, 0.56, 0., 0, 0) ; | |
79 | ||
b13bbe81 | 80 | |
81 | // --- The polysterene scintillator (CH) --- | |
82 | Float_t aP[2] = {12.011, 1.00794} ; | |
83 | Float_t zP[2] = {6.0, 1.0} ; | |
84 | Float_t wP[2] = {1.0, 1.0} ; | |
85 | Float_t dP = 1.032 ; | |
86 | ||
87 | AliMixture(2, "Polystyrene$", aP, zP, dP, -2, wP) ; | |
88 | ||
89 | // --- Aluminium --- | |
90 | AliMaterial(3, "Al$", 26.98, 13., 2.7, 8.9, 999., 0, 0) ; | |
91 | // --- Absorption length is ignored ^ | |
92 | ||
2012850d | 93 | // DEFINITION OF THE TRACKING MEDIA |
94 | ||
95 | // for EMCAL: idtmed[1599->1698] equivalent to fIdtmed[0->100] | |
96 | Int_t * idtmed = fIdtmed->GetArray() - 1599 ; | |
97 | Int_t isxfld = gAlice->Field()->Integ() ; | |
98 | Float_t sxmgmx = gAlice->Field()->Max() ; | |
b13bbe81 | 99 | |
100 | ||
2012850d | 101 | |
102 | // Air -> idtmed[1599] | |
103 | AliMedium(0, "Air $", 0, 0, | |
104 | isxfld, sxmgmx, 10.0, 1.0, 0.1, 0.1, 10.0, 0, 0) ; | |
105 | ||
a63e0d5e | 106 | // The Lead -> idtmed[1600] |
2012850d | 107 | |
108 | AliMedium(1, "Lead $", 1, 0, | |
109 | isxfld, sxmgmx, 10.0, 0.1, 0.1, 0.1, 0.1, 0, 0) ; | |
110 | ||
b13bbe81 | 111 | // The scintillator of the CPV made of Polystyrene scintillator -> idtmed[1601] |
112 | AliMedium(2, "CPV scint. $", 2, 1, | |
61e0abb5 | 113 | isxfld, sxmgmx, 10.0, 0.001, 0.1, 0.001, 0.001, 0, 0) ; |
b13bbe81 | 114 | |
a63e0d5e | 115 | // Various Aluminium parts made of Al -> idtmed[1602] |
b13bbe81 | 116 | AliMedium(3, "Al parts $", 3, 0, |
117 | isxfld, sxmgmx, 10.0, 0.1, 0.1, 0.001, 0.001, 0, 0) ; | |
118 | ||
2012850d | 119 | |
b13bbe81 | 120 | // --- Set decent energy thresholds for gamma and electron tracking |
2012850d | 121 | |
122 | // Tracking threshold for photons and electrons in Lead | |
ffa6d63b | 123 | gMC->Gstpar(idtmed[1600],"CUTGAM",0.00008) ; |
124 | gMC->Gstpar(idtmed[1600],"CUTELE",0.001) ; | |
125 | gMC->Gstpar(idtmed[1600],"BCUTE",0.0001) ; | |
2012850d | 126 | |
127 | // --- Generate explicitly delta rays in Lead --- | |
128 | gMC->Gstpar(idtmed[1600], "LOSS",3.) ; | |
129 | gMC->Gstpar(idtmed[1600], "DRAY",1.) ; | |
05a92d59 | 130 | gMC->Gstpar(idtmed[1600], "DCUTE",0.00001) ; |
131 | gMC->Gstpar(idtmed[1600], "DCUTM",0.00001) ; | |
132 | ||
a63e0d5e | 133 | // --- in aluminium parts --- |
b13bbe81 | 134 | gMC->Gstpar(idtmed[1602], "LOSS",3.) ; |
135 | gMC->Gstpar(idtmed[1602], "DRAY",1.) ; | |
05a92d59 | 136 | gMC->Gstpar(idtmed[1602], "DCUTE",0.00001) ; |
137 | gMC->Gstpar(idtmed[1602], "DCUTM",0.00001) ; | |
b13bbe81 | 138 | |
ffa6d63b | 139 | // --- and finally thresholds for photons and electrons in the scintillator --- |
61e0abb5 | 140 | gMC->Gstpar(idtmed[1601],"CUTGAM",0.00008) ; |
141 | gMC->Gstpar(idtmed[1601],"CUTELE",0.001) ; | |
142 | gMC->Gstpar(idtmed[1601],"BCUTE",0.0001) ; | |
143 | ||
2012850d | 144 | } |
05a92d59 | 145 | |
146 | //____________________________________________________________________________ | |
147 | AliEMCALGeometry * AliEMCAL::GetGeometry() const | |
148 | { | |
149 | // gets the pointer to the AliEMCALGeometry unique instance | |
05a92d59 | 150 | |
1d7b3dd6 | 151 | if (fGeom) |
152 | return fGeom ; | |
153 | else | |
154 | return AliEMCALGeometry::GetInstance(GetTitle(),"") ; | |
05a92d59 | 155 | } |
156 | ||
2012850d | 157 | //____________________________________________________________________________ |
158 | void AliEMCAL::SetTreeAddress() | |
159 | { | |
d64c959b | 160 | // Linking Hits in Tree to Hits array |
2012850d | 161 | TBranch *branch; |
162 | char branchname[20]; | |
163 | sprintf(branchname,"%s",GetName()); | |
164 | ||
165 | // Branch address for hit tree | |
88cb7938 | 166 | TTree *treeH = TreeH(); |
167 | if (treeH) { | |
2012850d | 168 | branch = treeH->GetBranch(branchname); |
88cb7938 | 169 | if (branch) |
170 | { | |
d64c959b | 171 | if (fHits == 0x0) |
172 | fHits= new TClonesArray("AliEMCALHit",1000); | |
88cb7938 | 173 | branch->SetAddress(&fHits); |
174 | } | |
175 | else | |
176 | { | |
177 | Warning("SetTreeAddress","<%s> Failed",GetName()); | |
178 | } | |
2012850d | 179 | } |
2012850d | 180 | } |
2012850d | 181 | |
88cb7938 | 182 | //____________________________________________________________________________ |
183 | AliLoader* AliEMCAL::MakeLoader(const char* topfoldername) | |
184 | { | |
185 | //different behaviour than standard (singleton getter) | |
186 | // --> to be discussed and made eventually coherent | |
187 | fLoader = new AliEMCALLoader(GetName(),topfoldername); | |
188 | return fLoader; | |
189 | } | |
85a5290f | 190 | |
191 | //____________________________________________________________________________ | |
192 | void AliEMCAL::Hits2SDigits() | |
193 | { | |
194 | // create summable digits | |
195 | ||
196 | AliEMCALSDigitizer* emcalDigitizer = | |
197 | new AliEMCALSDigitizer(fLoader->GetRunLoader()->GetFileName().Data()); | |
198 | emcalDigitizer->ExecuteTask(); | |
199 | } | |
200 | ||
201 | //____________________________________________________________________________ | |
c92eb8ad | 202 | AliDigitizer* AliEMCAL::CreateDigitizer(AliRunDigitizer* manager) const |
85a5290f | 203 | { |
204 | return new AliEMCALDigitizer(manager); | |
205 | } |