]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HMPID/AliHMPIDRecoParam.cxx
Thresholds initialzed at SOR
[u/mrichter/AliRoot.git] / HMPID / AliHMPIDRecoParam.cxx
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
17 ///////////////////////////////////////////////////////////////////////////////
18 //                                                                           //
19 // Class to set HMPID reconstruction parameters (normal, HTA, UserCut ...    //
20 //                                                                           //  
21 //                                                                           //
22 ///////////////////////////////////////////////////////////////////////////////
23 //
24 //Email: domenico.dibari@ba.infn.it
25 //
26 #include "AliLog.h"
27 #include "AliHMPIDRecoParam.h"
28 #include "AliHMPIDParam.h"
29
30 ClassImp(AliHMPIDRecoParam)
31
32 //_____________________________________________________________________________
33 AliHMPIDRecoParam::AliHMPIDRecoParam():AliDetectorRecoParam(),   
34   fHmpRecoMode(kTRUE),fHmpFixedDistCut(kTRUE),
35   fHmpTrackMatchingDist(1.0)
36 {
37   //
38   // ctor
39   //
40   for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++) fHmpUserCut[iCh]=3;
41   for(Int_t iPol=0;iPol<5;iPol++) fHmpTrackMatchingDistParas[iPol]=0;
42 }
43 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
44 AliHMPIDRecoParam::AliHMPIDRecoParam(const AliHMPIDRecoParam &p):AliDetectorRecoParam(p),   
45     fHmpRecoMode(kTRUE),fHmpFixedDistCut(kTRUE),
46     fHmpTrackMatchingDist(1.0)
47
48    //copy Ctor
49
50    fHmpRecoMode= p.fHmpRecoMode;
51    fHmpFixedDistCut=p.fHmpFixedDistCut;
52    for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++) fHmpUserCut[iCh]=p.fHmpUserCut[iCh];
53    fHmpTrackMatchingDist=p.fHmpTrackMatchingDist;
54    for(Int_t iPol=0;iPol<5;iPol++) fHmpTrackMatchingDistParas[iPol]=p.fHmpTrackMatchingDistParas[iPol];
55 }
56
57 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
58 AliHMPIDRecoParam& AliHMPIDRecoParam::operator=(const AliHMPIDRecoParam &p)
59 {
60 //
61 // assign. operator
62 //
63   if(this!=&p){
64     AliDetectorRecoParam::operator=(p);
65     this->fHmpRecoMode= p.fHmpRecoMode;
66     this->fHmpFixedDistCut=p.fHmpFixedDistCut;
67     for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++) this->fHmpUserCut[iCh] = p.fHmpUserCut[iCh];   
68     this->fHmpTrackMatchingDist=p.fHmpTrackMatchingDist;
69     for(Int_t iPol=0;iPol<5;iPol++) this->fHmpTrackMatchingDistParas[iPol]=p.fHmpTrackMatchingDistParas[iPol];
70   }
71   return *this;
72 }
73 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
74 AliHMPIDRecoParam::~AliHMPIDRecoParam() 
75 {
76   //
77   // dtor
78   //  
79 }
80 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
81 AliHMPIDRecoParam *AliHMPIDRecoParam::GetLowFluxParam(){
82   //
83   // Set HMPID Reco Params for Low Flux environment
84   //
85   AliHMPIDRecoParam *hmpParam = new AliHMPIDRecoParam;
86   hmpParam->fHmpRecoMode = kTRUE;                                                     //kTRUE = normal reco. kFLASE = HTA
87   hmpParam->fHmpUserCut[0] = 3;                                                       //HMPID Module 0 User DAQ Sigma cut
88   hmpParam->fHmpUserCut[1] = 3;                                                       //HMPID Module 1 User DAQ Sigma cut
89   hmpParam->fHmpUserCut[2] = 3;                                                       //HMPID Module 2 User DAQ Sigma cut
90   hmpParam->fHmpUserCut[3] = 3;                                                       //HMPID Module 3 User DAQ Sigma cut
91   hmpParam->fHmpUserCut[4] = 3;                                                       //HMPID Module 4 User DAQ Sigma cut
92   hmpParam->fHmpUserCut[5] = 3;                                                       //HMPID Module 5 User DAQ Sigma cut
93   hmpParam->fHmpUserCut[6] = 3;                                                       //HMPID Module 6 User DAQ Sigma cut
94   hmpParam->fHmpFixedDistCut=kTRUE;                                                   //HMPID fixed (kTRUE) or parameterized distance cut (kFALSE)
95   hmpParam->fHmpTrackMatchingDist = 3.0;                                              //HMPID Track Matching distance cut
96   for(Int_t iPol=0;iPol<5;iPol++) hmpParam->fHmpTrackMatchingDistParas[iPol]=1;       //Prevision for momentum dependen track matching
97   hmpParam->SetName("HMP Low Flux");
98   hmpParam->SetTitle("HMP Low Flux");
99   return hmpParam;
100     
101 }
102 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
103 AliHMPIDRecoParam *AliHMPIDRecoParam::GetHighFluxParam(){
104   //
105   // Set HMPID Reco Params for Low Flux environment
106   //
107   AliHMPIDRecoParam *hmpParam = new AliHMPIDRecoParam;
108   hmpParam->fHmpRecoMode = kTRUE;                                                       //kTRUE = normal reco. kFLASE = HTA
109   hmpParam->fHmpUserCut[0] = 3;                                                         //HMPID Module 0 User DAQ Sigma cut
110   hmpParam->fHmpUserCut[1] = 3;                                                         //HMPID Module 1 User DAQ Sigma cut
111   hmpParam->fHmpUserCut[2] = 3;                                                         //HMPID Module 2 User DAQ Sigma cut
112   hmpParam->fHmpUserCut[3] = 3;                                                         //HMPID Module 3 User DAQ Sigma cut
113   hmpParam->fHmpUserCut[4] = 3;                                                         //HMPID Module 4 User DAQ Sigma cut
114   hmpParam->fHmpUserCut[5] = 3;                                                         //HMPID Module 5 User DAQ Sigma cut
115   hmpParam->fHmpUserCut[6] = 3;                                                         //HMPID Module 6 User DAQ Sigma cut
116   hmpParam->fHmpFixedDistCut=kTRUE;                                                     //HMPID fixed (kTRUE) or parameterized distance cut (kFALSE)
117   hmpParam->fHmpTrackMatchingDist = 1.0;                                                //HMPID Track Matching distance cut
118   for(Int_t iPol=0;iPol<5;iPol++) hmpParam->fHmpTrackMatchingDistParas[iPol]=1;         //Prevision for momentum dependen track matching
119   hmpParam->SetName("HMP High Flux");
120   hmpParam->SetTitle("HMP High Flux");
121   return hmpParam;
122     
123 }
124 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
125 AliHMPIDRecoParam *AliHMPIDRecoParam::GetCosmicParam(){
126   //
127   // Set HMPID Reco Params for Low Flux environment
128   //
129   AliHMPIDRecoParam *hmpParam = new AliHMPIDRecoParam;
130   hmpParam->fHmpRecoMode = kTRUE;                                                                   //kTRUE = normal reco. kFLASE = HTA
131   hmpParam->fHmpUserCut[0] = 3;                                                                     //HMPID Module 0 User DAQ Sigma cut
132   hmpParam->fHmpUserCut[1] = 3;                                                                     //HMPID Module 1 User DAQ Sigma cut
133   hmpParam->fHmpUserCut[2] = 3;                                                                     //HMPID Module 2 User DAQ Sigma cut
134   hmpParam->fHmpUserCut[3] = 3;                                                                     //HMPID Module 3 User DAQ Sigma cut
135   hmpParam->fHmpUserCut[4] = 3;                                                                     //HMPID Module 4 User DAQ Sigma cut
136   hmpParam->fHmpUserCut[5] = 3;                                                                     //HMPID Module 5 User DAQ Sigma cut
137   hmpParam->fHmpUserCut[6] = 3;                                                                     //HMPID Module 6 User DAQ Sigma cut
138   hmpParam->fHmpFixedDistCut=kTRUE;                                                                 //HMPID fixed (kTRUE) or parameterized distance cut (kFALSE)
139   hmpParam->fHmpTrackMatchingDist = 4.0;                                                            //HMPID Track Matching distance cut
140   for(Int_t iPol=0;iPol<5;iPol++) hmpParam->fHmpTrackMatchingDistParas[iPol]=1;                     //Prevision for momentum dependen track matching
141   hmpParam->SetName("HMP Cosmic ");
142   hmpParam->SetTitle("HMP Cosmic");
143   return hmpParam;
144     
145 }
146 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
147 void AliHMPIDRecoParam::PrintParameters() const
148 {
149   //
150   // Printing of the used HMPID reconstruction parameters
151   //
152    AliInfo(Form("%s",AliHMPIDRecoParam::GetName()));
153    AliInfo(Form("IsDefault: %d",AliHMPIDRecoParam::IsDefault()));
154    AliInfo(Form(" Running HMPID Reco: %d (1=Standard, 0=HTA)",fHmpRecoMode));
155    AliInfo(Form(" Is track matching distance fixed (1) or momentum dependent (0): %d",fHmpFixedDistCut));
156    AliInfo(Form(" HMPID track matching distance cut: %.3lf",fHmpTrackMatchingDist));
157    for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++)
158     AliInfo(Form(" HMPID Chamber: %d User DAQ Sigma cut: %d",iCh,fHmpUserCut[iCh]));
159    for(Int_t iPol=0;iPol<5;iPol++) 
160      AliInfo(Form(" HMPID momentum dependent distnce parameters: param[%d]=%lf",iPol,fHmpTrackMatchingDistParas[iPol]));
161   
162 }