diff --git a/.gitignore b/.gitignore index b25c15b..1465b61 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,9 @@ *~ +*.art +*.root +*.log +*.so +*.d +*.pcm +*__pycache__ +backing diff --git a/README.md b/README.md index 5116020..c06833c 100644 --- a/README.md +++ b/README.md @@ -20,11 +20,13 @@ Both of these are currently undergoing rapid development. Feel free to use these Validation scripts and instructions are [here](validation/README.md) ## Previous Versions -The version history of EventNtuple is [here](https://mu2ewiki.fnal.gov/wiki/TrkAna#Version_History_.2F_TrkAna_Musings). -* Special Note: there were major changes going from v5 to v6 and so we have provided a [list of v5 --> v6 changes](doc/v5-to-v6.md) for those with analysis scripts that ran on v5 ntuples +The version history of EventNtuple is [here](https://mu2ewiki.fnal.gov/wiki/EventNtuple). + +### Upgrading from v5 to v6 +* For analyzers: a list of branch/leaf/name changes is [here](doc/v5-to-v6.md) +* For developers: instructions to update your development area are [here](doc/v5-to-v6_developers.md) ## Other Useful Links -* [Mu2eWiki page](https://mu2ewiki.fnal.gov/wiki/TrkAna) +* [Mu2eWiki page](https://mu2ewiki.fnal.gov/wiki/EventNtuple) * [tutorial](tutorial/README.md) -* [instructions for developers](https://mu2ewiki.fnal.gov/wiki/TrkAna#For_Developers) diff --git a/doc/ntuplehelper.md b/doc/ntuplehelper.md index 08300c7..d837b00 100644 --- a/doc/ntuplehelper.md +++ b/doc/ntuplehelper.md @@ -1,10 +1,10 @@ # How to get help -- ```ntuplehelper``` -On this page, you will learn how to use the [```ntuplehelper```](../../utils/ntuplehelper.py) utility to get more information about what the different branches and leaves are. You will need to be in a TrkAna environment e.g. +On this page, you will learn how to use the [```ntuplehelper```](../../utils/ntuplehelper.py) utility to get more information about what the different branches and leaves are. You will need to be in a EventNtuple environment e.g. ``` mu2einit -muse setup TrkAna +muse setup EventNtuple ``` You can use this utility: diff --git a/doc/v5-to-v6.md b/doc/v5-to-v6.md index 0480a5f..1ffb1e7 100644 --- a/doc/v5-to-v6.md +++ b/doc/v5-to-v6.md @@ -1,6 +1,8 @@ # Major Changes from v5 to v6 -There was a major update when we moved from v5 to v6. Here are tables of changes for you to consult. Note that the same change may appear in multiple tables since it may be important in one area but defined in another. For example, the folder name is defined in fcl but is also important to know in the Tree / Branch / Leaf Changes +There was a major update when we moved from v5 to v6. Here are tables of changes for you to consult. Note that the same change may appear in multiple tables since it may be important in one area but defined in another. For example, the folder name is defined in fcl but is also important to know in the Tree / Branch / Leaf Changes. + +Instructions for developers to upgrade their development areas are [here](v5-to-v6_developers.md) ## Tree / Branch / Leaf Changes | | v5 | v6 | Notes | @@ -32,6 +34,12 @@ Many fcl files were renamed, updated, or deleted. New fcl files introduced in v6 | TrkAnaExtracted.fcl | from_mcs-extracted.fcl | for running on mcs "extracted position" datasets, now #includes from_mcs-mockdata.fcl as a base | | TrkAnaReco_ceSimReco.fcl | from_mcs-ceSimReco.fcl | for running on the output of ceSimReco.fcl | | TrkAnaRecoEnsemble-Data.fcl | from_mcs-mockdata_noMC.fcl | for running on mock data with no MC information | +| TrkAnaDeM.fcl | only #includes updated | | +| TrkAnaDeMFromDigis.fcl | only #includes updated | | +| TrkAnaLineFromDigis.fcl | only #includes updated | | +| TrkAnaReflections.fcl | only #includes updated | | +| TrkAnaTrigger.fcl | only #includes updated | | +| TrkAnaTriggerFromDigis.fcl | only #includes updated | | | TrkAnaRecoEnsemble-MC.fcl | deleted | use from_mcs-mockdata.fcl instead| | TrkAnaReco_mergedKalSeeds.fcl | deleted | all track types in one branch is now the default | | CrvExpert.fcl | deleted | | @@ -40,6 +48,7 @@ Many fcl files were renamed, updated, or deleted. New fcl files introduced in v6 | TrkAnaReco_addStopTgtVDs.fcl | deleted | | | TrkAnaReco_multipleBestCrv.fcl | deleted | | | TrkAnaReco_multipleBestCrv_differentThresholds.fcl | deleted | | +| TrkAnaReco_MultipleTrkQual.fcl | deleted | | ## Fcl Parameter Changes | | v5 | v6 | Notes | diff --git a/doc/v5-to-v6_developers.md b/doc/v5-to-v6_developers.md new file mode 100644 index 0000000..8733c73 --- /dev/null +++ b/doc/v5-to-v6_developers.md @@ -0,0 +1,18 @@ +# Updating your TrkAna v5 area to an EventNtuple v6 area + +Rename your own fork on GitHub. Go to settings and change the repository name under "General" + +From your working directory before doing ```muse setup```: + +``` +mv TrkAna/ EventNtuple/ +cd EventNtuple/ +git remote set-url origin git@github.com:YourUsername/EventNtuple +git remote set-url mu2e https://github.com/Mu2e/EventNtuple +cd ../ +rm -rf build/XXX/ # if you like +mu2einit +muse setup +muse build -j4 --mu2eCompactPrint +``` + diff --git a/fcl/TrkAnaDeM.fcl b/fcl/TrkAnaDeM.fcl index 011ae42..e0126ba 100644 --- a/fcl/TrkAnaDeM.fcl +++ b/fcl/TrkAnaDeM.fcl @@ -1,7 +1,7 @@ # Minimal job to run TrkAna on the 'best' downstream electrons. Runs on mcs files #include "Offline/fcl/minimalMessageService.fcl" #include "Offline/fcl/standardServices.fcl" -#include "TrkAna/fcl/prolog.fcl" +#include "EventNtuple/fcl/prolog.fcl" process_name: TADeM source : { module_type : RootInput } diff --git a/fcl/TrkAnaDeMFromDigis.fcl b/fcl/TrkAnaDeMFromDigis.fcl index b2413bf..cd56297 100644 --- a/fcl/TrkAnaDeMFromDigis.fcl +++ b/fcl/TrkAnaDeMFromDigis.fcl @@ -1,6 +1,6 @@ # Minimal job to reconstructed downstream electrons from digis and analyze the output with TrkAna # #include this script in a subscript which specifies the database (ie -##include "TrkAna/fcl/TrkAnaDeMFromDigis.fcl" +##include "EventNtuple/fcl/TrkAnaDeMFromDigis.fcl" #services.DbService.purpose: MDC2020_best #services.DbService.version: v1_3 #services.DbService.verbose : 2 @@ -9,7 +9,7 @@ #include "Offline/fcl/standardServices.fcl" #include "Production/JobConfig/reco/prolog.fcl" #include "Offline/Mu2eKinKal/fcl/prolog.fcl" -#include "TrkAna/fcl/prolog.fcl" +#include "EventNtuple/fcl/prolog.fcl" process_name: TADeMDigis source : { module_type : RootInput } diff --git a/fcl/TrkAnaLineFromDigis.fcl b/fcl/TrkAnaLineFromDigis.fcl index 9f3067e..b9970ac 100644 --- a/fcl/TrkAnaLineFromDigis.fcl +++ b/fcl/TrkAnaLineFromDigis.fcl @@ -4,7 +4,7 @@ #include "Offline/fcl/standardServices.fcl" #include "Production/JobConfig/reco/prolog.fcl" #include "Offline/Mu2eKinKal/fcl/prolog.fcl" -#include "TrkAna/fcl/prolog.fcl" +#include "EventNtuple/fcl/prolog.fcl" process_name: TALineDigis source : { module_type : RootInput } diff --git a/fcl/TrkAnaReco_MultipleTrkQual.fcl b/fcl/TrkAnaReco_MultipleTrkQual.fcl deleted file mode 100644 index a378630..0000000 --- a/fcl/TrkAnaReco_MultipleTrkQual.fcl +++ /dev/null @@ -1,6 +0,0 @@ -#include "TrkAna/fcl/TrkAnaReco.fcl" -# Add another TrkQual module with a different training -# (NB to be read out by TrkAna it must have the same suffix) -physics.producers.TrkQualNewDeP : @local::TrkQualDeP -physics.producers.TrkQualNewDeP.TrainingName : "TrkQualPosNew" -physics.TrkAnaTrigPath : [ @sequence::TrkAnaReco.TrigSequence, TrkQualNewDeP ] diff --git a/fcl/TrkAnaReflections.fcl b/fcl/TrkAnaReflections.fcl index 0a7ffd3..8abc7c4 100644 --- a/fcl/TrkAnaReflections.fcl +++ b/fcl/TrkAnaReflections.fcl @@ -2,7 +2,7 @@ #include "Offline/fcl/minimalMessageService.fcl" #include "Offline/fcl/standardServices.fcl" #include "Offline/TrkReco/fcl/prolog.fcl" -#include "TrkAna/fcl/prolog.fcl" +#include "EventNtuple/fcl/prolog.fcl" BEGIN_PROLOG TAR : { @table::EventNtupleMaker diff --git a/fcl/TrkAnaTriggerMC.fcl b/fcl/TrkAnaTriggerMC.fcl index c3a2fd2..7787131 100644 --- a/fcl/TrkAnaTriggerMC.fcl +++ b/fcl/TrkAnaTriggerMC.fcl @@ -2,7 +2,7 @@ # Run TrkAna on the output of the trigger, including MC truth matching # #include "Offline/fcl/standardServices.fcl" -#include "TrkAna/fcl/prolog_trigger.fcl" +#include "EventNtuple/fcl/prolog_trigger.fcl" process_name : TrkAnaTriggerMC services : @local::Services.Reco source : { diff --git a/fcl/TrkAnaTriggerMCFromDigis.fcl b/fcl/TrkAnaTriggerMCFromDigis.fcl index eecb61c..00eaa4c 100644 --- a/fcl/TrkAnaTriggerMCFromDigis.fcl +++ b/fcl/TrkAnaTriggerMCFromDigis.fcl @@ -5,7 +5,7 @@ #include "Offline/CommonMC/fcl/prolog_trigger.fcl" #include "Production/JobConfig/digitize/prolog.fcl" -#include "TrkAna/fcl/prolog_trigger.fcl" +#include "EventNtuple/fcl/prolog_trigger.fcl" #include "mu2e_trig_config/test/triggerTest.fcl" # # Add MC truth matching for the highP_stopTarg triggers diff --git a/fcl/from_dig-mockdata.fcl b/fcl/from_dig-mockdata.fcl index a649119..e7bd09c 100644 --- a/fcl/from_dig-mockdata.fcl +++ b/fcl/from_dig-mockdata.fcl @@ -2,7 +2,7 @@ #include "Offline/fcl/standardProducers.fcl" #include "Offline/fcl/standardServices.fcl" #include "Production/JobConfig/reco/prolog.fcl" -#include "TrkAna/fcl/prolog.fcl" +#include "EventNtuple/fcl/prolog.fcl" process_name : EventNtuple diff --git a/fcl/from_mcs-ceSimReco.fcl b/fcl/from_mcs-ceSimReco.fcl index 7ff0c9c..f668d1e 100644 --- a/fcl/from_mcs-ceSimReco.fcl +++ b/fcl/from_mcs-ceSimReco.fcl @@ -1,4 +1,4 @@ -#include "TrkAna/fcl/from_mcs-mockdata.fcl" +#include "EventNtuple/fcl/from_mcs-mockdata.fcl" physics.analyzers.EventNtuple.branches : [ @local::DeM ] physics.analyzers.EventNtuple.FillTriggerInfo : false diff --git a/fcl/from_mcs-extracted.fcl b/fcl/from_mcs-extracted.fcl index bae180d..39e9791 100644 --- a/fcl/from_mcs-extracted.fcl +++ b/fcl/from_mcs-extracted.fcl @@ -1,8 +1,7 @@ -#include "TrkAna/fcl/from_mcs-mockdata.fcl" +#include "EventNtuple/fcl/from_mcs-mockdata.fcl" physics.EventNtuplePath : [ @sequence::EventNtuple.PathExt ] # path for extracted position cosmics physics.analyzers.EventNtuple.branches : [ @local::Ext ] physics.analyzers.EventNtuple.FitType : KinematicLine services.GeometryService.inputFile: "Production/JobConfig/cosmic/geom_cosmic_extracted.txt" -services.TFileService.fileName: "nts.owner.trkanaextracted-reco.version.sequencer.root" diff --git a/fcl/from_mcs-mixed.fcl b/fcl/from_mcs-mixed.fcl index 3e3cfc7..bb9e297 100644 --- a/fcl/from_mcs-mixed.fcl +++ b/fcl/from_mcs-mixed.fcl @@ -1 +1 @@ -#include "TrkAna/fcl/from_mcs-primary.fcl" +#include "EventNtuple/fcl/from_mcs-primary.fcl" diff --git a/fcl/from_mcs-mockdata.fcl b/fcl/from_mcs-mockdata.fcl index 95c44b3..2c962e4 100644 --- a/fcl/from_mcs-mockdata.fcl +++ b/fcl/from_mcs-mockdata.fcl @@ -1,7 +1,7 @@ #include "Offline/fcl/minimalMessageService.fcl" #include "Offline/fcl/standardProducers.fcl" #include "Offline/fcl/standardServices.fcl" -#include "TrkAna/fcl/prolog.fcl" +#include "EventNtuple/fcl/prolog.fcl" process_name : EventNtuple diff --git a/fcl/from_mcs-mockdata_noMC.fcl b/fcl/from_mcs-mockdata_noMC.fcl index 1a8466e..f2c166a 100644 --- a/fcl/from_mcs-mockdata_noMC.fcl +++ b/fcl/from_mcs-mockdata_noMC.fcl @@ -1,4 +1,4 @@ -#include "TrkAna/fcl/from_mcs-mockdata.fcl" +#include "EventNtuple/fcl/from_mcs-mockdata.fcl" physics.analyzers.EventNtuple.FillMCInfo : false diff --git a/fcl/from_mcs-mockdata_selectorExample.fcl b/fcl/from_mcs-mockdata_selectorExample.fcl index bda991a..875738a 100644 --- a/fcl/from_mcs-mockdata_selectorExample.fcl +++ b/fcl/from_mcs-mockdata_selectorExample.fcl @@ -1,4 +1,4 @@ -#include "TrkAna/fcl/from_mcs-mockdata.fcl" +#include "EventNtuple/fcl/from_mcs-mockdata.fcl" # a simple selector is used here, but any selector implemented as a tool can be used physics.producers.MergeKKAll.Selector : { diff --git a/fcl/from_mcs-mockdata_separateTrkBranches.fcl b/fcl/from_mcs-mockdata_separateTrkBranches.fcl index 887ebdb..75330dc 100644 --- a/fcl/from_mcs-mockdata_separateTrkBranches.fcl +++ b/fcl/from_mcs-mockdata_separateTrkBranches.fcl @@ -1,4 +1,4 @@ -#include "TrkAna/fcl/from_mcs-mockdata.fcl" +#include "EventNtuple/fcl/from_mcs-mockdata.fcl" physics.analyzers.EventNtuple.branches : [ @local::DeM, @local::DeP, @local::UeM, @local::UeP, @local::DmuM, @local::DmuP, @local::UmuM, @local::UmuP ] diff --git a/fcl/from_mcs-primary.fcl b/fcl/from_mcs-primary.fcl index 340bd64..e9650a8 100644 --- a/fcl/from_mcs-primary.fcl +++ b/fcl/from_mcs-primary.fcl @@ -1,3 +1,3 @@ -#include "TrkAna/fcl/from_mcs-mockdata.fcl" +#include "EventNtuple/fcl/from_mcs-mockdata.fcl" physics.EventNtupleEndPath : [ @sequence::EventNtuple.EndPath ] # adds back genCountLogger diff --git a/fcl/prolog.fcl b/fcl/prolog.fcl index c5546a8..772c054 100644 --- a/fcl/prolog.fcl +++ b/fcl/prolog.fcl @@ -3,7 +3,7 @@ #include "Offline/CommonMC/fcl/prolog.fcl" #include "Offline/fcl/TrkCaloDt.fcl" -#include "TrkAna/fcl/prolog_mc_reweighters.fcl" +#include "EventNtuple/fcl/prolog_mc_reweighters.fcl" BEGIN_PROLOG # Track quality module diff --git a/fcl/prolog_trigger.fcl b/fcl/prolog_trigger.fcl index c4a7463..6609185 100644 --- a/fcl/prolog_trigger.fcl +++ b/fcl/prolog_trigger.fcl @@ -1,7 +1,7 @@ # # Special configuration base for running TrkAna on trigger fits # -#include "TrkAna/fcl/prolog.fcl" +#include "EventNtuple/fcl/prolog.fcl" BEGIN_PROLOG TrkAnaTrigger : { TrkAnaTT : { diff --git a/inc/CentralHelixInfo.hh b/inc/CentralHelixInfo.hh index fc277c0..d6728c4 100644 --- a/inc/CentralHelixInfo.hh +++ b/inc/CentralHelixInfo.hh @@ -6,7 +6,7 @@ // #ifndef CentralHelixInfo_HH #define CentralHelixInfo_HH -#include "TrkAna/inc/RootVectors.hh" +#include "EventNtuple/inc/RootVectors.hh" #include "Offline/DataProducts/inc/SurfaceId.hh" namespace mu2e { diff --git a/inc/CrvHitInfoMC.hh b/inc/CrvHitInfoMC.hh index fb1d64c..00701b8 100644 --- a/inc/CrvHitInfoMC.hh +++ b/inc/CrvHitInfoMC.hh @@ -5,7 +5,7 @@ namespace CLHEP {class Hep3Vector; } #include -#include "TrkAna/inc/RootVectors.hh" +#include "EventNtuple/inc/RootVectors.hh" namespace mu2e { diff --git a/inc/CrvHitInfoReco.hh b/inc/CrvHitInfoReco.hh index f2505ab..518ffcc 100644 --- a/inc/CrvHitInfoReco.hh +++ b/inc/CrvHitInfoReco.hh @@ -3,7 +3,7 @@ // CrvHitInfoReco: information about a cluster of CRV coincidence triplets -#include "TrkAna/inc/RootVectors.hh" +#include "EventNtuple/inc/RootVectors.hh" #include "Offline/DataProducts/inc/CRVId.hh" namespace CLHEP {class Hep3Vector; } #include diff --git a/inc/CrvInfoHelper.hh b/inc/CrvInfoHelper.hh index 2363162..c44f5fa 100644 --- a/inc/CrvInfoHelper.hh +++ b/inc/CrvInfoHelper.hh @@ -1,13 +1,13 @@ // // Replacement for CRVAnalysis // -#include "TrkAna/inc/CrvHitInfoReco.hh" -#include "TrkAna/inc/CrvHitInfoMC.hh" -#include "TrkAna/inc/CrvWaveformInfo.hh" -#include "TrkAna/inc/CrvSummaryReco.hh" -#include "TrkAna/inc/CrvSummaryMC.hh" -#include "TrkAna/inc/CrvPlaneInfoMC.hh" -#include "TrkAna/inc/CrvPulseInfoReco.hh" +#include "EventNtuple/inc/CrvHitInfoReco.hh" +#include "EventNtuple/inc/CrvHitInfoMC.hh" +#include "EventNtuple/inc/CrvWaveformInfo.hh" +#include "EventNtuple/inc/CrvSummaryReco.hh" +#include "EventNtuple/inc/CrvSummaryMC.hh" +#include "EventNtuple/inc/CrvPlaneInfoMC.hh" +#include "EventNtuple/inc/CrvPulseInfoReco.hh" #include "Offline/DataProducts/inc/CRVId.hh" #include "Offline/RecoDataProducts/inc/CrvCoincidenceCluster.hh" #include "Offline/RecoDataProducts/inc/CrvRecoPulse.hh" diff --git a/inc/CrvPlaneInfoMC.hh b/inc/CrvPlaneInfoMC.hh index c7f13ea..5cea16f 100644 --- a/inc/CrvPlaneInfoMC.hh +++ b/inc/CrvPlaneInfoMC.hh @@ -3,7 +3,7 @@ // CrvPlaneInfoMC: information about the point where the MC trajectory crosses the xz plane of CRV-T -#include "TrkAna/inc/RootVectors.hh" +#include "EventNtuple/inc/RootVectors.hh" namespace CLHEP {class Hep3Vector; } #include diff --git a/inc/CrvPulseInfoReco.hh b/inc/CrvPulseInfoReco.hh index 81fcc2c..6da5ab0 100644 --- a/inc/CrvPulseInfoReco.hh +++ b/inc/CrvPulseInfoReco.hh @@ -1,7 +1,7 @@ #ifndef CrvPulseInfoReco_hh #define CrvPulseInfoReco_hh -#include "TrkAna/inc/RootVectors.hh" +#include "EventNtuple/inc/RootVectors.hh" namespace CLHEP {class Hep3Vector; } #include diff --git a/inc/CrvSummaryMC.hh b/inc/CrvSummaryMC.hh index ac99d0b..c8fbfd6 100644 --- a/inc/CrvSummaryMC.hh +++ b/inc/CrvSummaryMC.hh @@ -3,7 +3,7 @@ // CrvSummaryMC: branch that provides a summary of the CRV MC true information -#include "TrkAna/inc/RootVectors.hh" +#include "EventNtuple/inc/RootVectors.hh" namespace CLHEP {class Hep3Vector; } namespace mu2e { diff --git a/inc/HelixInfo.hh b/inc/HelixInfo.hh index 285d64b..938aeda 100644 --- a/inc/HelixInfo.hh +++ b/inc/HelixInfo.hh @@ -1,8 +1,8 @@ // // HelixInfo: struct for HelixSeed info // -#ifndef TrkAna_HelixInfo_hh -#define TrkAna_HelixInfo_hh +#ifndef EventNtuple_HelixInfo_hh +#define EventNtuple_HelixInfo_hh namespace mu2e { struct HelixInfo { int nch = -1; // number of combo hits potentially used for this helix diff --git a/inc/InfoMCStructHelper.hh b/inc/InfoMCStructHelper.hh index ef3bab2..958b9b9 100644 --- a/inc/InfoMCStructHelper.hh +++ b/inc/InfoMCStructHelper.hh @@ -2,8 +2,8 @@ // Namespace for collecting tools used in MC truth evaluation // Original author: Dave Brown (LBNL) 8/10/2016 // -#ifndef TrkAna_InfoMCStructHelper_hh -#define TrkAna_InfoMCStructHelper_hh +#ifndef EventNtuple_InfoMCStructHelper_hh +#define EventNtuple_InfoMCStructHelper_hh #include "fhiclcpp/types/Atom.h" #include "Offline/RecoDataProducts/inc/StrawHitIndex.hh" #include "Offline/MCDataProducts/inc/StrawDigiMC.hh" @@ -11,14 +11,14 @@ #include "Offline/MCDataProducts/inc/CrvCoincidenceClusterMC.hh" #include "Offline/RecoDataProducts/inc/KalSeed.hh" -#include "TrkAna/inc/TrkInfoMC.hh" -#include "TrkAna/inc/SimInfo.hh" -#include "TrkAna/inc/TrkStrawHitInfoMC.hh" -#include "TrkAna/inc/CaloClusterInfoMC.hh" -#include "TrkAna/inc/MCStepInfo.hh" -#include "TrkAna/inc/MCStepSummaryInfo.hh" -#include "TrkAna/inc/SurfaceStepInfo.hh" -#include "TrkAna/inc/CrvHitInfoMC.hh" +#include "EventNtuple/inc/TrkInfoMC.hh" +#include "EventNtuple/inc/SimInfo.hh" +#include "EventNtuple/inc/TrkStrawHitInfoMC.hh" +#include "EventNtuple/inc/CaloClusterInfoMC.hh" +#include "EventNtuple/inc/MCStepInfo.hh" +#include "EventNtuple/inc/MCStepSummaryInfo.hh" +#include "EventNtuple/inc/SurfaceStepInfo.hh" +#include "EventNtuple/inc/CrvHitInfoMC.hh" #include "Offline/RecoDataProducts/inc/KalSeed.hh" #include "Offline/MCDataProducts/inc/KalSeedMC.hh" #include "BTrk/BbrGeom/HepPoint.h" diff --git a/inc/InfoStructHelper.hh b/inc/InfoStructHelper.hh index 5e186c2..c2295da 100644 --- a/inc/InfoStructHelper.hh +++ b/inc/InfoStructHelper.hh @@ -2,8 +2,8 @@ // Class for help filling Info structs // Original author: A. Edmonds (November 2018) // -#ifndef TrkAna_InfoStructHelper_hh -#define TrkAna_InfoStructHelper_hh +#ifndef EventNtuple_InfoStructHelper_hh +#define EventNtuple_InfoStructHelper_hh #include "Offline/RecoDataProducts/inc/StrawHitIndex.hh" #include "Offline/RecoDataProducts/inc/KalSeed.hh" #include "Offline/RecoDataProducts/inc/StrawHitFlag.hh" @@ -16,19 +16,19 @@ #include "Offline/GeometryService/inc/GeomHandle.hh" #include "Offline/CalorimeterGeom/inc/DiskCalorimeter.hh" -#include "TrkAna/inc/HitCount.hh" -#include "TrkAna/inc/TrkInfo.hh" -#include "TrkAna/inc/TrkSegInfo.hh" -#include "TrkAna/inc/LoopHelixInfo.hh" -#include "TrkAna/inc/CentralHelixInfo.hh" -#include "TrkAna/inc/KinematicLineInfo.hh" -#include "TrkAna/inc/TrkStrawHitInfo.hh" -#include "TrkAna/inc/TrkStrawMatInfo.hh" -#include "TrkAna/inc/TrkCaloHitInfo.hh" -#include "TrkAna/inc/TrkPIDInfo.hh" -#include "TrkAna/inc/HelixInfo.hh" -#include "TrkAna/inc/MVAResultInfo.hh" -#include "TrkAna/inc/CrvHitInfoReco.hh" +#include "EventNtuple/inc/HitCount.hh" +#include "EventNtuple/inc/TrkInfo.hh" +#include "EventNtuple/inc/TrkSegInfo.hh" +#include "EventNtuple/inc/LoopHelixInfo.hh" +#include "EventNtuple/inc/CentralHelixInfo.hh" +#include "EventNtuple/inc/KinematicLineInfo.hh" +#include "EventNtuple/inc/TrkStrawHitInfo.hh" +#include "EventNtuple/inc/TrkStrawMatInfo.hh" +#include "EventNtuple/inc/TrkCaloHitInfo.hh" +#include "EventNtuple/inc/TrkPIDInfo.hh" +#include "EventNtuple/inc/HelixInfo.hh" +#include "EventNtuple/inc/MVAResultInfo.hh" +#include "EventNtuple/inc/CrvHitInfoReco.hh" #include "art/Framework/Principal/Handle.h" #include #include diff --git a/inc/MCStepInfo.hh b/inc/MCStepInfo.hh index 36e5dcb..8e3d1c8 100644 --- a/inc/MCStepInfo.hh +++ b/inc/MCStepInfo.hh @@ -4,7 +4,7 @@ #ifndef MCStepInfo_HH #define MCStepInfo_HH #include -#include "TrkAna/inc/RootVectors.hh" +#include "EventNtuple/inc/RootVectors.hh" namespace mu2e { struct MCStepInfo { diff --git a/inc/MCStepSummaryInfo.hh b/inc/MCStepSummaryInfo.hh index 3adfb3a..a772aac 100644 --- a/inc/MCStepSummaryInfo.hh +++ b/inc/MCStepSummaryInfo.hh @@ -4,7 +4,7 @@ #ifndef MCStepSummaryInfo_HH #define MCStepSummaryInfo_HH #include -#include "TrkAna/inc/RootVectors.hh" +#include "EventNtuple/inc/RootVectors.hh" namespace mu2e { struct MCStepSummaryInfo { diff --git a/inc/MVAResultInfo.hh b/inc/MVAResultInfo.hh index 0d9b9f0..781b45b 100644 --- a/inc/MVAResultInfo.hh +++ b/inc/MVAResultInfo.hh @@ -1,6 +1,6 @@ // // MVAResultInfo: array branch containing the output of a multi-variate analysis (MVA) -// structs used to record MVAResult information into TrkAna tree +// structs used to record MVAResult information into EventNtuple // Andy Edmonds (January 2024) // #ifndef MVAResultInfo_HH diff --git a/inc/SimInfo.hh b/inc/SimInfo.hh index 498874f..955c839 100644 --- a/inc/SimInfo.hh +++ b/inc/SimInfo.hh @@ -6,7 +6,7 @@ // #ifndef SimInfo_HH #define SimInfo_HH -#include "TrkAna/inc/RootVectors.hh" +#include "EventNtuple/inc/RootVectors.hh" #include "Offline/MCDataProducts/inc/MCRelationship.hh" namespace mu2e { diff --git a/inc/SurfaceStepInfo.hh b/inc/SurfaceStepInfo.hh index c4408fb..1e1f3bf 100644 --- a/inc/SurfaceStepInfo.hh +++ b/inc/SurfaceStepInfo.hh @@ -4,7 +4,7 @@ #ifndef SurfaceStepInfo_HH #define SurfaceStepInfo_HH #include "Offline/DataProducts/inc/SurfaceId.hh" -#include "TrkAna/inc/RootVectors.hh" +#include "EventNtuple/inc/RootVectors.hh" namespace mu2e { class SurfaceStep; diff --git a/inc/TrkCaloHitInfo.hh b/inc/TrkCaloHitInfo.hh index 46979ee..9afe45d 100644 --- a/inc/TrkCaloHitInfo.hh +++ b/inc/TrkCaloHitInfo.hh @@ -4,7 +4,7 @@ // #ifndef TrkCaloHitInfo_HH #define TrkCaloHitInfo_HH -#include "TrkAna/inc/RootVectors.hh" +#include "EventNtuple/inc/RootVectors.hh" namespace mu2e { struct TrkCaloHitInfo { diff --git a/inc/TrkSegInfo.hh b/inc/TrkSegInfo.hh index 598c14b..14d2f22 100644 --- a/inc/TrkSegInfo.hh +++ b/inc/TrkSegInfo.hh @@ -6,7 +6,7 @@ // #ifndef TrkSegInfo_HH #define TrkSegInfo_HH -#include "TrkAna/inc/RootVectors.hh" +#include "EventNtuple/inc/RootVectors.hh" #include "Offline/DataProducts/inc/SurfaceId.hh" namespace mu2e { diff --git a/inc/TrkStrawHitInfo.hh b/inc/TrkStrawHitInfo.hh index 1dea831..b244f47 100644 --- a/inc/TrkStrawHitInfo.hh +++ b/inc/TrkStrawHitInfo.hh @@ -5,7 +5,7 @@ #define TrkStrawHitInfoHH -//#include "TrkAna/inc/RootVectors.hh" +//#include "EventNtuple/inc/RootVectors.hh" #include "Offline/DataProducts/inc/TrkTypes.hh" namespace mu2e { diff --git a/inc/TrkStrawHitInfoMC.hh b/inc/TrkStrawHitInfoMC.hh index 14502a5..872e0ac 100644 --- a/inc/TrkStrawHitInfoMC.hh +++ b/inc/TrkStrawHitInfoMC.hh @@ -3,7 +3,7 @@ // #ifndef TrkStrawHitInfoMC_HH #define TrkStrawHitInfoMC_HH -#include "TrkAna/inc/RootVectors.hh" +#include "EventNtuple/inc/RootVectors.hh" #include "Offline/MCDataProducts/inc/MCRelationship.hh" namespace mu2e { diff --git a/src/BestCrvHitDeltaT_module.cc b/src/BestCrvHitDeltaT_module.cc index 7815ae6..f8a0f9c 100644 --- a/src/BestCrvHitDeltaT_module.cc +++ b/src/BestCrvHitDeltaT_module.cc @@ -16,7 +16,7 @@ #include "fhiclcpp/types/Table.h" #include "fhiclcpp/types/OptionalSequence.h" -#include "TrkAna/inc/BestCrvAssns.hh" +#include "EventNtuple/inc/BestCrvAssns.hh" // C++ includes. #include diff --git a/src/CrvHitInfoMC.cc b/src/CrvHitInfoMC.cc index 72c404b..81a0ddd 100644 --- a/src/CrvHitInfoMC.cc +++ b/src/CrvHitInfoMC.cc @@ -1,4 +1,4 @@ -#include "TrkAna/inc/CrvHitInfoMC.hh" +#include "EventNtuple/inc/CrvHitInfoMC.hh" #include "CLHEP/Vector/ThreeVector.h" namespace mu2e { CrvHitInfoMC::CrvHitInfoMC(bool valid, int pdgId, diff --git a/src/CrvHitInfoReco.cc b/src/CrvHitInfoReco.cc index ff98dd1..e0cf5d9 100644 --- a/src/CrvHitInfoReco.cc +++ b/src/CrvHitInfoReco.cc @@ -1,4 +1,4 @@ -#include "TrkAna/inc/CrvHitInfoReco.hh" +#include "EventNtuple/inc/CrvHitInfoReco.hh" #include "CLHEP/Vector/ThreeVector.h" namespace mu2e { CrvHitInfoReco::CrvHitInfoReco(int sectorType, CLHEP::Hep3Vector hpos, float timeWindowStart, float timeWindowEnd, float timeAvg, float PEs, std::array PEsPerLayer, int nCoincidenceHits, int nCoincidenceLayers, float coincidenceAngle) : diff --git a/src/CrvInfoHelper.cc b/src/CrvInfoHelper.cc index d02d5a6..ae1d3f9 100644 --- a/src/CrvInfoHelper.cc +++ b/src/CrvInfoHelper.cc @@ -1,4 +1,4 @@ -#include "TrkAna/inc/CrvInfoHelper.hh" +#include "EventNtuple/inc/CrvInfoHelper.hh" #include "Offline/CosmicRayShieldGeom/inc/CosmicRayShield.hh" #include "Offline/CRVConditions/inc/CRVDigitizationPeriod.hh" diff --git a/src/CrvPlaneInfoMC.cc b/src/CrvPlaneInfoMC.cc index acb47bb..67f96b5 100644 --- a/src/CrvPlaneInfoMC.cc +++ b/src/CrvPlaneInfoMC.cc @@ -1,4 +1,4 @@ -#include "TrkAna/inc/CrvPlaneInfoMC.hh" +#include "EventNtuple/inc/CrvPlaneInfoMC.hh" #include "CLHEP/Vector/ThreeVector.h" namespace mu2e { CrvPlaneInfoMC::CrvPlaneInfoMC(int pdgId, int primaryPdgId, float primaryE, CLHEP::Hep3Vector primaryPos, diff --git a/src/CrvPulseInfoReco.cc b/src/CrvPulseInfoReco.cc index 584ccb3..ee28c0c 100644 --- a/src/CrvPulseInfoReco.cc +++ b/src/CrvPulseInfoReco.cc @@ -1,4 +1,4 @@ -#include "TrkAna/inc/CrvPulseInfoReco.hh" +#include "EventNtuple/inc/CrvPulseInfoReco.hh" #include "CLHEP/Vector/ThreeVector.h" namespace mu2e { CrvPulseInfoReco::CrvPulseInfoReco(CLHEP::Hep3Vector ppos, int barId, int sectorId, int SiPMId, int PEs, int PEsPulseHeight, float pulseHeight, float pulseBeta, float pulseFitChi2, float time) : diff --git a/src/CrvSummaryMC.cc b/src/CrvSummaryMC.cc index 225667c..e55bfcc 100644 --- a/src/CrvSummaryMC.cc +++ b/src/CrvSummaryMC.cc @@ -1,4 +1,4 @@ -#include "TrkAna/inc/CrvSummaryMC.hh" +#include "EventNtuple/inc/CrvSummaryMC.hh" #include "CLHEP/Vector/ThreeVector.h" namespace mu2e { CrvSummaryMC::CrvSummaryMC(double totalEnergyDeposited, double minPathLayer, double maxPathLayer, int nHitCounters, CLHEP::Hep3Vector ppos, int sectorNumber, int sectorType, int pdgId) : diff --git a/src/EventNtupleMaker_module.cc b/src/EventNtupleMaker_module.cc index 63b25b2..48cbed9 100644 --- a/src/EventNtupleMaker_module.cc +++ b/src/EventNtupleMaker_module.cc @@ -54,35 +54,35 @@ // mu2e tracking #include "Offline/BTrkData/inc/TrkStrawHit.hh" // diagnostics -#include "TrkAna/inc/HitCount.hh" -#include "TrkAna/inc/TrkCount.hh" -#include "TrkAna/inc/EventInfo.hh" -#include "TrkAna/inc/EventInfoMC.hh" -#include "TrkAna/inc/TrkInfo.hh" -#include "TrkAna/inc/TrkInfoMC.hh" -#include "TrkAna/inc/TrkSegInfo.hh" -#include "TrkAna/inc/LoopHelixInfo.hh" -#include "TrkAna/inc/CentralHelixInfo.hh" -#include "TrkAna/inc/KinematicLineInfo.hh" -#include "TrkAna/inc/SimInfo.hh" -#include "TrkAna/inc/EventWeightInfo.hh" -#include "TrkAna/inc/TrkStrawHitInfo.hh" -#include "TrkAna/inc/TrkStrawHitInfoMC.hh" -#include "TrkAna/inc/TrkCaloHitInfo.hh" -#include "TrkAna/inc/CaloClusterInfoMC.hh" -#include "TrkAna/inc/TrkPIDInfo.hh" -#include "TrkAna/inc/HelixInfo.hh" -#include "TrkAna/inc/InfoStructHelper.hh" -#include "TrkAna/inc/CrvInfoHelper.hh" -#include "TrkAna/inc/InfoMCStructHelper.hh" +#include "EventNtuple/inc/HitCount.hh" +#include "EventNtuple/inc/TrkCount.hh" +#include "EventNtuple/inc/EventInfo.hh" +#include "EventNtuple/inc/EventInfoMC.hh" +#include "EventNtuple/inc/TrkInfo.hh" +#include "EventNtuple/inc/TrkInfoMC.hh" +#include "EventNtuple/inc/TrkSegInfo.hh" +#include "EventNtuple/inc/LoopHelixInfo.hh" +#include "EventNtuple/inc/CentralHelixInfo.hh" +#include "EventNtuple/inc/KinematicLineInfo.hh" +#include "EventNtuple/inc/SimInfo.hh" +#include "EventNtuple/inc/EventWeightInfo.hh" +#include "EventNtuple/inc/TrkStrawHitInfo.hh" +#include "EventNtuple/inc/TrkStrawHitInfoMC.hh" +#include "EventNtuple/inc/TrkCaloHitInfo.hh" +#include "EventNtuple/inc/CaloClusterInfoMC.hh" +#include "EventNtuple/inc/TrkPIDInfo.hh" +#include "EventNtuple/inc/HelixInfo.hh" +#include "EventNtuple/inc/InfoStructHelper.hh" +#include "EventNtuple/inc/CrvInfoHelper.hh" +#include "EventNtuple/inc/InfoMCStructHelper.hh" #include "Offline/RecoDataProducts/inc/RecoQual.hh" #include "Offline/RecoDataProducts/inc/MVAResult.hh" -#include "TrkAna/inc/RecoQualInfo.hh" -#include "TrkAna/inc/MVAResultInfo.hh" -#include "TrkAna/inc/BestCrvAssns.hh" -#include "TrkAna/inc/MCStepInfo.hh" -#include "TrkAna/inc/SurfaceStepInfo.hh" -#include "TrkAna/inc/MCStepSummaryInfo.hh" +#include "EventNtuple/inc/RecoQualInfo.hh" +#include "EventNtuple/inc/MVAResultInfo.hh" +#include "EventNtuple/inc/BestCrvAssns.hh" +#include "EventNtuple/inc/MCStepInfo.hh" +#include "EventNtuple/inc/SurfaceStepInfo.hh" +#include "EventNtuple/inc/MCStepSummaryInfo.hh" // C++ includes. #include diff --git a/src/InfoMCStructHelper.cc b/src/InfoMCStructHelper.cc index afbb940..d37c1cd 100644 --- a/src/InfoMCStructHelper.cc +++ b/src/InfoMCStructHelper.cc @@ -2,7 +2,7 @@ // Namespace for collecting tools used in MC truth evaluation // Original author: Dave Brown (LBNL) 8/10/2016 // -#include "TrkAna/inc/InfoMCStructHelper.hh" +#include "EventNtuple/inc/InfoMCStructHelper.hh" #include "Offline/MCDataProducts/inc/StepPointMC.hh" #include "Offline/MCDataProducts/inc/SimParticle.hh" #include "Offline/MCDataProducts/inc/MCRelationship.hh" diff --git a/src/InfoStructHelper.cc b/src/InfoStructHelper.cc index f295ee0..0323b62 100644 --- a/src/InfoStructHelper.cc +++ b/src/InfoStructHelper.cc @@ -2,7 +2,7 @@ // Namespace for collecting tools used in TrkDiag tree filling // Original author: A. Edmonds (November 2018) // -#include "TrkAna/inc/InfoStructHelper.hh" +#include "EventNtuple/inc/InfoStructHelper.hh" #include "Offline/RecoDataProducts/inc/TrkStrawHitSeed.hh" #include "KinKal/Trajectory/CentralHelix.hh" #include "Offline/Mu2eKinKal/inc/WireHitState.hh" diff --git a/src/SurfaceStepInfo.cc b/src/SurfaceStepInfo.cc index 3e0ceed..ef73882 100644 --- a/src/SurfaceStepInfo.cc +++ b/src/SurfaceStepInfo.cc @@ -1,4 +1,4 @@ -#include "TrkAna/inc/SurfaceStepInfo.hh" +#include "EventNtuple/inc/SurfaceStepInfo.hh" #include "Offline/MCDataProducts/inc/SurfaceStep.hh" namespace mu2e { SurfaceStepInfo::SurfaceStepInfo (const SurfaceStep ss) : sid(ss.surfaceId().id().id()),sindex(ss.surfaceId().index()), time(ss.time()), edep(ss.energyDeposit()), diff --git a/src/classes.h b/src/classes.h index 8703357..bb9a7cd 100644 --- a/src/classes.h +++ b/src/classes.h @@ -1,30 +1,30 @@ -#include "TrkAna/inc/TrkStrawHitInfoMC.hh" -#include "TrkAna/inc/TrkStrawHitInfo.hh" -#include "TrkAna/inc/TrkStrawMatInfo.hh" -#include "TrkAna/inc/EventInfo.hh" -#include "TrkAna/inc/EventInfoMC.hh" -#include "TrkAna/inc/HelixInfo.hh" -#include "TrkAna/inc/HitCount.hh" -#include "TrkAna/inc/TrkCount.hh" -#include "TrkAna/inc/TrkInfo.hh" -#include "TrkAna/inc/TrkInfoMC.hh" -#include "TrkAna/inc/TrkSegInfo.hh" -#include "TrkAna/inc/LoopHelixInfo.hh" -#include "TrkAna/inc/CentralHelixInfo.hh" -#include "TrkAna/inc/KinematicLineInfo.hh" -#include "TrkAna/inc/SimInfo.hh" -#include "TrkAna/inc/MCStepInfo.hh" -#include "TrkAna/inc/MCStepSummaryInfo.hh" -#include "TrkAna/inc/TrkCaloHitInfo.hh" -#include "TrkAna/inc/EventWeightInfo.hh" -#include "TrkAna/inc/RecoQualInfo.hh" -#include "TrkAna/inc/CaloClusterInfoMC.hh" -#include "TrkAna/inc/CrvHitInfoReco.hh" -#include "TrkAna/inc/CrvHitInfoMC.hh" -#include "TrkAna/inc/CrvWaveformInfo.hh" -#include "TrkAna/inc/CrvPlaneInfoMC.hh" -#include "TrkAna/inc/CrvPulseInfoReco.hh" -#include "TrkAna/inc/CrvSummaryReco.hh" -#include "TrkAna/inc/CrvSummaryMC.hh" -#include "TrkAna/inc/MVAResultInfo.hh" -#include "TrkAna/inc/SurfaceStepInfo.hh" +#include "EventNtuple/inc/TrkStrawHitInfoMC.hh" +#include "EventNtuple/inc/TrkStrawHitInfo.hh" +#include "EventNtuple/inc/TrkStrawMatInfo.hh" +#include "EventNtuple/inc/EventInfo.hh" +#include "EventNtuple/inc/EventInfoMC.hh" +#include "EventNtuple/inc/HelixInfo.hh" +#include "EventNtuple/inc/HitCount.hh" +#include "EventNtuple/inc/TrkCount.hh" +#include "EventNtuple/inc/TrkInfo.hh" +#include "EventNtuple/inc/TrkInfoMC.hh" +#include "EventNtuple/inc/TrkSegInfo.hh" +#include "EventNtuple/inc/LoopHelixInfo.hh" +#include "EventNtuple/inc/CentralHelixInfo.hh" +#include "EventNtuple/inc/KinematicLineInfo.hh" +#include "EventNtuple/inc/SimInfo.hh" +#include "EventNtuple/inc/MCStepInfo.hh" +#include "EventNtuple/inc/MCStepSummaryInfo.hh" +#include "EventNtuple/inc/TrkCaloHitInfo.hh" +#include "EventNtuple/inc/EventWeightInfo.hh" +#include "EventNtuple/inc/RecoQualInfo.hh" +#include "EventNtuple/inc/CaloClusterInfoMC.hh" +#include "EventNtuple/inc/CrvHitInfoReco.hh" +#include "EventNtuple/inc/CrvHitInfoMC.hh" +#include "EventNtuple/inc/CrvWaveformInfo.hh" +#include "EventNtuple/inc/CrvPlaneInfoMC.hh" +#include "EventNtuple/inc/CrvPulseInfoReco.hh" +#include "EventNtuple/inc/CrvSummaryReco.hh" +#include "EventNtuple/inc/CrvSummaryMC.hh" +#include "EventNtuple/inc/MVAResultInfo.hh" +#include "EventNtuple/inc/SurfaceStepInfo.hh" diff --git a/utils/helper/ntuplehelper.py b/utils/helper/ntuplehelper.py index ea0fbd5..c10b965 100644 --- a/utils/helper/ntuplehelper.py +++ b/utils/helper/ntuplehelper.py @@ -90,7 +90,7 @@ def whatis(self, array): if (".hh" not in struct_file): struct_file += ".hh" # print(struct_file) - with open(os.environ.get("TRKANA_INC")+"/TrkAna/inc/"+struct_file, 'r') as f: + with open(os.environ.get("EVENTNTUPLE_INC")+"/EventNtuple/inc/"+struct_file, 'r') as f: lines = f.readlines() for row in lines: if (row.find("// "+struct) != -1): diff --git a/utils/rooutil/draft.md b/utils/rooutil/draft.md index d0aa889..080c23a 100644 --- a/utils/rooutil/draft.md +++ b/utils/rooutil/draft.md @@ -9,7 +9,7 @@ There are various classes that combine together branches at different dimenions | Class | Single Objects | Vectors | Vector-of-Vectors | |-----|-----|----|-----| -| Event | ```evtinfo```, ```evtinfomc``` | ```trk``` | ```trkfit``` | +| Event | ```evtinfo```, ```evtinfomc``` | ```trk``` | ```trksegs``` | | Track | ```trk``` | ```trksegs``` | none | | TrackSegment | ```trkseg``` | none | none | @@ -23,7 +23,7 @@ The currently supported branches are: ### Common Cut Functions -Here are the common cut functions defined in ```TrkAna/utils/rooutil/inc/common_cuts.hh``` with explanations: +Here are the common cut functions defined in ```EventNtuple/utils/rooutil/inc/common_cuts.hh``` with explanations: | function | cuts on | result | |----|----|----| diff --git a/utils/rooutil/examples/CreateTree.C b/utils/rooutil/examples/CreateTree.C index efd3537..2c63c55 100644 --- a/utils/rooutil/examples/CreateTree.C +++ b/utils/rooutil/examples/CreateTree.C @@ -3,8 +3,8 @@ // This uses cut functions defined in common_cuts.hh // -#include "TrkAna/utils/rooutil/inc/RooUtil.hh" -#include "TrkAna/utils/rooutil/inc/common_cuts.hh" +#include "EventNtuple/utils/rooutil/inc/RooUtil.hh" +#include "EventNtuple/utils/rooutil/inc/common_cuts.hh" #include "TH1F.h" diff --git a/utils/rooutil/examples/PlotEntranceMomentum.C b/utils/rooutil/examples/PlotEntranceMomentum.C index 739ee9b..7bdc78e 100644 --- a/utils/rooutil/examples/PlotEntranceMomentum.C +++ b/utils/rooutil/examples/PlotEntranceMomentum.C @@ -3,8 +3,8 @@ // This uses cut functions defined in common_cuts.hh // -#include "TrkAna/utils/rooutil/inc/RooUtil.hh" -#include "TrkAna/utils/rooutil/inc/common_cuts.hh" +#include "EventNtuple/utils/rooutil/inc/RooUtil.hh" +#include "EventNtuple/utils/rooutil/inc/common_cuts.hh" #include "TH1F.h" diff --git a/utils/rooutil/examples/PrintEvents.C b/utils/rooutil/examples/PrintEvents.C index 9b31063..7cf7152 100644 --- a/utils/rooutil/examples/PrintEvents.C +++ b/utils/rooutil/examples/PrintEvents.C @@ -1,10 +1,10 @@ -#include "TrkAna/utils/rooutil/inc/RooUtil.hh" -#include "TrkAna/utils/rooutil/inc/common_cuts.hh" +#include "EventNtuple/utils/rooutil/inc/RooUtil.hh" +#include "EventNtuple/utils/rooutil/inc/common_cuts.hh" #include bool good_track(const Track& track) { - if (track.trk->fitcon > 1e-3 && is_e_minus(track) && is_downstream(track)) { + if (track.trk->fitcon > 1e-3 && is_e_minus(track)) { return true; } else { diff --git a/utils/rooutil/examples/TrackCounting.C b/utils/rooutil/examples/TrackCounting.C index ddec7e9..9557498 100644 --- a/utils/rooutil/examples/TrackCounting.C +++ b/utils/rooutil/examples/TrackCounting.C @@ -1,5 +1,5 @@ -#include "TrkAna/utils/rooutil/inc/RooUtil.hh" -#include "TrkAna/utils/rooutil/inc/common_cuts.hh" +#include "EventNtuple/utils/rooutil/inc/RooUtil.hh" +#include "EventNtuple/utils/rooutil/inc/common_cuts.hh" #include diff --git a/utils/rooutil/inc/Event.hh b/utils/rooutil/inc/Event.hh index 2d154e1..5246a45 100644 --- a/utils/rooutil/inc/Event.hh +++ b/utils/rooutil/inc/Event.hh @@ -1,10 +1,10 @@ #ifndef Event_hh_ #define Event_hh_ -#include "TrkAna/inc/EventInfo.hh" -#include "TrkAna/inc/EventInfoMC.hh" +#include "EventNtuple/inc/EventInfo.hh" +#include "EventNtuple/inc/EventInfoMC.hh" -#include "TrkAna/utils/rooutil/inc/Track.hh" +#include "EventNtuple/utils/rooutil/inc/Track.hh" #include "TTree.h" diff --git a/utils/rooutil/inc/RooUtil.hh b/utils/rooutil/inc/RooUtil.hh index b3ca9b1..9837802 100644 --- a/utils/rooutil/inc/RooUtil.hh +++ b/utils/rooutil/inc/RooUtil.hh @@ -4,7 +4,7 @@ #include "TFile.h" #include "TTree.h" -#include "TrkAna/utils/rooutil/inc/Event.hh" +#include "EventNtuple/utils/rooutil/inc/Event.hh" class RooUtil { public: diff --git a/utils/rooutil/inc/Track.hh b/utils/rooutil/inc/Track.hh index 4475ae5..6edb301 100644 --- a/utils/rooutil/inc/Track.hh +++ b/utils/rooutil/inc/Track.hh @@ -2,10 +2,10 @@ #define Track_hh_ #include -#include "TrkAna/inc/TrkInfo.hh" -#include "TrkAna/inc/TrkSegInfo.hh" +#include "EventNtuple/inc/TrkInfo.hh" +#include "EventNtuple/inc/TrkSegInfo.hh" -#include "TrkAna/utils/rooutil/inc/TrackSegment.hh" +#include "EventNtuple/utils/rooutil/inc/TrackSegment.hh" struct Track { Track(mu2e::TrkInfo* trk, std::vector* trksegs, bool debug = false) : trk(trk), trksegs(trksegs), debug(debug) { diff --git a/utils/rooutil/inc/TrackSegment.hh b/utils/rooutil/inc/TrackSegment.hh index 2b0ef4d..a24b945 100644 --- a/utils/rooutil/inc/TrackSegment.hh +++ b/utils/rooutil/inc/TrackSegment.hh @@ -2,7 +2,7 @@ #define TrackSegment_hh_ #include -#include "TrkAna/inc/TrkSegInfo.hh" +#include "EventNtuple/inc/TrkSegInfo.hh" struct TrackSegment { TrackSegment(mu2e::TrkSegInfo* trkseg) : trkseg(trkseg) { } diff --git a/utils/rooutil/inc/common_cuts.hh b/utils/rooutil/inc/common_cuts.hh index ab14d57..23952dc 100644 --- a/utils/rooutil/inc/common_cuts.hh +++ b/utils/rooutil/inc/common_cuts.hh @@ -6,8 +6,8 @@ #ifndef common_cuts_hh_ #define common_cuts_hh_ -#include "TrkAna/utils/rooutil/inc/Track.hh" -#include "TrkAna/utils/rooutil/inc/TrackSegment.hh" +#include "EventNtuple/utils/rooutil/inc/Track.hh" +#include "EventNtuple/utils/rooutil/inc/TrackSegment.hh" // Track Particle Types bool is_e_minus(const Track& track) { @@ -30,17 +30,21 @@ bool is_mu_plus(const Track& track) { else { return false; } } -// Track Directions -bool is_downstream(const Track& track) { - // Segments are time-ordered so check to see if the track always increases in z-position - double first_z = track.GetSegments().at(0).trkseg->pos.z(); - double prev_z = first_z; - for (const auto& segment : track.GetSegments()) { - if (segment.trkseg->pos.z() < prev_z) { // we are now upstream of the previous segment so this is now a downstream track - return false; - } +// Track Segment Directions +bool is_downstream(const TrackSegment& segment) { + // the sign of p_z tells us whether this segment is going upstream or downstream + if (segment.trkseg->mom.z() > 0) { + return true; } - return true; // we got to the end without turning upstream + else { return false; } +} + +bool is_upstream(const TrackSegment& segment) { + // the sign of p_z tells us whether this segment is going upstream or downstream + if (segment.trkseg->mom.z() < 0) { + return true; + } + else { return false; } } @@ -61,4 +65,29 @@ bool tracker_exit(const TrackSegment& segment) { } +// More complex cuts + +// A track is a reflected track if we have both an upstream and a downstream segment at the tracker entrance +bool is_reflected(const Track& track) { + bool have_upstream = false; + bool have_downstream = false; + for (const auto& segment : track.segments) { + if (tracker_entrance(segment)) { + if (is_upstream(segment)) { + have_upstream = true; + } + if (is_downstream(segment)) { + have_downstream = true; + } + } + } + if (have_upstream && have_downstream) { + return true; + } + else { + return false; + } +} + + #endif diff --git a/validation/test_fcls.sh b/validation/test_fcls.sh new file mode 100644 index 0000000..5f85b56 --- /dev/null +++ b/validation/test_fcls.sh @@ -0,0 +1,95 @@ +# +# test_fcls.sh - runs fcl files to make sure that they complete successfully +# Note: requires relevant filelists in a directory above this one +# + +log_file="test_fcls.log" +rm ${log_file} + +echo -n "from_mcs-mockdata.fcl... " +mu2e -c fcl/from_mcs-mockdata.fcl -S ../filelists/mcs.mu2e.ensemble-1BB-CEDIOCRYCosmic-2400000s-p95MeVc-Triggered.MDC2020ae_perfect_v1_3.art.list --TFileName nts.ntuple.mock.root -n 100 > ${log_file} 2>&1 +if [ $? == 0 ]; then + echo "OK" +else + echo "FAIL" +fi + +echo -n "from_mcs-mockdata_noMC.fcl... " +mu2e -c fcl/from_mcs-mockdata_noMC.fcl -S ../filelists/mcs.mu2e.ensemble-1BB-CEDIOCRYCosmic-2400000s-p95MeVc-Triggered.MDC2020ae_perfect_v1_3.art.list --TFileName nts.ntuple.mockNoMC.root -n 100 >> ${log_file} 2>&1 +if [ $? == 0 ]; then + echo "OK" +else + echo "FAIL" +fi + +echo -n "from_mcs-primary.fcl... " +mu2e -c fcl/from_mcs-primary.fcl -S ../filelists/mcs.mu2e.CeEndpointOnSpillTriggered.MDC2020ae_best_v1_3.art.list --TFileName nts.ntuple.primary.root -n 100 >> ${log_file} 2>&1 +if [ $? == 0 ]; then + echo "OK" +else + echo "FAIL" +fi + +echo -n "from_mcs-mixed.fcl... " +mu2e -c fcl/from_mcs-mixed.fcl -S ../filelists/mcs.mu2e.CeEndpointMix2BBTriggered.MDC2020ae_best_v1_3.art.list --TFileName nts.ntuple.mixed.root -n 100 >> ${log_file} 2>&1 +if [ $? == 0 ]; then + echo "OK" +else + echo "FAIL" +fi + +echo -n "from_mcs-extracted.fcl... " +mu2e -c fcl/from_mcs-extracted.fcl -S ../filelists/mcs.mu2e.CosmicCRYExtractedCatTriggered.MDC2020ae_best_v1_3.art.list --TFileName nts.ntuple.extracted.root -n 100 >> ${log_file} 2>&1 +if [ $? == 0 ]; then + echo "OK" +else + echo "FAIL" +fi + +echo -n "from_mcs-ceSimReco.fcl... " +mu2e -c fcl/from_mcs-ceSimReco.fcl -s mcs.owner.val-ceSimReco.dsconf.seq.art --TFileName nts.ntuple.ceSimReco.root >> ${log_file} 2>&1 +if [ $? == 0 ]; then + echo "OK" +else + echo "FAIL" +fi + +echo -n "from_mcs-mockdata_separateTrkBranches.fcl... " +mu2e -c fcl/from_mcs-mockdata_separateTrkBranches.fcl -S ../filelists/mcs.mu2e.ensemble-1BB-CEDIOCRYCosmic-2400000s-p95MeVc-Triggered.MDC2020ae_perfect_v1_3.art.list --TFileName nts.ntuple.mockSepTrkBranches.root -n 100 >> ${log_file} 2>&1 +if [ $? == 0 ]; then + echo "OK" +else + echo "FAIL" +fi + +echo -n "from_mcs-mockdata_selectorExample.fcl... " +mu2e -c fcl/from_mcs-mockdata_selectorExample.fcl -S ../filelists/mcs.mu2e.ensemble-1BB-CEDIOCRYCosmic-2400000s-p95MeVc-Triggered.MDC2020ae_perfect_v1_3.art.list --TFileName nts.ntuple.mockSelector.root -n 100 >> ${log_file} 2>&1 +if [ $? == 0 ]; then + echo "OK" +else + echo "FAIL" +fi + +echo -n "from_dig-mockdata.fcl... " +mu2e -c fcl/from_dig-mockdata.fcl -S ../filelists/dig.mu2e.ensemble-1BB-CEDIOCRYCosmic-2400000s-p95MeVc-Triggered.MDC2020ae_perfect_v1_3.art.list --TFileName nts.ntuple.dig.root -n 100 >> ${log_file} 2>&1 +if [ $? == 0 ]; then + echo "OK" +else + echo "FAIL" +fi + +echo -n "creating v6 file for validation script... " +mu2e -c fcl/from_mcs-mockdata.fcl -S ../filelists/mcs.mu2e.ensemble-1BB-CEDIOCRYCosmic-2400000s-p95MeVc-Triggered.MDC2020ae_perfect_v1_3.art.list --TFileName nts.ntuple.v6.root -n 100 >> ${log_file} 2>&1 +if [ $? == 0 ]; then + echo "OK" +else + echo "FAIL" +fi + +echo -n "creating validation file... " +root -l -b -q validation/create_val_file.C\(\"nts.ntuple.v6.root\",\"val.ntuple.v6.root\"\) >> ${log_file} 2>&1 +if [ $? == 0 ]; then + echo "OK" +else + echo "FAIL" +fi diff --git a/validation/test_rooutil.sh b/validation/test_rooutil.sh index 1349fbb..3aee895 100644 --- a/validation/test_rooutil.sh +++ b/validation/test_rooutil.sh @@ -1,3 +1,3 @@ -root -l -b -q TrkAna/utils/rooutil/examples/PrintEvents.C++\(\"nts.trkana.v6.root\"\) -root -l -b -q TrkAna/utils/rooutil/examples/PlotEntranceMomentum.C++\(\"nts.trkana.v6.root\"\) -root -l -b -q TrkAna/utils/rooutil/examples/CreateTree.C++\(\"nts.trkana.v6.root\"\) +root -l -b -q utils/rooutil/examples/PrintEvents.C++\(\"nts.ntuple.v6.root\"\) +root -l -b -q utils/rooutil/examples/PlotEntranceMomentum.C++\(\"nts.ntuple.v6.root\"\) +root -l -b -q utils/rooutil/examples/CreateTree.C++\(\"nts.ntuple.v6.root\"\)