Skip to content

Commit

Permalink
Remove preshower and CaloDesign 1
Browse files Browse the repository at this point in the history
  • Loading branch information
olantwin committed Oct 24, 2024
1 parent 62496f4 commit 6d73347
Show file tree
Hide file tree
Showing 20 changed files with 22 additions and 682 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,4 @@ cross-section measurement code, and obsolete detector configurations.
* Housekeeping: Don't use CMake commands no longer provided by FairRoot 19
* Housekeeping: Remove old CMake for ROOT 5
* Remove old, outdated tracking script
* Remove preshower and CaloDesign 1 (TP+Preshower)
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ add_subdirectory (muon)
add_subdirectory (shipgen)
add_subdirectory (field)
add_subdirectory (genfit)
add_subdirectory (preshower)
add_subdirectory (pid)
add_subdirectory (muonShieldOptimization)
# add_subdirectory (online) is not anymore compatible with FairRoot
Expand Down
3 changes: 1 addition & 2 deletions ecal/ecalStructure.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
using namespace std;


ecalCell* ecalStructure::GetCell(Int_t volId, Int_t& ten, Bool_t& isPS)
ecalCell* ecalStructure::GetCell(Int_t volId, Int_t& ten)
{
UInt_t i;
static Int_t volidmax = 0;
Expand All @@ -45,7 +45,6 @@ ecalCell* ecalStructure::GetCell(Int_t volId, Int_t& ten, Bool_t& isPS)
if (lisPS) fHash[volId]->isPsTen+=1;
}
ten=fHash[volId]->isPsTen/2;
isPS=fHash[volId]->isPsTen%2;
return fHash[volId]->cell;
}

Expand Down
21 changes: 8 additions & 13 deletions ecal/ecalStructure.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class ecalStructure : public TNamed
void Construct();
Int_t GetNumber(Int_t x, Int_t y) const;

Bool_t AddEnergy(Float_t x, Float_t y, Float_t energy, Bool_t isPS=kFALSE);
Float_t GetEnergy(Float_t x, Float_t y, Bool_t isPS=kFALSE) const;
Bool_t AddEnergy(Float_t x, Float_t y, Float_t energy);
Float_t GetEnergy(Float_t x, Float_t y) const;
ecalCell* GetCell(Float_t x, Float_t y) const;
ecalModule* GetModule(Float_t x, Float_t y) const;
Int_t GetModuleNumber(Float_t x, Float_t y) const;
Expand Down Expand Up @@ -61,7 +61,7 @@ class ecalStructure : public TNamed
// HitId -> cell type
Int_t GetType(const Int_t hitId) const;

ecalCell* GetCell(Int_t fVolId, Int_t& ten, Bool_t& isPS);
ecalCell* GetCell(Int_t fVolId, Int_t& ten);
//Hit It -> Cell
ecalCell* GetHitCell(const Int_t hitId) const;

Expand Down Expand Up @@ -145,30 +145,25 @@ inline Float_t ecalStructure::GetY2() const
fEcalInf->GetModuleSize()*fEcalInf->GetYSize()/2.0;
}

inline Bool_t ecalStructure::AddEnergy(Float_t x, Float_t y, Float_t energy, Bool_t isPS)
inline Bool_t ecalStructure::AddEnergy(Float_t x, Float_t y, Float_t energy)
{
/** Add preshower or calorimeter energy to a cell with coordinate (x,y) **/
/** Add calorimeter energy to a cell with coordinate (x,y) **/
ecalCell* cell=GetCell(x,y);
if (cell)
{
if (isPS) ; // cell->AddPSEnergy(energy); Preshower removed
else
cell->AddEnergy(energy);
cell->AddEnergy(energy);
}
else
return kFALSE;
return kTRUE;
}

inline Float_t ecalStructure::GetEnergy(Float_t x, Float_t y, Bool_t isPS) const
inline Float_t ecalStructure::GetEnergy(Float_t x, Float_t y) const
{
ecalCell* cell=GetCell(x,y);
if (cell)
{
if (isPS)
return 0; // return cell->GetPSEnergy(); Preshower removed
else
return cell->GetEnergy();
return cell->GetEnergy();
}
return -1111;
}
Expand Down
13 changes: 3 additions & 10 deletions ecal/ecalStructureFiller.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ void ecalStructureFiller::LoopForMCPoints()
ecalCell* cell;
Int_t ten;
UInt_t n;
Bool_t isPS;

