/*
$Log$
+Revision 1.13 2000/06/13 15:32:44 nilsen
+fix compilation error on HP and DEC unix.
+
Revision 1.12 2000/06/12 23:43:16 nilsen
New ITS code replacing the old structure and simulations code.
}
//___________________________________________
-void AliITS::SetClasses(Int_t id, TString digit, TString cluster)
+void AliITS::SetClasses(Int_t id, char* digit, char* cluster)
{
//set the digit and cluster classes to be used for the id detector type
((AliITSDetType*) (*fDetTypes)[id])->ClassNames(digit,cluster);
fNctype = new Int_t[fNDetTypes];
fCtype = new TObjArray(fNDetTypes);
- const char *kDigclass;
- const char *kClclass;
+ char *kDigclass;
+ char *kClclass;
Int_t i;
for(i=0; i<fNDetTypes ;i++) {
// Set reconstruction
virtual void SetReconstructionModel(Int_t id, AliITSClusterFinder *rec);
// Set class names for digit and rec point
- virtual void SetClasses(Int_t id, TString digit, TString cluster);
+ virtual void SetClasses(Int_t id, char* digit, char* cluster);
// Getters
fSegmentation->Angles(StereoP,StereoN);
fTanP=TMath::Tan(StereoP);
fTanN=TMath::Tan(StereoN);
-
+ fPNsignalRatio=7./8.; // warning: hard-wired number
}
//-------------------------------------------------------
posClusterN = GetClusterZ(clusterN);
posErrorClusterN = clusterN->GetPositionError();
pkg->DelCluster(clusterIndex,SIDEP);
- sigClusterN = ps/PNsignalRatio;
+ sigClusterN = ps/fPNsignalRatio;
// there is no sonse to check how signal ratio is far from perfect
// matching line if the if below it is true
if (ns < sigClusterN) {
sigClusterN=ns;
- if (debug) cout<<"n1 < p1/PNsignalRatio";
+ if (debug) cout<<"n1 < p1/fPNsignalRatio";
if (debug) cout<<"Attempting to del cluster N "<<clusterIdx<<" ... \n";
pkg->DelClusterOI(clusterIdx,SIDEN);
} else {
posClusterP = GetClusterZ(clusterP);
posErrorClusterP = clusterP->GetPositionError();
pkg->DelCluster(clusterIndex,SIDEN);
- sigClusterP=ns*PNsignalRatio;
+ sigClusterP=ns*fPNsignalRatio;
// there is no sonse to check how signal ratio is far from perfect
// matching line if the if below it is true
if (ps < sigClusterP) {
sigClusterP = ps;
- if (debug) cout<<"ps < ns*PNsignalRatio";
+ if (debug) cout<<"ps < ns*fPNsignalRatio";
if (debug) cout<<"Attempting to del cluster P "<<clusterIdx<<" ... \n";
pkg->DelClusterOI(clusterIdx,SIDEP);
} else {
if (debug) cout<<"\nWe decided to take 3rd point";
if (clusterP1->GetCrossNo()==1) {
if (debug) cout<<"... P1 has one cross\n";
- n1sig = p1sig/PNsignalRatio;
- p2sig = n2sig*PNsignalRatio;
+ n1sig = p1sig/fPNsignalRatio;
+ p2sig = n2sig*fPNsignalRatio;
clusterN1->CutTotalSignal(n1sig);
clusterP2->CutTotalSignal(p2sig);
} else {
if (debug) cout<<"... N1 has one cross\n";
- n2sig=p2sig/PNsignalRatio;
- p1sig=n1sig*PNsignalRatio;
+ n2sig=p2sig/fPNsignalRatio;
+ p1sig=n1sig*fPNsignalRatio;
clusterN2->CutTotalSignal(n2sig);
clusterP1->CutTotalSignal(p1sig);
{
sig = cluster->GetTotalSignal();
- sig += sig/PNsignalRatio;
+ sig += sig/fPNsignalRatio;
sigerr = cluster->GetTotalSignalError();
x1 = -Dx/2 + pos *fPitch;
{
sig = cluster->GetTotalSignal();
- sig += sig*PNsignalRatio;
+ sig += sig*fPNsignalRatio;
sigerr = cluster->GetTotalSignalError();
Float_t falpha1;
Float_t falpha2;
Float_t falpha3;
-
+ Float_t fPNsignalRatio;
static const Bool_t SIDEP=kTRUE;
static const Bool_t SIDEN=kFALSE;
- static const Float_t PNsignalRatio = 0.875; // 7./8.;
+
Int_t fSFF; //forward stepping factor
Int_t fSFB; //backward stepping factor
// Configure reconstruction model
fReconst = thisReconstruction;
}
- void ClassNames(TString digit, TString cluster) {
+ void ClassNames(char * digit, char * cluster) {
// Set class names for digits and clusters
fDigClassName=digit; fClustClassName=cluster;
}
}
//
- void GetClassNames(const char *&digit, const char *&cluster)
+ void GetClassNames(char* &digit, char* &cluster)
{
// Get class names for digits and rec points
digit=fDigClassName; cluster=fClustClassName;
AliITSresponse *fResponse; // response
AliITSsegmentation *fSegmentation; // segmentation
- TString fDigClassName; // string
- TString fClustClassName; // string
+ char* fDigClassName; // string
+ char* fClustClassName; // string
ClassDef(AliITSDetType,1)
// Type of data - real or simulated
virtual void SetDataType(char *data) =0;
// Get data type
- virtual const char *DataType() =0;
+ virtual char *DataType() =0;
// Set filenames
virtual void SetFilenames(char *,char *,char *) {}
// Filenames
- virtual void Filenames(const char*&,const char*&,const char*&) {}
+ virtual void Filenames(const char *, const char *,const char *) {}
virtual Float_t DriftSpeed() {return 0.;}
cp[i]=fCPar[i];
}
}
-//______________________________________________________________________________
-void AliITSresponseSDD::Streamer(TBuffer &R__b)
-{
- // Stream an object of class AliITSresponseSDD.
-
- if (R__b.IsReading()) {
- Version_t R__v = R__b.ReadVersion(); if (R__v) { }
- AliITSresponse::Streamer(R__b);
- R__b.ReadStaticArray(fCPar);
- R__b >> fNoise;
- R__b >> fBaseline;
- R__b >> fTopValue;
- R__b >> fTemperature;
- R__b >> fDriftSpeed;
- R__b >> fMaxAdc;
- R__b >> fDiffCoeff;
- R__b >> fQref;
- R__b >> fZeroSuppFlag;
- R__b >> fMinVal;
- R__b >> fWrite;
- //R__b.ReadArray(fOption); // Not to be printed out?
- //R__b.ReadArray(fParam1); // Not to be printed out?
- //R__b.ReadArray(fParam2); // Not to be printed out?
- fDataType.Streamer(R__b);
- fFileName1.Streamer(R__b);
- fFileName2.Streamer(R__b);
- fFileName3.Streamer(R__b);
- } else {
- R__b.WriteVersion(AliITSresponseSDD::IsA());
- AliITSresponse::Streamer(R__b);
- R__b.WriteArray(fCPar, 8);
- R__b << fNoise;
- R__b << fBaseline;
- R__b << fTopValue;
- R__b << fTemperature;
- R__b << fDriftSpeed;
- R__b << fMaxAdc;
- R__b << fDiffCoeff;
- R__b << fQref;
- R__b << fZeroSuppFlag;
- R__b << fMinVal;
- R__b << fWrite;
- //R__b.WriteArray(fOption, __COUNTER__); // Not to be printed out?
- //R__b.WriteArray(fParam1, __COUNTER__); // Not to be printed out?
- //R__b.WriteArray(fParam2, __COUNTER__); // Not to be printed out?
- fDataType.Streamer(R__b);
- fFileName1.Streamer(R__b);
- fFileName2.Streamer(R__b);
- fFileName3.Streamer(R__b);
- }
-}
// Type of data - real or simulated
fDataType=data;
}
- virtual const char *DataType() {
+ virtual char *DataType() {
// Get data type
- return fDataType.Data();
+ return fDataType;
}
virtual void SetParamOptions(Option_t *opt1="same",Option_t *opt2="same"){
// Set filenames - input, output, parameters ....
fFileName1=f1; fFileName2=f2; fFileName3=f3;
}
- virtual void Filenames(const char*&input,const char*&baseline,const char*¶m) {
+ virtual void Filenames(const char*input,const char*baseline,const char*param) {
// Filenames
input=fFileName1; baseline=fFileName2; param=fFileName3;
}
Option_t *fParam1; // Read baselines from file option
Option_t *fParam2; // Read compression algo thresholds from file
- TString fDataType; // input keys : run, module #
- TString fFileName1; // input keys : run, module #
- TString fFileName2; // baseline & noise val or output coded // signal or monitored bgr.
- TString fFileName3; // param values or output coded signal
+ char* fDataType; // input keys : run, module #
+ char* fFileName1; // input keys : run, module #
+ char* fFileName2; // baseline & noise val or output coded // signal or monitored bgr.
+ char* fFileName3; // param values or output coded signal
ClassDef(AliITSresponseSDD,1) // SDD response
// Type of data - real or simulated
fDataType=data;
}
- virtual const char *DataType() {
+ virtual char *DataType() {
// Get data typer
- return fDataType.Data();
+ return fDataType;
}
ClassDef(AliITSresponseSPD,1) // SPD response
Float_t fBaseline; // Baseline value
Int_t fThreshold; // Zero-Suppression threshold
- TString fDataType; // Type of data - real or simulated
+ char* fDataType; // Type of data - real or simulated
};
#endif
par[i]=fDetPar[i];
}
}
-
-//______________________________________________________________________________
-void AliITSresponseSSD::Streamer(TBuffer &R__b)
-{
- // Stream an object of class AliITSresponseSSD.
-
- if (R__b.IsReading()) {
- Version_t R__v = R__b.ReadVersion(); if (R__v) { }
- AliITSresponse::Streamer(R__b);
- R__b >> fNPar;
- //R__b.ReadArray(fDetPar); // Not to be printed out?
- R__b >> fNoiseP;
- R__b >> fNoiseN;
- R__b >> fSigmaP;
- R__b >> fSigmaN;
- R__b >> fDiffCoeff;
- //R__b.ReadArray(fOption1); // Not to be printed out?
- //R__b.ReadArray(fOption2); // Not to be printed out?
- fDataType.Streamer(R__b);
- } else {
- R__b.WriteVersion(AliITSresponseSSD::IsA());
- AliITSresponse::Streamer(R__b);
- R__b << fNPar;
- //R__b.WriteArray(fDetPar, __COUNTER__); // Not to be printed out?
- R__b << fNoiseP;
- R__b << fNoiseN;
- R__b << fSigmaP;
- R__b << fSigmaN;
- R__b << fDiffCoeff;
- //R__b.WriteArray(fOption1, __COUNTER__); // Not to be printed out?
- //R__b.WriteArray(fOption2, __COUNTER__); // Not to be printed out?
- fDataType.Streamer(R__b);
- }
-}
// Type of data - real or simulated
fDataType=data;
}
- virtual const char *DataType() {
+ virtual char *DataType() {
// Get data type
- return fDataType.Data();
+ return fDataType;
}
virtual void SetSigmaSpread(Float_t p1=3., Float_t p2=2.) {
Option_t *fOption1; // Simulate invalid strips option
Option_t *fOption2; // Not used for the moment
- TString fDataType; // Type of data - real or simulated
+ char* fDataType; // Type of data - real or simulated
ClassDef(AliITSresponseSSD,1) //Response class for SSD
#pragma link C++ class AliITSsegmentationSSD;
#pragma link C++ class AliITSresponse;
#pragma link C++ class AliITSresponseSPD;
-#pragma link C++ class AliITSresponseSDD-;
-#pragma link C++ class AliITSresponseSSD-;
+#pragma link C++ class AliITSresponseSDD;
+#pragma link C++ class AliITSresponseSSD;
#pragma link C++ class AliITSsimulation;
#pragma link C++ class AliITSsimulationSPD;
#pragma link C++ class AliITSsimulationSDD-;