]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/PHOS-HTML/src/AliPHOSPIDv1.cxx.html
This commit was generated by cvs2svn to compensate for changes in r799,
[u/mrichter/AliRoot.git] / PHOS / PHOS-HTML / src / AliPHOSPIDv1.cxx.html
1 <!DOCTYPE HTML PUBLIC "-// IETF/DTD HTML 2.0// EN">
2 <html>
3 <!--                                             -->
4 <!-- Author: ROOT team (rootdev@hpsalo.cern.ch)  -->
5 <!--                                             -->
6 <!--   Date: Thu Mar  9 00:11:50 2000            -->
7 <!--                                             -->
8 <head>
9 <title>AliPHOSPIDv1 - source file</title>
10 <link rev=made href="mailto:rootdev@root.cern.ch">
11 <meta name="rating" content="General">
12 <meta name="objecttype" content="Manual">
13 <meta name="keywords" content="software development, oo, object oriented, unix, x11, motif, windows nt, c++, html, rene brun, fons rademakers">
14 <meta name="description" content="ROOT - An Object Oriented Framework For Large Scale Data Analysis.">
15 </head>
16 <body BGCOLOR="#ffffff" LINK="#0000ff" VLINK="#551a8b" ALINK="#ff0000" TEXT="#000000">
17 <a name="TopOfPage"></a>
18 <pre>
19 /**************************************************************************
20  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
21  *                                                                        *
22  * Author: The ALICE Off-line Project.                                    *
23  * Contributors are mentioned in the code where appropriate.              *
24  *                                                                        *
25  * Permission to use, copy, modify and distribute this software and its   *
26  * documentation strictly for non-commercial purposes is hereby granted   *
27  * without fee, provided that the above copyright notice appears in all   *
28  * copies and that both the copyright notice and this permission notice   *
29  * appear in the supporting documentation. The authors make no claims     *
30  * about the suitability of this software for any purpose. It is          *
31  * provided "as is" without express or implied warranty.                  *
32  **************************************************************************/
33
34 /* $Id$ */
35
36 <b>//_________________________________________________________________________</b>
37 <b>// Implementation version v1 of the PHOS particle identifier </b>
38 <b>// Identification is based on information from PPSD and EMC</b>
39 <b>//                  </b>
40 <b>//*-- Author: Yves Schutz (SUBATECH)</b>
41
42
43 <b>// --- ROOT system ---</b>
44
45 <b>// --- Standard library ---</b>
46
47 #include &lt;iostream&gt;
48
49 <b>// --- AliRoot header files ---</b>
50
51 #include "<a href="../AliPHOSPIDv1.h">AliPHOSPIDv1.h</a>"
52 #include "<a href="../AliPHOSTrackSegment.h">AliPHOSTrackSegment.h</a>"
53 #include "<a href="../AliPHOSRecParticle.h">AliPHOSRecParticle.h</a>"
54
55 ClassImp( AliPHOSPIDv1) 
56
57 <b>//____________________________________________________________________________</b>
58 <a name="AliPHOSPIDv1:MakeParticles"> </a><a href="../ListOfTypes.html#void">void</a>  <a href=".././AliPHOSPIDv1.html#AliPHOSPIDv1:MakeParticles">AliPHOSPIDv1::MakeParticles</a>(<a href="../ListOfTypes.html#TrackSegmentsList">TrackSegmentsList</a> * trsl, <a href="../ListOfTypes.html#RecParticlesList">RecParticlesList</a> * rpl)
59 {
60 <b>  // Makes a RecParticle out of a TrackSegment</b>
61
62   TIter next(trsl) ; 
63   <a href=".././AliPHOSTrackSegment.html">AliPHOSTrackSegment</a> * tracksegment ; 
64   <a href="../ListOfTypes.html#Int_t">Int_t</a> index = 0 ; 
65   <a href=".././AliPHOSRecParticle.html">AliPHOSRecParticle</a> * rp ; 
66   <a href="../ListOfTypes.html#Int_t">Int_t</a> type ; 
67
68   while ( (tracksegment = (<a href=".././AliPHOSTrackSegment.html">AliPHOSTrackSegment</a> *)next()) ) {
69     new( (*rpl)[index] ) <a href=".././AliPHOSRecParticle.html">AliPHOSRecParticle</a>(tracksegment) ;
70     rp = (<a href=".././AliPHOSRecParticle.html">AliPHOSRecParticle</a> *)(*rpl)[index] ; 
71
72 <b>    // try to figure out the type of particle:</b>
73 <b>    //    1. just looking at the PPSD information </b>
74     if( tracksegment-&gt;GetPpsdUp() == 0 ) {     // Neutral
75       
76       if( tracksegment-&gt;GetPpsdLow() == 0 )    // Neutral  
77         type = kNEUTRAL ;   
78       else {    // check the shower profile       
79         <a href=".././AliPHOSEmcRecPoint.html">AliPHOSEmcRecPoint</a> * recp = tracksegment-&gt;GetEmcRecPoint() ; 
80         <a href="../ListOfTypes.html#Float_t">Float_t</a> * lambda = new <a href="../ListOfTypes.html#Float_t">Float_t</a>[2]; 
81         recp-&gt;GetElipsAxis(lambda) ; 
82         if ( ( lambda[0] &gt; <a href=".././AliPHOSPIDv1.html#AliPHOSPIDv1:fLambda1m">fLambda1m</a> &amp;&amp; lambda[0] &lt; <a href=".././AliPHOSPIDv1.html#AliPHOSPIDv1:fLambda1M">fLambda1M</a> ) &amp;&amp; // shower profile cut
83              ( lambda[1] &gt; <a href=".././AliPHOSPIDv1.html#AliPHOSPIDv1:fLambda2m">fLambda2m</a> &amp;&amp; lambda[1] &lt; <a href=".././AliPHOSPIDv1.html#AliPHOSPIDv1:fLambda2M">fLambda2M</a> ) ) 
84           type = kGAMMA ;                      // a well identified photon 
85         else 
86           type = kGAMMAHADRON ;                // looks like a photon but is a hadron (most likely)  
87       }
88     } // Neutral
89     else                            // Charged           
90       type = kCHARGED ;   
91
92 <b>    //   2. from the shower profile analysis</b>
93     if ( type == kNEUTRAL ) { 
94       <a href=".././AliPHOSEmcRecPoint.html">AliPHOSEmcRecPoint</a> * recp = tracksegment-&gt;GetEmcRecPoint() ; 
95       <a href="../ListOfTypes.html#Float_t">Float_t</a> * lambda = new <a href="../ListOfTypes.html#Float_t">Float_t</a>[2]; 
96       recp-&gt;GetElipsAxis(lambda) ; 
97       if ( ( lambda[0] &gt; <a href=".././AliPHOSPIDv1.html#AliPHOSPIDv1:fLambda1m">fLambda1m</a> &amp;&amp; lambda[0] &lt; <a href=".././AliPHOSPIDv1.html#AliPHOSPIDv1:fLambda1M">fLambda1M</a> ) &amp;&amp; // shower profile cut
98            ( lambda[1] &gt; <a href=".././AliPHOSPIDv1.html#AliPHOSPIDv1:fLambda2m">fLambda2m</a> &amp;&amp; lambda[1] &lt; <a href=".././AliPHOSPIDv1.html#AliPHOSPIDv1:fLambda2M">fLambda2M</a> ) )
99         type = kNEUTRALEM ; 
100       else 
101         type = kNEUTRALHADRON ; 
102       delete lambda ; 
103    }
104
105 <b>    //   3. from the shower dispersion </b>
106     if (type == kCHARGED) { 
107       if( tracksegment-&gt;GetEmcRecPoint()-&gt;GetDispersion() &gt; <a href=".././AliPHOSPIDv1.html#AliPHOSPIDv1:fCutOnDispersion">fCutOnDispersion</a>)  // shower dispersion cut
108         type = kCHARGEDHADRON ;
109       else  
110         type = kELECTRON ; 
111     } 
112     rp-&gt;SetType(type) ; 
113     index++ ; 
114   }
115     
116 }
117
118 <b>//____________________________________________________________________________</b>
119 <a name="AliPHOSPIDv1:Print"> </a><a href="../ListOfTypes.html#void">void</a>  <a href=".././AliPHOSPIDv1.html#AliPHOSPIDv1:Print">AliPHOSPIDv1::Print</a>() 
120 {
121 <b>  // Print the parameters used for the particle type identification</b>
122   
123   cout &lt;&lt; "<a href=".././AliPHOSPIDv1.html">AliPHOSPIDv1</a> : cuts for the particle idendification based on the shower profile " &lt;&lt; endl 
124        &lt;&lt; <a href=".././AliPHOSPIDv1.html#AliPHOSPIDv1:fLambda1m">fLambda1m</a> &lt;&lt; " &lt; value1 &lt; " &lt;&lt; <a href=".././AliPHOSPIDv1.html#AliPHOSPIDv1:fLambda1M">fLambda1M</a> &lt;&lt; endl 
125        &lt;&lt; <a href=".././AliPHOSPIDv1.html#AliPHOSPIDv1:fLambda2m">fLambda2m</a> &lt;&lt; " &lt; value2 &lt; " &lt;&lt; <a href=".././AliPHOSPIDv1.html#AliPHOSPIDv1:fLambda2M">fLambda2M</a> &lt;&lt; endl ;  
126
127 }
128
129 <b>//____________________________________________________________________________</b>
130 <a name="AliPHOSPIDv1:SetShowerProfileCuts"> </a><a href="../ListOfTypes.html#void">void</a>  <a href=".././AliPHOSPIDv1.html#AliPHOSPIDv1:SetShowerProfileCuts">AliPHOSPIDv1::SetShowerProfileCuts</a>(<a href="../ListOfTypes.html#Float_t">Float_t</a> l1m, <a href="../ListOfTypes.html#Float_t">Float_t</a> l1M, <a href="../ListOfTypes.html#Float_t">Float_t</a> l2m, <a href="../ListOfTypes.html#Float_t">Float_t</a> l2M)
131 {
132 <b>  // Modifies the parameters used for the particle type identification</b>
133
134   <a href=".././AliPHOSPIDv1.html#AliPHOSPIDv1:fLambda1m">fLambda1m</a> = l1m ; 
135   <a href=".././AliPHOSPIDv1.html#AliPHOSPIDv1:fLambda1M">fLambda1M</a> = l1M ; 
136   <a href=".././AliPHOSPIDv1.html#AliPHOSPIDv1:fLambda2m">fLambda2m</a> = l2m ; 
137   <a href=".././AliPHOSPIDv1.html#AliPHOSPIDv1:fLambda2M">fLambda2M</a> = l2M ; 
138 }
139 </pre>
140
141 <!--SIGNATURE-->
142 <br>
143 <address>
144 <hr>
145 <center>
146 <a href="http://root.cern.ch/root/Welcome.html">ROOT page</a> - <a href="../ClassIndex.html">Class index</a> - <a href="#TopOfPage">Top of the page</a><br>
147 </center>
148 <hr>This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to <a href="mailto:rootdev@root.cern.ch">ROOT support</a>, or contact <a href="mailto:rootdev@root.cern.ch">the developers</a> with any questions or problems regarding ROOT.
149 </address>
150 </body>
151 </html>