n=fListECALpts->GetEntriesFast();
if (fVerbose>0)
Expand All @@ -116,23 +115,17 @@ void ecalStructureFiller::LoopForMCPoints()
for(UInt_t j=0; j<n; j++)
{
pt=(ecalPoint*)fListECALpts->At(j);
cell=fStr->GetCell(pt->GetDetectorID(), ten, isPS);
cell=fStr->GetCell(pt->GetDetectorID(), ten);
if (ten==0) {
if (isPS)
; // cell->AddPSEnergy(pt->GetEnergyLoss()); preshower removed
else
cell->AddEnergy(pt->GetEnergyLoss());
cell->AddEnergy(pt->GetEnergyLoss());
}
}
if (fStoreTrackInfo)
for(UInt_t j=0; j<n; j++)
{
pt=(ecalPoint*)fListECALpts->At(j);
ecalCellMC* cellmc=(ecalCellMC*)fStr->GetCell(pt->GetDetectorID(), ten, isPS);
ecalCellMC* cellmc=(ecalCellMC*)fStr->GetCell(pt->GetDetectorID(), ten);
if (ten==0) {
if (isPS)
; // cell->AddTrackPSEnergy(pt->GetTrackID(),pt->GetEnergyLoss()); //preshower removed
else
cellmc->AddTrackEnergy(pt->GetTrackID(),pt->GetEnergyLoss(), pt->GetTime());
}
}
Expand Down
32 changes: 2 additions & 30 deletions geometry/geometry_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

