modified: Analyzer.C
implementation of function to fgiure out the cqreelated cathodes in events
This commit is contained in:
parent
56a6389b4f
commit
02213caaee
104
Analyzer.C
104
Analyzer.C
|
@ -84,13 +84,13 @@ void Analyzer::Begin(TTree * /*tree*/)
|
|||
|
||||
hZProj = new TH1F("hZProj", "Z Projection", 200, -600, 600);
|
||||
|
||||
hanVScatsum = new TH2F("hanVScatsum", "Anode vs Cathode Sum; Anode E; Cathode E", 400, 0, 10000, 400, 0, 16000);
|
||||
hanVScatsum = new TH2F("hanVScatsum", "Anode vs Cathode Sum; Anode E; Cathode E", 400, 0, 16000, 400, 0, 20000);
|
||||
hAnodeMultiplicity = new TH1F("hAnodeMultiplicity", "Number of Anodes/Event", 40, 0, 40);
|
||||
for (int i = 0; i < 24; i++)
|
||||
{
|
||||
TString histName = Form("hAnodeVsCathode_%d", i);
|
||||
TString histTitle = Form("Anode %d vs Cathode Sum; Anode E; Cathode Sum E", i);
|
||||
hanVScatsum_a[i] = new TH2F(histName, histTitle, 400, 0, 10000, 400, 0, 16000);
|
||||
hanVScatsum_a[i] = new TH2F(histName, histTitle, 400, 0, 16000, 400, 0, 20000);
|
||||
}
|
||||
for (int i = 0; i < 48; i++)
|
||||
{
|
||||
|
@ -432,23 +432,12 @@ Bool_t Analyzer::Process(Long64_t entry)
|
|||
|
||||
std::vector<std::pair<int, double>> anodeHits = {};
|
||||
std::vector<std::pair<int, double>> cathodeHits = {};
|
||||
std::vector<std::pair<int, double>> corrcatMax = {};
|
||||
std::vector<std::pair<int, double>> corrcatnextMax = {};
|
||||
int aID = 0;
|
||||
int cID = 0;
|
||||
float aE = 0;
|
||||
float cE = 0;
|
||||
|
||||
// Define the excluded SX3 and QQQ channels
|
||||
// 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};
|
||||
// inCuth=false;
|
||||
// inCutl=false;
|
||||
// inPCCut=false;
|
||||
for (int i = 0; i < pc.multi; i++)
|
||||
{
|
||||
|
||||
if (pc.e[i] > 50 && pc.multi < 7)
|
||||
{
|
||||
|
||||
float aESum = 0;
|
||||
float cESum = 0;
|
||||
float aEMax = 0;
|
||||
|
@ -460,6 +449,16 @@ Bool_t Analyzer::Process(Long64_t entry)
|
|||
int aIDnextMax = 0;
|
||||
int cIDnextMax = 0;
|
||||
|
||||
// Define the excluded SX3 and QQQ channels
|
||||
// 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};
|
||||
// inCuth=false;
|
||||
// inCutl=false;
|
||||
// inPCCut=false;
|
||||
for (int i = 0; i < pc.multi; i++)
|
||||
{
|
||||
if (pc.e[i] > 50 && pc.multi < 7)
|
||||
{
|
||||
// creating a vector of pairs of anode and cathode hits that is sorted in order of decreasing energy
|
||||
if (pc.index[i] < 24)
|
||||
{
|
||||
|
@ -524,7 +523,22 @@ Bool_t Analyzer::Process(Long64_t entry)
|
|||
}
|
||||
|
||||
cESum += cE;
|
||||
for (int j = 0; j < 5; j++)
|
||||
{
|
||||
if ((aIDMax + 24 + j) % 24 == cathode.first)
|
||||
{
|
||||
corrcatMax.push_back(std::pair<int, double>(cathode.first, cathode.second));
|
||||
}
|
||||
if((aIDnextMax + 24 + j) % 24 == cathode.first)
|
||||
{
|
||||
corrcatnextMax.push_back(std::pair<int, double>(cathode.first, cathode.second));
|
||||
}
|
||||
}
|
||||
// for(int j=0;j<24;j++){
|
||||
// if(corrcatMax[j]==corrcatnextMax[j])
|
||||
// std::cout << "Common Cathode" << j;
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
// inCuth = false;
|
||||
|
@ -575,66 +589,6 @@ Bool_t Analyzer::Process(Long64_t entry)
|
|||
}
|
||||
}
|
||||
|
||||
if (E.size() >= 3)
|
||||
{
|
||||
|
||||
int aID = 0;
|
||||
int cID = 0;
|
||||
|
||||
float aE = 0;
|
||||
float cE = 0;
|
||||
// if( ID[0].first < 1 ) {
|
||||
// aID = pc.ch[ID[0].second];
|
||||
// cID = pc.ch[ID[1].second];
|
||||
// }else{
|
||||
// cID = pc.ch[ID[0].second];
|
||||
// aID = pc.ch[ID[1].second];
|
||||
// }
|
||||
// printf("anode= %d, cathode = %d\n", aID, cID);
|
||||
|
||||
for (int k = 0; k < qqq.multi; k++)
|
||||
{
|
||||
if (qqq.index[k] == 75 && pc.index[k] == 2 && pc.e[k] > 100)
|
||||
{
|
||||
|
||||
int multi_an = 0;
|
||||
for (int l = 0; l < E.size(); l++)
|
||||
{
|
||||
if (E[l].first < 24)
|
||||
{
|
||||
multi_an++;
|
||||
}
|
||||
}
|
||||
|
||||
if (multi_an >= 1)
|
||||
{
|
||||
for (int l = 0; l < E.size(); l++)
|
||||
{
|
||||
if (E[l].first < 24 && E[l].first != 19 && E[l].first != 12)
|
||||
{
|
||||
aE = E[l].second;
|
||||
}
|
||||
else if (E[l].first > 24)
|
||||
{
|
||||
cE = E[l].second;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
hanVScatsum->Fill(aE, cE);
|
||||
|
||||
if (ID[0].first < 1)
|
||||
{
|
||||
aID = pc.ch[ID[0].second];
|
||||
cID = pc.ch[ID[1].second];
|
||||
}
|
||||
else
|
||||
{
|
||||
cID = pc.ch[ID[0].second];
|
||||
aID = pc.ch[ID[1].second];
|
||||
}
|
||||
|
||||
if (HitNonZero)
|
||||
{
|
||||
pw_contr.CalTrack(hitPos, aID, cID);
|
||||
|
|
|
@ -30,4 +30,4 @@ if [ $option -eq 0 ]; then
|
|||
./Mapper ${rootFolder}/*${runID}*${timeWindow}.root
|
||||
fi
|
||||
|
||||
root "processRun.C(\"${rootFolder}/PulserRun_${runID}_mapped.root\")"
|
||||
root "processRun.C(\"${rootFolder}/ProtonRun_${runID}_mapped.root\")"
|
||||
|
|
Loading…
Reference in New Issue
Block a user