2 use static method AliRunLoader::Open("galice.root","AlicE","update") or just AliRunLoader::Open() for defaults.
3 Returns pointer to AliRunLoader on success or fatal termination on error
4 How to get total number of events in galice.root:
5 AliRunLoader::GetNumberOfEvents() (or AliRun::GetEventsPerRun() using f.e. gAlice deprecated)
6 How to get pointer to HMPID:
7 AliRunLoader()->GetAliRun()->GetDetector("HMPID") but before one needs to AliRunLoade()->Set
8 How to avoid using gAlice:
9 detector->GetLoader()->GetRunLoader()->GetAliRun() returns gAlice global pointer.
10 How to retrieve pointer to alice run loader:
11 use pHMPID->GetLoader()->GetRunLoader() (all detector classes inherit from AliDetector which has GetLoader())
12 use method AliRun::GetRunLoader for gAlice (deprecated)
13 How to get pointers to different root trees:
14 TreeE belongs to AliRunLoader, available after AliRunLoader::LoadHeader()
15 TreeK belongs to AliRunLoader, available after AliRunLoader::LoadKinematics()
16 TreeH belongs to AliLoader , available after AliLoader::LoadHits()
17 TreeS belongs to AliLoader , available after AliLoader::LoadSDigits()
18 TreeD belongs to AliLoader , available after AliLoader::LoadDigits()
19 TreeR belongs to AliLoader , available after AliLoader::LoadRecPoints()
20 all methods return 0 on success.
21 How to get event of interest:
22 AliRunLoader::GetEvent(event_number) returns 0 on success
23 How to deal with the stack of particles?
24 - first of all, the stack includes primary as well as secondary particles
25 - pointer to the stack is taken:
26 AliRun::Stack() (global gAlice of type AliRun - deprecated way to do)
27 AliRunLoader::Stack() but before one needs to load event header by AliRunLoader::LoadHeader() otherwise both methods return 0.
28 Moreover loading header gives the information about number of particles only.
29 To retrieve the list of particle one also needs to load kinematics by AliRunLoader::LoadKinematics()
30 - total amount of particles in stack for a given event:
32 AliRun::GetEvent() (after LoadHeader())
33 - total amount of primary particles in stack for a given event (after LoadHeader()):
34 AliStack::GetNprimary()
36 Hits are stored on primary by primary basis. Hits for the given primary is TClonesArray.
37 To retrieve all hits one needs to do:
38 -initialize the root tree and containers: pRich->GetLoader()->LoadHits(); (AliLoader::LoadHits() returns 0 on success)
39 -read number of entries in TreeH: pRich->GetLoader()->TreeH()->GetEntries()
40 -then for each entry: pRich->GetLoader()->TreeH()->GetEntry(i)
41 How to retrieve sdigits?
42 Sdigits stored in tree S with the branch of TClonesArray, all sdigits in a single TClonesArray
43 So the tree has only one entry.
45 -pRich->GetLoader()->LoadSDigits(); this one open file, get the tree and invoke AliHMPID::SetTreeAddress()
46 How to retrieve digits?
47 Digits stored in tree D with the 7 branches of TClonesArray, one per chamber, all digits of a given chamber in a single TClonesArray
48 So the tree has only one entry.
50 pRich->GetLoader()->LoadDigits(); this one opens file, gets the tree and invoke AliHMPID::SetTreeAddress() which in turn corresponds
51 branches of the tree to the digits containers in memory. There are 7 containers, one per chamber, all of them belong to AliHMPID.
52 -Then one needs to take the tree entry (only one) to the memory:
53 pRich->GetLoader()->TreeD()->GetEntry(0)
54 -Finally pRich->Digits(chamber_number) returns the pointer to TClonesArray of AliHMPIDdigit
55 What are the debug methods avail:
56 AliLog::SetGlobalDebugLevel(AliLog::kDebug)
57 How to get info for a given particle number:
58 Header and Kinematics trees must be loaded, then possible to retrieve pointer to Stack of particles
59 Int_t AliRunLoader::LoadHeader(); Int_t AliRunLoader::LoadKinematics()
60 AliStack *AliRunLoader::Stack()
61 TParticle *AliStack::Particle(tid)
63 How to deal with AliRunDigitizer:
64 AliRunDigitizer::Exec() just call AliRunDigitizer::Digitize()
65 What are the meanings of different VMC flags:
68 gMC->IsTrackDisappeared()
69 How to get pad number for a local position:
70 use static TVector AliHMPIDParam::Loc2Pad(TVector2 position);
71 Why list of chambers belongs to AliHMPIDParam:
73 How to check if a given stack particle is primary:
74 Stack is TClonesArray of TParticle. TParticle::GetMother(0) returns -1 if it's primary (no mother)
75 How to loop over all possible object:
76 for(Int_t iEventN=0;iEventN < GetLoader()->GetRunLoader()->GetAliRun()->GetEventsPerRun();iEventN++){//events loop
77 for(Int_t iEntryN=0;iEntryN < GetLoader()->TreeH()->GetEntries();iEntryN++){//TreeH loop
78 GetLoader()->TreeH()->GetEntry(iEntryN);//get current entry (prim)
79 for(Int_t iHitN=0;iHitN<Hits()->GetEntries();iHitN++){//hits loop
80 AliVHMPIDHit *pHit=(AliVHMPIDHit*)Hits()->At(iHitN);//get current hit
87 HMPID full simulation-reconstruction sequence
90 Responsible method is AliHMPID::Hits2SDigits
91 One hit may affect one or more pads.
92 Hit position is taken on the anode wires plane as the most of avalanche is developed there.
93 This position is not directly available, track intersections with entrance and exit of amplification gap are only stored.
94 So the position in the middle of the gap is calculated as average out of pHit->In() and pHit->Out() positions.
95 Then, total charge collected for this hit is calculated by AliHMPIDParam::Hit2Qdc.
96 Area of disintegration is a list of pads affected by current hit. This is a parameter of Mathienson
98 The necessety of sdigits is dictated by the fact that transport engine transports tracks in a continuous sequence track by track.
99 It means that it may happen that the same pad is affected by few tracks. But this might be known only after the transport of full event is finished.
102 A set of neighboring digits compose cluster. The aim of this transformation is to construct a list of clusters out of digits list.
103 The calling sequence is:
104 AliReconstruction::Run()
106 AliHMPIDReconstructor::Reconstruct() creates an empty clusters list, loops on chambers, retrieves a list of digits for a given chamber, gives it to the method Dig2Clu() and finally serializes
109 AliHMPIDReconstructor::Dig2Clu() which knows no details about
112 clusters+tracks->theta cerenkov
124 Generalized structure of AliReconstruction:
128 if(there is galice.root) <-|
129 AliRunLoader::Open(....) |
130 else | this is done in InitRunLoader()
131 if(raw data process requested) |
132 create galice.root on the base of AliRawReader::NextEvent <-|
134 for(all detectors){ <-|
135 if(detector not selected to run) skip this detector | this is done in RunLocalReconstruction()
136 reconstructor=get detector's reconstructor |
138 if(detector HasLocalReconstruction) skip this detector | IMPORTANT! if HasLocalReconstruction() returns YES use RunLocalEventReconstruction instead
139 if(run upon raw data) |
140 reconstructor->Reconstruct(fRunLoader, fRawReader); |
141 else | <- this approach is currently used by HMPID as all branches are mounted in AliHMPID.cxx
142 reconstructor->Reconstruct(fRunLoader); |
147 for(all detectors){ |
148 if(detector not selected to run) skip this detector |
149 reconstructor=get detector's reconstructor |
150 loader=get detector's loader | this is done in RunLocalEventReconstruction()
151 if(raw data process requested and detector HasDigitConversion){ |
152 loader->LoadDigits("update"); | open file and invoke detector->SetTreeAddress();
153 loader->CleanDigits(); |
154 loader->MakeDigitsContainer(); | create tree
155 reconstructor->Reconstruct(fRawReader,loader->TreeD()); | expected to fill TreeD out of raw reader
156 loader->WriteDigits("overwrite"); |
157 loader->UnloadDigits(); |
159 if(detector do not HasLocalReconstruction) skip this detector | IMPORTANT! assumed that this detector is already processed in RunLocalReconstruction()
160 loader->LoadRecPoints("update"); |
161 loader->CleanRecPoints(); |
162 loader->MakeRecPointsContainer(); |
163 if(fRawReader && reconstructor do not HasDigitConversion()){ |
164 reconstructor->Reconstruct(fRawReader, loader->TreeR()); | expected to fill TreeR out of raw reader
166 loader->LoadDigits("read"); |
167 reconstructor->Reconstruct(loader->TreeD(),loader->TreeR()); | the only operations inside are pDigTree->GetEntry(0) and pCluTree->Fill();
168 loader->UnloadDigits(); |
170 loader->WriteRecPoints("OVERWRITE"); |
171 loader->UnloadRecPoints(); |
178 HMPID calibration and alignment.
181 HMPID calibration and alignment strategy is described with emphasis put on those aspects of the procedure which are relevant for reconstruction and thus the final detector
182 figure of merit. In particular, the refractive index calibration technique based on mass plot shifts analysis and chamber alignment with respect to core detectors
183 are explained in details. External sources of calibration and alignment data are also mentioned as well as the way HMPID intends to handle those data, including initial CDB
187 Looking on HMPID chamber structure, full description of which is available elsewhere (ref RichTDR), easy to compile the table of all possible parameters affecting reconstruction.
188 The first one of major importance is a freon refractive index. Although the full optical path visible by photons includes freon vessel, proximity and amplification gaps filled
189 with methane and quartz window separating above mentioned volumes, only freon refractive index is subject for calibration. Refractive index of SiO2 window is not practically
190 affected by any external parameters, while influence of methane temperature to it's refractive index is negligible. So it's enough to measure there optical curves just once.
191 In the rest, the only changeable parameter is refractive index of freon. Temperature influence on freon refractive index was measured experimentally. The parametrization
193 n=n0-0.0005(T-20) where T is freon temperature in degrees Celsius
194 n0=Sqrt(1+ 0.554*lamda^2/(lamda^2-5796)) where lamda is photon wavelength in nm taken at 20 degrees Celsius
195 Preliminary, the parametrization itself is considered to be permanent one. The only parameter to store and retrieve is freon temperature. Since this value is available from
196 DCS DB and expected to be served by a SHUTTLE program which is not yet ready, the following temporarily solution has been adopted.
197 In local CDB storage (default directory is $ALICE_ROOT) two versions of freon refractive index are written by external macro RichCdb.C :
198 Run0_0_v0_s0.root contains DiMauro's parametrization and the temperature is set to 20 degrees. To be used as default for simulation and reconstruction.
199 Run0_0_v0_s1.root contains DiMauro's parametrization and the temperature is set to 50 degrees. To be used in special uncalibrated reconstruction to test calibration procedure.
200 Both of them are valid in run range from run number 0 to run number 0, thus in no way affecting any normal operations.
202 Refractive index of freon (C6F14) is taken in AliHMPIDRecon for 3 different photon energies by means of 2 methods: Set
207 Information about detector position and orientation is needed during reconstruction phase. This information affects track-cluster matching procedure, the relevant peace of
208 code comes to AliHMPIDTracker::PropogateBack(). Matching procedure consists in prolongation of the track reconstructed in core detectors up to each HMPID chamber plane in
209 a sequence. The plane used is the entrance to HMPID radiators. If the intersection exists and inside the sensitive area, the point of intersection is to be transformed to HMPID
210 local reference system. Note, that in this check, the dead zones in-between radiators are not taken into account. This operation requiring MARS to LORS transformations is done
211 in AliHMPIDHelix::RichIntersection(). Plane to be intersected is defined by a point belonging to that plane served by AliHMPIDParam::Center(ChamberNumber) and a vector normal
212 to the plane served by AliHMPIDParam::Norm(ChamberNumber). Transformations itself are done in AliHMPIDParam::Mars2Lors() and AliHMPIDParam::Lors2Mars(). Internaly in AliHMPIDParam,
213 each chamber is represented by TGeoHMatrix. It's worth to stress again that geometry related operations are needed to be done for 3 different planes per chamber, namely entrance
214 to radiator, anode wires plane and photocathode plane. So AliHMPIDParam sustains 7*3=21 planes. Also important to say, that direct usage of TGeoHMatrix::MasterToLocal()
215 and vice versa is not possible due to special nature of HMPID LORS. According to the decision made about 3 years ago, HMPID local reference system is centered in low left
216 hand corner of the chamber if one looks from outside to direction pointing to intersection point.
217 So the most obvious candidate for alignable objects to be stored are these 21 TGeoHMatrix objects.
218 The approach suggested in AliAlignObj is not quite feasible mainly due to the fact it relays on incrementing procedure using import from geometry.root. HMPID geometry is defined
219 in a way that there is no volumes exactly corresponding to the HMPID planes.
221 Geometry of HMPID chambers.
222 After the decision to rotate the whole HMPID setup from 12 o'clock position to 2 o'clock position we have the following situation:
224 Theta = 109.5 degrees for chambers 1,3
225 Theta = 90.0 degrees for chambers 2,4,6
226 Theta = 70.5 degrees for chambers 5,7
228 Phi = 50.0 degrees for chambers 6,7
229 Phi = 30.0 degrees for chambers 3,4,5
230 Phi = 10.0 degrees for chambers 1,2
233 Old parametrization by AliHMPIDChamber:
234 HMPID chamber 1 (454.877118 , 80.207109 , -163.565361)(rho,theta,phi)=(490.0,109.5,10.0)
235 HMPID chamber 2 (482.555799 , 85.087607 , 0.000000)(rho,theta,phi)=(490.0, 90.0,10.0)
236 HMPID chamber 3 (400.012224 , 230.947165 , -163.565361)(rho,theta,phi)=(490.0,109.5,30.0)
237 HMPID chamber 4 (424.352448 , 245.000000 , 0.000000)(rho,theta,phi)=(490.0, 90.0,30.0)
238 HMPID chamber 5 (400.012224 , 230.947165 , 163.565361)(rho,theta,phi)=(490.0, 70.5,30.0)
239 HMPID chamber 6 (314.965929 , 375.361777 , 0.000000)(rho,theta,phi)=(490.0, 90.0,50.0)
240 HMPID chamber 7 (296.899953 , 353.831585 , 163.565361)(rho,theta,phi)=(490.0, 70.5,50.0)
242 New parametrization by TGeoHMatrix: perfect geometry, no misalignment
244 -0.328736 -0.173648 0.928321 Tx = 454.877118
245 -0.057965 0.984808 0.163688 Ty = 80.207109
246 -0.942641 0.000000 -0.333807 Tz = -163.565361
248 0.000000 -0.173648 0.984808 Tx = 482.555799
249 0.000000 0.984808 0.173648 Ty = 85.087607
250 -1.000000 0.000000 0.000000 Tz = 0.000000
252 -0.289085 -0.500000 0.816351 Tx = 400.012224
253 -0.166903 0.866025 0.471321 Ty = 230.947165
254 -0.942641 0.000000 -0.333807 Tz = -163.565361
256 0.000000 -0.500000 0.866025 Tx = 424.352448
257 0.000000 0.866025 0.500000 Ty = 245.000000
258 -1.000000 0.000000 0.000000 Tz = 0.000000
260 0.289085 -0.500000 0.816351 Tx = 400.012224
261 0.166903 0.866025 0.471321 Ty = 230.947165
262 -0.942641 0.000000 0.333807 Tz = 163.565361
264 0.000000 -0.766044 0.642788 Tx = 314.965929
265 0.000000 0.642788 0.766044 Ty = 375.361777
266 -1.000000 0.000000 0.000000 Tz = 0.000000
268 0.214567 -0.766044 0.605918 Tx = 296.899953
269 0.255711 0.642788 0.722105 Ty = 353.831585
270 -0.942641 0.000000 0.333807 Tz = 163.565361
273 Map of all HMPID PC planes, coordinates are in spherical system= distance from IP in cm, Theta and Phi in degrees:
274 _______________________________ _______________________________
275 | 506.21 506.21| | 506.21 506.21|
276 | 63.26 78.07| | 82.59 97.41|
277 | 58.02 57.32| | 57.22 57.22|
279 | 498.00 | | 498.00 | Sensitive area (130.60,126.16)
280 | 70.50 | | 90.00 | Lors Center ( 65.30, 63.08)
283 | 506.21 506.21| | 506.21 506.21|
284 | 63.26 78.07| | 82.59 97.41|
285 | 41.98 6 42.68| | 42.78 5 42.78|
286 ------------------------------- -------------------------------
288 _______________________________ _______________________________ _______________________________
289 | 506.21 506.21| | 506.21 506.21| | 506.21 506.21|
290 | 63.26 78.07| | 82.59 97.41| | 101.93 116.74|
291 | 38.02 37.32| | 37.22 37.22| | 37.32 38.02|
293 | 498.00 | | 498.00 | | 498.00 |
294 | 70.50 | | 90.00 | | 109.50 |
295 | 30.00 | | 30.00 | | 30.00 |
297 | 506.21 506.21| | 506.21 506.21| | 506.21 506.21|
298 | 63.26 78.07| | 82.59 97.41| | 101.93 116.74|
299 | 21.98 4 22.68| | 22.78 3 22.78| | 37.32 2 38.02|
300 ------------------------------- ------------------------------- -------------------------------
302 _______________________________ _______________________________
303 | 506.21 506.21| | 506.21 506.21|
304 | 82.59 97.41| | 101.93 116.74|
305 | 17.22 17.22| | 17.32 18.02|
307 | 498.00 | | 498.00 |
311 | 506.21 506.21| | 506.21 506.21|
312 | 82.59 97.41| | 101.93 116.74|
313 | 2.78 1 2.78| | 2.68 0 1.98|
314 ------------------------------- -------------------------------