clas12root
Loading...
Searching...
No Matches
clas12reader.h
Go to the documentation of this file.
1/*
2 * File: clas12reader.h
3 * Author: dglazier
4 *
5 */
6
7#ifndef CLAS12READER_H
8#define CLAS12READER_H
9
10#include "clas12defs.h"
11#include "clas12databases.h"
12#include <hipo4/reader.h>
13#include "particle.h"
14#include "ftbparticle.h"
15#include "mcparticle.h"
16#include "mcevent.h"
17#include "calorimeter.h"
18#include "scintillator.h"
19#include "tracker.h"
20#include "utracker.h"
21#include "traj.h"
22#include "cherenkov.h"
23#include "event.h"
24#include "runconfig.h"
25#include "ftbevent.h"
26#include "vtp.h"
27#include "vertdoca.h"
28#include "scaler.h"
29#include "covmatrix.h"
30#include "helonline.h"
31#include "helflip.h"
32#include "forwardtagger.h"
33#include "region_particle.h"
34#include "region_fdet.h"
35#include "region_cdet.h"
36#include "region_ft.h"
37#include "region_band.h"
38#include "scaler_reader.h"
39#include "rcdb_vals.h"
40#include <hipo4/dictionary.h>
41
42#include <algorithm>
43#include <set>
44#include <vector>
45#include <string>
46#include <iostream>
47#include <functional>
48
49#ifdef RCDB_MYSQL
50 #include "rcdb_reader.h"
51#endif
52
53//#ifdef CLAS_QADB
54 #include "qadb_reader.h"
55//#endif
56
57namespace clas12 {
58 using std::cout;
59 using std::endl;
60 using std::cerr;
61
75
76
77 public:
78
79
80 clas12reader()=default;
81 clas12reader(std::string filename,std::vector<long> tags=std::vector<long>());
82 clas12reader(const clas12reader &other,std::string filename="",std::vector<long> tags=std::vector<long>());
83
84 virtual ~clas12reader()=default;
85
86 hipo::reader& getReader(){
87 if(_isOpen==false){
88 cerr<<"hipo::reader& getReader() clas12reader must be created with valid filename, currently we have "<<getFilename()<<endl;
89 }
90 return _reader;
91 }
92
93 bool next();
94 bool nextInRecord();
95 void sort();
96 bool readEvent();
97 void clearEvent();
98
99 std::vector<hipo::bank* > getAllBanksPtrs(){return _allBanks;}
100 hipo::dictionary& getDictionary(){return _factory;}
101 std::string getFilename(){return _filename;}
102
104 //Forward detector needs particles, calorimeter, scintillator,
105 //track, cherenkov
106 region_fdet_uptr reg{new region_fdet{_bparts.get(),_bftbparts.get(),_bcovmat.get(),_bcal.get(),_bscint.get(),_btrck.get(),_butrck.get(),_btraj.get(),_bcher.get(),_bft.get(),_bevent.get(),_brich.get(),_bmcparts.get()}};
107 if(_useFTBased)reg->useFTBPid();
108 _rfdets.push_back(std::move(reg));
109 }
111 //Forward detector needs particles, calorimeter, scintillator,
112 //track, cherenkov
113 region_cdet_uptr reg{new region_cdet{_bparts.get(),_bftbparts.get(),_bcovmat.get(),_bcal.get(),_bscint.get(),_btrck.get(),_butrck.get(),_btraj.get(),_bcher.get(),_bft.get(),_bevent.get(),_brich.get(),_bmcparts.get()}};
114 if(_useFTBased)reg->useFTBPid();
115 _rcdets.push_back(std::move(reg));
116 }
118 //Forward tagger needs particles and forward tagger
119 region_ft_uptr reg{new region_ft{_bparts.get(),_bftbparts.get(),_bcovmat.get(),_bcal.get(),_bscint.get(),_btrck.get(),_butrck.get(),_btraj.get(),_bcher.get(),_bft.get(),_bevent.get(),_brich.get(),_bmcparts.get()}};
120 if(_useFTBased)reg->useFTBPid();
121 _rfts.push_back(std::move(reg));
122 }
124 //Forward tagger needs particles and forward tagger
125 region_band_uptr reg{new region_band{_bparts.get(),_bftbparts.get(),_bcovmat.get(),_bcal.get(),_bscint.get(),_btrck.get(),_butrck.get(),_btraj.get(),_bcher.get(),_bft.get(),_bevent.get(),_brich.get(),_bmcparts.get()}};
126 if(_useFTBased)reg->useFTBPid();
127 _rbands.push_back(std::move(reg));
128 }
129
130 // bank accessors
131 // - the method name convention is `getBankName` where `BankName` is the bank name without the colons (`::`)
132 // - the `class` tag is needed disambiguate between classes and `clas12reader` methods with the same name
135 class particle& getRECParticle() const { return *_bparts; }
138 class ftbparticle& getRECFTParticle() const { return *_bftbparts; }
140 class helonline& getHELonline() const { return *_bhelonline; }
142 class helflip& getHELflip() const { return *_bhelflip; }
144 class runconfig& getRUNconfig() const { return *_brunconfig; }
146 class event& getRECEvent() const { return *_bevent; }
148 class ftbevent& getRECFTEvent() const { return *_bftbevent; }
150 class vtp& getRAWvtp() const { return *_bvtp; }
152 class vertdoca& getRECVertDoca() const { return *_bvertdoca; }
154 class calorimeter& getRECCalorimeter() const { return *_bcal; }
156 class scintillator& getRECScintillator() const { return *_bscint; }
158 class tracker& getRECTrack() const { return *_btrck; }
160 class covmatrix& getRECCovMat() const { return *_bcovmat; }
162 class utracker& getRECUTrack() const { return *_butrck; }
164 class traj& getRECTraj() const { return *_btraj; }
166 class cherenkov& getRECCherenkov() const { return *_bcher; }
168 class rich& getRICHParticle() const { return *_brich; }
170 class forwardtagger& getRECForwardTagger() const { return *_bft; }
172 class mcparticle& getMCLund() const { return *_bmcparts; }
174 class mcevent& getMCEvent() const { return *_bmcevent; }
175
176 // bank pointer accessors
178 helonline_ptr helonline() const{return _bhelonline.get();};
180 helflip_ptr helflip() const{return _bhelflip.get();};
182 runconfig_ptr runconfig() const{return _brunconfig.get();};
184 event_ptr event() const{return _bevent.get();};
186 ftbevent_ptr ftbevent() const{return _bftbevent.get();};
188 vtp_ptr vtp() const{return _bvtp.get();};
190 vertdoca_ptr vertdoca() const{return _bvertdoca.get();};
192 mcpar_ptr mcparts() const{return _bmcparts.get();};
194 mcevt_ptr mcevent() const{return _bmcevent.get();};
195
196 // additional bank accessors
197
207 hipo::bank& getParticleBank() const {
208 if(_useFTBased && getRECFTParticle().getRows()>0)
209 return getRECFTParticle();
210 else
211 return getRECParticle();
212 }
213
214 //support for generic non-DST banks
215 uint addBank(const std::string& name){
216 if(isOpen()==false){
217 cerr<<"clas12reader::addBank reader not opened, exiting..."<<endl;
218 cerr<<" in case using HipoChain, call NextFile() first"<<endl;
219 exit(0);
220 }
221 std::unique_ptr<hipo::bank> bnk{new hipo::bank{_factory.getSchema(name.data())}};
222 _addBanks.push_back(std::move(bnk));
223 _allBanks.push_back(_addBanks.back().get());
224 _addBankNames.push_back(name);
225 return _addBanks.size()-1; //return place in vector
226 }
227
228 hipo::bank* getBank(uint index) const {return _addBanks.at(index).get();}
229 int getBankOrder(int ibank,std::string itemname ) const{
230 return getBank(ibank)->getSchema().getEntryOrder(itemname.data());
231 }
232
233 const std::vector<hipo::bank*> getBanksPtrs(std::vector<std::string> names) const{
234 std::vector<hipo::bank*> blist;
235 for(const auto& name:names){
236 //Find this bank in all banks
237 auto it = std::find_if(
238 _allBanks.begin(),
239 _allBanks.end(),
240 [&name](auto* bank)
241 { return bank->getSchema().getName() == name; });
242 if(it == _allBanks.end()) {
243 cerr<<"clas12reader::getBanks : bank "<<name<<" does not exist"<<endl;
244 exit(0);
245 }
246 //make a copy and add to list
247 auto cpBank = dynamic_cast<hipo::bank*>(*it);
248 blist.push_back(cpBank);
249
250 }
251 cout<<"clas12reader::getBanks got "<<blist.size()<<endl;
252 return blist;
253 }
254
256 // region particle accessors
257
261 int getNParticles() const noexcept{return _detParticles.size();}
262
267 std::vector<region_part_ptr>& getDetParticles(){return _detParticles;}
268
273 std::vector<region_part_ptr>* getDetParticlesPtr(){return &_detParticles;}
274
283 std::vector<region_part_ptr> getDetParticles(bool const& applyBankFilter) const;
284
293 std::vector<region_part_ptr> getByID(int id, bool const& applyBankFilter=false) const;
294
303 std::vector<region_part_ptr> getByRegion(int ir, bool const& applyBankFilter=false) const;
304
313 std::vector<region_part_ptr> getByCharge(int ch, bool const& applyBankFilter=false) const;
314
316
317 const std::vector<short>& preCheckPids();
318 const std::vector<short>& preCheckPidsOrCharge();
319
320 short getNPid(short pid)const noexcept{return std::count(_pids.begin(),_pids.end(), pid);};
321 void addAtLeastPid(short pid,short n){
322 _pidSelect[pid]=n;
323 _givenPids.push_back(pid);
324 }
325 void addExactPid(short pid,short n){
326 _pidSelectExact[pid]=n;
327 _givenPids.push_back(pid);
328 }
329 void addZeroOfRestPid(){_zeroOfRestPid=true;};
330
331 bool passPidSelect();
332
335 void useFTBased(){_useFTBased=true;}
336
339 bool const usingFTBased() const { return _useFTBased; }
340
341 const std::vector<short> &getPids() const noexcept{return _pids;}
342
343 bool checkTriggerBit(uint k){
344 long pattern = _brunconfig->getTrigger();
345 return ( pattern & (1<<k)) != 0;
346 }
347 bool checkVTPTriggerBit(uint k){
348 long pattern = _bvtp->makeVTPTriggers();
349 return ( pattern & (1<<k)) != 0;
350 }
351
353 if(_scalReader.get()) return _scalReader.get();
354 _scalReader.reset(new scaler_reader(_filename));
355 _runBeamCharge = _scalReader->getBeamCharge();
356 return _scalReader.get();
357 }
359 if(_db!=nullptr)
360 if(db()->qa()!=nullptr) return db()->qa()->getAccCharge();
361 return _runBeamCharge;
362 }
363
364 int getRunNumber()const {return _runNo;}//works if connectDatabases called
365 std::set<int> getRunNumbers() const {return _runNumbers;}
366
367 double getCurrApproxCharge(){return _runBeamCharge*_nevent/_reader.getEntries();}
368
369 void summary(){
370 std::cout<<"for file "<<_filename<<"\n\t read "<<_nevent<<" events from which "<<_nselected<< " passed filtering conditions."<<std::endl;
371 if(_db!=nullptr)
372 if(db()->qa()){
373 auto prev = db()->qa()->getPreviousCharge();
374 //Just charge for this file
375 // double charge=db()->qa()->getChargeForRunlist(getRunNumbers()) - prev;
376 double charge=db()->qa()->getAccCharge();
377 db()->qa()->setPreviousCharge(charge);
378 charge-= prev;
379 cout<<"\t accumulated charge past QA: "<<charge<<" nC"<<endl;
380 }
381 }
382
383 void getStructure(hipo::bank* bank){
384 if(_isRead==false)
385 hipoRead();
386 _event.getStructure(*bank);
387 }
388 bool grabEvent(Long64_t Nev);
389
390 //rcdb
391 static int readQuickRunConfig(const std::string& filename);
392 static int tryTaggRunConfig(const std::string& filename, int tag);
393
394
395 bool isOpen(){return _isOpen;}
396
397 void setEntries(long n){_nToProcess = n;}
398 void setVerbose(short level=1){
399 _verbose=level;
400 _reader.setVerbose(level);
401 }
402
407 void SetReadAction(std::function<bool(clas12reader*)> readEventUserAction) {
408 _readEventUserAction = readEventUserAction;
409 }
410
411
412 protected:
413
414 void initReader();
415
416
417 private:
418
419 void makeListBanks(); //calls clear, so only do this in here
420
421 void hipoRead(){
422 _reader.read(_event);
423 _isRead=true;
424 }
425
426 std::string _filename;
427
428 //reader
429 hipo::reader _reader;
430 hipo::event _event;
431 hipo::dictionary _factory;
432
433 //DST banks
434 helonline_uptr _bhelonline;
435 helflip_uptr _bhelflip;
436 runconfig_uptr _brunconfig;
437 event_uptr _bevent;
438 ftbevent_uptr _bftbevent;
439 par_uptr _bparts;
440 // std::unique_ptr<clas12::particle> _ownbparts;
441 ftbpar_uptr _bftbparts;
442 covmat_uptr _bcovmat;
443 cal_uptr _bcal;
444 scint_uptr _bscint;
445 trck_uptr _btrck;
446 utrck_uptr _butrck;
447 traj_uptr _btraj;
448 cher_uptr _bcher;
449 rich_uptr _brich;
450 ft_uptr _bft;
451 vtp_uptr _bvtp;
452 vertdoca_uptr _bvertdoca;
453
454
455 mcpar_uptr _bmcparts;
456 mcevt_uptr _bmcevent;
457
458
459 std::vector<std::unique_ptr<hipo::bank> > _addBanks;
460 std::vector<hipo::bank* > _allBanks;
461
462 //Detector region vectors,
463 //each particle in an event will have
464 //one associated, these vectors own the ptrs
465 std::vector<region_fdet_uptr> _rfdets;
466 std::vector<region_cdet_uptr> _rcdets;
467 std::vector<region_ft_uptr> _rfts;
468 std::vector<region_band_uptr> _rbands;
469
470 //this vector links to raw ptrs, does not own
471 std::vector<region_part_ptr> _detParticles;
472
473
474 double _runBeamCharge{0};
475 long _nevent{0};
476 long _nselected{0};
477 long _nToProcess{-1};
478 ushort _nparts{0};
479 ushort _n_rfdets{0};
480 ushort _n_rcdets{0};
481 ushort _n_rfts{0};
482 ushort _n_rbands{0};
483
484 ushort _verbose{0};
485
486 std::vector<short> _pids;
487 bool _isRead{false};
488 //bool _rcdbQueried=false;
489
490 //members that need copied in constructor
491 scalerreader_uptr _scalReader;
492 std::vector<short> _givenPids;
493 std::map<short,short> _pidSelect;
494 std::map<short,short> _pidSelectExact;
495 bool _zeroOfRestPid{false};
496 bool _useFTBased{false};
497 bool _isOpen{false};
498 std::vector<std::string> _addBankNames;
499
501 std::function<bool(clas12reader*)> _readEventUserAction = [](clas12reader* r) {return true;};
502
504 private:
505 int _runNo{0};
506 std::set<int> _runNumbers;
507 clas12databases *_db={nullptr}; //
508
509 bool _applyQA=false;
510 bool _connectDB=false;
511 bool checkQA();
512 bool justCheckQA();
513
514 public:
515
516 //Database stuff
517 void connectDataBases(clas12databases *db);
518 //void connectDataBases();
519
520 ccdb_reader* ccdb()const {return _db->cc();}
521 rcdb_reader* rcdb()const {return _db->rc();}
522 qadb_reader* qadb()const {return _db->qa();}
523
524 clas12databases* db(){return _db;};
525
526 //clas12-qadb
527 void applyQA(const string& pass) {
528 _applyQA=true;
529 _db->setPass(pass);
530 }
531
532 //double sumChargeFromQA();
533 void ignoreBank(const string& bnk ){
534 if(_bankInUse.at(bnk))
535 (*_bankInUse[bnk])=false;
536 }
537
539 _justParticleAna=true;
540 ignoreBank("REC::CovMat");
541 ignoreBank("REC::Traj");
542 ignoreBank("REC::Calorimeter");
543 ignoreBank("REC::Scintillator");
544 ignoreBank("REC::CaloExtras");
545 ignoreBank("REC::ScintExtras");
546 ignoreBank("REC::Track");
547 ignoreBank("REC::UTrack");
548 ignoreBank("REC::ForwardTagger");
549 ignoreBank("REC::VertDoca");
550 ignoreBank("REC::Cherenkov");
551 ignoreBank("RICH::Particle");
552 ignoreBank("HEL::online");
553 ignoreBank("RAW::vtp");
554
555 }
556 private:
557
558 std::map<string,bool*> _bankInUse;
559 bool _useCovmat={false};
560 bool _useEvent={false};
561 bool _useRunconfig={false};
562 bool _useFTBEvent={false};
563 bool _useCal={false};
564 bool _useCalExtras={false};
565 bool _useScint={false};
566 bool _useScintExtras={false};
567 bool _useTrck={false};
568 bool _useUTrck={false};
569 bool _useTraj={false};
570 bool _useCher={false};
571 bool _useRich={false};
572 bool _useFT={false};
573 bool _useVTP={false};
574 bool _useHelonline={false};
575 bool _useVertdoca={false};
576 bool _useMCparts={false};
577 bool _useMCevent={false};
578 bool _justParticleAna={false};
580
581 };
582 //helper functions
583
584 //filter vectors via a lambda function
585 //see for example clas12reader::getByID()
586 template <typename Cont, typename Pred>
587 Cont container_filter(const Cont &container, Pred predicate){
588 Cont result;
589 std::copy_if(container.begin(),container.end(),std::back_inserter(result), predicate);
590 return result;
591 }
592
593}
594
595#endif /* CLAS12READER_H */
Definition calorimeter.h:24
Definition ccdb_reader.h:19
Definition cherenkov.h:22
Definition clas12databases.h:23
qadb_reader * qa() const
Definition clas12databases.h:53
void SetReadAction(std::function< bool(clas12reader *)> readEventUserAction)
Set a "read action", a custom lambda function that is executed for every event within readEvent().
Definition clas12reader.h:407
mcpar_ptr mcparts() const
get a pointer to the MC::Lund bank
Definition clas12reader.h:192
class tracker & getRECTrack() const
get the REC::Track bank
Definition clas12reader.h:158
bool const usingFTBased() const
Definition clas12reader.h:339
std::vector< region_part_ptr > & getDetParticles()
Get the full list of region_particles.
Definition clas12reader.h:267
std::vector< region_part_ptr > getByRegion(int ir, bool const &applyBankFilter=false) const
Get the list of region_particles, filtered by region.
Definition clas12reader.cpp:665
class rich & getRICHParticle() const
get the RICH::Particle bank
Definition clas12reader.h:168
ccdb_reader * ccdb() const
Definition clas12reader.h:520
hipo::dictionary & getDictionary()
Definition clas12reader.h:100
hipo::reader & getReader()
Definition clas12reader.h:86
class particle & getRECParticle() const
get the REC::Particle bank
Definition clas12reader.h:135
bool next()
initialise next event from the reader
Definition clas12reader.cpp:471
void getStructure(hipo::bank *bank)
Definition clas12reader.h:383
class runconfig & getRUNconfig() const
get the RUN::config bank
Definition clas12reader.h:144
hipo::bank * getBank(uint index) const
Definition clas12reader.h:228
event_ptr event() const
get a pointer to the REC::Event bank
Definition clas12reader.h:184
qadb_reader * qadb() const
Definition clas12reader.h:522
std::vector< region_part_ptr > * getDetParticlesPtr()
Get the full list of region_particles.
Definition clas12reader.h:273
clas12databases * db()
Definition clas12reader.h:524
uint addBank(const std::string &name)
Definition clas12reader.h:215
void SetRecParticleOnly()
Definition clas12reader.h:538
short getNPid(short pid) const noexcept
Definition clas12reader.h:320
void addExactPid(short pid, short n)
Definition clas12reader.h:325
bool checkTriggerBit(uint k)
Definition clas12reader.h:343
const std::vector< short > & preCheckPids()
Definition clas12reader.cpp:289
class event & getRECEvent() const
get the REC::Event bank
Definition clas12reader.h:146
class ftbevent & getRECFTEvent() const
get the REC::FTEvent bank
Definition clas12reader.h:148
void addARegionFDet()
Definition clas12reader.h:103
vtp_ptr vtp() const
get a pointer to the RAW::vtp bank
Definition clas12reader.h:188
scalerreader_ptr scalerReader()
Definition clas12reader.h:352
std::set< int > getRunNumbers() const
Definition clas12reader.h:365
bool nextInRecord()
initialise next event from the reader
Definition clas12reader.cpp:500
class mcparticle & getMCLund() const
get the MC::Lund bank
Definition clas12reader.h:172
const std::vector< short > & preCheckPidsOrCharge()
Definition clas12reader.cpp:322
bool readEvent()
Definition clas12reader.cpp:409
bool passPidSelect()
Definition clas12reader.cpp:612
class cherenkov & getRECCherenkov() const
get the REC::Cherenkov bank
Definition clas12reader.h:166
class vtp & getRAWvtp() const
get the RAW::vtp bank
Definition clas12reader.h:150
void sort()
Definition clas12reader.cpp:522
bool checkVTPTriggerBit(uint k)
Definition clas12reader.h:347
mcevt_ptr mcevent() const
get a pointer to the MC::Event bank
Definition clas12reader.h:194
ftbevent_ptr ftbevent() const
get a pointer to the REC::FTEvent bank
Definition clas12reader.h:186
bool grabEvent(Long64_t Nev)
Definition clas12reader.cpp:754
class vertdoca & getRECVertDoca() const
get the REC::VertDoca bank
Definition clas12reader.h:152
void clearEvent()
read the data
Definition clas12reader.cpp:273
std::vector< region_part_ptr > getByCharge(int ch, bool const &applyBankFilter=false) const
Get the list of region_particles, filtered by charge.
Definition clas12reader.cpp:672
const std::vector< short > & getPids() const noexcept
Definition clas12reader.h:341
class mcevent & getMCEvent() const
get the MC::Event bank
Definition clas12reader.h:174
runconfig_ptr runconfig() const
get a pointer to the RUN::config bank
Definition clas12reader.h:182
std::string getFilename()
Definition clas12reader.h:101
class forwardtagger & getRECForwardTagger() const
get the REC::ForwardTagger bank
Definition clas12reader.h:170
void summary()
Definition clas12reader.h:369
const std::vector< hipo::bank * > getBanksPtrs(std::vector< std::string > names) const
Definition clas12reader.h:233
class calorimeter & getRECCalorimeter() const
get the REC::Calorimeter bank
Definition clas12reader.h:154
class scintillator & getRECScintillator() const
get the REC::Scintillator bank
Definition clas12reader.h:156
void setVerbose(short level=1)
Definition clas12reader.h:398
hipo::bank & getParticleBank() const
get the particle bank, depending on your configuration
Definition clas12reader.h:207
void addARegionBAND()
Definition clas12reader.h:123
rcdb_reader * rcdb() const
Definition clas12reader.h:521
void addZeroOfRestPid()
Definition clas12reader.h:329
class helflip & getHELflip() const
get the HEL::flip bank
Definition clas12reader.h:142
helonline_ptr helonline() const
get a pointer to the HEL::online bank
Definition clas12reader.h:178
int getBankOrder(int ibank, std::string itemname) const
Definition clas12reader.h:229
void addARegionFT()
Definition clas12reader.h:117
class helonline & getHELonline() const
get the HEL::online bank
Definition clas12reader.h:140
helflip_ptr helflip() const
get a pointer to the HEL::flip bank
Definition clas12reader.h:180
void setEntries(long n)
Definition clas12reader.h:397
void ignoreBank(const string &bnk)
Definition clas12reader.h:533
static int readQuickRunConfig(const std::string &filename)
Definition clas12reader.cpp:215
int getNParticles() const noexcept
Get the number of region_particles.
Definition clas12reader.h:261
static int tryTaggRunConfig(const std::string &filename, int tag)
Definition clas12reader.cpp:226
void useFTBased()
use FT-based PID, rather than the default
Definition clas12reader.h:335
virtual ~clas12reader()=default
void applyQA(const string &pass)
Definition clas12reader.h:527
void addARegionCDet()
Definition clas12reader.h:110
std::vector< region_part_ptr > getByID(int id, bool const &applyBankFilter=false) const
Get the list of region_particles, filtered by PDG.
Definition clas12reader.cpp:658
void connectDataBases(clas12databases *db)
Enable QA skimming.
Definition clas12reader.cpp:701
bool isOpen()
Definition clas12reader.h:395
double getCurrApproxCharge()
Definition clas12reader.h:367
std::vector< hipo::bank * > getAllBanksPtrs()
Definition clas12reader.h:99
int getRunNumber() const
Definition clas12reader.h:364
double getRunBeamCharge()
Definition clas12reader.h:358
void initReader()
Definition clas12reader.cpp:62
class covmatrix & getRECCovMat() const
get the REC::CovMat bank
Definition clas12reader.h:160
void addAtLeastPid(short pid, short n)
Definition clas12reader.h:321
class utracker & getRECUTrack() const
get the REC::UTrack bank
Definition clas12reader.h:162
vertdoca_ptr vertdoca() const
get a pointer to the REC::VertDoca bank
Definition clas12reader.h:190
class ftbparticle & getRECFTParticle() const
get the REC::FTParticle bank
Definition clas12reader.h:138
class traj & getRECTraj() const
get the REC::Traj bank
Definition clas12reader.h:164
Definition covmatrix.h:27
Definition forwardtagger.h:23
Definition ftbparticle.h:23
Definition mcparticle.h:23
Definition particle.h:25
Definition qadb_reader.h:16
double getPreviousCharge() const
Definition qadb_reader.h:96
void setPreviousCharge(double val)
Definition qadb_reader.h:97
double getAccCharge()
Definition qadb_reader.h:89
Definition rcdb_reader.h:25
Definition region_band.h:23
Definition region_cdet.h:24
Definition region_fdet.h:23
Definition region_ft.h:23
Definition rich.h:123
Definition scaler_reader.h:12
double getBeamCharge() const noexcept
Definition scaler_reader.h:17
Definition scintillator.h:23
Definition tracker.h:22
Definition traj.h:22
Definition utracker.h:22
Definition calextras.cpp:10
std::unique_ptr< clas12::forwardtagger > ft_uptr
Definition forwardtagger.h:116
clas12::scaler_reader * scalerreader_ptr
Definition scaler_reader.h:48
std::unique_ptr< clas12::rich > rich_uptr
Definition rich.h:256
std::unique_ptr< clas12::vertdoca > vertdoca_uptr
Definition vertdoca.h:104
std::unique_ptr< clas12::helonline > helonline_uptr
Definition helonline.h:57
std::unique_ptr< clas12::ftbevent > ftbevent_uptr
Definition ftbevent.h:56
clas12::helonline * helonline_ptr
Definition helonline.h:56
std::unique_ptr< clas12::scaler_reader > scalerreader_uptr
Definition scaler_reader.h:49
std::unique_ptr< clas12::cherenkov > cher_uptr
Definition cherenkov.h:100
std::unique_ptr< clas12::calorimeter > cal_uptr
Definition calorimeter.h:226
clas12::vertdoca * vertdoca_ptr
Definition vertdoca.h:103
std::unique_ptr< clas12::region_ft > region_ft_uptr
Definition region_ft.h:67
std::unique_ptr< clas12::vtp > vtp_uptr
Definition vtp.h:56
std::unique_ptr< clas12::event > event_uptr
Definition event.h:75
std::unique_ptr< clas12::particle > par_uptr
Definition particle.h:119
clas12::mcparticle * mcpar_ptr
Definition mcparticle.h:144
std::unique_ptr< clas12::region_cdet > region_cdet_uptr
Definition region_cdet.h:103
clas12::vtp * vtp_ptr
Definition vtp.h:55
std::unique_ptr< clas12::mcparticle > mcpar_uptr
Definition mcparticle.h:145
std::unique_ptr< clas12::scintillator > scint_uptr
Definition scintillator.h:134
std::unique_ptr< clas12::traj > traj_uptr
Definition traj.h:94
std::unique_ptr< clas12::helflip > helflip_uptr
Definition helflip.h:72
clas12::mcevent * mcevt_ptr
Definition mcevent.h:78
clas12::event * event_ptr
Definition event.h:74
std::unique_ptr< clas12::covmatrix > covmat_uptr
Definition covmatrix.h:88
clas12::runconfig * runconfig_ptr
Definition runconfig.h:71
Cont container_filter(const Cont &container, Pred predicate)
Definition clas12reader.h:587
std::unique_ptr< clas12::tracker > trck_uptr
Definition tracker.h:74
std::unique_ptr< clas12::runconfig > runconfig_uptr
Definition runconfig.h:72
std::unique_ptr< clas12::mcevent > mcevt_uptr
Definition mcevent.h:79
std::unique_ptr< clas12::utracker > utrck_uptr
Definition utracker.h:104
std::unique_ptr< clas12::region_band > region_band_uptr
Definition region_band.h:75
std::unique_ptr< clas12::region_fdet > region_fdet_uptr
Definition region_fdet.h:126
clas12::helflip * helflip_ptr
Definition helflip.h:71
clas12::ftbevent * ftbevent_ptr
Definition ftbevent.h:55
std::unique_ptr< clas12::ftbparticle > ftbpar_uptr
Definition ftbparticle.h:88