15.9.2011 Kamil Sedlak
1) Bug removed from the simulation of optical photons with
the option "APDcellsEffectRequested" -- namely, when any
simulated photon hit a given APD cell, the cell became "blind"
to any other photon, irrespective of the arrival time of the
next photon. However, we need that if the "second" photon
(simulated at later phase) enters the APD cell before the
"first" one, that the time of photon arrival changes to the
earlierst photon.
2) A new keyword "sampleID ..." (defining which volume is the
sample volume) was added to the musrSimAna. The manual
was updated accordingly.
This commit is contained in:
@@ -474,6 +474,23 @@ void musrAnalysis::ReadInInputParameters(char* charV1190FileName) {
|
||||
nscan = sscanf(pch,"%d",&N1);
|
||||
} while (nscan==1);
|
||||
}
|
||||
else if (strcmp(tmpString0,"sampleID")==0) {
|
||||
int nscan; int N1; char NAME[100];
|
||||
char *pch = line + strlen("sampleID");
|
||||
do {
|
||||
nscan = sscanf(pch,"%d",&N1);
|
||||
SampleDetIDList.push_back(N1);
|
||||
nscan = sscanf(pch,"%s",NAME);
|
||||
char* pch2 = strstr(pch ,NAME)+strlen(NAME);
|
||||
pch=pch2;
|
||||
nscan = sscanf(pch,"%d",&N1);
|
||||
} while (nscan==1);
|
||||
std::cout<<"SampleID :";
|
||||
for (std::list <Int_t>::const_iterator it=SampleDetIDList.begin(); it!=SampleDetIDList.end(); ++it) {
|
||||
std::cout<<" "<< *it;
|
||||
}
|
||||
std::cout<<std::endl;
|
||||
}
|
||||
else if (strcmp(tmpString0,"setSpecialAnticoincidenceTimeWindow")==0) {
|
||||
int channelNumber;
|
||||
double min, max;
|
||||
@@ -823,10 +840,12 @@ void musrAnalysis::SaveHistograms(char* runChar, char* v1190FileName) {
|
||||
|
||||
Long64_t numberOfMuonCandidates = mCounter->GetNumberOfMuonCandidates();
|
||||
Long64_t numberOfMuonCandidatesAfterVK = mCounter->GetNumberOfMuonCandidatesAfterVK();
|
||||
Long64_t numberOfMuonCandidatesAfterVKandDoubleHitRemoval = mCounter->GetNumberOfMuonCandidatesAfterVKandDoubleHitRemoval();
|
||||
Double_t durationOfExperiment = (numberOfRewinds*rewindTimeBins*tdcresolution+currentTime)/1000000;
|
||||
hInfo->Fill(5,(Double_t) numberOfMuonCandidates); // number of "triggers"
|
||||
hInfo->Fill(4,(Double_t) numberOfMuonCandidatesAfterVK); // number of "triggers"
|
||||
hInfo->Fill(3,durationOfExperiment);
|
||||
hInfo->Fill(8,(Double_t) numberOfMuonCandidatesAfterVKandDoubleHitRemoval);
|
||||
//==============================
|
||||
// Write out the histograms
|
||||
std::cout<<"musrAnalysis::SaveHistograms()"<<std::endl;
|
||||
@@ -1086,7 +1105,9 @@ void musrAnalysis::FillHistograms(Int_t iiiEntry) {
|
||||
|
||||
// CALCULATE CONDITIONS
|
||||
alwaysTrue = true;
|
||||
muonDecayedInSample_gen = muDecayDetID==201;
|
||||
// Find whether the muon decayed in the sample; the sample may consist of more than just one volume. The ID
|
||||
// of the sample volume (or volumes) is defined in the *.v1190 file after the keyword "sampleID":
|
||||
muonDecayedInSample_gen = (find(SampleDetIDList.begin(), SampleDetIDList.end(), muDecayDetID)) != SampleDetIDList.end() ;
|
||||
muonTriggered_gen = muM0Time > -1000;
|
||||
muonTriggered_det = mCounterHitExistsForThisEventID;
|
||||
positronHit_det = pCounterHitExistsForThisEventID;
|
||||
|
||||
@@ -409,6 +409,7 @@ private:
|
||||
std::list <Int_t> D_posCounterList;
|
||||
std::list <Int_t> L_posCounterList;
|
||||
std::list <Int_t> R_posCounterList;
|
||||
std::list <Int_t> SampleDetIDList;
|
||||
// std::list <Int_t>::iterator posCounterList_Iterator;
|
||||
};
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ musrCounter::musrCounter(int CHANNEL_NR, char CHANNEL_NAME[200], char CHANNEL_TY
|
||||
doubleHitN=0;
|
||||
numberOfMuonCandidates=0;
|
||||
numberOfMuonCandidatesAfterVK=0;
|
||||
numberOfMuonCandidatesAfterVKandDoubleHitRemoval=0;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -194,6 +195,8 @@ Bool_t musrCounter::GetNextGoodMuon(Int_t evtID, Long64_t timeBinMin, Long64_t&
|
||||
goto endOfThisHit;
|
||||
}
|
||||
|
||||
numberOfMuonCandidatesAfterVKandDoubleHitRemoval++;
|
||||
|
||||
kEntry = (it->second)->eventEntry;
|
||||
idet = (it->second)->det_i;
|
||||
idetID = (it->second)->det_id;
|
||||
|
||||
@@ -64,7 +64,7 @@ class musrCounter {
|
||||
void myPrintThisCounter(Int_t evtID, Int_t detail=2);
|
||||
Long64_t GetNumberOfMuonCandidates(){return numberOfMuonCandidates;}
|
||||
Long64_t GetNumberOfMuonCandidatesAfterVK(){return numberOfMuonCandidatesAfterVK;}
|
||||
|
||||
Long64_t GetNumberOfMuonCandidatesAfterVKandDoubleHitRemoval(){return numberOfMuonCandidatesAfterVKandDoubleHitRemoval;}
|
||||
|
||||
private:
|
||||
// static musrCounter* pointerToAnalysis;
|
||||
@@ -91,6 +91,7 @@ class musrCounter {
|
||||
Int_t doubleHitN;
|
||||
Long64_t numberOfMuonCandidates;
|
||||
Long64_t numberOfMuonCandidatesAfterVK;
|
||||
Long64_t numberOfMuonCandidatesAfterVKandDoubleHitRemoval;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user