]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSPIDv1.cxx
Debugger output in AliPHOSReconstructioner
[u/mrichter/AliRoot.git] / PHOS / AliPHOSPIDv1.cxx
CommitLineData
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//
22//*-- Author: Yves Schutz (SUBATECH)
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 38ClassImp( AliPHOSPIDv1)
6ad0bfa0 39
6ad0bfa0 40//____________________________________________________________________________
0dd37dda 41void 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 ;
50
6ad0bfa0 51 while ( (tracksegment = (AliPHOSTrackSegment *)next()) ) {
09fc14a0 52 new( (*rpl)[index] ) AliPHOSRecParticle(tracksegment) ;
83974468 53 rp = (AliPHOSRecParticle *)rpl->At(index) ;
0dd37dda 54
55 // try to figure out the type of particle:
56 // 1. just looking at the PPSD information
83974468 57
58 if( tracksegment->GetPpsdUpRecPoint() == 0 ) { // Neutral
0dd37dda 59
83974468 60 if( tracksegment->GetPpsdLowRecPoint() == 0 ) // Neutral
0dd37dda 61 type = kNEUTRAL ;
c1d256cb 62 else { // check the shower profile
63 AliPHOSEmcRecPoint * recp = tracksegment->GetEmcRecPoint() ;
64 Float_t * lambda = new Float_t[2];
65 recp->GetElipsAxis(lambda) ;
66 if ( ( lambda[0] > fLambda1m && lambda[0] < fLambda1M ) && // shower profile cut
67 ( lambda[1] > fLambda2m && lambda[1] < fLambda2M ) )
68 type = kGAMMA ; // a well identified photon
69 else
70 type = kGAMMAHADRON ; // looks like a photon but is a hadron (most likely)
71 }
72 } // Neutral
0dd37dda 73 else // Charged
74 type = kCHARGED ;
83974468 75
0dd37dda 76 // 2. from the shower profile analysis
77 if ( type == kNEUTRAL ) {
09fc14a0 78 AliPHOSEmcRecPoint * recp = tracksegment->GetEmcRecPoint() ;
79 Float_t * lambda = new Float_t[2];
80 recp->GetElipsAxis(lambda) ;
81 if ( ( lambda[0] > fLambda1m && lambda[0] < fLambda1M ) && // shower profile cut
82 ( lambda[1] > fLambda2m && lambda[1] < fLambda2M ) )
b9bbdad1 83 type = kNEUTRALEM ;
09fc14a0 84 else
b9bbdad1 85 type = kNEUTRALHADRON ;
09fc14a0 86 delete lambda ;
87 }
0dd37dda 88
89 // 3. from the shower dispersion
09fc14a0 90 if (type == kCHARGED) {
83974468 91
09fc14a0 92 if( tracksegment->GetEmcRecPoint()->GetDispersion() > fCutOnDispersion) // shower dispersion cut
93 type = kCHARGEDHADRON ;
83974468 94 // else
95 // type = kELECTRON ;
09fc14a0 96 }
97 rp->SetType(type) ;
6ad0bfa0 98 index++ ;
99 }
100
101}
102
09fc14a0 103//____________________________________________________________________________
104void AliPHOSPIDv1:: Print()
105{
b2a60966 106 // Print the parameters used for the particle type identification
107
09fc14a0 108 cout << "AliPHOSPIDv1 : cuts for the particle idendification based on the shower profile " << endl
109 << fLambda1m << " < value1 < " << fLambda1M << endl
110 << fLambda2m << " < value2 < " << fLambda2M << endl ;
111
112}
113
114//____________________________________________________________________________
115void AliPHOSPIDv1::SetShowerProfileCuts(Float_t l1m, Float_t l1M, Float_t l2m, Float_t l2M)
116{
b2a60966 117 // Modifies the parameters used for the particle type identification
118
09fc14a0 119 fLambda1m = l1m ;
120 fLambda1M = l1M ;
121 fLambda2m = l2m ;
122 fLambda2M = l2M ;
123}