Skip to content
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

tidy up #88

Merged
merged 2 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading