Skip to content
Snippets Groups Projects
Commit dd21da98 authored by adrien-matta's avatar adrien-matta
Browse files

Merge branch 'NPTool.dev.prerelease' of https://github.com/adrien-matta/nptool...

Merge branch 'NPTool.dev.prerelease' of https://github.com/adrien-matta/nptool into NPTool.dev.prerelease
parents 1d8b5ce6 846aa120
No related branches found
No related tags found
No related merge requests found
...@@ -67,10 +67,8 @@ void TExogamPhysics::PreTreat() ...@@ -67,10 +67,8 @@ void TExogamPhysics::PreTreat()
{ {
ClearPreTreatedData(); ClearPreTreatedData();
//ECC
//E //E
for(unsigned int i = 0 ; i < EventData -> GetECCEMult(); i++) { for(unsigned int i = 0 ; i < EventData -> GetECCEMult(); i++) {
UShort_t cristal_E = 10000 ; UShort_t cristal_T = 2000; UShort_t cristal_E = 10000 ; UShort_t cristal_T = 2000;
//if(IsValidChannel) //if(IsValidChannel)
...@@ -84,12 +82,14 @@ void TExogamPhysics::PreTreat() ...@@ -84,12 +82,14 @@ void TExogamPhysics::PreTreat()
if(cristal_E > Threshold_ECC) if(cristal_E > Threshold_ECC)
{ {
if(EventData -> GetECCTMult() !=0)
{ PreTreatedData->SetECCEClover ( clover ) ;
for(unsigned int k = 0; k < EventData -> GetECCTMult(); k++) PreTreatedData->SetECCECristal( cristal ) ;
{ PreTreatedData->SetECCEEnergy ( cristal_E ) ;
if(clover == EventData -> GetECCTClover(k) && cristal == EventData -> GetECCTCristal(k))
{ bool checkT = false;
for(unsigned int k = 0; k < EventData -> GetECCTMult(); k++){
if(clover == EventData -> GetECCTClover(k) && cristal == EventData -> GetECCTCristal(k)){
// cout << EventData -> GetECCTTime(k) << endl; // cout << EventData -> GetECCTTime(k) << endl;
if(EventData -> GetECCTTime(k) < 16383) cristal_T = CalibrationManager::getInstance()-> ApplyCalibration("EXOGAM/Cl"+itoa(clover)+"_Cr"+itoa(cristal)+"_T", EventData -> GetECCTTime(k)); if(EventData -> GetECCTTime(k) < 16383) cristal_T = CalibrationManager::getInstance()-> ApplyCalibration("EXOGAM/Cl"+itoa(clover)+"_Cr"+itoa(cristal)+"_T", EventData -> GetECCTTime(k));
...@@ -97,35 +97,24 @@ void TExogamPhysics::PreTreat() ...@@ -97,35 +97,24 @@ void TExogamPhysics::PreTreat()
//if(cristal_T >5000 && cristal_T !=25000 ) cout << "PreTreat " << cristal_T << " " << EventData -> GetECCTTime(k) << " " << clover << " " << cristal << " " << EventData->GetECCTMult() << endl; //if(cristal_T >5000 && cristal_T !=25000 ) cout << "PreTreat " << cristal_T << " " << EventData -> GetECCTTime(k) << " " << clover << " " << cristal << " " << EventData->GetECCTMult() << endl;
PreTreatedData->SetECCEClover ( EventData->GetECCEClover(i) ) ; checkT=true;
PreTreatedData->SetECCECristal( EventData->GetECCECristal(i) ) ; PreTreatedData->SetECCTClover (clover ) ;
PreTreatedData->SetECCEEnergy ( cristal_E ) ; PreTreatedData->SetECCTCristal( cristal ) ;
PreTreatedData->SetECCTClover ( EventData->GetECCEClover(i) ) ;
PreTreatedData->SetECCTCristal( EventData->GetECCECristal(i) ) ;
PreTreatedData->SetECCTTime ( cristal_T ) ; PreTreatedData->SetECCTTime ( cristal_T ) ;
ECC_Multiplicity ++; ECC_Multiplicity ++;
GOCCE_Multiplicity++; GOCCE_Multiplicity++;
} }
else { }
} }
}
else // case of calibration with ECCTMult = 0 if(!checkT) {
{ PreTreatedData->SetECCTClover (clover ) ;
cristal_T = 3000; PreTreatedData->SetECCTCristal( cristal ) ;
//cout << cristal_E << endl; PreTreatedData->SetECCTTime ( -1000 ) ;
}
PreTreatedData->SetECCEClover ( EventData->GetECCEClover(i) ) ;
PreTreatedData->SetECCECristal( EventData->GetECCECristal(i) ) ;
PreTreatedData->SetECCEEnergy ( cristal_E ) ;
PreTreatedData->SetECCTClover ( EventData->GetECCEClover(i) ) ;
PreTreatedData->SetECCTCristal( EventData->GetECCECristal(i) ) ;
PreTreatedData->SetECCTTime ( cristal_T ) ;
// if(cristal_T > 5000 && cristal_T !=30000) cout << "PreTreat (default = 30000) " << cristal_T << " " << clover << " " << cristal << endl;
}
} }
} }
} }
...@@ -174,8 +163,6 @@ void TExogamPhysics::PreTreat() ...@@ -174,8 +163,6 @@ void TExogamPhysics::PreTreat()
void TExogamPhysics::BuildPhysicalEvent() void TExogamPhysics::BuildPhysicalEvent()
{ {
//cout << "Exogam Build ?" << endl;
PreTreat(); PreTreat();
if(PreTreatedData -> GetECCEMult() != PreTreatedData -> GetECCTMult()) cout << PreTreatedData -> GetECCEMult() << " " << PreTreatedData -> GetECCTMult() << endl; if(PreTreatedData -> GetECCEMult() != PreTreatedData -> GetECCTMult()) cout << PreTreatedData -> GetECCEMult() << " " << PreTreatedData -> GetECCTMult() << endl;
...@@ -580,7 +567,8 @@ void TExogamPhysics::AddClover(string AngleFile) ...@@ -580,7 +567,8 @@ void TExogamPhysics::AddClover(string AngleFile)
Angles.push_back(angle); // Theta (k = 0) Phi (k = 1) Angles.push_back(angle); // Theta (k = 0) Phi (k = 1)
//cout << angle << endl; //cout << angle << endl;
// cout << NumberOfClover << " " << Angles[0] << endl; if(Angles.size()==2)
cout << "Clover " << NumberOfClover << ": Theta=" << Angles[0] << " Phi=" << Angles[1]<< endl;
} }
...@@ -624,7 +612,7 @@ void TExogamPhysics::AddParameterToCalibrationManager() ...@@ -624,7 +612,7 @@ void TExogamPhysics::AddParameterToCalibrationManager()
// Activated associated Branches and link it to the private member DetectorData address // Activated associated Branches and link it to the private member DetectorData address
// In this method mother Branches (Detector) AND daughter leaf (fDetector_parameter) have to be activated // In this method mother Branches (Detector) AND daughter leaf (fDetector_parameter) have to be activated
void TExogamPhysics::InitializeRootInput() void TExogamPhysics::InitializeRootInputRaw()
{ {
TChain* inputChain = RootInput::getInstance()->GetChain() ; TChain* inputChain = RootInput::getInstance()->GetChain() ;
inputChain->SetBranchStatus( "EXOGAM" , true ) ; inputChain->SetBranchStatus( "EXOGAM" , true ) ;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment