Releases: JeffersonLab/clas12root
some bug fixes from 1.7
region_particle::getBeta etc
mclund lifetime
submodules and mcmatch
Use submodules for data bases,
this version is tagged with
ccdb v1.06.07
rcdb v0.06.00
clasqaDB v1.0.0
and lz4 v1.9.2
Add mcmatch class and automate particle matching e.g.
if(p->mc()->isMatched()){//this particle has an mc match
p->getMCPDiff(); //momentum difference
p->mc()->getPid(); //mc() contains LUND particle banks
}
Update QADB stuff for clasqaDB release v1.0.0
Add scintextras
For FTBased
protect ftbparticle against queries when no entries,
add region_particle functions to handle ambigous data i.e
when using FTBased and no FT trigger particle use
p->getStatus() rather than
p->par()->getStatus() or p->ftbpar()->getStatus()
This will give FTBased if exists, REC::Particle if no FTBased entries
also
p->getChi2Pid()
p->getVt()
p->Beta()
Note p->getPid() already existed and used this same strategy.
Databases
Add interfaces for CCDB and clasQADB combining with RCDB in new clas12databases class.
Requires download of seperate packages RCDB, CCDB and clasqadb. If the relevent environment variables are not set these will be ignored at compilation. CCDB requires being built with scons, while the others are header only. SQLITE works OK for CCDB but I could not get RCDB to read an sqlite file, instead users can make a single connection to the remote rcdb and download the info in a ROOT file.
Setting up of databases is done in a standalone script PrepareDatabases.C so generally analysis should not be making any connections with databases.
To use databases you must point to the data files at the start of your script,
clas12databases::SetCCDBLocalConnection("/where/to/ccdb.sqlite");
clas12databases::SetQADBConnection("/where/to/qaDB.json");
clas12databases::SetRCDBRootConnection("/where/to/rcdb.root");
Further explanation at bottom of README and Ex10_Clas12Databases.C
A fix/hack is used to get the run number from the hipo file in all cases, sometimes it is in tag 0 events, sometimes in tag 1, now both are checked. This is required for databases.
Include RTPC as a CD tracker
Add example on MC LUND data
RunRoot/ExMC.C
Add SetEntries function to clas12reader, particleDraw, BankDraw
Add C12Ref function to HipoChain which allows you to get a const pointer to clas12reader before the event loop which then updates as the file changes.
e.g
auto& c12=chain.C12ref();
while (chain.Next()){
c12->event()->getStartTime();
Update hipo4 source code from hipo github, remove dictionary creation of ntuple_writer as cannot compile with ROOT 6.22.02, is fixed in later versions of ROOT
band aid
Addition of BAND as new region with region id = 4000. Particles reconstructed in BAND are now part of clas12reader::getDetParticles()
Remove streaming of some data members in clas12reader
Make sure correct copy is made of clas12reader in clas12proof so any configuration is past on
band aid + run number fix
Keep looking for a run number in hipo file, not garunteed in first event...
int runNo=0;
while(runNo==0){
if(areader.next()==false) break;
areader.read(anevent);
anevent.getStructure(arunconf);
runNo=arunconf.getRun();
}
pass1 ready
Change some layer IDs for pass1 data (CTOF, FT)
Add beamCharge information via scaler_reader class. This looks for the largest charge in the RAW::scaler banks and you can also add counters to get rates for scaler reads.
auto scal=c12.scalerReader();
c12.getRunBeamCharge();
clas12_writer now writes tag=1 banks and events
Support for vtp trigger information added in the case it is in the data file.
Add new feature to HipoChain to allow processing of multiple files ,
clas12root::HipoChain chain;
//Add lots of files
chain.Add("/WHERE/IS/MY/HIPO/file1.hipo");
auto c12=chain.GetC12Reader();
c12->addExactPid(11,1); //if want some filters
while (chain.Next()){
c12=chain.GetC12Reader();
auto electrons=c12->getByID(11);
. ...
}
clas12writer, etc
clas12writer for filtering and skimming
hipo ntuple classes
nonDST banks
MAC and calorimeter Lw
Fix to the cmake files from Celentano for compiling on MACs
Fix to calorimeter.cpp to include calorimeter Lw
Optimisations
This version has bug with traj.h. Please use code from release 1.1.a
This version requires Hipo version 1.1
Some speed up achieved inlining functions in clas12root and hipo, note new version of hipo required to compile this.
add preCheckPid function so you can just stream REC::Particle and check the event PIDs before getting structures for other branches
Several bug fixes, region particle timing for neutrals in FD, using RECFTB Pids for filtering with addExactPid, changing CND layer numbering so as not confuse clash with FTOF,