-
Notifications
You must be signed in to change notification settings - Fork 54
Light Calorimetry #878
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Light Calorimetry #878
Conversation
Version v09_67_00
- cleaned (but need to clean more) skipping products that aren't used (xarapuca flashes + truth products) for example to avoid nullptr
- cleaned (but need to clean more) skipping products that aren't used (xarapuca flashes + truth products) for example to avoid nullptr
- moved truth validation to a separate function - added lower/upper threshold for PE per channel - added fcl param to turn on/off evaluating all planes - option to add dir/refl efficiencies; NOTE: not really accounted for in the code yet
- merge the two previous trees into one - match-type can now differentiate between event/slice level easily
Version v09_89_01, patch release for SBN2024A
Version v09_93_01_02p02
Version v10_04_07
Version v10_14_02
…ask; add upper limit to avoid nonlinearity effects (rough idea)
…ghted avg fix - BCFM has at most, one bcfm<->one slice <-> one opflash association, even if there are opflashes in both tpcs. Explicitly look for an opflash (within a fcl parameter window) in the opposite TPC if the slice has spacepoints in both TPCs - bug fix for weighted average; need to treat each TPC as independent for calculating the weighted avg
- add to standard mc/data reco2 workflow - add SCE tag to cafmaker sce for data and mc
…ctable PMTs (use pmt calib db instead)
| std::vector<art::Ptr<recob::OpFlash>> flash0_v; | ||
| std::vector<art::Ptr<recob::OpFlash>> flash1_v; | ||
|
|
||
| for (size_t i=0; i<2; i++){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be great to limit the loop to the size of the opflash label vector. Otherwise it would break in the unlikely event that one wants to run the module for just one tpc
| ::art::Handle<std::vector<recob::OpFlash>> flash0_ara_h; | ||
| ::art::Handle<std::vector<recob::OpFlash>> flash1_ara_h; | ||
|
|
||
| for (size_t i=0; i<2; i++){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as before
| double CalcMedian(std::vector<double> total_light); | ||
|
|
||
| // Returns the mean of the light vector | ||
| double CalcMean(std::vector<double> total_light); | ||
| double CalcMean(std::vector<double> total_light, std::vector<double> total_err); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see you are only using one of the CalcMean functions. Could you remove the unused functions/ add fcl parameter to select which one to use? Maybe save the three of them so the analyzer chooses which one to use? That's your call!
| util::CreateAssn(*this, e, *lightcalo_v, opflash0, *flash_assn_v); | ||
| util::CreateAssn(*this, e, *lightcalo_v, opflash1, *flash_assn_v); | ||
|
|
||
| _tree->Fill(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to always fill the tree? I would suggest not saving it by default and instead adding an fcl parameter to control this.
| OpDetMaxPEThreshold: [4000., 1e9] # PE in a single opdet to ignore (due to saturation effects) | ||
|
|
||
| # calibration constants & simulation parameters | ||
| CalAreaConstants: [ 0.02052, 0.02044, 0.02019 ] # calibration constants for wire planes, found in sbndcode/LArSoftConfigurations/calorimetry_sbnd.fcl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would strongly recommend inheriting this from the original fcl to always use the same values
| auto vuv_eff = fopdet_vuv_eff.at(ch); | ||
| auto vis_eff = fopdet_vis_eff.at(ch); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of having this vector structure, I would suggest defining 3 fcl parameters: fopdet_co_vuv_eff, fopdet_co_vis_eff, fopdet_unco_eff and the look for the opdet type and compute the efficiency based on those values. That way you can easily inherit the three detection efficiencies from the original fcl sbndcode/OpDetSim/digi_pmt_sbnd.fcl so that the efficiency values are always updated.
| OpDetVUVEfficiencies: [0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.03570, 0.03570, 0.03570, 0.03570, 0.03570, 0.03570, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.03570, 0.03570, 0.03570, 0.03570, 0.03570, 0.03570, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.03570, 0.03570, 0.03570, 0.03570, 0.03570, 0.03570, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.03570, 0.03570, 0.03570, 0.03570, 0.03570, 0.03570, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.03920, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752, 0.01752] | ||
| OpDetVISEfficiencies: [0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.03570, 0.03570, 0.03570, 0.03570, 0.03570, 0.03570, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.03570, 0.03570, 0.03570, 0.03570, 0.03570, 0.03570, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.03570, 0.03570, 0.03570, 0.03570, 0.03570, 0.03570, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.03570, 0.03570, 0.03570, 0.03570, 0.03570, 0.03570, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.01264, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.02600, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271, 0.00271] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See other comment about inheriting these values from the original fcl
|
|
||
| BEGIN_PROLOG | ||
| sbnd_lightcalo_data: @local::sbnd_lightcalo | ||
| sbnd_lightcalo_data.CalAreaConstants: [ 0.02172 , 0.02150, 0.02103 ] # calibration constants for wire planes, found in sbndcode/LArSoftConfigurations/calorimetry_sbnd.fcl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment ad for the mc fcl
asanchezcastillo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for putting this together @lynnt20, this is a lot of great work! I just left some minor comments, mainly about fcl inheritance which I think is strongly recommended in this case.
Description
Add producer module to create light calorimetry data products. Creates new subdirectory
Calorimetryto store the module and fcls. Over 3 years since the first commit! Reco2/caf level changes only.Checklist
Reviewers,AssigneesDevelopementRelevant PR links
Accompanying PRs: SBNSoftware/sbncode#619, SBNSoftware/sbnanaobj#181, SBNSoftware/sbnobj#158
Link(s) to docdb describing changes (optional)
Is there a docdb describing the issue this solves or the feature added?