ROOT logo
//*-- created  : /19/12/2001 Dusan Zovinec
//*-- Modified : /14/02/2002 by D.Zovinec
//*-- Modified : /04/03/2002 by D.Zovinec
//*-- Modified : /05/03/2002 by Ilse Koenig
//*-- Modified : /23/09/2002 by D.Zovinec

//_HADES_CLASS_DESCRIPTION 
////////////////////////////////////////////////////////////////////////////
// HTofClusterFPar
//
// Clusterfinder parameters for TOF
// (adapted from /u/halo/anal/v5_45/hkicktrackfpar.cc)
//
////////////////////////////////////////////////////////////////////////////

#include "htofclusterfpar.h"
#include "hparamlist.h"

ClassImp(HTofClusterFPar)

HTofClusterFPar::HTofClusterFPar(const Char_t* name,const Char_t* title,
                                 const Char_t* context)
                : HParCond(name,title,context) {
  clear();
}

HTofClusterFPar::~HTofClusterFPar(void) {
}

void HTofClusterFPar::clear(void) {
  diffTmax = 0.0;
  diffXmax = 0.0;
  mipLimit = 0.0;
  mL1all = 0.0;
  sL1all = 0.0;
  mL2all = 0.0;
  sL2all = 0.0;
  ratCall1 = 0.0;
  mL1lep = 0.0;
  sL1lep = 0.0;
  mL2lep = 0.0;
  sL2lep = 0.0;
  ratClep1 = 0.0;
  diffPmax = 0.0;
  lossEmax = 0.0;

  status=kFALSE;
  resetInputVersions();
}

void HTofClusterFPar::putParams(HParamList* l) {
  if (!l) return;
  l->add("diffTmax",diffTmax);
  l->add("diffXmax",diffXmax);
  l->add("mipLimit",mipLimit);
  l->add("mL1all",mL1all);
  l->add("sL1all",sL1all);
  l->add("mL2all",mL2all);
  l->add("sL2all",sL2all);
  l->add("ratCall1",ratCall1);
  l->add("mL1lep",mL1lep);
  l->add("sL1lep",sL1lep);
  l->add("mL2lep",mL2lep);
  l->add("sL2lep",sL2lep);
  l->add("ratClep1",ratClep1);
  l->add("diffPmax",diffPmax);
  l->add("lossEmax",lossEmax);
}

Bool_t HTofClusterFPar::getParams(HParamList* l) {
  if (!l) return kFALSE;
  //  if (!l->fill("iCutOffThresheold",&iCutOffThresheold)) return kFALSE;
  if (!l->fill("diffTmax",&diffTmax)) return kFALSE;
  if (!l->fill("diffXmax",&diffXmax)) return kFALSE;
  if (!l->fill("mipLimit",&mipLimit)) return kFALSE;
  if (!l->fill("mL1all",&mL1all)) return kFALSE;
  if (!l->fill("sL1all",&sL1all)) return kFALSE;
  if (!l->fill("mL2all",&mL2all)) return kFALSE;
  if (!l->fill("sL2all",&sL2all)) return kFALSE;
  if (!l->fill("ratCall1",&ratCall1)) return kFALSE;
  if (!l->fill("mL1lep",&mL1lep)) return kFALSE;
  if (!l->fill("sL1lep",&sL1lep)) return kFALSE;
  if (!l->fill("mL2lep",&mL2lep)) return kFALSE;
  if (!l->fill("sL2lep",&sL2lep)) return kFALSE;
  if (!l->fill("ratClep1",&ratClep1)) return kFALSE;
  if (!l->fill("diffPmax",&diffPmax)) return kFALSE;
  if (!l->fill("lossEmax",&lossEmax)) return kFALSE;
  return kTRUE;
} 
void HTofClusterFPar::readFrom(const HTofClusterFPar &par) {
  diffTmax = par.diffTmax;
  diffXmax = par.diffXmax;
  mipLimit = par.mipLimit;
  mL1all = par.mL1all;
  sL1all = par.sL1all;
  mL2all = par.mL2all;
  sL2all = par.sL2all;
  ratCall1 = par.ratCall1;
  mL1lep = par.mL1lep;
  sL1lep = par.sL1lep;
  mL2lep = par.mL2lep;
  sL2lep = par.sL2lep;
  ratClep1 = par.ratClep1;
  diffPmax = par.diffPmax;
  lossEmax = par.lossEmax;
}

