Lines getting the matched track moved to a method in AliCalorimeterUtils. Lines copie...
[u/mrichter/AliRoot.git] / PWG2 / FEMTOSCOPY / AliFemtoUser / AliFemtoShareQualityTPCEntranceSepPairCut.cxx
CommitLineData
0b3bd1ac 1/////////////////////////////////////////////////////////////////////////////
2// //
3// AliFemtoShareQualityTPCEntranceSepPairCut - a pair cut which checks //
4// for some pair qualities that attempt to identify slit/doubly //
5// reconstructed tracks and also selects pairs based on their separation //
6// at the entrance to the TPC //
7// //
8/////////////////////////////////////////////////////////////////////////////
9/***************************************************************************
10 *
11 * $Id: AliFemtoShareQualityTPCEntranceSepPairCut.cxx,v 1.1.2.1 2007/10/19 13:35:33 akisiel Exp $
12 *
13 * Author: Adam Kisiel, Ohio State, kisiel@mps.ohio-state.edu
14 ***************************************************************************
15 *
16 * Description: part of STAR HBT Framework: AliFemtoMaker package
17 * a cut to remove "shared" and "split" pairs
18 *
19 ***************************************************************************
20 *
21 *
22 **************************************************************************/
23
24#include "AliFemtoShareQualityTPCEntranceSepPairCut.h"
25#include <string>
26#include <cstdio>
27
28#ifdef __ROOT__
29ClassImp(AliFemtoShareQualityTPCEntranceSepPairCut)
30#endif
31
32//__________________
33AliFemtoShareQualityTPCEntranceSepPairCut::AliFemtoShareQualityTPCEntranceSepPairCut():
34 AliFemtoShareQualityPairCut(),
35 fDTPCMin(0)
36{
37}
38//__________________
39AliFemtoShareQualityTPCEntranceSepPairCut::AliFemtoShareQualityTPCEntranceSepPairCut(const AliFemtoShareQualityTPCEntranceSepPairCut& c) :
40 AliFemtoShareQualityPairCut(c),
41 fDTPCMin(0)
42{
43 fDTPCMin = c.fDTPCMin;
44}
45
46//__________________
47AliFemtoShareQualityTPCEntranceSepPairCut::~AliFemtoShareQualityTPCEntranceSepPairCut(){
48 /* no-op */
49}
50//__________________
d4fd39c5 51
52AliFemtoShareQualityTPCEntranceSepPairCut& AliFemtoShareQualityTPCEntranceSepPairCut::operator=(const AliFemtoShareQualityTPCEntranceSepPairCut& c)
53{
54 if (this != &c) {
55 AliFemtoShareQualityPairCut::operator=(c);
56 fDTPCMin = c.fDTPCMin;
57 }
58
59 return *this;
60}
61//__________________
0b3bd1ac 62bool AliFemtoShareQualityTPCEntranceSepPairCut::Pass(const AliFemtoPair* pair){
63 // Accept pairs based on their TPC entrance separation and
64 // quality and sharity
65 bool temp = true;
66
67 double distx = pair->Track1()->Track()->NominalTpcEntrancePoint().x() - pair->Track2()->Track()->NominalTpcEntrancePoint().x();
68 double disty = pair->Track1()->Track()->NominalTpcEntrancePoint().y() - pair->Track2()->Track()->NominalTpcEntrancePoint().y();
69 double distz = pair->Track1()->Track()->NominalTpcEntrancePoint().z() - pair->Track2()->Track()->NominalTpcEntrancePoint().z();
70 double dist = sqrt(distx*distx + disty*disty + distz*distz);
71
72 temp = dist > fDTPCMin;
73
74 if (temp) {
75 temp = AliFemtoShareQualityPairCut::Pass(pair);
76 }
77 else
78 fNPairsFailed++;
79
80 return temp;
81}
82//__________________
83AliFemtoString AliFemtoShareQualityTPCEntranceSepPairCut::Report(){
84 // Prepare a report from the execution
85 string stemp = "AliFemtoShareQualityTPCEntranceSep Pair Cut - remove shared and split pairs and pairs with small separation at the entrance to the TPC\n"; char ctemp[100];
adecdc37 86 snprintf(ctemp , 100, "Accept pair with TPC entrance separation more that %f",fDTPCMin);
0b3bd1ac 87 stemp += ctemp;
adecdc37 88 snprintf(ctemp , 100, "Number of pairs which passed:\t%ld Number which failed:\t%ld\n",fNPairsPassed,fNPairsFailed);
0b3bd1ac 89 stemp += ctemp;
90 AliFemtoString returnThis = stemp;
91 return returnThis;}
92//__________________
93
94TList *AliFemtoShareQualityTPCEntranceSepPairCut::ListSettings()
95{
96 // return a list of settings in a writable form
97 TList *tListSetttings = AliFemtoShareQualityPairCut::ListSettings();
98 char buf[200];
db2d5b4b 99 snprintf(buf, 200, "AliFemtoShareQualityTPCEntranceSepPairCut.tpcentsepmin=%f", fDTPCMin);
0b3bd1ac 100 tListSetttings->AddLast(new TObjString(buf));
101
102 return tListSetttings;
103}
104
105void AliFemtoShareQualityTPCEntranceSepPairCut::SetTPCEntranceSepMinimum(double dtpc)
106{
107 fDTPCMin = dtpc;
108}