diff --git a/CHANGELOG.md b/CHANGELOG.md index 07ee7ccda8..6f60915c38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/CMakeLists.txt b/CMakeLists.txt index 77c02160a9..2baca6d811 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 diff --git a/ecal/ecalStructure.cxx b/ecal/ecalStructure.cxx index 95a8c4f0dc..5dc2de3fee 100644 --- a/ecal/ecalStructure.cxx +++ b/ecal/ecalStructure.cxx @@ -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; @@ -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; } diff --git a/ecal/ecalStructure.h b/ecal/ecalStructure.h index 875c7f51c6..31d54e542b 100644 --- a/ecal/ecalStructure.h +++ b/ecal/ecalStructure.h @@ -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; @@ -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; @@ -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; } diff --git a/ecal/ecalStructureFiller.cxx b/ecal/ecalStructureFiller.cxx index 4110a9a9ca..1ee06ef346 100644 --- a/ecal/ecalStructureFiller.cxx +++ b/ecal/ecalStructureFiller.cxx @@ -104,7 +104,6 @@ void ecalStructureFiller::LoopForMCPoints() ecalCell* cell; Int_t ten; UInt_t n; - Bool_t isPS; n=fListECALpts->GetEntriesFast(); if (fVerbose>0) @@ -116,23 +115,17 @@ void ecalStructureFiller::LoopForMCPoints() for(UInt_t j=0; jAt(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; jAt(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()); } } diff --git a/geometry/geometry_config.py b/geometry/geometry_config.py index a22e481df1..130199c1f2 100644 --- a/geometry/geometry_config.py +++ b/geometry/geometry_config.py @@ -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, @@ -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 @@ -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 diff --git a/hcal/hcalStructure.h b/hcal/hcalStructure.h index b76487e44a..8d4055a855 100644 --- a/hcal/hcalStructure.h +++ b/hcal/hcalStructure.h @@ -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) { diff --git a/macro/evd_fillEnergy.py b/macro/evd_fillEnergy.py index 7c33c3a490..fc50951fc8 100644 --- a/macro/evd_fillEnergy.py +++ b/macro/evd_fillEnergy.py @@ -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 diff --git a/macro/eventDisplay.py b/macro/eventDisplay.py index 670e3249b1..5d82efd2ec 100644 --- a/macro/eventDisplay.py +++ b/macro/eventDisplay.py @@ -474,7 +474,6 @@ def DrawMCTracks(self, option=""): "muonPoint", "EcalPoint", "HcalPoint", - "preshowerPoint", "strawtubesPoint", "ShipRpcPoint", "TargetPoint", @@ -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]) diff --git a/macro/run_simScript.py b/macro/run_simScript.py index e671209c82..0b7decf4d5 100755 --- a/macro/run_simScript.py +++ b/macro/run_simScript.py @@ -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") diff --git a/preshower/CMakeLists.txt b/preshower/CMakeLists.txt deleted file mode 100644 index ce623a9e23..0000000000 --- a/preshower/CMakeLists.txt +++ /dev/null @@ -1,33 +0,0 @@ -# Create a library called "libmuon" which includes the source files given in -# the array . -# The extension is already found. Any number of sources could be listed here. - -set(INCLUDE_DIRECTORIES -${CMAKE_SOURCE_DIR}/shipdata -${CMAKE_SOURCE_DIR}/preshower -) - -include_directories(${INCLUDE_DIRECTORIES} ${VMC_INCLUDE_DIRS} ${FAIRROOT_INCLUDE_DIR}) -include_directories(SYSTEM ${SYSTEM_INCLUDE_DIRECTORIES}) - -set(LINK_DIRECTORIES -${ROOT_LIBRARY_DIR} -${FAIRROOT_LIBRARY_DIR} -) - -link_directories( ${LINK_DIRECTORIES}) - -set(SRCS -#Put here your sourcefiles -preshower.cxx -preshowerContFact.cxx -preshowerPoint.cxx -) - -Set(LINKDEF preshowerLinkDef.h) -Set(LIBRARY_NAME preshower) -Set(DEPENDENCIES - Base ShipData FairLogger::FairLogger -) - -GENERATE_LIBRARY() diff --git a/preshower/preshower.cxx b/preshower/preshower.cxx deleted file mode 100644 index 5ec9814991..0000000000 --- a/preshower/preshower.cxx +++ /dev/null @@ -1,267 +0,0 @@ -#include "preshower.h" - -#include "preshowerPoint.h" - - -#include "FairVolume.h" -#include "FairGeoVolume.h" -#include "FairGeoNode.h" -#include "FairRootManager.h" -#include "FairGeoLoader.h" -#include "FairGeoInterface.h" -#include "FairGeoMedia.h" -#include "FairGeoBuilder.h" -#include "FairRun.h" -#include "FairRuntimeDb.h" -#include "ShipDetectorList.h" -#include "ShipStack.h" - -#include "TClonesArray.h" -#include "TVirtualMC.h" -#include "TGeoManager.h" -#include "TGeoBBox.h" -#include "TGeoCompositeShape.h" -#include "TGeoShapeAssembly.h" -#include "TGeoTube.h" -#include "TGeoMaterial.h" -#include "TGeoMedium.h" -#include "TParticle.h" - - - -#include -using std::cout; -using std::endl; - -preshower::preshower() - : FairDetector("preshower", kTRUE, kPreshower), - fTrackID(-1), - fVolumeID(-1), - fPos(), - fMom(), - fTime(-1.), - fLength(-1.), - fELoss(-1), - fpreshowerPointCollection(new TClonesArray("preshowerPoint")) -{ -} - -preshower::preshower(const char* name, Bool_t active) - : FairDetector(name, active, kPreshower), - fTrackID(-1), - fVolumeID(-1), - fPos(), - fMom(), - fTime(-1.), - fLength(-1.), - fELoss(-1), - fpreshowerPointCollection(new TClonesArray("preshowerPoint")) -{ -} - -preshower::~preshower() -{ - if (fpreshowerPointCollection) { - fpreshowerPointCollection->Delete(); - delete fpreshowerPointCollection; - } -} - -void preshower::Initialize() -{ - FairDetector::Initialize(); -// FairRuntimeDb* rtdb= FairRun::Instance()->GetRuntimeDb(); -// preshowerGeoPar* par=(preshowerGeoPar*)(rtdb->getContainer("preshowerGeoPar")); -} -// ----- Private method InitMedium -Int_t preshower::InitMedium(const char* name) -{ - static FairGeoLoader *geoLoad=FairGeoLoader::Instance(); - static FairGeoInterface *geoFace=geoLoad->getGeoInterface(); - static FairGeoMedia *media=geoFace->getMedia(); - static FairGeoBuilder *geoBuild=geoLoad->getGeoBuilder(); - - FairGeoMedium *ShipMedium=media->getMedium(name); - - if (!ShipMedium) - { - Fatal("InitMedium","Material %s not defined in media file.", name); - return -1111; - } - TGeoMedium* medium=gGeoManager->GetMedium(name); - if (medium!=NULL) - return ShipMedium->getMediumIndex(); - - return geoBuild->createMedium(ShipMedium); -} -Bool_t preshower::ProcessHits(FairVolume* vol) -{ - /** This method is called from the MC stepping */ - //Set parameters at entrance of volume. Reset ELoss. - if ( gMC->IsTrackEntering() ) { - fELoss = 0.; - fTime = gMC->TrackTime() * 1.0e09; - fLength = gMC->TrackLength(); - gMC->TrackPosition(fPos); - gMC->TrackMomentum(fMom); - } - - // Sum energy loss for all steps in the active volume - fELoss += gMC->Edep(); - - // Create preshowerPoint at exit of active volume - if ( gMC->IsTrackExiting() || - gMC->IsTrackStop() || - gMC->IsTrackDisappeared() ) { - fTrackID = gMC->GetStack()->GetCurrentTrackNumber(); - //fVolumeID = vol->getMCid(); - //cout << "preshower proc "<< fVolumeID<<" "<GetName()<<" "<getVolumeId() <FindVolumeFast(vol->GetName())->GetNumber()<FindVolumeFast(vol->GetName())->GetNumber(); - if (fELoss == 0. ) { return kFALSE; } - TParticle* p=gMC->GetStack()->GetCurrentTrack(); - Int_t pdgCode = p->GetPdgCode(); - AddHit(fTrackID, fVolumeID, TVector3(fPos.X(), fPos.Y(), fPos.Z()), - TVector3(fMom.Px(), fMom.Py(), fMom.Pz()), fTime, fLength, - fELoss,pdgCode); - - // Increment number of preshower det points in TParticle - ShipStack* stack = (ShipStack*) gMC->GetStack(); - stack->AddPoint(kPreshower); - } - - return kTRUE; -} - -void preshower::EndOfEvent() -{ - - fpreshowerPointCollection->Clear(); - -} - - - -void preshower::Register() -{ - - /** This will create a branch in the output tree called - preshowerPoint, setting the last parameter to kFALSE means: - this collection will not be written to the file, it will exist - only during the simulation. - */ - - FairRootManager::Instance()->Register("preshowerPoint", "preshower", - fpreshowerPointCollection, kTRUE); - -} - - -TClonesArray* preshower::GetCollection(Int_t iColl) const -{ - if (iColl == 0) { return fpreshowerPointCollection; } - else { return NULL; } -} - -void preshower::Reset() -{ - fpreshowerPointCollection->Clear(); -} - -void preshower::SetZStationPosition2(Double_t z0, Double_t z1) -{ - fM0z=z0; - fM1z=z1; - //fM2z=z2; - //fM3z=z3; -} -void preshower::SetZFilterPosition2(Double_t z0, Double_t z1) -{ - fF0z=z0; - fF1z=z1; - // fF2z=z2; -} -void preshower::SetActiveThickness(Double_t activeThickness) -{ - - fActiveThickness=activeThickness; -} -void preshower::SetFilterThickness2(Double_t filterThickness0,Double_t filterThickness1) -{ - fFilterThickness0=filterThickness0; - fFilterThickness1=filterThickness1; -} -void preshower::SetXMax(Double_t xMax) -{ - fXMax=xMax; -} -void preshower::SetYMax(Double_t yMax) -{ - fYMax=yMax; -} -void preshower::ConstructGeometry() -{ - /** If you are using the standard ASCII input for the geometry - just copy this and use it for your detector, otherwise you can - implement here you own way of constructing the geometry. */ - - TGeoVolume *top=gGeoManager->GetTopVolume(); - TGeoVolume *tPreshower = new TGeoVolumeAssembly("PreshowerDetector"); - - InitMedium("lead"); - InitMedium("Scintillator"); - - TGeoMedium *Al =gGeoManager->GetMedium("Scintillator"); - TGeoMedium *A2 =gGeoManager->GetMedium("lead"); - -// TGeoBBox *detbox1 = new TGeoBBox("detbox1", 250, 250, 10); -// TGeoBBox *detbox2 = new TGeoBBox("detbox2", 245, 245, 10); - -// TGeoCompositeShape *detcomp1 = new TGeoCompositeShape("detcomp1", "detbox1-detbox2"); - -// TGeoVolume *detmu1 = new TGeoVolume("MuX", detcomp1, Al); - TGeoVolume *preshowerdet0 = gGeoManager->MakeBox("preshowerdet0", Al, fXMax, fYMax, fActiveThickness); - TGeoVolume *preshowerdet1 = gGeoManager->MakeBox("preshowerdet1", Al, fXMax, fYMax, fActiveThickness); -// TGeoVolume *preshowerdet2 = gGeoManager->MakeBox("preshowerdet2", Al, fXMax, fYMax, fActiveThickness); -// TGeoVolume *preshowerdet3 = gGeoManager->MakeBox("preshowerdet3", Al, fXMax, fYMax, fActiveThickness); - - TGeoVolume *preshowerfilter0 = gGeoManager->MakeBox("preshowerfilter0", A2, fXMax, fYMax, fFilterThickness0); - TGeoVolume *preshowerfilter1 = gGeoManager->MakeBox("preshowerfilter1", A2, fXMax, fYMax, fFilterThickness1); -// TGeoVolume *preshowerfilter2 = gGeoManager->MakeBox("preshowerfilter2", A2, fXMax, fYMax, fFilterThickness); - - AddSensitiveVolume(preshowerdet0); - AddSensitiveVolume(preshowerdet1); - // AddSensitiveVolume(preshowerdet2); - //AddSensitiveVolume(preshowerdet3); - preshowerdet0->SetLineColor(kGreen); - preshowerdet1->SetLineColor(kGreen); - // preshowerdet2->SetLineColor(kGreen); - // preshowerdet3->SetLineColor(kGreen); - preshowerfilter0->SetLineColor(kBlue); - preshowerfilter1->SetLineColor(kBlue); - // preshowerfilter2->SetLineColor(kBlue); - Double_t zStartPreshower = fM0z; - tPreshower->AddNode(preshowerdet0, 1, new TGeoTranslation(0, 0, fM0z-zStartPreshower)); - tPreshower->AddNode(preshowerfilter0, 1, new TGeoTranslation(0, 0, fF0z-zStartPreshower)); - tPreshower->AddNode(preshowerdet1, 1, new TGeoTranslation(0, 0, fM1z-zStartPreshower)); - tPreshower->AddNode(preshowerfilter1, 1, new TGeoTranslation(0, 0, fF1z-zStartPreshower)); - // tPreshower->AddNode(preshowerdet2, 1, new TGeoTranslation(0, 0, fM2z-zStartPreshower)); - // tPreshower->AddNode(preshowerfilter2, 1, new TGeoTranslation(0, 0, fF2z-zStartPreshower)); - // tPreshower->AddNode(preshowerdet3, 1, new TGeoTranslation(0, 0, fM3z-zStartPreshower)); - //finish assembly and position - TGeoShapeAssembly* asmb = dynamic_cast(tPreshower->GetShape()); - Double_t totLength = asmb->GetDZ(); - top->AddNode(tPreshower, 1, new TGeoTranslation(0, 0,zStartPreshower+totLength)); -} - -preshowerPoint* preshower::AddHit(Int_t trackID, Int_t detID, - TVector3 pos, TVector3 mom, - Double_t time, Double_t length, - Double_t eLoss, Int_t pdgCode) -{ - TClonesArray& clref = *fpreshowerPointCollection; - Int_t size = clref.GetEntriesFast(); - // cout << "preshower hit called"<< pos.z()< - - -//static preshowerContFact gpreshowerContFact; - -preshowerContFact::preshowerContFact() - : FairContFact() -{ - /** Constructor (called when the library is loaded) */ - fName="preshowerContFact"; - fTitle="Factory for parameter containers in libpreshower"; - setAllContainers(); - FairRuntimeDb::instance()->addContFactory(this); -} - -void preshowerContFact::setAllContainers() -{ - /** Creates the Container objects with all accepted - contexts and adds them to - the list of containers for the preshower library. - */ -/* - FairContainer* p= new FairContainer("preshowerGeoPar", - "preshower Geometry Parameters", - "TestDefaultContext"); - p->addContext("TestNonDefaultContext"); - - containers->Add(p); -*/ - } - -FairParSet* preshowerContFact::createContainer(FairContainer* c) -{ - /** Calls the constructor of the corresponding parameter container. - For an actual context, which is not an empty string and not - the default context - of this container, the name is concatinated with the context. - */ - /* const char* name=c->GetName(); - FairParSet* p=NULL; - if (strcmp(name,"preshowerGeoPar")==0) { - p=new preshowerGeoPar(c->getConcatName().Data(), - c->GetTitle(),c->getContext()); - } - return p; -*/ - return 0; -} diff --git a/preshower/preshowerContFact.h b/preshower/preshowerContFact.h deleted file mode 100644 index 04505e82da..0000000000 --- a/preshower/preshowerContFact.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef VETOCONTFACT_H -#define VETOCONTFACT_H - -#include "FairContFact.h" - -class FairContainer; - -class preshowerContFact : public FairContFact -{ - private: - void setAllContainers(); - public: - preshowerContFact(); - ~preshowerContFact() {} - FairParSet* createContainer(FairContainer*); - ClassDef( preshowerContFact,0) // Factory for all preshower parameter containers -}; - -#endif diff --git a/preshower/preshowerLinkDef.h b/preshower/preshowerLinkDef.h deleted file mode 100644 index 68b7040366..0000000000 --- a/preshower/preshowerLinkDef.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifdef __CINT__ - -#pragma link off all globals; -#pragma link off all classes; -#pragma link off all functions; - -#pragma link C++ class preshowerContFact; -#pragma link C++ class preshower+; -#pragma link C++ class preshowerPoint+; - -#endif diff --git a/preshower/preshowerPoint.cxx b/preshower/preshowerPoint.cxx deleted file mode 100644 index c48c7854db..0000000000 --- a/preshower/preshowerPoint.cxx +++ /dev/null @@ -1,41 +0,0 @@ -#include "preshowerPoint.h" - -#include -using std::cout; -using std::endl; - - -// ----- Default constructor ------------------------------------------- -preshowerPoint::preshowerPoint() - : FairMCPoint() -{ -} -// ------------------------------------------------------------------------- - -// ----- Standard constructor ------------------------------------------ -preshowerPoint::preshowerPoint(Int_t trackID, Int_t detID, - TVector3 pos, TVector3 mom, - Double_t tof, Double_t length, - Double_t eLoss, Int_t pdgcode) - : FairMCPoint(trackID, detID, pos, mom, tof, length, eLoss), fPdgCode(pdgcode) -{ -} -// ------------------------------------------------------------------------- - -// ----- Destructor ---------------------------------------------------- -preshowerPoint::~preshowerPoint() { } -// ------------------------------------------------------------------------- - -// ----- Public method Print ------------------------------------------- -void preshowerPoint::Print(const Option_t* opt) const -{ - cout << "-I- preshowerPoint: preshower point for track " << fTrackID - << " in detector " << fDetectorID << endl; - cout << " Position (" << fX << ", " << fY << ", " << fZ - << ") cm" << endl; - cout << " Momentum (" << fPx << ", " << fPy << ", " << fPz - << ") GeV" << endl; - cout << " Time " << fTime << " ns, Length " << fLength - << " cm, Energy loss " << fELoss*1.0e06 << " keV" << endl; -} -// ------------------------------------------------------------------------- diff --git a/preshower/preshowerPoint.h b/preshower/preshowerPoint.h deleted file mode 100644 index 61336813e8..0000000000 --- a/preshower/preshowerPoint.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef PRESHOWERPOINT_H -#define PRESHOWERPOINT_H 1 - - -#include "FairMCPoint.h" - -#include "TObject.h" -#include "TVector3.h" - -class preshowerPoint : public FairMCPoint -{ - - public: - - /** Default constructor **/ - preshowerPoint(); - - - /** Constructor with arguments - *@param trackID Index of MCTrack - *@param detID Detector ID - *@param pos Ccoordinates at entrance to active volume [cm] - *@param mom Momentum of track at entrance [GeV] - *@param tof Time since event start [ns] - *@param length Track length since creation [cm] - *@param eLoss Energy deposit [GeV] - **/ - preshowerPoint(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, - Double_t tof, Double_t length, Double_t eLoss, Int_t pdgCode); - - - - /** Destructor **/ - virtual ~preshowerPoint(); - - /** Output to screen **/ - virtual void Print(const Option_t* opt) const; - Int_t PdgCode() const {return fPdgCode;} - - private: - /** Copy constructor **/ - Int_t fPdgCode; - preshowerPoint(const preshowerPoint& point); - preshowerPoint operator=(const preshowerPoint& point); - - ClassDef(preshowerPoint,2) - -}; - -#endif diff --git a/python/shipDet_conf.py b/python/shipDet_conf.py index 069b4adb07..cf8bdc62a8 100644 --- a/python/shipDet_conf.py +++ b/python/shipDet_conf.py @@ -750,22 +750,6 @@ def configure(run, ship_geo): detectorList.append(Strawtubes) if ship_geo.EcalOption == 1: # shashlik design TP - if ship_geo.preshowerOption > 0: - Preshower = ROOT.preshower("Preshower", ROOT.kTRUE) - Preshower.SetZStationPosition2( - ship_geo.PreshowerStation0.z, ship_geo.PreshowerStation1.z - ) - Preshower.SetZFilterPosition2( - ship_geo.PreshowerFilter0.z, ship_geo.PreshowerFilter1.z - ) - Preshower.SetXMax(ship_geo.Preshower.XMax) - Preshower.SetYMax(ship_geo.Preshower.YMax) - Preshower.SetActiveThickness(ship_geo.Preshower.ActiveThickness) - Preshower.SetFilterThickness2( - ship_geo.Preshower.FilterThickness0, ship_geo.Preshower.FilterThickness1 - ) - detectorList.append(Preshower) - ecal, EcalZSize = posEcal(ship_geo.ecal.z, ship_geo.ecal.File) detectorList.append(ecal) diff --git a/python/shipRoot_conf.py b/python/shipRoot_conf.py index 3298ca85bd..bb23d8b39a 100644 --- a/python/shipRoot_conf.py +++ b/python/shipRoot_conf.py @@ -29,7 +29,6 @@ ROOT.gSystem.Load('libhcal') ROOT.gSystem.Load('libmuon') ROOT.gSystem.Load('libpid') - ROOT.gSystem.Load('libpreshower') ROOT.gSystem.Load('libgenfit') ROOT.gSystem.Load("libPythia6") ROOT.gSystem.Load("libpythia8")