Commit 4694fd3e authored by Chad Lantz's avatar Chad Lantz
Browse files

Added Scintillators and ScintillatorsAnalysis2021

parent 607bdf23
......@@ -25,6 +25,7 @@
#include "ZDC.h"
#include "EM.h"
#include "RPD.h"
#include "Scintillators.h"
#include <TChain.h>
......@@ -46,7 +47,7 @@ class DataReader2021{
void AddPreAnalysis ( Analysis* );
void AddDetectorAnalysis ( Analysis* );
void SelectDetectorForAnalysis ( bool _useUEM, bool _usePFRPD, bool _useTRPD, bool _useZDCs );
void SelectDetectorForAnalysis ( bool _useUEM, bool _usePFRPD, bool _useTRPD, bool _useZDCs, bool _useScint );
void ReadListOfFiles( std::string listname );
......@@ -130,12 +131,13 @@ class DataReader2021{
int m_event_old = 0;
//Booleans for analysis selection
bool m_useZDCs, m_usePFRPD, m_useTRPD, m_useUEM;
bool m_useZDCs, m_usePFRPD, m_useTRPD, m_useUEM, m_useScint;
//Pointers for each detector, to be assigned using booleans.
ZDC *zdc1, *zdc2, *zdc3;
RPD *pfrpd, *trpd;
EM *uem;
Scintillators *scint;
//Boolean to enable plot labelling
bool m_useLabel = false;
......
......@@ -132,12 +132,13 @@ void DataReader2021::AddDetectorAnalysis( Analysis* det_ana ){
* @param _useTRPD set it true to look to the TRPD
* @param _useUEM set it true to look to the upgraded EM module
*/
void DataReader2021::SelectDetectorForAnalysis(bool _useUEM, bool _usePFRPD, bool _useTRPD, bool _useZDCs){
void DataReader2021::SelectDetectorForAnalysis(bool _useUEM, bool _usePFRPD, bool _useTRPD, bool _useZDCs, bool _useScint){
m_useUEM = _useUEM;
m_useZDCs = _useZDCs;
m_usePFRPD = _usePFRPD;
m_useTRPD = _useTRPD;
m_useScint = _useScint;
std::string enableDet;
enableDet = "Detectors Selected for Analysis: ";
......@@ -146,6 +147,7 @@ void DataReader2021::SelectDetectorForAnalysis(bool _useUEM, bool _usePFRPD, boo
if (m_usePFRPD) enableDet += " PanFlute-RPD " ;
if (m_useTRPD) enableDet += " Tile-RPD " ;
if (m_useZDCs) enableDet += " HAD1 HAD2 HAD3 " ;
if (m_useScint) enableDet += " Trigger " ;
enableDet += ";";
......@@ -272,6 +274,7 @@ void DataReader2021::LoadConfigurationFile(std::string _inFile ){
if (m_usePFRPD) pfrpd = new RPD(channelEntries,m_runNumber, "PFRPD");
if (m_useTRPD) trpd = new RPD(channelEntries,m_runNumber, "TRPD");
if (m_useUEM) uem = new EM(channelEntries,m_runNumber, "UEM");
if (m_useScint) scint = new Scintillators(channelEntries,m_runNumber, "Trigger");
if (m_useZDCs) {
m_detectors.push_back(zdc1);
......@@ -281,6 +284,7 @@ void DataReader2021::LoadConfigurationFile(std::string _inFile ){
if (m_usePFRPD) m_detectors.push_back(pfrpd);
if (m_useTRPD) m_detectors.push_back(trpd);
if (m_useUEM) m_detectors.push_back(uem);
if (m_useScint) m_detectors.push_back(scint);
delete m_XMLparser; m_XMLparser = NULL;
return;
......@@ -517,6 +521,7 @@ void DataReader2021::Initialize(){
if(m_usePFRPD) pfrpd = static_cast< RPD* >( GetDetector("PFRPD") );
if(m_useTRPD) trpd = static_cast< RPD* >( GetDetector("TRPD") );
if(m_useUEM) uem = static_cast< EM* > ( GetDetector("UEM") );
if(m_useScint) scint = static_cast< Scintillators* > ( GetDetector("Trigger") );
//All the raw channels addresses set for read-out
for( uint detID = 0; detID < (int) m_detectors.size(); detID++ ){
m_detectors.at(detID)->SetBranches(m_tIn);
......
......@@ -10,6 +10,7 @@
#include "DataReader2021.h"
#include "ZDCAnalysis2021.h"
#include "RPDAnalysis2021.h"
#include "ScintillatorsAnalysis2021.h"
#include "EMAnalysis.h"
#include "WFAnalysis.h"
#include "EventTimer.h"
......@@ -130,7 +131,7 @@ int main(int argc, char *argv[]){
}
//ADD DETECTORS FOR WF ANALYSIS (PROCESSING OF RAW SIGNALS)
r->SelectDetectorForAnalysis(true,true,false,true); //(_useUEM, _usePFRPD, _useTRPD, _useZDCs)
r->SelectDetectorForAnalysis(true,true,false,true,true); //(_useUEM, _usePFRPD, _useTRPD, _useZDCs)
std::cout << std::endl << "============ LoadConfigurationFile ============" << std::endl << std::endl;
r->LoadConfigurationFile( config_file );
......@@ -140,6 +141,7 @@ int main(int argc, char *argv[]){
r->GetDetector("HAD2")->SetWFAthresholds( 5, 30 );
r->GetDetector("HAD3")->SetWFAthresholds( 5, 30 );
r->GetDetector("UEM")->SetWFAthresholds( 4, 25 );
r->GetDetector("Trigger")->SetWFAthresholds( 4, 25 );
r->GetDetector("PFRPD")->SetMedianFilter( 6 );
// r->GetDetector("TRPD")->SetMedianFilter( 4 );
......@@ -147,6 +149,7 @@ int main(int argc, char *argv[]){
r->GetDetector("HAD2")->SetMedianFilter( 4 );
r->GetDetector("HAD3")->SetMedianFilter( 4 );
r->GetDetector("UEM")->SetMedianFilter( 4 );
r->GetDetector("Trigger")->SetMedianFilter( 4 );
//Add pre analysis
r->AddPreAnalysis( new WFAnalysis() );
......@@ -155,6 +158,7 @@ int main(int argc, char *argv[]){
r->AddDetectorAnalysis( new ZDCAnalysis2021() );
r->AddDetectorAnalysis( new RPDAnalysis2021() );
r->AddDetectorAnalysis( new EMAnalysis() );
r->AddDetectorAnalysis( new ScintillatorsAnalysis2021() );
std::cout << std::endl << "============ LoadAlignmentFile ============" << std::endl << std::endl;
r->LoadAlignmentFile( alignment_file );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment