]>
Commit | Line | Data |
---|---|---|
6ad0bfa0 | 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 | ||
b2a60966 | 16 | /* $Id$ */ |
17 | ||
6ad0bfa0 | 18 | //_________________________________________________________________________ |
b2a60966 | 19 | // Implementation version v1 of the PHOS particle identifier |
20 | // Identification is based on information from PPSD and EMC | |
21 | // | |
2aad621e | 22 | //*-- Author: Yves Schutz (SUBATECH) & Gines Martinez (SUBATECH) |
b2a60966 | 23 | |
6ad0bfa0 | 24 | |
25 | // --- ROOT system --- | |
26 | ||
27 | // --- Standard library --- | |
28 | ||
de9ec31b | 29 | #include <iostream.h> |
6ad0bfa0 | 30 | |
31 | // --- AliRoot header files --- | |
32 | ||
26d4b141 | 33 | #include "AliPHOSPIDv1.h" |
6ad0bfa0 | 34 | #include "AliPHOSTrackSegment.h" |
35 | #include "AliPHOSRecParticle.h" | |
83974468 | 36 | #include "AliPHOSIndexToObject.h" |
6ad0bfa0 | 37 | |
26d4b141 | 38 | ClassImp( AliPHOSPIDv1) |
6ad0bfa0 | 39 | |
6ad0bfa0 | 40 | //____________________________________________________________________________ |
0dd37dda | 41 | void AliPHOSPIDv1::MakeParticles(TrackSegmentsList * trsl, RecParticlesList * rpl) |
6ad0bfa0 | 42 | { |
b2a60966 | 43 | // Makes a RecParticle out of a TrackSegment |
6ad0bfa0 | 44 | |
45 | TIter next(trsl) ; | |
46 | AliPHOSTrackSegment * tracksegment ; | |
47 | Int_t index = 0 ; | |
09fc14a0 | 48 | AliPHOSRecParticle * rp ; |
0dd37dda | 49 | Int_t type ; |
2aad621e | 50 | Int_t shower_profile; // 0 narrow and 1 wide |
51 | Int_t cpv_detector; // 1 hit and 0 no hit | |
52 | Int_t pc_detector; // 1 hit and 0 no hit | |
0dd37dda | 53 | |
6ad0bfa0 | 54 | while ( (tracksegment = (AliPHOSTrackSegment *)next()) ) { |
09fc14a0 | 55 | new( (*rpl)[index] ) AliPHOSRecParticle(tracksegment) ; |
83974468 | 56 | rp = (AliPHOSRecParticle *)rpl->At(index) ; |
2aad621e | 57 | AliPHOSEmcRecPoint * recp = tracksegment->GetEmcRecPoint() ; |
58 | Float_t * lambda = new Float_t[2]; | |
59 | recp->GetElipsAxis(lambda) ; | |
60 | ||
61 | // Looking at the lateral development of the shower | |
62 | if ( ( lambda[0] > fLambda1m && lambda[0] < fLambda1M ) && // shower profile cut | |
63 | ( lambda[1] > fLambda2m && lambda[1] < fLambda2M ) ) shower_profile = 0 ; // NARROW PROFILE | |
64 | else shower_profile = 1 ;// WIDE PROFILE | |
65 | ||
66 | // Looking at the photon conversion detector | |
67 | if( tracksegment->GetPpsdLowRecPoint() == 0 ) pc_detector = 0; // No hit | |
68 | else pc_detector = 1; // hit | |
69 | ||
70 | // Looking at the photon conversion detector | |
71 | if( tracksegment->GetPpsdUpRecPoint() == 0 ) cpv_detector = 0; // No hit | |
72 | else cpv_detector = 1; // Hit | |
73 | ||
74 | type = shower_profile + 2*pc_detector + 4*cpv_detector; | |
09fc14a0 | 75 | rp->SetType(type) ; |
6ad0bfa0 | 76 | index++ ; |
77 | } | |
78 | ||
79 | } | |
80 | ||
09fc14a0 | 81 | //____________________________________________________________________________ |
82 | void AliPHOSPIDv1:: Print() | |
83 | { | |
b2a60966 | 84 | // Print the parameters used for the particle type identification |
85 | ||
09fc14a0 | 86 | cout << "AliPHOSPIDv1 : cuts for the particle idendification based on the shower profile " << endl |
87 | << fLambda1m << " < value1 < " << fLambda1M << endl | |
88 | << fLambda2m << " < value2 < " << fLambda2M << endl ; | |
89 | ||
90 | } | |
91 | ||
92 | //____________________________________________________________________________ | |
93 | void AliPHOSPIDv1::SetShowerProfileCuts(Float_t l1m, Float_t l1M, Float_t l2m, Float_t l2M) | |
94 | { | |
b2a60966 | 95 | // Modifies the parameters used for the particle type identification |
96 | ||
09fc14a0 | 97 | fLambda1m = l1m ; |
98 | fLambda1M = l1M ; | |
99 | fLambda2m = l2m ; | |
100 | fLambda2M = l2M ; | |
101 | } |