# targetOpt = 5 # 0=solid >0 sliced, 5: 5 pieces of tungsten, 4 air slits, 17: molybdenum tungsten interleaved with H20
# strawOpt = 0 # 0=simplistic tracking stations defined in veto.cxx 1=detailed strawtube design 4=sophisticated straw tube design, horizontal wires (default) 10=2cm straw diameter for 2018 layout
# preshowerOption = 0 # 1=simple preShower detector for conceptual studies, moves calo and muon stations
# tankDesign = 5 # 4=TP elliptical tank design, 5 = optimized conical rectangular design, 6=5 without segment-1
shield_db = {
'combi': [ 70. , 170. , 208. , 207. , 281. , 172.82, 212.54, 168.64,
Expand Down Expand Up @@ -203,47 +202,20 @@
if CaloDesign==0:
c.HcalOption = 1
c.EcalOption = 1
c.preshowerOption = 0
c.splitCal = 0
elif CaloDesign==3:
c.HcalOption = 2
c.EcalOption = 1
c.preshowerOption = 0
c.splitCal = 0
elif CaloDesign==1:
c.HcalOption = 1
c.EcalOption = 1
c.preshowerOption = 1
elif CaloDesign==2:
c.HcalOption = -1
c.EcalOption = 2
c.preshowerOption = 0
else:
print("CaloDesign option wrong -> ",CaloDesign)
1/0

presShowerDeltaZ = 0.
if c.preshowerOption >0:
PreshowerStart = c.TimeDet.z + c.TimeDet.DZ + 5*u.cm + presShowerDeltaZ
c.PreshowerFilter0 = AttrDict(z= PreshowerStart )
c.PreshowerStation0 = AttrDict(z= c.PreshowerFilter0.z + 10*u.cm )

c.Preshower = AttrDict(z=0)
c.Preshower.XMax = 240.*u.cm
c.Preshower.YMax = 600.*u.cm * c.Yheight / (10.*u.m)
c.Preshower.ActiveThickness = 0.5*u.cm
c.Preshower.FilterThickness0 = 1.4*u.cm

PreshowerLeverArm=1*u.m

c.PreshowerFilter1 = AttrDict(z= c.PreshowerStation0.z +PreshowerLeverArm )
c.PreshowerStation1 = AttrDict(z= c.PreshowerFilter1.z + 10*u.cm )
c.Preshower.FilterThickness1 = 2.*u.cm

presShowerDeltaZ = PreshowerLeverArm + 2*10*u.cm + 2*2.*u.cm

c.SplitCal = AttrDict(z=0)
c.SplitCal.ZStart = c.TimeDet.z + c.TimeDet.DZ + 5*u.cm + presShowerDeltaZ
c.SplitCal.ZStart = c.TimeDet.z + c.TimeDet.DZ + 5*u.cm
c.SplitCal.XMax = 480.*u.cm/2. #290.*u.cm #half length
c.SplitCal.YMax = 720. * u.cm / 2. #510.*u.cm * c.Yheight / (10.*u.m) #half length
c.SplitCal.Empty = 0*u.cm
Expand Down Expand Up @@ -273,7 +245,7 @@
c.SplitCal.StripHalfLength = 150*u.cm # c.SplitCal.YMax/c.SplitCal.NModulesInY
c.SplitCal.SplitCalThickness=(c.SplitCal.FilterECALThickness_first-c.SplitCal.FilterECALThickness)+(c.SplitCal.FilterECALThickness+c.SplitCal.ActiveECALThickness)*c.SplitCal.nECALSamplings+c.SplitCal.BigGap

c.ecal = AttrDict(z = c.TimeDet.z + c.TimeDet.DZ + 5*u.cm + presShowerDeltaZ) #
c.ecal = AttrDict(z = c.TimeDet.z + c.TimeDet.DZ + 5*u.cm) #
c.ecal.File = EcalGeoFile
hcalThickness = 232*u.cm
if c.HcalOption == 2: hcalThickness = 110*u.cm # to have same interaction length as before
Expand Down
2 changes: 1 addition & 1 deletion hcal/hcalStructure.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ inline Float_t hcalStructure::GetY2() const

inline Bool_t hcalStructure::AddEnergy(Float_t x, Float_t y, Float_t energy, Float_t energy2)
{
/** Add preshower or calorimeter energy to a module with coordinate (x,y) **/
/** Add calorimeter energy to a module with coordinate (x,y) **/
hcalModule* mdl=GetModule(x,y);
if (mdl)
{
Expand Down
2 changes: 1 addition & 1 deletion macro/evd_fillEnergy.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def collect_hits(lsOfGlobals, checked_muons):
hitlist = {}
hitlist[fPos.Z()] = [fPos.X(), fPos.Y(), fT.GetP()]
# loop over all sensitive volumes to find hits
for P in ["vetoPoint", "muonPoint", "EcalPoint", "HcalPoint", "preshowerPoint",
for P in ["vetoPoint", "muonPoint", "EcalPoint", "HcalPoint",
"strawtubesPoint", "ShipRpcPoint", "TargetPoint"]:
if not sTree.GetBranch(P):
continue
Expand Down
7 changes: 0 additions & 7 deletions macro/eventDisplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,6 @@ def DrawMCTracks(self, option=""):
"muonPoint",
"EcalPoint",
"HcalPoint",
"preshowerPoint",
"strawtubesPoint",
"ShipRpcPoint",
"TargetPoint",
Expand Down Expand Up @@ -1411,12 +1410,6 @@ def debugStraw(n):
"TargetPoint", ROOT.kRed, ROOT.kFullSquare
)

if hasattr(ShipGeo, "preshowerOption"):
if ShipGeo.preshowerOption > 0:
mcHits["preshowerPoints"] = ROOT.FairMCPointDraw(
"preshowerPoint", ROOT.kYellow, ROOT.kFullCircle
)

for x in mcHits:
fMan.AddTask(mcHits[x])

Expand Down
7 changes: 5 additions & 2 deletions macro/run_simScript.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,11 @@
,10=with field map for hadron absorber", required=False, choices=range(7,11), default=globalDesigns[default]['ds'], type=int)
parser.add_argument("--nuTauTargetDesign", dest="nud"\
,help="0=TP, 1=new magnet option for short muon shield, 2= no magnet surrounding neutrino detector, 3= emulsion spectrometer and muon filter as in CDS, 4= not magnetized target and muon spectrometer for ECN3",required=False, default=globalDesigns[default]['nud'], type=int)
parser.add_argument("--caloDesign", dest="caloDesign", help="0=ECAL/HCAL TP 1=ECAL/HCAL TP + preshower 2=splitCal 3=ECAL/ passive HCAL"\
,required=False, default=globalDesigns[default]['caloDesign'], type=int)
parser.add_argument("--caloDesign",
help="0=ECAL/HCAL TP 2=splitCal 3=ECAL/ passive HCAL",
default=globalDesigns[default]['caloDesign'],
type=int,
choices=[0,2,3])
parser.add_argument("--strawDesign", dest="strawDesign", help="simplistic tracker design, 4=sophisticated straw tube design, horizontal wires (default), 10=2cm straw"
,required=False, default=globalDesigns[default]['strawDesign'], type=int)
parser.add_argument("--Muflux", dest="muflux", help="Muflux fixed target setup", required=False, action="store_true")
Expand Down
33 changes: 0 additions & 33 deletions preshower/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit 6d73347

Please sign in to comment.