for(Int_t i=0; i<72; i++)
for (Int_t j=0; j<6; j++)
fCombFMData[i][j]=0;
+
+ for(Int_t i=0; i<18;i++)
+ fTOFMatrixId[i]=0;
+
}
//_____________________________________________________________________________
AliTOFAlignment::AliTOFAlignment(const AliTOFAlignment &t):
for(Int_t i=0; i<72; i++)
for (Int_t j=0; j<6; j++)
fCombFMData[i][j]=t.fCombFMData[i][j];
+
+ for(Int_t i=0; i<18;i++)
+ fTOFMatrixId[i]=t.fTOFMatrixId[i];
+
}
//_____________________________________________________________________________
AliTOFAlignment& AliTOFAlignment::operator=(const AliTOFAlignment &t){
fNTOFAlignObj=t.fNTOFAlignObj;
fTOFmgr=t.fTOFmgr;
fTOFAlignObjArray=t.fTOFAlignObjArray;
+ for(Int_t i=0; i<18;i++)
+ fTOFMatrixId[i]=t.fTOFMatrixId[i];
+
return *this;
}
fRecPoints=0;
}
- if (fTofClusters || fNumberOfTofClusters) {
+ //if (fTofClusters || fNumberOfTofClusters) {
+ if (fNumberOfTofClusters) {
for (Int_t ii=0; ii<fNumberOfTofClusters; ii++)
if (fTofClusters[ii]) fTofClusters[ii]->Delete();
fNumberOfTofClusters=0;
fTOFLoader->MakeTree("D");
fTreeD = fTOFLoader->TreeD();
}
+ else {
+ AliFatal("Can not get TreeD");
+ return;
+ }
Int_t bufsize = 32000;
fDigits->Clear();
delete fTOFdigits;
- if (fTofClusters || fNumberOfTofClusters) {
+ //if (fTofClusters || fNumberOfTofClusters) {
+ if (fNumberOfTofClusters) {
for (Int_t ii=0; ii<fNumberOfTofClusters; ii++)
if (fTofClusters[ii]) fTofClusters[ii]->Delete();
fNumberOfTofClusters = 0;
}
//_____________________________________________________________________________
-Bool_t AliTOFGeometry::IsInsideThePad(TGeoHMatrix mat, const Float_t * const pos, Float_t *dist3d) const
+Bool_t AliTOFGeometry::IsInsideThePad(TGeoHMatrix *mat, const Float_t * const pos, Float_t *dist3d) const
{
//
// Returns true if space point with coor pos (x,y,z) [cm] falls inside
// from ALICE global reference system
// towards TOF pad reference system
Double_t posl[3] = {0., 0., 0.};
- mat.MasterToLocal(posg,posl);
+ mat->MasterToLocal(posg,posl);
Float_t xr = posl[0];
Float_t yr = posl[1];
Double_t padg[3] = {0., 0., 0.};
// from TOF pad local reference system
// towards ALICE global reference system
- TGeoHMatrix inverse = mat.Inverse();
+ TGeoHMatrix inverse = mat->Inverse();
inverse.MasterToLocal(padl,padg);
// returns the 3d distance
virtual Bool_t GetHoles() const {return fHoles;};
virtual Float_t DistanceToPadPar(Int_t *det, const Float_t * const pos, Float_t *dist3d=0) const;
virtual Bool_t IsInsideThePadPar(Int_t *det, const Float_t * const pos) const;
- virtual Bool_t IsInsideThePad(TGeoHMatrix mat, const Float_t * const pos, Float_t *dist3d=0) const;
+ virtual Bool_t IsInsideThePad(TGeoHMatrix *mat, const Float_t * const pos, Float_t *dist3d=0) const;
virtual void GetVolumePath(const Int_t * const ind, Char_t *path );
virtual void GetVolumePath(Int_t sector, Char_t *path );
virtual void GetVolumePath(Int_t sector, Int_t plate, Int_t strip, Char_t *path );
fTOFTrigMask(0)
{
//main ctor
+ for (Int_t i=0;i<kNCTTM;i++) fLTMarray[i] = kFALSE;
+
for (Int_t i=0;i<kNLTM;i++){
- fLTMarray[i] = kFALSE; //*******************************************************************************************************
+
for (Int_t j=0;j<kNLTMchannels;j++){
fLTMmatrix[i][j]=kFALSE;
}
fTOFTrigMask(0)
{
//ctor with thresholds for triggers
+ for (Int_t i=0;i<kNCTTM;i++) fLTMarray[i] = kFALSE;
for (Int_t i=0;i<kNLTM;i++){
- fLTMarray[i] = kFALSE; //*******************************************************************************************************
for (Int_t j=0;j<kNLTMchannels;j++){
fLTMmatrix[i][j]=kFALSE;
}
fTOFTrigMask(0)
{
//copy ctor
+ for (Int_t i=0;i<kNCTTM;i++) fLTMarray[i] = kFALSE;
for (Int_t i=0;i<kNLTM;i++){
- fLTMarray[i] = tr.fLTMarray[i];
for (Int_t j=0;j<kNLTMchannels;j++){
fLTMmatrix[i][j]=tr.fLTMmatrix[i][j];
}
//
//initialization
+ for (Int_t i=0;i<kNCTTM;i++) fLTMarray[i]= kFALSE;
for (Int_t i=0;i<kNLTM;i++){
- fLTMarray[i]= kFALSE;
for (Int_t j=0;j<kNLTMchannels;j++){
fLTMmatrix[i][j]=kFALSE;
}
tofLoader->LoadDigits("read");
TTree *treeD = tofLoader->TreeD();
- if (treeD == 0x0)
- {
- AliFatal("AliTOFTrigger: Can not get TreeD");
- }
+ if (treeD == 0x0) {
+ AliFatal("AliTOFTrigger: Can not get TreeD");
+ return;
+ }
TBranch *branch = treeD->GetBranch("TOF");
if (!branch) {
Float_t dist3d[3];
accept = kFALSE;
for (Int_t i=0; i<nc; i++) {
- isInside = fGeom->IsInsideThePad(global[i],ctrackPos,dist3d);
+ isInside = fGeom->IsInsideThePad((TGeoHMatrix*)(&global[i]),ctrackPos,dist3d);
if ( mLastStep ) {
Float_t yLoc = dist3d[1];
const Float_t kMaxQualityD = 1.; // max delta quality if cluster used
const Float_t kForbiddenR = 0.1; // minimal PID according TPC
- static const Double_t kMasses[6]={
+ static const Double_t kMasses[AliPID::kSPECIES+1]={
0.000511, 0.105658, 0.139570, 0.493677, 0.938272, 1.875613
};
Float_t mintimedist[kNclusterMax];
Float_t likelihood[kNclusterMax];
Float_t length[kNclusterMax];
- Double_t tpcpid[AliPID::kSPECIES];
+ Double_t tpcpid[AliPID::kSPECIES+1]; // overrun_static - coverity warning
dist3D[0][0]=1;
for (Int_t i=0; i<fNseedsTOF; i++) {
Double_t tof2=AliTOFGeometry::TdcBinWidth()*cluster->GetTDC()+kTofOffset; // in ps
// Float_t tgamma = TMath::Sqrt(cluster->GetR()*cluster->GetR()+cluster->GetZ()*cluster->GetZ())/0.03; //time for "primary" gamma
//if (trackTOFin->GetPt()<0.7 && TMath::Abs(tgamma-tof2)<350) continue; // gamma conversion candidate - TEMPORARY
- for(Int_t j=0;j<=5;j++){
+ for(Int_t j=0;j<AliPID::kSPECIES+1;j++){
Double_t mass=kMasses[j];
times[nfound][j]+=distances[4]/3e-2*TMath::Sqrt(mom*mom+mass*mass)/mom; // add time distance