]>
Commit | Line | Data |
---|---|---|
51359cd6 | 1 | void RichAlign(Float_t sigmaTrans=0, Float_t sigmaRot=0) |
2 | { | |
3 | Float_t dX, dY, dX; Float_t dPsi, dTheta, dPhi; //displacements | |
4 | ||
5 | TClonesArray *pCA = new TClonesArray("AliAlignObjMatrix",10000); | |
6 | ||
7 | TRandom *pRnd = new TRandom(4357); | |
8 | ||
9 | AliAlignObjMatrix o; | |
10 | ||
11 | Int_t idRICH = AliAlignObj::kRICH; | |
12 | for (Int_t iCh = 0; iCh < 7; iCh++) { | |
13 | dX = (pRnd->Uniform()-0.5)*sigmaTrans; dY = (pRnd->Uniform()-0.5)*sigmaTrans; dZ = (pRnd->Uniform()-0.5)*sigmaTrans; | |
14 | dPsi = (pRnd->Uniform()-0.5)*sigmaRot; dTheta = (pRnd->Uniform()-0.5)*sigmaRot; dPhi = (pRnd->Uniform()-0.5)*sigmaRot; | |
15 | new((*pCA)[iCh]) AliAlignObjMatrix(AliAlignObj::GetVolPath(idRICH,iCh), AliAlignObj::LayerToVolUID(idRICH,iCh),dX,dY,dZ,dPsi,dTheta,dPhi); | |
16 | } | |
17 | ||
18 | pCA->Print(); | |
19 | ||
20 | AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT"); | |
21 | ||
22 | AliCDBMetaData *pMeta= new AliCDBMetaData(); | |
23 | pMeta->SetResponsible("RICH Expert"); | |
24 | pMeta->SetComment("Alignment objects for ideal geometry, i.e. applying them to TGeo has to leave geometry unchanged"); | |
25 | AliCDBId id("RICH/Align/Data",0,0); //you have to specify the run validity, although in the case of saving ideal objects makes not much sense | |
26 | AliCDBManager::Instance()->Put(pCA,id,pMeta); | |
27 | pCA->Delete(); | |
28 | } |