Skip to content

Commit

Permalink
Merge pull request #88 from dglazier/master
Browse files Browse the repository at this point in the history
tidy up
  • Loading branch information
dglazier authored Dec 3, 2024
2 parents d34e24c + 8b5446b commit 0d04c8c
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 17 deletions.
31 changes: 17 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -480,24 +480,27 @@ Where ccdbElSF is a std::vector<std::vector<double>> and so you can access the e
clas12root can use the Quality Assurance database .json files found at https://github.com/c-dilks/clas12-qadb/tree/master to reject events that have been identified as failing to meet certain requirements. This is implemented in an analysis using the clas12reader with the functions
c12.db()->qadb_requireOkForAsymmetry(true);
c12.db()->qadb_requireGolden(true);
c12.db()->qadb_addQARequirement("MarginalOutlier");
c12.db()->qadb_addQARequirement("TotalOutlier");
c12.applyQA();
c12.db().applyQA(GETPASSSTRINGHERE);//GETPASSSTRINGHERE="latest", "pass1, "pass2",...
c12.db().qadb_addQARequirement("MarginalOutlier");
c12.db().qadb_addQARequirement("TotalOutlier");
c12.db().qadb_addQARequirement("TerminalOutlier");
c12.db().qadb_addQARequirement("MarginalOutlier");
c12.db().qadb_addQARequirement("SectorLoss");
c12.db().qadb_addQARequirement("LowLiveTime");
Or in case you use HipoChain (also for when running PROOF/HipoSelector)
auto c12=chain.GetC12Reader();
c12->db()->qadb_requireOkForAsymmetry(true);
c12->db()->qadb_requireGolden(true);
c12->db()->qadb_addQARequirement("MarginalOutlier");
c12->db()->qadb_addQARequirement("TotalOutlier");
c12->applyQA();
where requireOkForAsymmetry(true) requires only events that were identified as suitable for asymmetry calculations, and requireGolden(true) requires only events without any defects. addQARequirement("Requirement") allows to reject events that fail to meet the specified requirement. These can be:
auto config_c12=chain.GetC12Reader();
config_c12->applyQA(GETPASSSTRINGHERE);//GETPASSSTRINGHERE="latest", "pass1, "pass2",...
config_c12->db()->qadb_addQARequirement("MarginalOutlier");
config_c12->db()->qadb_addQARequirement("TotalOutlier");
config_c12->db()->qadb_addQARequirement("TerminalOutlier");
config_c12->db()->qadb_addQARequirement("MarginalOutlier");
config_c12->db()->qadb_addQARequirement("SectorLoss");
config_c12->db()->qadb_addQARequirement("LowLiveTime");
addQARequirement("Requirement") allows to reject events that fail to meet the specified requirement. These can be:
TotalOutlier: outlier N/F, but not terminal, marginal, or sector loss
TerminalOutlier: outlier N/F of first or last file of run
Expand Down
19 changes: 16 additions & 3 deletions RunRoot/Ex10_clas12Databases.C
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,26 @@ void Ex10_clas12Databases(){
cout<<"Beam current: "<<rcdbData.beam_current<<endl;

//configure qadb requirements
//configure qadb requirements
/*
*
* addRequirement requires that the event was not identified
* as, for example, a marginal outlier. Several requirements
* can be assigned at the same time.
*
* See RGA analysis note and clas12-qadb github repository for
* additional information.
*/
if(c12.qadb()!=nullptr){
c12.db().qadb_requireOkForAsymmetry(true);
c12.db().qadb_requireGolden(true);
c12.db().applyQA(GETPASSSTRINGHERE);//GETPASSSTRINGHERE="latest", "pass1, "pass2",...
c12.db().qadb_addQARequirement("MarginalOutlier");
c12.db().qadb_addQARequirement("TotalOutlier");
c12.applyQA();
c12.db().qadb_addQARequirement("TerminalOutlier");
c12.db().qadb_addQARequirement("MarginalOutlier");
c12.db().qadb_addQARequirement("SectorLoss");
c12.db().qadb_addQARequirement("LowLiveTime");
}


gBenchmark->Start("db");

Expand Down

0 comments on commit 0d04c8c

Please sign in to comment.