32 |
// error "Cannot find InclinationInfo.h" update your DV installation |
// error "Cannot find InclinationInfo.h" update your DV installation |
33 |
#include <RunInfo.h> |
#include <RunInfo.h> |
34 |
#include <GLTables.h> |
#include <GLTables.h> |
35 |
|
#include <ExtTrack.h> |
36 |
|
|
37 |
|
|
38 |
#include <TTree.h> |
#include <TTree.h> |
226 |
|
|
227 |
private: |
private: |
228 |
|
|
229 |
|
ExtTrack* trk_ext_track; |
230 |
TrkTrack* trk_track; |
TrkTrack* trk_track; |
231 |
CaloTrkVar* calo_track; |
CaloTrkVar* calo_track; |
232 |
ToFTrkVar* tof_track; |
ToFTrkVar* tof_track; |
241 |
|
|
242 |
PamTrack(); |
PamTrack(); |
243 |
PamTrack(TrkTrack* , CaloTrkVar* , ToFTrkVar*, OrbitalInfoTrkVar* ); |
PamTrack(TrkTrack* , CaloTrkVar* , ToFTrkVar*, OrbitalInfoTrkVar* ); |
244 |
|
PamTrack(ExtTrack* , CaloTrkVar* , ToFTrkVar*, OrbitalInfoTrkVar* ); |
245 |
PamTrack(const PamTrack&); |
PamTrack(const PamTrack&); |
246 |
~PamTrack(){ Delete(); }; |
~PamTrack(){ Delete(); }; |
247 |
|
|
256 |
void SetPScore(Int_t p){pscore=p;}; |
void SetPScore(Int_t p){pscore=p;}; |
257 |
void SetIScore(Int_t i){iscore=i;}; |
void SetIScore(Int_t i){iscore=i;}; |
258 |
|
|
259 |
|
ExtTrack* GetExtTrack(){return trk_ext_track;}; |
260 |
TrkTrack* GetTrkTrack(){return trk_track;}; |
TrkTrack* GetTrkTrack(){return trk_track;}; |
261 |
CaloTrkVar* GetCaloTrack(){return calo_track;}; |
CaloTrkVar* GetCaloTrack(){return calo_track;}; |
262 |
ToFTrkVar* GetToFTrack(){return tof_track;}; |
ToFTrkVar* GetToFTrack(){return tof_track;}; |
263 |
OrbitalInfoTrkVar* GetOrbitalInfoTrack(){return orb_track;}; |
OrbitalInfoTrkVar* GetOrbitalInfoTrack(){return orb_track;}; |
264 |
|
|
265 |
ClassDef(PamTrack,2); |
ClassDef(PamTrack,3); |
266 |
}; |
}; |
267 |
|
|
268 |
/** |
/** |
293 |
ULong64_t abstime; // current abs time |
ULong64_t abstime; // current abs time |
294 |
UInt_t pktnum; // current packet number |
UInt_t pktnum; // current packet number |
295 |
Bool_t isFragment; |
Bool_t isFragment; |
296 |
|
Bool_t isSync; ///< the file is fully sinchronized between L2 and L0/DB data |
297 |
|
// Bool_t hasL0EE; ///< backward compatibility flag for preselected event list |
298 |
|
Long64_t il0entry; ///< entry of level0 file in selection list |
299 |
TChain* run_tree; |
TChain* run_tree; |
300 |
TTree* run_tree_clone; |
TTree* run_tree_clone; |
301 |
TChain* sel_tree; |
TChain* sel_tree; |
303 |
int *irunoffset; |
int *irunoffset; |
304 |
GL_TIMESYNC *gltsync; // Emiliano |
GL_TIMESYNC *gltsync; // Emiliano |
305 |
Bool_t fUpdateRunInfo; // Emiliano |
Bool_t fUpdateRunInfo; // Emiliano |
306 |
|
Bool_t fUseDBinRunInfo; // Emiliano |
307 |
|
|
308 |
// ------------------------------------------- |
// ------------------------------------------- |
309 |
// variables to store total live and dead time |
// variables to store total live and dead time |
316 |
TFile* l0_file; |
TFile* l0_file; |
317 |
TTree* l0_tree; |
TTree* l0_tree; |
318 |
Int_t iroot; |
Int_t iroot; |
319 |
Int_t prevshift; // to remember if any shift is needed to synchronize l0 and l2 data instead of calculating any time |
Long64_t prevshift; // shift needed to sync level2 data with the DB (nested+DV_skipped packets) - global position in level2 file EM |
320 |
|
Long64_t yprevshift; // shift needed to sync level2 data with level0 data (nested+DV_skipped packets) - run wise EM |
321 |
Int_t maxshift; // EMILIANO maximum discrepancy between L2 and L0 data (the bigger the better concering synch but the processing speed drops) default = 10 |
Int_t maxshift; // EMILIANO maximum discrepancy between L2 and L0 data (the bigger the better concering synch but the processing speed drops) default = 10 |
322 |
// -------------------------------------------- |
// -------------------------------------------- |
323 |
// variables to store Level0 info (if required) |
// variables to store Level0 info (if required) |
348 |
TrkHough* trkh_obj; |
TrkHough* trkh_obj; |
349 |
CaloLevel1* calo1_obj; |
CaloLevel1* calo1_obj; |
350 |
CaloLevel2* calo2_obj; |
CaloLevel2* calo2_obj; |
351 |
ToFLevel2* tof_obj; |
ToFLevel2* tof2_obj; |
352 |
TrigLevel2* trig_obj; |
TrigLevel2* trig_obj; |
353 |
S4Level2* s4_obj; |
S4Level2* s4_obj; |
354 |
NDLevel2* nd_obj; |
NDLevel2* nd_obj; |
355 |
AcLevel2* ac_obj; |
AcLevel2* ac_obj; |
356 |
OrbitalInfo* orb_obj; |
OrbitalInfo* orb2_obj; |
357 |
GL_RUN* run_obj; |
GL_RUN* run_obj; |
358 |
SoftInfo* soft_obj; // Emiliano |
SoftInfo* soft_obj; // Emiliano |
359 |
|
|
360 |
|
|
361 |
|
|
362 |
|
Int_t extAlgFlag; |
363 |
|
|
364 |
|
TClonesArray* trk_ext_obj; |
365 |
|
TClonesArray* trk_ext_nuc_obj; |
366 |
|
TClonesArray* trk_nuc_obj; |
367 |
|
|
368 |
|
|
369 |
|
TClonesArray* calo_ext_obj; |
370 |
|
TClonesArray* calo_ext_nuc_obj; |
371 |
|
TClonesArray* calo_nuc_obj; |
372 |
|
|
373 |
|
TClonesArray* tof_ext_obj; |
374 |
|
TClonesArray* tof_ext_nuc_obj; |
375 |
|
TClonesArray* tof_nuc_obj; |
376 |
|
|
377 |
|
TClonesArray* orb_ext_obj; |
378 |
|
TClonesArray* orb_ext_nuc_obj; |
379 |
|
TClonesArray* orb_nuc_obj; |
380 |
|
|
381 |
|
|
382 |
|
TrkLevel2* trk2_nuc_obj; |
383 |
|
CaloLevel2* calo2_nuc_obj; |
384 |
|
ToFLevel2* tof2_nuc_obj; |
385 |
|
OrbitalInfo* orb2_nuc_obj; |
386 |
|
|
387 |
|
|
388 |
|
|
389 |
// -------------------------------------------- |
// -------------------------------------------- |
390 |
// variables to handle GP |
// variables to handle GP |
391 |
// -------------------------------------------- |
// -------------------------------------------- |
396 |
// ----------------------------------- |
// ----------------------------------- |
397 |
TClonesArray *tsorted; |
TClonesArray *tsorted; |
398 |
TClonesArray *timage; |
TClonesArray *timage; |
399 |
|
TClonesArray *text; //array of pamtrack objects built from extended algorythm |
400 |
|
TClonesArray *tsorted_nuc; |
401 |
|
TClonesArray *timage_nuc; |
402 |
|
TClonesArray *text_nuc; //array of pamtrack objects built from extended algorythm |
403 |
|
|
404 |
PamTrack *track; //store the last required |
PamTrack *track; //store the last required |
405 |
TString howtosort; |
TString howtosort; |
406 |
Float_t sortthr; |
Float_t sortthr; |
407 |
|
|
408 |
Bool_t issorted; // true if the current event has already been sorted with the current sort criteria |
Bool_t issorted; // true if the current event has already been sorted with the current sort criteria |
409 |
Long64_t lastsorted; // the last event whose tracks has been sorted |
Long64_t lastsorted; // the last event whose tracks has been sorted |
410 |
|
|
411 |
|
|
412 |
|
Bool_t issorted_new; // true if the current event has already been sorted with the current sort criteria |
413 |
|
Long64_t lastsorted_new; // the last event whose tracks has been sorted |
414 |
|
|
415 |
// -------------------------------------- |
// -------------------------------------- |
416 |
// flags to load level0-1-2 trees/braches |
// flags to load level0-1-2 trees/braches |
417 |
// -------------------------------------- |
// -------------------------------------- |
435 |
|
|
436 |
Bool_t GP; //GP simulation tree |
Bool_t GP; //GP simulation tree |
437 |
|
|
438 |
|
|
439 |
|
Bool_t EXT;//get tracks from extended tracking algorythm |
440 |
|
Bool_t NUC;//get tracks from nuclei algorythm |
441 |
|
|
442 |
|
const char* trkAlg; |
443 |
|
|
444 |
// ----------- |
// ----------- |
445 |
// other flags |
// other flags |
446 |
// ----------- |
// ----------- |
486 |
TChain* GetRunTree(TList*); |
TChain* GetRunTree(TList*); |
487 |
TChain* GetRunTree(TString ddir,TString list){ return GetRunTree(GetListOfLevel2Files(ddir,list)); }; |
TChain* GetRunTree(TString ddir,TString list){ return GetRunTree(GetListOfLevel2Files(ddir,list)); }; |
488 |
Bool_t UpdateRunInfo(Long64_t);///< new implementation to solve Mori's bug |
Bool_t UpdateRunInfo(Long64_t);///< new implementation to solve Mori's bug |
|
Bool_t UpdateRunInfo_bckw_compat(Long64_t);///< backward compatibility method |
|
489 |
Bool_t UpdateRunInfo(TTree *,Long64_t); |
Bool_t UpdateRunInfo(TTree *,Long64_t); |
490 |
Bool_t UpdateRunInfo(TChain *,Long64_t); |
Bool_t UpdateRunInfo(TChain *,Long64_t); |
491 |
|
|
492 |
void SkipRunInfoUpdate(); // Emiliano |
void SkipRunInfoUpdate(); // Emiliano |
493 |
void DoRunInfoUpdate(){fUpdateRunInfo = true;}; // [default] Emiliano |
void DoRunInfoUpdate(){fUpdateRunInfo = true;}; // [default] Emiliano |
494 |
|
void UseDBinRunInfo(){fUseDBinRunInfo = true;}; // [default] Emiliano |
495 |
|
void NoDBinRunInfo(){fUseDBinRunInfo = false;}; // EM |
496 |
void NoDBconnections(){SkipRunInfoUpdate();}; // Emiliano |
void NoDBconnections(){SkipRunInfoUpdate();}; // Emiliano |
497 |
|
|
498 |
void CreateCloneTrees0(TChain *fChain, TFile* file); |
void CreateCloneTrees0(TChain *fChain, TFile* file); |
510 |
Long64_t GetReadEntry(); |
Long64_t GetReadEntry(); |
511 |
Int_t GetYodaEntry(); |
Int_t GetYodaEntry(); |
512 |
|
|
513 |
void SetMaxShift(Int_t sh){ maxshift = sh; return;}; // EMILIANO method to change the maxshift variable |
void SetMaxShift(Int_t sh); // EMILIANO method to change the maxshift variable |
514 |
|
|
515 |
Long64_t GetEntries(){return pam_tree->GetEntries();}; |
Long64_t GetEntries(){return pam_tree->GetEntries();}; |
516 |
TChain* GetPamTree(){return pam_tree;}; |
TChain* GetPamTree(){return pam_tree;}; |
545 |
TrkHough *GetTrkHough() { return trkh_obj; }; |
TrkHough *GetTrkHough() { return trkh_obj; }; |
546 |
CaloLevel1 *GetCaloLevel1() { return calo1_obj;}; |
CaloLevel1 *GetCaloLevel1() { return calo1_obj;}; |
547 |
CaloLevel2 *GetCaloLevel2() { return calo2_obj;}; |
CaloLevel2 *GetCaloLevel2() { return calo2_obj;}; |
548 |
ToFLevel2 *GetToFLevel2() { return tof_obj; }; |
ToFLevel2 *GetToFLevel2() { return tof2_obj; }; |
549 |
TrigLevel2 *GetTrigLevel2() { return trig_obj; }; |
TrigLevel2 *GetTrigLevel2() { return trig_obj; }; |
550 |
S4Level2 *GetS4Level2() { return s4_obj; }; |
S4Level2 *GetS4Level2() { return s4_obj; }; |
551 |
NDLevel2 *GetNDLevel2() { return nd_obj; }; |
NDLevel2 *GetNDLevel2() { return nd_obj; }; |
552 |
AcLevel2 *GetAcLevel2() { return ac_obj; }; |
AcLevel2 *GetAcLevel2() { return ac_obj; }; |
553 |
OrbitalInfo *GetOrbitalInfo(){ return orb_obj; }; |
OrbitalInfo *GetOrbitalInfo(){ return orb2_obj; }; |
554 |
GL_RUN *GetRunInfo() { return run_obj; }; |
GL_RUN *GetRunInfo() { return run_obj; }; |
555 |
SoftInfo *GetSoftInfo() { return soft_obj; }; // Emiliano |
SoftInfo *GetSoftInfo() { return soft_obj; }; // Emiliano |
556 |
GPamela *GetGPamela() { return gp_obj; }; |
GPamela *GetGPamela() { return gp_obj; }; |
576 |
void SortTracks(); //assign value to variable sorted_tracks |
void SortTracks(); //assign value to variable sorted_tracks |
577 |
// TRefArray* GetTracks(); //return sorted_tracks |
// TRefArray* GetTracks(); //return sorted_tracks |
578 |
TClonesArray* GetTracks(); //return sorted_tracks |
TClonesArray* GetTracks(); //return sorted_tracks |
579 |
PamTrack* GetTrack(int); |
PamTrack* GetTrackOld(int); |
580 |
PamTrack* GetTrackImage(int); |
PamTrack* GetTrackImageOld(int); |
581 |
void SetSortingMethod(TString how); |
PamTrack* GetTrack(int i){ return GetTrackOld(i); }; |
582 |
|
PamTrack* GetTrackImage(int i){ return GetTrackImageOld(i); }; |
583 |
|
void SetSortingMethod(TString how); |
584 |
TString GetSortingMethod(){return howtosort;}; |
TString GetSortingMethod(){return howtosort;}; |
585 |
void SetNucleiSortingThreshold(Float_t nucleithr){ sortthr = nucleithr; return;}; |
void SetNucleiSortingThreshold(Float_t nucleithr){ sortthr = nucleithr; return;}; |
586 |
Float_t GetNucleiSortingThreshold(){ return sortthr;}; |
Float_t GetNucleiSortingThreshold(){ return sortthr;}; |
587 |
|
|
588 |
|
|
589 |
|
|
590 |
|
|
591 |
|
// ================================= |
592 |
|
// methods to handle new tracking algorythms |
593 |
|
// ================================= |
594 |
|
/* Int_t GetTrackingAlgorythmFlag(){return extAlgFlag;}; */ |
595 |
|
/* void SetTrackingAlgorythm(const char * alg); */ |
596 |
|
/* const char* GetTrackingAlgorythm(); */ |
597 |
|
|
598 |
|
Int_t GetNTracks(const char*); |
599 |
|
PamTrack* GetTrack(int,const char*); |
600 |
|
PamTrack* GetTrackImage(int, const char*); |
601 |
|
|
602 |
|
|
603 |
|
/* Int_t GetNTracks(){return GetNTracks(trkAlg); }; */ |
604 |
|
/* PamTrack* GetTrack(int i) { return GetTrack(i,trkAlg); }; */ |
605 |
|
/* PamTrack* GetTrackImage(int i){ return GetTrackImage(i,trkAlg); }; */ |
606 |
|
|
607 |
|
void SortTracksNew(); //assign value to variable sorted_tracks |
608 |
|
|
609 |
|
|
610 |
// ================================= |
// ================================= |
611 |
// other methods |
// other methods |
612 |
// ================================= |
// ================================= |
639 |
|
|
640 |
Bool_t IsRUN(){return RUN;}; |
Bool_t IsRUN(){return RUN;}; |
641 |
|
|
642 |
|
Bool_t IsEXT(){return EXT;}; |
643 |
|
Bool_t IsNUC(){return NUC;}; |
644 |
|
|
645 |
Bool_t IsGood(Bool_t strict=true); |
Bool_t IsGood(Bool_t strict=true); |
646 |
|
|
647 |
Int_t IsSELLI(){return SELLI;}; //trees of selected events (there is a selection list) |
Int_t IsSELLI(){return SELLI;}; //trees of selected events (there is a selection list) |
653 |
|
|
654 |
void SetDebug(Bool_t set){ DBG=set; TrkParams::SetVerboseMode(); }; |
void SetDebug(Bool_t set){ DBG=set; TrkParams::SetVerboseMode(); }; |
655 |
|
|
656 |
|
|
657 |
ClassDef(PamLevel2,2); |
ClassDef(PamLevel2,3); |
658 |
}; |
}; |
659 |
|
|
660 |
//=============================================================================================== |
//=============================================================================================== |