]>
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 | ||
16 | //_________________________________________________________________________ | |
26d4b141 | 17 | // Algorithm class to identify the type of particle from the PHOS TrackSegment alone |
6ad0bfa0 | 18 | //*-- Author : Y. Schutz SUBATECH |
19 | ////////////////////////////////////////////////////////////////////////////// | |
20 | ||
21 | // --- ROOT system --- | |
22 | ||
23 | // --- Standard library --- | |
24 | ||
25 | #include <iostream> | |
26 | ||
27 | // --- AliRoot header files --- | |
28 | ||
26d4b141 | 29 | #include "AliPHOSPIDv1.h" |
6ad0bfa0 | 30 | #include "AliPHOSTrackSegment.h" |
31 | #include "AliPHOSRecParticle.h" | |
32 | ||
26d4b141 | 33 | ClassImp( AliPHOSPIDv1) |
6ad0bfa0 | 34 | |
35 | ||
36 | //____________________________________________________________________________ | |
09fc14a0 | 37 | AliPHOSPIDv1::AliPHOSPIDv1(): fCutOnDispersion(1.5) |
38 | ||
6ad0bfa0 | 39 | { |
40 | // ctor | |
41 | ||
42 | } | |
43 | ||
44 | //____________________________________________________________________________ | |
26d4b141 | 45 | AliPHOSPIDv1::~AliPHOSPIDv1() |
6ad0bfa0 | 46 | { |
47 | // dtor | |
48 | } | |
49 | ||
50 | ||
51 | //____________________________________________________________________________ | |
0dd37dda | 52 | void AliPHOSPIDv1::MakeParticles(TrackSegmentsList * trsl, RecParticlesList * rpl) |
6ad0bfa0 | 53 | { |
54 | // main function, does the job | |
55 | ||
56 | TIter next(trsl) ; | |
57 | AliPHOSTrackSegment * tracksegment ; | |
58 | Int_t index = 0 ; | |
09fc14a0 | 59 | AliPHOSRecParticle * rp ; |
0dd37dda | 60 | Int_t type ; |
61 | ||
6ad0bfa0 | 62 | while ( (tracksegment = (AliPHOSTrackSegment *)next()) ) { |
09fc14a0 | 63 | new( (*rpl)[index] ) AliPHOSRecParticle(tracksegment) ; |
64 | rp = (AliPHOSRecParticle *)(*rpl)[index] ; | |
0dd37dda | 65 | |
66 | // try to figure out the type of particle: | |
67 | // 1. just looking at the PPSD information | |
68 | if( tracksegment->GetPpsdUp() == 0 ) { // Neutral | |
69 | ||
70 | if( tracksegment->GetPpsdLow() == 0 ) // Neutral | |
71 | type = kNEUTRAL ; | |
c1d256cb | 72 | else { // check the shower profile |
73 | AliPHOSEmcRecPoint * recp = tracksegment->GetEmcRecPoint() ; | |
74 | Float_t * lambda = new Float_t[2]; | |
75 | recp->GetElipsAxis(lambda) ; | |
76 | if ( ( lambda[0] > fLambda1m && lambda[0] < fLambda1M ) && // shower profile cut | |
77 | ( lambda[1] > fLambda2m && lambda[1] < fLambda2M ) ) | |
78 | type = kGAMMA ; // a well identified photon | |
79 | else | |
80 | type = kGAMMAHADRON ; // looks like a photon but is a hadron (most likely) | |
81 | } | |
82 | } // Neutral | |
0dd37dda | 83 | else // Charged |
84 | type = kCHARGED ; | |
85 | ||
86 | // 2. from the shower profile analysis | |
87 | if ( type == kNEUTRAL ) { | |
09fc14a0 | 88 | AliPHOSEmcRecPoint * recp = tracksegment->GetEmcRecPoint() ; |
89 | Float_t * lambda = new Float_t[2]; | |
90 | recp->GetElipsAxis(lambda) ; | |
91 | if ( ( lambda[0] > fLambda1m && lambda[0] < fLambda1M ) && // shower profile cut | |
92 | ( lambda[1] > fLambda2m && lambda[1] < fLambda2M ) ) | |
b9bbdad1 | 93 | type = kNEUTRALEM ; |
09fc14a0 | 94 | else |
b9bbdad1 | 95 | type = kNEUTRALHADRON ; |
09fc14a0 | 96 | delete lambda ; |
97 | } | |
0dd37dda | 98 | |
99 | // 3. from the shower dispersion | |
09fc14a0 | 100 | if (type == kCHARGED) { |
101 | if( tracksegment->GetEmcRecPoint()->GetDispersion() > fCutOnDispersion) // shower dispersion cut | |
102 | type = kCHARGEDHADRON ; | |
103 | else | |
104 | type = kELECTRON ; | |
105 | } | |
106 | rp->SetType(type) ; | |
6ad0bfa0 | 107 | index++ ; |
108 | } | |
109 | ||
110 | } | |
111 | ||
09fc14a0 | 112 | //____________________________________________________________________________ |
113 | void AliPHOSPIDv1:: Print() | |
114 | { | |
115 | cout << "AliPHOSPIDv1 : cuts for the particle idendification based on the shower profile " << endl | |
116 | << fLambda1m << " < value1 < " << fLambda1M << endl | |
117 | << fLambda2m << " < value2 < " << fLambda2M << endl ; | |
118 | ||
119 | } | |
120 | ||
121 | //____________________________________________________________________________ | |
122 | void AliPHOSPIDv1::SetShowerProfileCuts(Float_t l1m, Float_t l1M, Float_t l2m, Float_t l2M) | |
123 | { | |
124 | fLambda1m = l1m ; | |
125 | fLambda1M = l1M ; | |
126 | fLambda2m = l2m ; | |
127 | fLambda2M = l2M ; | |
128 | } |