]>
Commit | Line | Data |
---|---|---|
4e0dc966 | 1 | void RichAlign(Float_t sigmaTrans=0.1, Float_t sigmaRot=0.001) |
51359cd6 | 2 | { |
4e0dc966 | 3 | Float_t dX, dY, dZ; Float_t dPsi, dTheta, dPhi; //displacements |
51359cd6 | 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++) { | |
4e0dc966 | 13 | dX = pRnd->Gaus(0,sigmaTrans); dY = pRnd->Gaus(0,sigmaTrans); dZ = pRnd->Gaus(0,sigmaTrans); |
14 | dPsi = pRnd->Gaus(0,sigmaRot); dTheta = pRnd->Gaus(0,sigmaRot); dPhi = pRnd->Gaus(0,sigmaRot); | |
51359cd6 | 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 | } |