cdb->SetRun(0);
AliCDBStorage* storage;
+ TString Storage;
- if( gSystem->Getenv("TOCDB") == TString("kTRUE") ){
- TString Storage = gSystem->Getenv("STORAGE");
+ if( TString(gSystem->Getenv("TOCDB")) == TString("kTRUE") ){
+ Storage = gSystem->Getenv("STORAGE");
if(!Storage.BeginsWith("local://") && !Storage.BeginsWith("alien://")) {
Error(macroname,"STORAGE variable set to %s is not valid. Exiting\n",Storage.Data());
return;
}
AliGeomManager::ELayerID idTOF = AliGeomManager::kTOF;
- Int_t i;
Int_t j=0;
- Double_t dx=0.;
- Double_t dy=0.;
- Double_t dz=0.;
- Double_t dpsi, dtheta, dphi;
+ Int_t strId=-1;
+ Double_t dx=0., dy=0., dz=0., dpsi=0., dtheta=0., dphi=0.;
TRandom *rnd = new TRandom(4357);
Double_t sigmatr = 0.1; // sigma (in cm) for shift w.r.t. local ideal RS
- for(i=0; i<AliGeomManager::LayerSize(idTOF); i++) {
- dx = 0;
+ Int_t sActive[18]={0,1,1,0,0,0,1,1,0,1,1,1,1,0,0,1,1,1};
+
+ Int_t nstrA=15;
+ Int_t nstrB=19;
+ Int_t nstrC=19;
+ Int_t nSectors=18;
+ Int_t nStrips=nstrA+2*nstrB+2*nstrC;
+
+ for (Int_t isect = 0; isect < nSectors; isect++) {
+ for (Int_t istr = 1; istr <= nStrips; istr++) {
dy = rnd->Gaus(0.,sigmatr);
dz = rnd->Gaus(0.,sigmatr);
- dpsi = 0.;
- dtheta = 0.;
- dphi = 0.;
- new(alobj[j]) AliAlignObjParams(AliGeomManager::SymName(idTOF,i), AliGeomManager::LayerToVolUID(idTOF,i), dx, dy, dz, dpsi, dtheta, dphi, kFALSE);
- j++;
+ strId++;
+ if ((isect==13 || isect==14 || isect==15) && (istr >= 39 && istr <= 53)) continue;
+ if( (TString(gSystem->Getenv("PARTGEOM")) == TString("kTRUE")) && !sActive[isect] ) continue;
+ new(alobj[j++]) AliAlignObjParams(AliGeomManager::SymName(idTOF,strId),AliGeomManager::LayerToVolUID(idTOF,strId), dx, dy, dz, dpsi, dtheta, dphi, kFALSE);
+ }
}
- if( gSystem->Getenv("TOCDB") != TString("kTRUE") ){
+ if( TString(gSystem->Getenv("TOCDB")) != TString("kTRUE") ){
// save on file
const char* filename = "TOFresidualMisalignment.root";
TFile f(filename,"RECREATE");