}
if (strstr(st,"GEOMETRY_FILE")) {
- tmp[0] = '\0';
- st2[0] = '\0';
+ memset(tmp,0,100*sizeof(char));
+ memset(st2,0,200*sizeof(char));
sscanf(st,"%99s %199s",tmp,st2);
if (gSystem->AccessPathName(st2)) {
AliInfo("*** WARNING! *** geometry file not found! ");
}
if (strstr(st,"PREALIGNMENT_FILE")) {
- tmp[0] = '\0';
- st2[0] = '\0';
+ memset(tmp,0,100*sizeof(char));
+ memset(st2,0,200*sizeof(char));
sscanf(st,"%99s %199s",tmp,st2);
if (gSystem->AccessPathName(st2)) {
AliInfo("*** WARNING! *** prealignment file not found! ");
}
if (strstr(st,"SUPERMODULE_FILE")) {
- tmp[0] = '\0';
- st2[0] = '\0';
+ memset(tmp,0,100*sizeof(char));
+ memset(st2,0,200*sizeof(char));
sscanf(st,"%99s %199s",tmp,st2);
if (gSystem->AccessPathName(st2)) {
AliInfo("*** WARNING! *** supermodule file not found! ");
}
if (strstr(st,"SET_B_FIELD")) {
- tmp[0] = '\0';
+ memset(tmp,0,100*sizeof(char));
sscanf(st,"%99s %f",tmp,&f1);
if (f1>0) {
fBField = f1;
}
if (strstr(st,"SET_PARSIG_TRA")) {
- tmp[0] = '\0';
+ memset(tmp,0,100*sizeof(char));
sscanf(st,"%99s %f",tmp,&f1);
fParSigTranslations=f1;
}
if (strstr(st,"SET_PARSIG_ROT")) {
- tmp[0] = '\0';
+ memset(tmp,0,100*sizeof(char));
sscanf(st,"%99s %f",tmp,&f1);
fParSigRotations=f1;
}
if (strstr(st,"SET_NSTDDEV")) {
- tmp[0] = '\0';
+ memset(tmp,0,100*sizeof(char));
sscanf(st,"%99s %d",tmp,&idx);
fNStdDev=idx;
}
if (strstr(st,"SET_RESCUT_INIT")) {
- tmp[0] = '\0';
+ memset(tmp,0,100*sizeof(char));
sscanf(st,"%99s %f",tmp,&f1);
fResCutInitial=f1;
}
if (strstr(st,"SET_RESCUT_OTHER")) {
- tmp[0] = '\0';
+ memset(tmp,0,100*sizeof(char));
sscanf(st,"%99s %f",tmp,&f1);
fResCut=f1;
}
if (strstr(st,"SET_LOCALSIGMAFACTOR")) {
- tmp[0] = '\0';
+ memset(tmp,0,100*sizeof(char));
sscanf(st,"%99s %f %f",tmp,&f1,&f2);
if (f1>0 && f2>0) {
fSigmaXfactor=f1;
}
if (strstr(st,"SET_STARTFAC")) {
- tmp[0] = '\0';
+ memset(tmp,0,100*sizeof(char));
sscanf(st,"%99s %f",tmp,&f1);
fStartFac=f1;
}
// ndet = detector number: 1-6 for LAYER and 1-3 for DETECTOR (SPD=1, SDD=2, SSD=3)
// updw = 1 for Y>0, -1 for Y<0, 0 if not specified
// nreqpts = minimum number of points of that type
- tmp[0] = '\0';
- st2[0] = '\0';
+ memset(tmp,0,100*sizeof(char));
+ memset(st2,0,200*sizeof(char));
sscanf(st,"%99s %199s %d %d %d",tmp,st2,&itx,&ity,&itz);
itx--;
if (strstr(st2,"LAYER")) {
if (strstr(st,"MODULE_INDEX")) { // works only for sensitive modules
f1=0; f2=0;
- tmp[0] = '\0';
+ memset(tmp,0,100*sizeof(char));
sscanf(st,"%99s %d %d %d %d %d %d %d %f %f",tmp,&idx,&itx,&ity,&itz,&iph,&ith,&ips,&f1,&f2);
if (idx<0 || idx>2197) {fclose(pfc); return 1;} // bad index
voluid=GetModuleVolumeID(idx);
if (strstr(st,"MODULE_VOLUID")) {
f1=0; f2=0;
- tmp[0] = '\0';
+ memset(tmp,0,100*sizeof(char));
sscanf(st,"%99s %d %d %d %d %d %d %d %f %f",tmp,&idx,&itx,&ity,&itz,&iph,&ith,&ips,&f1,&f2);
voluid=UShort_t(idx);
if (voluid>14335 && fUseSuperModules) { // custom supermodule
return fPreAlignQF[index];
}
-AliTrackPointArray *AliITSAlignMille::PrepareTrack(AliTrackPointArray *atp) {
+AliTrackPointArray *AliITSAlignMille::PrepareTrack(const AliTrackPointArray *atp) {
/// create a new AliTrackPointArray keeping only defined modules
/// move points according to a given prealignment, if any
/// sort alitrackpoints w.r.t. global Y direction, if selected
-AliTrackPointArray *AliITSAlignMille::SortTrack(AliTrackPointArray *atp) {
+AliTrackPointArray *AliITSAlignMille::SortTrack(const AliTrackPointArray *atp) {
/// sort alitrackpoints w.r.t. global Y direction
AliTrackPointArray *atps=NULL;
Int_t idx[20];
}
-AliITSAlignMilleModule *AliITSAlignMille::GetMilleModule(UShort_t voluid)
+AliITSAlignMilleModule *AliITSAlignMille::GetMilleModule(UShort_t voluid) const
{
// return pointer to a define supermodule
// return NULL if error
return 0;
}
-Int_t AliITSAlignMille::CalcIntersectionPoint(Double_t *lpar, Double_t *gpar) {
+Int_t AliITSAlignMille::CalcIntersectionPoint(const Double_t *lpar, const Double_t *gpar) {
/// calculate intersection point of track with current module in local coordinates
/// according with a given set of parameters (local(4/5) and global(6))
/// and fill fPintLoc/Glo
Double_t nonzero=0.0;
for (Int_t i=0; i<fNLocal; i++) nonzero += TMath::Abs(dXdL[i]);
if (nonzero==0.0) {
- AliInfo("Aborting local equations for this point beacuse of zero local X derivatives!");
+ AliInfo("Discarding local equations for this point beacuse of zero local X derivatives!");
return -2;
}
nonzero=0.0;
for (Int_t i=0; i<ITSMILLENPARCH; i++) nonzero += TMath::Abs(dXdG[i]);
if (nonzero==0.0) {
- AliInfo("Aborting local equations for this point beacuse of zero global X derivatives!");
+ AliInfo("Discarding local equations for this point beacuse of zero global X derivatives!");
return -2;
}
nonzero=0.0;
for (Int_t i=0; i<fNLocal; i++) nonzero += TMath::Abs(dZdL[i]);
if (nonzero==0.0) {
- AliInfo("Aborting local equations for this point beacuse of zero local Z derivatives!");
+ AliInfo("Discarding local equations for this point beacuse of zero local Z derivatives!");
return -2;
}
nonzero=0.0;
for (Int_t i=0; i<ITSMILLENPARCH; i++) nonzero += TMath::Abs(dZdG[i]);
if (nonzero==0.0) {
- AliInfo("Aborting local equations for this point beacuse of zero global Z derivatives!");
+ AliInfo("Discarding local equations for this point beacuse of zero global Z derivatives!");
return -2;
}
}
-void AliITSAlignMille::SetLocalEquations(AliITSAlignMilleData *m, Int_t neq) {
+void AliITSAlignMille::SetLocalEquations(const AliITSAlignMilleData *m, Int_t neq) {
/// Set local equations with data stored in m
/// return 0 if success
volid=a->GetVolUID();
strncpy(st,a->GetSymName(),TMath::Min(sizeof(st),strlen(a->GetSymName())+1));
a->GetMatrix(m);
-
- symname[0] = '\0';
+ memset(symname,0,250*sizeof(char));
sscanf(st,"%249s",symname);
// decode module list
char *stp=strstr(st,"ModuleList:");