modified: Analyzer.C

This commit is contained in:
vs19g 2024-08-26 10:34:13 -04:00
parent 4ba9c73b98
commit f0a393abe2

View File

@ -272,52 +272,55 @@ Bool_t Analyzer::Process(Long64_t entry){
std::unordered_set<int> excludeSX3 = {34, 35, 36, 37, 61, 62, 67, 73, 74, 75, 76, 77, 78, 79, 80, 93, 97, 100, 103, 108, 109, 110, 111, 112}; std::unordered_set<int> excludeSX3 = {34, 35, 36, 37, 61, 62, 67, 73, 74, 75, 76, 77, 78, 79, 80, 93, 97, 100, 103, 108, 109, 110, 111, 112};
std::unordered_set<int> excludeQQQ = {0, 17, 109, 110, 111, 112, 113, 119, 127, 128}; std::unordered_set<int> excludeQQQ = {0, 17, 109, 110, 111, 112, 113, 119, 127, 128};
for (int i = 0; i < pc.multi; i++) { for( int i = 0; i < pc.multi; i ++){
if (pc.e[i] > 20) { // Reduced threshold for debugging if(pc.e[i]>50){
// hpcIndexVE->Fill( pc.index[i], pc.e[i] );
// for( int j = i+1; j < pc.multi; j++){
// hpcCoin->Fill( pc.index[i], pc.index[j]);
// }
for (int j = 0; j < sx3.multi; j++) { for (int j=0;j<sx3.multi;j++){
if (excludeSX3.find(sx3.index[j]) == excludeSX3.end()) { if(excludeSX3.find(sx3.index[j]) == excludeSX3.end()){
hpcIndexVE->Fill(pc.index[i], pc.e[i]); hpcIndexVE->Fill( pc.index[i], pc.e[i] );
for( int j = i+1; j < pc.multi; j++){
if (pc.e[i] > 20) { hpcCoin->Fill( pc.index[i], pc.index[j]);
if (pc.index[i] < 24) {
anodeHits.push_back(std::make_pair(pc.index[i], pc.e[i]));
} else if (pc.index[i] >= 24) {
cathodeHits.push_back(std::make_pair(pc.index[i], pc.e[i]));
} }
} if(pc.e[i]>100){
if (pc.index[i] < 24 ){
for (int k = i + 1; k < pc.multi; k++) { anodeHits.push_back(std::pair<int, double>(pc.index[i], pc.e[i]));
hpcCoin->Fill(pc.index[i], pc.index[k]); } else if (pc.index[i] >= 24){
cathodeHits.push_back(std::pair<int, double>(pc.index[i], pc.e[i]));
} }
} }
} }
}
// hpcIndexVE->Fill( pc.index[i], pc.e[i] );
if (!anodeHits.empty() && !cathodeHits.empty()) {
float aESum = 0; float aESum = 0;
float cESum = 0; if (anodeHits.size()>=1 && cathodeHits.size() >= 1 && pc.e[i]>100){
for (const auto& anode : anodeHits) { for (const auto& anode : anodeHits) {
aESum += anode.second; float cESum = 0;
hAnodeHits->Fill(anode.first, anode.second); // for(int l=0; l<sx3.multi; l++){
} // if (sx3.index[l]==80){
int aID = anode.first;
float aE = anode.second;
aESum += aE;
for (const auto& cathode : cathodeHits) { for (const auto& cathode : cathodeHits) {
cESum += cathode.second; int cID = cathode.first;
float cE = cathode.second;
cESum += cE;
} }
// Debugging output hanVScatsum->Fill(aESum,cESum);
printf("Filling histogram: aESum = %f, cESum = %f\n", aESum, cESum); hAnodeHits->Fill(aID, aE);
// }
hanVScatsum->Fill(aESum, cESum); // }
}
}
} }
anodeHits.clear();
cathodeHits.clear();
} }
}
// hanVScatsum->Fill(aE,cE); // hanVScatsum->Fill(aE,cE);