Skip to content
Snippets Groups Projects
Commit 90c9f558 authored by Vikas Singhal's avatar Vikas Singhal Committed by cbm
Browse files

For mMuCh Hit position correction according to tag value.

parent 975c0394
No related branches found
No related tags found
1 merge request!1232mMuCh Hit reconstruction and including mMuCh in mcbm L1 macro
......@@ -126,6 +126,32 @@ InitStatus CbmMuchFindHitsGem::Init()
LOG_IF(fatal, !file) << "Could not open file " << fDigiFile;
TObjArray* stations = file->Get<TObjArray>("stations");
LOG_IF(fatal, !stations) << "TObjArray stations not found in file " << fDigiFile;
//For X, Y position correction according to different geometry file and its tag.
if (fDigiFile.Contains("mcbm")) {
if (fDigiFile.Contains("v19a")) {
fGemTX = 18.5;
fGemTY = 80.5;
}
else if (fDigiFile.Contains("v20a")) {
fGemTX = 18.5;
fGemTY = 80.0;
}
else if (fDigiFile.Contains("v22j")) { // for high intensity runs during June 2022 mMuCh in acceptance
fGemTX = 8.0;
fGemTY = 81.5;
fRpcTX = 66.25; //RPC introduced during 2022 data taking
fRpcTY = -70.5;
}
else if (fDigiFile.Contains("v22k")) { // during benchmark runs. mMuCh is out of acceptance
fGemTX = -44.5;
fGemTY = 81.5;
fRpcTX = 48.0;
fRpcTY = -70.0;
}
}
file->Close();
file->Delete();
/// Restore old global file and folder pointer to avoid messing with FairRoot
......@@ -584,7 +610,8 @@ void CbmMuchFindHitsGem::ExecClusteringPeaks(CbmMuchCluster* cluster, Int_t iClu
void CbmMuchFindHitsGem::CreateHits(CbmMuchCluster* cluster, Int_t iCluster, CbmEvent* event)
{
Int_t nDigis = cluster->GetNofDigis();
Double_t sumq = 0, sumx = 0, sumy = 0, sumt = 0, sumdx2 = 0, sumdy2 = 0, sumdxy2 = 0, sumdt2 = 0;
Double_t sumq = 0, sumx = 0, sumy = 0, sumdx2 = 0, sumdy2 = 0, sumdxy2 = 0,
sumdt2 = 0; // , sumt =0 // not used FU 22.03.23
Double_t q = 0, x = 0, y = 0, t = 0, z = 0, dx = 0, dy = 0, dxy = 0, dt = 0;
Double_t nX = 0, nY = 0, nZ = 0;
Int_t address = 0;
......@@ -653,7 +680,7 @@ void CbmMuchFindHitsGem::CreateHits(CbmMuchCluster* cluster, Int_t iCluster, Cbm
sumq += q;
sumx += q * x;
sumy += q * y;
sumt += q * t;
//sumt += q * t; // not used FU 22.03.23
sumdx2 += q * q * dx * dx;
sumdy2 += q * q * dy * dy;
sumdxy2 += q * q * dxy * dxy;
......@@ -677,20 +704,23 @@ void CbmMuchFindHitsGem::CreateHits(CbmMuchCluster* cluster, Int_t iCluster, Cbm
//Double_t tX =18.5 , tY = 80.0 ;
if (module->GetDetectorType() == 3) // GEM
{
tX = 8.5;
tY = 81.0;
tX = fGemTX;
tY = fGemTY;
}
else if (module->GetDetectorType() == 4) // RPC
{
tX = -66.5;
tY = 72.0;
tX = fRpcTX;
tY = fRpcTY;
//tX = -66.5;
//tY = 72.0;
}
else {
LOG(error) << "Unknown detector type";
}
nX = x + tX; // Ajit + OS + Apar -> For miniMUCH setup in March 2019
nY = y + tY; // Ajit + OS + Apar -> For miniMUCH setup in March 2019
nX = x + tX; // for miniCBM setup set these according to the geometry
// tag and in line number 125 during initialization.
nY = y + tY; //
nZ = z;
if (fFlag == 1) {
......
......@@ -106,6 +106,15 @@ private:
UInt_t fuClusters = 0; //Number of Clusters.
Bool_t bBeamTimeDigi = kFALSE; // Boolean for Using Beam Time Digi
//Below variables are applying X, Y correction for different mCBM geometries.
//In future we'll remove these and try to read directly from Geometry file.
// For GEM
Double_t fGemTX = 0.0;
Double_t fGemTY = 0.0;
// For RPC
Double_t fRpcTX = 0.0;
Double_t fRpcTY = 0.0;
CbmMuchFindHitsGem(const CbmMuchFindHitsGem&);
CbmMuchFindHitsGem operator=(const CbmMuchFindHitsGem&);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment