Comments (4)
Hi Anna,
it is not possible to instantiate twice the same detector in two locations. To my understanding there is a single kDetector identifier and energy losses in any of the two objects will fill the same data structure. You should use a different detector (another fiber set)... or modify the code heavily (data structure should be modified to add a detector instance; ProcessHit() should be able to assign the detector instance based on the GEANT volume name, ...). I would recommend to use another similar detector; I do not see other easy solution.
Hope it helps. Cheers
from r3broot.
Hi Hector, I see. The question arises for fibers, and it seems to me that all fibers/fi* classes are very similar (right?) so maybe this is the easy solution, use different ones for different instances. Thanks! Anna
from r3broot.
I have implemented a general class to make simulations with the fibers, named R3BFiber, below you can find how to invoke it for fiber-30:
if (fFi30){
if (fi30Par) {
fi30Par->printParams();
auto rfib30 = new TGeoRotation("Fi30rot");
rfib30->RotateX(fi30Par->GetRotX());
rfib30->RotateY(fi30Par->GetRotY());
rfib30->RotateZ(fi30Par->GetRotZ());
run->AddModule(new R3BFiber("Fi30", fFi30Geo, DetectorId::kFI30, {fi30Par->GetPosX(), fi30Par->GetPosY(),
fi30Par->GetPosZ(), rfib30}));
} else {
run->AddModule(new R3BFiber("Fi30", fFi30Geo, DetectorId::kFI30, {0., 0., 890.}));
}
}
The parameters used for positioning the fiber (positions and angles) are read from a .par file that should contain the same positions and angles used for the analysis of real data. This allows us to overlap simulations with experiments in a simple way.
An example of macro for the simulation is here:
https://github.com/R3BRootGroup/R3BParams_S522/blob/dev/macros/sim/runsim.C
from r3broot.
In the folder R3BParams_S522/macros/rootgeo (the same for other parameter repositories) you can find all the macros to create the root geometry of each detector. There is also a script named "setgeo.sh" that generates everything automatically doing (don't forget to load your config.sh file before executing this script):
. setgeo.sh
from r3broot.
Related Issues (20)
- NeuLAND: Update R3BNeulandMCMon to avoid warnings HOT 2
- CI: Please upgrade FairRoot and stdc++ in C++17 CI HOT 9
- System of units HOT 9
- Introducing R3Brc HOT 15
- Califa Geo - lxir136 HOT 3
- Weird timestamps from unpacker 202103_s455 HOT 3
- Handling new vs old experiment Readers/code HOT 1
- Clang-tidy setting HOT 24
- Design Guidelines for R3BRoot HOT 1
- Unknown Type name 'FairMCTracks' HOT 1
- Error in <TExMap::Add>: key is not unique HOT 1
- Clang-formatting - what should be included, what should be removed, future additions HOT 10
- File to generate Hit Parameters using Los not in GitHub repository HOT 5
- Proposal to remove ext files from dev branch HOT 19
- Bug CALIFA QPID Simulation HOT 4
- Forbid pull requests from the dev branch? HOT 6
- Spell fixes by `codespell` HOT 3
- FATAL error in unpacker HOT 4
- Auto-generated ext_h101 structs HOT 3
- Policy discussion: on pull requests, merging and reviews HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from r3broot.