]>
Commit | Line | Data |
---|---|---|
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 | // Implementation version v1 of the PHOS particle identifier | |
20 | // Identification is based on information from PPSD and EMC | |
21 | // | |
22 | //*-- Author: Yves Schutz (SUBATECH) & Gines Martinez (SUBATECH) | |
23 | ||
24 | ||
25 | // --- ROOT system --- | |
26 | ||
27 | // --- Standard library --- | |
28 | ||
29 | #include <iostream.h> | |
30 | ||
31 | // --- AliRoot header files --- | |
32 | ||
33 | #include "AliPHOSPIDv1.h" | |
34 | #include "AliPHOSTrackSegment.h" | |
35 | #include "AliPHOSRecParticle.h" | |
36 | #include "AliPHOSIndexToObject.h" | |
37 | ||
38 | ClassImp( AliPHOSPIDv1) | |
39 | ||
40 | //____________________________________________________________________________ | |
41 | AliPHOSPIDv1::AliPHOSPIDv1():AliPHOSPID() | |
42 | { | |
43 | fCutOnDispersion = 2.0; | |
44 | fCutOnRelativeDistance = 3.0 ; | |
45 | } | |
46 | ||
47 | //____________________________________________________________________________ | |
48 | Float_t AliPHOSPIDv1::GetDistanceInPHOSPlane(AliPHOSEmcRecPoint * emcclu,AliPHOSPpsdRecPoint * PpsdClu, Bool_t &toofar, Option_t * Axis) | |
49 | { | |
50 | // Calculates the distance between the EMC RecPoint and the PPSD RecPoint | |
51 | ||
52 | Float_t r; | |
53 | TVector3 vecEmc ; | |
54 | TVector3 vecPpsd ; | |
55 | ||
56 | emcclu->GetLocalPosition(vecEmc) ; | |
57 | PpsdClu->GetLocalPosition(vecPpsd) ; | |
58 | if(emcclu->GetPHOSMod() == PpsdClu->GetPHOSMod()) | |
59 | { | |
60 | ||
61 | // Correct to difference in CPV and EMC position due to different distance to center. | |
62 | // we assume, that particle moves from center | |
63 | Float_t dCPV = fGeom->GetIPtoOuterCoverDistance(); | |
64 | Float_t dEMC = fGeom->GetIPtoCrystalSurface() ; | |
65 | dEMC = dEMC / dCPV ; | |
66 | vecPpsd = dEMC * vecPpsd - vecEmc ; | |
67 | r = vecPpsd.Mag() ; | |
68 | if (Axis == "X") r = vecPpsd.X(); | |
69 | if (Axis == "Y") r = vecPpsd.Y(); | |
70 | if (Axis == "Z") r = vecPpsd.Z(); | |
71 | if (Axis == "R") r = vecPpsd.Mag(); | |
72 | ||
73 | } | |
74 | else | |
75 | { | |
76 | toofar = kTRUE ; | |
77 | } | |
78 | return r ; | |
79 | } | |
80 | ||
81 | //____________________________________________________________________________ | |
82 | void AliPHOSPIDv1::MakeParticles(AliPHOSTrackSegment::TrackSegmentsList * trsl, | |
83 | AliPHOSRecParticle::RecParticlesList * rpl) | |
84 | { | |
85 | // Makes a RecParticle out of a TrackSegment | |
86 | ||
87 | TIter next(trsl) ; | |
88 | AliPHOSTrackSegment * tracksegment ; | |
89 | Int_t index = 0 ; | |
90 | AliPHOSRecParticle * rp ; | |
91 | Bool_t tDistance; | |
92 | Int_t type ; | |
93 | Int_t showerprofile; // 0 narrow and 1 wide | |
94 | Int_t cpvdetector ; // 1 hit and 0 no hit | |
95 | Int_t pcdetector ; // 1 hit and 0 no hit | |
96 | ||
97 | while ( (tracksegment = (AliPHOSTrackSegment *)next()) ) { | |
98 | new( (*rpl)[index] ) AliPHOSRecParticle(tracksegment) ; | |
99 | rp = (AliPHOSRecParticle *)rpl->At(index) ; | |
100 | AliPHOSEmcRecPoint * recp = tracksegment->GetEmcRecPoint() ; | |
101 | AliPHOSPpsdRecPoint * rpcpv = tracksegment->GetPpsdUpRecPoint() ; | |
102 | AliPHOSPpsdRecPoint * rppc = tracksegment->GetPpsdLowRecPoint() ; | |
103 | ||
104 | // Float_t * lambda = new Float_t[2]; | |
105 | // recp->GetElipsAxis(lambda) ; | |
106 | ||
107 | // // Looking at the lateral development of the shower | |
108 | // if ( ( lambda[0] > fLambda1m && lambda[0] < fLambda1M ) && // shower profile cut | |
109 | // ( lambda[1] > fLambda2m && lambda[1] < fLambda2M ) ) | |
110 | // // Float_t R ; | |
111 | // //R=(lambda[0]-1.386)*(lambda[0]-1.386)+1.707*1.707*(lambda[1]-1.008)*(lambda[1]-1.008) ; | |
112 | // //if(R<0.35*0.35) | |
113 | ||
114 | Float_t Dispersion; | |
115 | Dispersion = recp->GetDispersion(); | |
116 | if (Dispersion < fCutOnDispersion) | |
117 | showerprofile = 0 ; // NARROW PROFILE | |
118 | else | |
119 | showerprofile = 1 ;// WIDE PROFILE | |
120 | ||
121 | ||
122 | // Looking at the photon conversion detector | |
123 | if( tracksegment->GetPpsdLowRecPoint() == 0 ) | |
124 | pcdetector = 0 ; // No hit | |
125 | else{ | |
126 | if (GetDistanceInPHOSPlane(recp, rppc, tDistance, "R") < fCutOnRelativeDistance) | |
127 | pcdetector = 1 ; // hit | |
128 | else | |
129 | pcdetector = 0 ; | |
130 | } | |
131 | ||
132 | // Looking at the photon conversion detector | |
133 | if( tracksegment->GetPpsdUpRecPoint() == 0 ) | |
134 | cpvdetector = 0 ; // No hit | |
135 | else{ | |
136 | if (GetDistanceInPHOSPlane(recp, rpcpv, tDistance, "R")< fCutOnRelativeDistance) | |
137 | cpvdetector = 1 ; // Hit | |
138 | else | |
139 | cpvdetector = 0 ; | |
140 | } | |
141 | ||
142 | type = showerprofile + 2 * pcdetector + 4 * cpvdetector ; | |
143 | rp->SetType(type) ; | |
144 | index++ ; | |
145 | } | |
146 | ||
147 | } | |
148 | ||
149 | //____________________________________________________________________________ | |
150 | void AliPHOSPIDv1:: Print(const char * opt) | |
151 | { | |
152 | // Print the parameters used for the particle type identification | |
153 | ||
154 | cout << "AliPHOSPIDv1 : cuts for the particle idendification based on the shower profile " << endl | |
155 | << fLambda1m << " < value1 < " << fLambda1M << endl | |
156 | << fLambda2m << " < value2 < " << fLambda2M << endl ; | |
157 | ||
158 | } | |
159 | ||
160 | //____________________________________________________________________________ | |
161 | void AliPHOSPIDv1::SetShowerProfileCuts(Float_t l1m, Float_t l1M, Float_t l2m, Float_t l2M) | |
162 | { | |
163 | // Modifies the parameters used for the particle type identification | |
164 | ||
165 | fLambda1m = l1m ; | |
166 | fLambda1M = l1M ; | |
167 | fLambda2m = l2m ; | |
168 | fLambda2M = l2M ; | |
169 | } | |
170 | ||
171 | //____________________________________________________________________________ | |
172 | void AliPHOSPIDv1::SetRelativeDistanceCut(Float_t CutOnRelativeDistance) | |
173 | { | |
174 | // Modifies the parameters used for the particle type identification | |
175 | ||
176 | fCutOnRelativeDistance = CutOnRelativeDistance ; | |
177 | ||
178 | } | |
179 |