void HTofClusterFPar::Streamer(TBuffer &R__b)
{
  UInt_t R__s, R__c;
  if (R__b.IsReading()) {
    Version_t R__v = R__b.ReadVersion(&R__s, &R__c); if (R__v) { }
    HParSet::Streamer(R__b);
    R__b >> diffTmax;
    R__b >> diffXmax;
    if(R__v <= 1){
      mipLimit = 0.;
      mL1all = 0.;
      sL1all = 0.;
      mL2all = 0.;
      sL2all = 0.;
      ratCall1 = 0.;
      mL1lep = 0.;
      sL1lep = 0.;
      mL2lep = 0.;
      sL2lep = 0.;
      ratClep1 = 0.;
      diffPmax = 0.;
      lossEmax = 0.;
    } else if(R__v == 2){
      R__b >> mL1all;
      R__b >> sL1all;
      R__b >> mL2all;
      R__b >> sL2all;
      R__b >> ratCall1;
      R__b >> mL1lep;
      R__b >> sL1lep;
      R__b >> mL2lep;
      R__b >> sL2lep;
      R__b >> ratClep1;
      mipLimit = 0.;
      diffPmax = 0.;
      lossEmax = 0.;
    } else if(R__v==3){
      R__b >> mipLimit;
      R__b >> mL1all;
      R__b >> sL1all;
      R__b >> mL2all;
      R__b >> sL2all;
      R__b >> ratCall1;
      R__b >> mL1lep;
      R__b >> sL1lep;
      R__b >> mL2lep;
      R__b >> sL2lep;
      R__b >> ratClep1;
      diffPmax = 0.;
      lossEmax = 0.;
    } else if(R__v>=4){
      R__b >> mipLimit;
      R__b >> mL1all;
      R__b >> sL1all;
      R__b >> mL2all;
      R__b >> sL2all;
      R__b >> ratCall1;
      R__b >> mL1lep;
      R__b >> sL1lep;
      R__b >> mL2lep;
      R__b >> sL2lep;
      R__b >> ratClep1;
      R__b >> diffPmax;
      R__b >> lossEmax;
    }

    R__b.CheckByteCount(R__s, R__c, HTofClusterFPar::IsA());
  } else {
    R__c = R__b.WriteVersion(HTofClusterFPar::IsA(), kTRUE);
    HParSet::Streamer(R__b);
    R__b << diffTmax;
    R__b << diffXmax;
    R__b << mipLimit;
    R__b << mL1all;
    R__b << sL1all;
    R__b << mL2all;
    R__b << sL2all;
    R__b << ratCall1;
    R__b << mL1lep;
    R__b << sL1lep;
    R__b << mL2lep;
    R__b << sL2lep;
    R__b << ratClep1;
    R__b << diffPmax;
    R__b << lossEmax;
    R__b.SetByteCount(R__c, kTRUE);
  }
}
 htofclusterfpar.cc:1
 htofclusterfpar.cc:2
 htofclusterfpar.cc:3
 htofclusterfpar.cc:4
 htofclusterfpar.cc:5
 htofclusterfpar.cc:6
 htofclusterfpar.cc:7
 htofclusterfpar.cc:8
 htofclusterfpar.cc:9
 htofclusterfpar.cc:10
 htofclusterfpar.cc:11
 htofclusterfpar.cc:12
 htofclusterfpar.cc:13
 htofclusterfpar.cc:14
 htofclusterfpar.cc:15
 htofclusterfpar.cc:16
 htofclusterfpar.cc:17
 htofclusterfpar.cc:18
 htofclusterfpar.cc:19
 htofclusterfpar.cc:20
 htofclusterfpar.cc:21
 htofclusterfpar.cc:22
 htofclusterfpar.cc:23
 htofclusterfpar.cc:24
 htofclusterfpar.cc:25
 htofclusterfpar.cc:26
 htofclusterfpar.cc:27
 htofclusterfpar.cc:28
 htofclusterfpar.cc:29
 htofclusterfpar.cc:30
 htofclusterfpar.cc:31
 htofclusterfpar.cc:32
 htofclusterfpar.cc:33
 htofclusterfpar.cc:34
 htofclusterfpar.cc:35
 htofclusterfpar.cc:36
 htofclusterfpar.cc:37
 htofclusterfpar.cc:38
 htofclusterfpar.cc:39
 htofclusterfpar.cc:40
 htofclusterfpar.cc:41
 htofclusterfpar.cc:42
 htofclusterfpar.cc:43
 htofclusterfpar.cc:44
 htofclusterfpar.cc:45
 htofclusterfpar.cc:46
 htofclusterfpar.cc:47
 htofclusterfpar.cc:48
 htofclusterfpar.cc:49
 htofclusterfpar.cc:50
 htofclusterfpar.cc:51
 htofclusterfpar.cc:52
 htofclusterfpar.cc:53
 htofclusterfpar.cc:54
 htofclusterfpar.cc:55
 htofclusterfpar.cc:56
 htofclusterfpar.cc:57
 htofclusterfpar.cc:58
 htofclusterfpar.cc:59
 htofclusterfpar.cc:60
 htofclusterfpar.cc:61
 htofclusterfpar.cc:62
 htofclusterfpar.cc:63
 htofclusterfpar.cc:64
 htofclusterfpar.cc:65
 htofclusterfpar.cc:66
 htofclusterfpar.cc:67
 htofclusterfpar.cc:68
 htofclusterfpar.cc:69
 htofclusterfpar.cc:70
 htofclusterfpar.cc:71
 htofclusterfpar.cc:72
 htofclusterfpar.cc:73
 htofclusterfpar.cc:74
 htofclusterfpar.cc:75
 htofclusterfpar.cc:76
 htofclusterfpar.cc:77
 htofclusterfpar.cc:78
 htofclusterfpar.cc:79
 htofclusterfpar.cc:80
 htofclusterfpar.cc:81
 htofclusterfpar.cc:82
 htofclusterfpar.cc:83
 htofclusterfpar.cc:84
 htofclusterfpar.cc:85
 htofclusterfpar.cc:86
 htofclusterfpar.cc:87
 htofclusterfpar.cc:88
 htofclusterfpar.cc:89
 htofclusterfpar.cc:90
 htofclusterfpar.cc:91
 htofclusterfpar.cc:92
 htofclusterfpar.cc:93
 htofclusterfpar.cc:94
 htofclusterfpar.cc:95
 htofclusterfpar.cc:96
 htofclusterfpar.cc:97
 htofclusterfpar.cc:98
 htofclusterfpar.cc:99
 htofclusterfpar.cc:100
 htofclusterfpar.cc:101
 htofclusterfpar.cc:102
 htofclusterfpar.cc:103
 htofclusterfpar.cc:104
 htofclusterfpar.cc:105
 htofclusterfpar.cc:106
 htofclusterfpar.cc:107
 htofclusterfpar.cc:108
 htofclusterfpar.cc:109
 htofclusterfpar.cc:110
 htofclusterfpar.cc:111
 htofclusterfpar.cc:112
 htofclusterfpar.cc:113
 htofclusterfpar.cc:114
 htofclusterfpar.cc:115
 htofclusterfpar.cc:116
 htofclusterfpar.cc:117
 htofclusterfpar.cc:118
 htofclusterfpar.cc:119
 htofclusterfpar.cc:120
 htofclusterfpar.cc:121
 htofclusterfpar.cc:122
 htofclusterfpar.cc:123
 htofclusterfpar.cc:124
 htofclusterfpar.cc:125
 htofclusterfpar.cc:126
 htofclusterfpar.cc:127
 htofclusterfpar.cc:128
 htofclusterfpar.cc:129
 htofclusterfpar.cc:130
 htofclusterfpar.cc:131
 htofclusterfpar.cc:132
 htofclusterfpar.cc:133
 htofclusterfpar.cc:134
 htofclusterfpar.cc:135
 htofclusterfpar.cc:136
 htofclusterfpar.cc:137
 htofclusterfpar.cc:138
 htofclusterfpar.cc:139
 htofclusterfpar.cc:140
 htofclusterfpar.cc:141
 htofclusterfpar.cc:142
 htofclusterfpar.cc:143
 htofclusterfpar.cc:144
 htofclusterfpar.cc:145
 htofclusterfpar.cc:146
 htofclusterfpar.cc:147
 htofclusterfpar.cc:148
 htofclusterfpar.cc:149
 htofclusterfpar.cc:150
 htofclusterfpar.cc:151
 htofclusterfpar.cc:152
 htofclusterfpar.cc:153
 htofclusterfpar.cc:154
 htofclusterfpar.cc:155
 htofclusterfpar.cc:156
 htofclusterfpar.cc:157
 htofclusterfpar.cc:158
 htofclusterfpar.cc:159
 htofclusterfpar.cc:160
 htofclusterfpar.cc:161
 htofclusterfpar.cc:162
 htofclusterfpar.cc:163
 htofclusterfpar.cc:164
 htofclusterfpar.cc:165
 htofclusterfpar.cc:166
 htofclusterfpar.cc:167
 htofclusterfpar.cc:168
 htofclusterfpar.cc:169
 htofclusterfpar.cc:170
 htofclusterfpar.cc:171
 htofclusterfpar.cc:172
 htofclusterfpar.cc:173
 htofclusterfpar.cc:174
 htofclusterfpar.cc:175
 htofclusterfpar.cc:176
 htofclusterfpar.cc:177
 htofclusterfpar.cc:178
 htofclusterfpar.cc:179
 htofclusterfpar.cc:180
 htofclusterfpar.cc:181
 htofclusterfpar.cc:182
 htofclusterfpar.cc:183
 htofclusterfpar.cc:184
 htofclusterfpar.cc:185
 htofclusterfpar.cc:186
 htofclusterfpar.cc:187
 htofclusterfpar.cc:188
 htofclusterfpar.cc:189
 htofclusterfpar.cc:190
 htofclusterfpar.cc:191
 htofclusterfpar.cc:192
 htofclusterfpar.cc:193
 htofclusterfpar.cc:194
 htofclusterfpar.cc:195