1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
19 #include "AliTPCcalibTracksCuts.h"
21 ClassImp(AliTPCcalibTracksCuts);
23 AliTPCcalibTracksCuts::AliTPCcalibTracksCuts(Int_t minClusters, Float_t minRatio, Float_t max1pt,
24 Float_t edgeXZCutNoise, Float_t edgeThetaCutNoise, char* outputFileName):
25 TNamed("calibTracksCuts", "calibTracksCuts") {
27 // Constructor for AliTPCcalibTracksCuts
28 // specify the cuts to be set on the processed tracks
29 // default cuts are for comics
31 fMinClusters = minClusters;
34 fEdgeYXCutNoise = edgeXZCutNoise;
35 fEdgeThetaCutNoise = edgeThetaCutNoise;
36 fOutputFileName = new TObjString(outputFileName);
39 AliTPCcalibTracksCuts::AliTPCcalibTracksCuts(AliTPCcalibTracksCuts *cuts){
43 fMinClusters = cuts->GetMinClusters();
44 fMinRatio = cuts->GetMinRatio();
45 fMax1pt = cuts->GetMax1pt();
46 fEdgeYXCutNoise = cuts->GetEdgeYXCutNoise();
47 fEdgeThetaCutNoise = cuts->GetEdgeThetaCutNoise();
48 fOutputFileName = new TObjString(cuts->GetOutputFileName());
51 AliTPCcalibTracksCuts::AliTPCcalibTracksCuts(){
53 // default constructor
59 fEdgeThetaCutNoise = 0;
60 fOutputFileName = new TObjString("");
63 void AliTPCcalibTracksCuts::AddCuts(TChain * chain, char* ctype, char* outputFileName){
65 // add predefined cuts to the chain for processing
66 // (creates AliTPCcalibTracksCuts object)
67 // the cuts are set in the following order:
68 // fMinClusters (number of clusters)
74 // The following predefined sets of cuts can be selected:
75 // laser: 20, 0.4, 0.5, 0.13, 0.018
76 // cosmic: 20, 0.4, 0.5, 0.13, 0.018
77 // lowflux: 20, 0.4, 5, 0.2, 0.0001
78 // highflux: 20, 0.4, 5, 0.2, 0.0001
81 TString cutType(ctype);
83 AliTPCcalibTracksCuts *cuts = 0;
84 if (cutType == "LASER")
85 // cuts = new AliTPCcalibTracksCuts(20, 0.4, 0.5, 0.13, 0.018);
86 cuts = new AliTPCcalibTracksCuts(20, 0.4, 5, 0.13, 0.018, outputFileName);
87 else if (cutType == "COSMIC")
88 cuts = new AliTPCcalibTracksCuts(20, 0.4, 0.5, 0.13, 0.018, outputFileName);
89 else if (cutType == "LOWFLUX")
90 cuts = new AliTPCcalibTracksCuts(20, 0.4, 5, 0.2, 0.0001, outputFileName);
91 else if (cutType == "HIGHFLUX")
92 cuts = new AliTPCcalibTracksCuts(20, 0.4, 5, 0.2, 0.0001, outputFileName);
94 cuts = new AliTPCcalibTracksCuts(20, 0.4, 5, 0.2, 0.0001, outputFileName);
95 cerr << "WARNING! unknown type '" << ctype << "', cuts set to default values for cosmics." << endl;
98 chain->GetUserInfo()->AddLast(cuts);
99 cout << "Cuts were set to predefined set: " << cutType << endl;
102 void AliTPCcalibTracksCuts::AddCuts(TChain * chain, Int_t minClusters, Float_t minRatio, Float_t max1pt,
103 Float_t edgeXZCutNoise, Float_t edgeThetaCutNoise, char* outputFileName){
105 // add user defined cuts to the chain for processing
106 // (creates AliTPCcalibTracksCuts object)
107 // the cuts are set in the following order:
108 // fMinClusters (number of clusters)
110 // fMax1pt 1 over p_t
112 // fEdgeThetaCutNoise
114 chain->GetUserInfo()->AddLast(new AliTPCcalibTracksCuts(minClusters, minRatio, max1pt, edgeXZCutNoise, edgeThetaCutNoise, outputFileName));
115 printf("Cuts were set to the individal values: minClusters: %i, minRatio: %f, max1pt: %f, edgeXZCutNoise: %f, edgeThetaCutNoise: %f \n",
116 minClusters, minRatio, max1pt, edgeXZCutNoise, edgeThetaCutNoise);
119 void AliTPCcalibTracksCuts::Print(Option_t* option) {
120 option = option; // to avoid compiler warnings
121 cout << "<AliTPCcalibTracksCuts>: The following cuts are specified: " << endl;
122 cout << "fMinClusters: " << fMinClusters << endl;
123 cout << "fMinRatio: " << fMinRatio << endl;
124 cout << "fMax1pt: " << fMax1pt << endl;
125 cout << "fEdgeYXCutNoise: " << fEdgeYXCutNoise << endl;
126 cout << "fEdgeThetaCutNoise: " << fEdgeThetaCutNoise << endl;
127 cout << "fOutputFileName: " << fOutputFileName->String().Data() << endl;
128 } // Prints out the specified cuts